[mrtg] Re: Fw: Need help

tanmaya Anand tanmaya at techie.com
Sun May 18 07:25:36 MEST 2003


Hi 

Following is the soltuion i found some days back in this list for linux HDD graph:

create a file named "df-mrtg" in say /root folder and put the following contents:

#!/bin/sh
PATH=/bin:/usr/bin
part=$1df=`df $part | tail -1`

echo $df | awk '{print $4}' # available
echo $df | awk '{print $3}' # used
uptime | cut -d, -f 1 | awk '{print $3, $4}'
echo $df | awk '{print $1}'

give the above file appropriate permissions.

now use the following in your mrtg.cfg:

WorkDir: /usr/local/apache2/htdocs
Options[_]: nopercent,growright,nobanner,nolegend,noinfo,gauge
MaxBytes[_]: 125000000

Target[root_use]: `/root/df-mrtg /`
Options[root_use]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge
Title[root_use]: Disk usage for /
PageTop[root_use]: <h3>Disk usage /</h3>
YLegend[root_use]: 1k blocks
ShortLegend[root_use]: &nbsp;1k blocks
LegendI[root_use]: avail&nbsp;
LegendO[root_use]: used&nbsp;

Target[home_use]: `/root/df-mrtg /home`
Options[home_use]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge
Title[home_use]: Disk usage for /home
PageTop[home_use]: <h3>Disk usage /home</h3>
YLegend[home_use]: 1k blocks
ShortLegend[home_use]: &nbsp;1k blocks
LegendI[home_use]: avail&nbsp;
LegendO[home_use]: used&nbsp;

likewise you can create for your other partitions also.

Regards,
Tanmaya

----- Original Message -----
From: "Tomi" <nauman at nettechltd.com>
Date: Sat, 17 May 2003 18:12:16 +0500
To: <mrtg at list.ee.ethz.ch>
Subject: [mrtg] Fw: Need help

> ----- Original Message ----- 
> From: Tomi 
> To: mrtg at list.ee.ethz.ch 
> Sent: Saturday, May 17, 2003 5:42 PM
> Subject: Need help
> 
> 
> HI
> 
> Can you please tell me that i want to makr grpah of my linux server for check HDD spcae and memory utlization and Load average of server out put in mrtg.How is the way and what script i need/. Kindly tell me . I really greatful.
> 
> Thanks
> Tomi
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list