Hi gents,

I've got a Mon configuration (mon-0-99-2.6 ) with ssh and some other agents  that work perfectly with Solaris 8 clients/server.
The problem has appeared when I've installed a new Solaris 9 box, I'm trying to get my mon server to check the ssh,
 but it always comes back with an error 65280.
The strange thing is that when I try to execute the same command within the shell, it returns a "0"

server         : ukbhu022p
client        : ukbhu032t

ukbhu022p:/usr/local/mon# su - mon -c "/usr/local/bin/ssh -l mon ukbhu032t /usr/bin/true" ; echo $?
0
ukbhu022p:/usr/local/mon#

The code for the agent is ..

foreach $host (@ARGV) {
    system("fping -q -r 3 -t 2000 $host 2>/dev/null");
    $status = $? / 256;
    next if $status;            # ignore hosts which are not pingable
    $errmsg = `su - mon -c "/usr/local/bin/ssh -l mon $host /usr/bin/true "`;
    chomp($errmsg);
    $rc = $?;
    if ($rc == 0) {
        next;
    } elsif ($rc == 0xff00) {
        $name=`id -a`;
        &alert("ssh command failed NAME: $name RC: $rc");
    } elsif ($rc > 0x80) {
        $rc >>= 8;
        &alert("exited with status $rc");
    } elsif ($rc & 0x80) {
        $rc &= ~0x80;
        &alert("exited with coredump from signal $rc");
    } else {
        &alert("exited with signal $rc");
    }
}

I added the "su" thing cos I wanted to elimate any env variables' problem... but it has exactly the same behaviour

Any help would be highly appreciated.

Thanks!

Best regards,

Kenneth Modrego
UNIX Systems Administrator
Europe & Africa Region
Toyota Financial Services (UK) PLC
Tel:  +44 (0)1737 365509
Fax: +44 (0)1737 365520
mailto:[EMAIL PROTECTED]

This correspondence is for the intended recipient only. It may contain confidential or legally privileged information or both. No confidentiality or privilege is waived or lost by any mistransmission or unauthorised alteration during transmission. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Toyota. This message has been checked for viruses but the recipient is strongly advised to rescan the message before opening any attachments or attached executable files.

_______________________________________________
mon mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to