[mrtg] Tracking size of one file
leen at webmind.nl
Wed Feb 19 11:39:50 MET 2003
He there again!
The MIB and SNMP is working fine at this stage, thanks for the help i got from this list.
However, im now trying to monitor the file size of the messages log on my redhat machine. (my PIX is sending its Informational (!) syslog to the linux syslogd, which is a LOT of data). Since id like to keep an eye on my disk space, i tried to make a small bash script that gives me the size of the file, and the free space on that partition.
I would expect one line going up, and one line going down.. but this aint the case, i get really weird graphs.
im pretty sure i have the right values, but it seems like they are not passed on to mrtg correctly.
Anyone here any ides one this??
the script :
SIZE=`du /var/log/messages* -c|grep total |cut -f1`
AVAIL=`df |grep 'hdb1' |cut -d' ' -f 19`
echo `uptime | cut -d"," -f1,2`
which gives an output of :
11:42am up 8 days, 1:29
Title[du]: Disk Usage
PageTop[du]: <h3>Disk Usage</h3>
YLegend[du]: Disk Usage
(the Maxbytes is skewed, since ive been trying to get some sense in my graphs)
Leen.smit at pronetsolutions.nl
Pro Net Solutions B.V.
Rigtersbleek Aalten 4
7521 RB Enschede
Tel.: 053 432 86 49
Fax: 053 432 86 94
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg