BB Unix Network Monitor - Message

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

Re: {bb} Solaris netstat monitoring script



In <OF73764434.D09E56AB-ON85256F9E.006CEEE7-85256F9E.006D55C8@CORE.VERIZON.COM> chris.ivey@verizon.com writes:

>I want to have a script that will look at the "netstat -s" output and 
>report on errors/drops/etc.

The only script I know of that reports on the netstat data is the
LARRD "bottom-feeder" that provides the input for the netstat graphs.

Do you want to add some additional graphs showing errors and drops, or
do you want to get alerted if they exceed some threshold ?

If it's the first, then you should look at modifying the LARRD
"netstat-larrd.pl" script, so it adds the data you want to track
to an RRD file; and next you'll want to modify the larrd-grapher.cgi
script to produce a graph with these data.

If it's the latter, then some sort of BB extension script would do
it. I guess you would need to store the previous value so you can see
how much these counters are rising, and then decide the status color
based on that. The raw counter value in itself is not particularly
interesting, it's the trend you want to look at.


>For instance, on my primary server (running Solaris 8) my netstat
>output looks like this:

>TCP     tcpRtoAlgorithm     =     4     tcpRtoMin           =   400
>        tcpRtoMax           = 60000     tcpMaxConn          =    -1
>        tcpActiveOpens      =872473     tcpPassiveOpens     =1326062

>I am pretty good with scripting and such, but I have become frustrated 
>trying to break up this output into one column (have tried cut, sed, and 
>awk)....  so now I come to the point of asking all the wonderful folks on 
>this list if anyone already has this and would be willing to share.  :o)

I'd probably try something like this - e.g. if you want to grab the
tcpMaxConn  value:

    L=`netstat -s | grep " tcpMaxConn "`
    set $L
    while [ $1 != "tcpMaxConn" ]; do shift; done
    TCPMAXCONN=$3


Regards,
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.


Home | Main Index | Thread Index