[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netsaint-users
Subject:    re [netsaint] Netsaint_statd and large capacity disks
From:       Jason Garrabrant <jgarrabr () sockeye ! com>
Date:       2002-05-31 14:17:45
[Download RAW message or body]

Hi, I saw your posting to the netsaint-users group .... I didnt see an 
aswer, so here is an attempt....

> > (/^[\w\/\:\.\-\=]*\s*\d*\s*\d*\s*\d*\s*(\d*)\%\s*([\w\/\-]*)/)
> > {
                        $disklisting .= "(".$2.",".$1.")";

The above lines seperate the response of df, and pulls out the capacity 
as $1 and mountpt as $2
this is done by using the '()' in the match... so if you wanted to get 
the avail instead of the capacity I believe you could do the following....

(/^[\w\/\:\.\-\=]*\s*\d*\s*\d*\s*(\d*)\s*\d*\%\s*([\w\/\-]*)/)
                        {
                        $disklisting .= "(".$2.",".$1.")";
and to show all three:
(/^[\w\/\:\.\-\=]*\s*\d*\s*\d*\s*(\d*)\s*(\d*)\%\s*([\w\/\-]*)/)
                        {
                        $disklisting .= "(".$3.",".$1.",".$2.")";

* note that should return the right values... however I think you will have to change \
the check_disk on your server to now use this value instead of the percent....


hope that helps

-jay



--

Hi Folks

I am having a little problem with really big disks
If I check for 100% full the disk may well show percentage 100% full but
there could be free space
e.g
Filesystem            	kbytes    	used   		avail 	capacity
Mounted on
/dev/md/dsk/d50     	 4131384 	4063112   	26959   100%
/local/data/oracle

Shows Capacity as 100% full but there is still some capacity left
Now this disk is quit small some of my larger disk could have several Gig of
space left.
Any idea on how to get statd to return the availability , capacity and mount
point

My perl is not up to expressions like the snipit for netsaint_statd

        open(DFOUTPUT,"$commandlist{$os}{dfcommand} |") || die;
        $_ = <DFOUTPUT>;
        while($_ = <DFOUTPUT>)
                {
                if
(/^[\w\/\:\.\-\=]*\s*\d*\s*\d*\s*\d*\s*(\d*)\%\s*([\w\/\-]*)/)
                        {
                        $disklisting .= "(".$2.",".$1.")";
                        }

Then I might be able to change check_all_disks.pl to look at both capacity
and availability

P.S Version of netsaint_statd is 2.15

Thanks

Matt

Matthew Garrett
Unix System Support
Shell Information Technology International Limited
Loirston House, Wellington Road, Altens, Aberdeen AB12 3BH

Tel: +44 (0)1224 21 7515 Other Tel: Internal 639 7515
Email: Matt.M.Garrett@is.shell.com
Internet: http://www.shell.com


-- 
Jason Garrabrant
Network Operations Analyst
Sockeye Networks, Inc.



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Netsaint-users mailing list
Netsaint-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netsaint-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic