MRTG + PHP input
From: Alcedema (tim_at_nominis-dot-net.no-spam.invalid)
Date: 04/29/04
- Next message: tompasto: "Easy way to install php 4.3"
- Previous message: Geert-Jan van Leeuwen: ""<a href" in combination with php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Apr 2004 08:05:11 -0500
I have mrtg set up correctly and graphing many things.
I made a small php script which grepped ifconfig and echo'ed the
server's total in and out bytes.
The MRTG graph only displays 1 value and it only logs one value. The
initial line in the log shows that it got both values, but
doesn't log it any more. The max bytes is well over the input
bytes.
end of php script:
--------
echo bytes_in . "
echo bytes_out . "
--------
mrtg code:
--------
Target[bandwidth]: `lynx -source
www.a3-gaming.co.uk/cron/bandwidth.php`
Options[bandwidth]:growright,nopercent, noinfo,gauge,
nobanner
Maxbytes[bandwidth]:10000000000
kMG[bandwidth]:,k,M,G
Title[bandwidth]:Bandwidth exchanged on eth0
PageTop[bandwidth]:Bandwidth
exchanged on eth0
YLegend[bandwidth]:bytes
ShortLegend[bandwidth]:b
Legend1[bandwidth]:In
Legend2[bandwidth]:Out
LegendI[bandwidth]:Total in
LegendO[bandwidth]:Total out
WithPeak[bandwidth]: wmy
--------
Logged
values:
--------
1083242401 4260460112 808896483
1083242401 0 808896483 0
808896483
1083242101 0 808836903 0 808836903
1083242100 0 808836903 0
808836903
--------
(Using lynx for now as i get an error compiling the
CGI version of PHP
which i'll get round to fixing one day ;) byt
nonetheless i did
try it with CGI on another machine with exactly the same
result)
Anything wrong?
----------------------------------------
The
post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums
- Next message: tompasto: "Easy way to install php 4.3"
- Previous message: Geert-Jan van Leeuwen: ""<a href" in combination with php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|