BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: {bb} BB-Central problem - no commands passed to the ssh command



Henrik -

I think there is a bug in bb-central.pl if you only have one host in the
bb-param file.

I'm not sure I can explain it very well, but here it goes:

At the beginning of reading through the <BBPARAM> file there are the
statements:

if ($host ne "") {                                
   if ($hold_host eq "") { $hold_host = $host; }

This is done so you don't try to write out your "last" host when you
reading the first host from the BBPARAM file.  In your case, both $host
and $hold_host now = "voodoo.hswn.dk".

At the bottom of the while loop you "save" all the information about the
current host... but only if it doesn't equal the last host.  In your
case, $host eq $host so this code is not executed:

         if ($hold_host ne $host) {
		<cut>
		 $hold_host = $host;
             $hold_nocpu = $nocpu;
             $hold_nodisk = $nodisk;
             $hold_noprocs = $noprocs;
		<cut>
	   }

After reading through the entire BBPARAM file you write out the "last"
host.

        # Write out info for final system

        print BBCENTRAL "\n";
        print BBCENTRAL "$BBHOME/bin/bbnet $hold_host:$port
>/dev/null\n";
        print BBCENTRAL "RC=\$?\n";
        print BBCENTRAL "if [ \$RC -eq 0 ]\n";
        print BBCENTRAL "then\n";
        print BBCENTRAL "       $ssh $hold_host \"";

Unfortunately since you only have one host in your file, the hold_host,
host_nocpu parameters never get set so they are blank.

So monitor a second system or change the code around.  Since I wanted
only to monitor one system, I changed the code... but I don't remember
if I changed it so it could do multiple systems or not.  And I'm just
assuming that a second system in the BBPARAM file will solve your
problem.

If you want to see my version, I would be happy to send it to you.

Barbara

---------------
Barbara Hale
CNF/Unix SysAdmin
Portland, OR




-----Original Message-----
From: owner-bb@bb4.com [mailto:owner-bb@bb4.com] On Behalf Of Henrik
Storner
Sent: Wednesday, March 09, 2005 2:26 PM
To: bb@bb4.com
Subject: {bb} BB-Central problem - no commands passed to the ssh command

I have a problem with BB-Central 1.5c - when I run the bb-central.pl
script it just hangs. After tearing out a bit of hair, I found out
that bb-central.pl generates bb-central.sh which should have the
commands needed to collect data from the remote system. However, it
seems that the commands never make it to the shell-script. Here's my
bb-param file:

$ grep -v "^#" bb-param
voodoo.hswn.dk  cpu     linux   250     500

and the resulting bb-central.sh looks like this:

#!/bin/sh

BBHOME=/usr/local/bb/bb
export BBHOME
[cut]
/usr/local/bb/bb/bin/bbnet voodoo.hswn.dk:22 >/dev/null
RC=$?
if [ $RC -eq 0 ]
then
        /usr/bin/ssh voodoo.hswn.dk "" >>
/usr/local/bb/bbc/ext/bb-central/tmp/bb-central.dat;
fi

The effect of running /usr/bin/ssh osiris.hswn.dk "" is a
login-session that just sits there doing nothing.

This is with BB 1.9e. Any idea what's causing this ?


Henrik
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index