[mrtg] Data file not retaining data except for 1st line...
Thomas
tsanders at logicx.com
Tue Sep 10 23:00:55 MEST 2002
Hi all, I am having a problem collecting the number of processes running.
This is a snipt of what I was running on a RaQ4, it was working just fine
there, but now its on a generic linux box and no longer works.
my processes.sh file looks something like
=================================
INDATA=`cat /proc/loadavg | cut -d ' ' -f4 | cut -d '/' -f 2`
OUTDATA=`cat /proc/loadavg | cut -d ' ' -f4 | cut -d '/' -f 1`
echo $INDATA
echo $OUTDATA
echo `uptime | cut -d"," -f1,2`
echo processes
=================================
the output from the processes.sh script is
=================================
137
4
1:52pm up 24 days, 11:47
processes
=================================
The processes.log looks like
=================================
1031690522 148 3
1031690522 0 0 0 0
1031690403 0 0 0 0
1031690400 0 0 0 0
=================================
It seems that the 1st line does indeed reflect the current poll, but the
following lines don't.
and my mrtg.cfg looks like
=================================
Target[processes]: `/etc/mrtg/processes.sh`
Title[processes]: Processes
PageTop[processes]: <h3>Processes</h3>
YLegend[processes]: Processes
ShortLegend[processes]:
LegendI[processes]: Total
LegendO[processes]: Running
=================================
I have attempted to be 100% self sufficient in locating the bug(s) and I
have even been in an RTFM loop for several days (off and on).
I am sure its something stupid I am overlooking but any input would be most
appreciated.
Thanks!
-Thomas
--
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