BB Unix Network Monitor - Message

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

RE: {bb} LARRD and memory



On Wed, 2007-03-28 at 08:17 -0400, Calderon, Willy (NIH/NINDS) [C]
wrote:
> Thanks. I've taken your advice and gone with option B. I already get
> the memory (mem for Windows servers) button accumulate statistics.
> In bbdef-server.sh I've included the DATAMSG argument like so:
> 
> RUNOPTS="EMBEDHTML","DATAMSG"
> export RUNOPTS

There's no need to do this if you are using scripts like bb-memory-3.1.
They use the "status" message type to transmit data. In any case,
multiple options here should be separated by spaces and only quoted
at the ends, so that would look like:

RUNOPTS="EMBEDHTML DATAMSG"

> I've added the bb-memory package from Deadcat on my SuSE and Red Hat
> ES 4 servers and it works. I've added "memory" in larrd-config.pl like
> so:
> 
> @DATALIST=("la","disk","memory","bbnet","vmstat","netstat","procs",
> "users","up","WebApp")
> 
> I've placed memory-larrd.pl in the ext directory and it's been added
> to the bb-bbextab list.

There's no need to do that. Larrd will run the script "auto-magically"
because of the DATALIST definition.

> After restarting Big Brother, I've checked LARRDOUT and find these
> errors coming up:
> 
> /usr/local/larrd/memory-larrd.pl: ERROR creating /home/bbrother/bb/
> bbvar/rrd/donkeyhead.css.gov.real.rrd: you must define at least one
> Data Source
> 
> Any ideas?

Actually, I gave installing this a shot and it turns out there are a
few problems with the memory-larrd.pl script. It looks more like a
"work in progress" that the finished article. Here is what I did to
get it working.

1. The variable $log is defined in the wrong scope so that, when it is
   referenced in a subroutine, it's empty. I added a line "my $log;"
   at the start of the script (just after the "# real work begins here"
   comment) and removed "my" from the line "my $log = $host;".

2. The "data source" is defined as a scalar and then referenced as an
   array. To match the other scripts, I change the definition to be
   an array too, so that the line:

     $DS="DS:realmempct:GAUGE:600:0:U";

   becomes:

     my @ds = ("DS:realmempct:GAUGE:600:0:U",
              );

3. The format of the RRD files it creates are out of step with the way
   the others are defined. It might not be strictly necessary to change
   this, but I added the line "$host =~ s/\,/\./g;" after the comment
   line "### create REAL-RRD if not exist and update data" and changed
   the two RRD definition lines to read like:

     $RRD="$ENV{'BBRRDS'}/$host.memory,real.rrd";
     $RRD="$ENV{'BBRRDS'}/$host.memory,swap.rrd";

And now it works :)

When it comes to Windows machines, it appears there is another choice
to be made. You can either install the external executable that comes
with the package (which should provide the required data in a format
that the script can handle), or modify memory-larrd.pl so that it will
handle the default data returned by the standard client.

That said, I don't have any Windows clients to play with, so it's
a little difficult to debug.

Cheers, Phil.



--
In the force if Yoda's so strong, construct a sentence with words
in the proper order then why can't he?


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
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