[rrd-users] Traffic port 27015
Mario Ohnewald
mario.ohnewald at gmx.de
Tue Mar 11 04:13:21 MET 2003
Hello!
I am trying to get a nice graph of the traffic which goes over port 27015.
This is a sligthly changes example from the tutorial.
I think my problem is that the start/end time is not inbetween the
time-window from the while loop.
But i am not sure.
### --- Script start
# create database (once)
rrdtool create test.rrd --start 920804400 DS:speed:COUNTER:600:U:U
RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:6:10
# Do loop, collect data
while [ "times" != "15" ]; do
#`date '+%s'` --> gets the time
#`iptables -L -v -n -x | grep 27025 | awk '{print $2}'` ---> traffic over
port 27015
#update database with current values
rrdtool update test.rrd `date '+%s'`:`iptables -L -v -n -x | grep 27025 |
awk '{print $2}'`
echo Zeit: `date '+%s'`
echo Traffic: `iptables -L -v -n -x | grep 27025 | awk '{print $2}'`
echo -----------------------
# draw graphic
rrdtool graph speed.gif --start 920804400 --end 920808000
DEF:myspeed=test.rrd:speed:AVERAGE LINE2:myspeed#FF0000
cp speed.gif public_html/
sleep 30
done
### --- Script ends
The OUTPUT (just a few lines):
----------------------
497x161
Zeit: 1047351219
Traffic: 215129356
-----------------------
497x161
Zeit: 1047351249
Traffic: 215161105
-----------------------
497x161
Zeit: 1047351279
Traffic: 215180766
-----------------------
497x161
Zeit: 1047351309
Traffic: 215196082
-----------------------
497x161
Zeit: 1047351339
Traffic: 215200413
-----------------------
497x161
Zeit: 1047351369
Traffic: 215204872
-----------------------
497x161
Zeit: 1047351399
Traffic: 215209637
-----------------------
497x161
Zeit: 1047351429
Traffic: 215213976
-----------------------
497x161
Zeit: 1047351459
Traffic: 215218739
-----------------------
497x161
Zeit: 1047351489
Traffic: 215223300
-----------------------
497x161
Zeit: 1047351520
Traffic: 215227962
-----------------------
497x161
Zeit: 1047351550
Traffic: 215232610
-----------------------
497x161
I hope you can help me here, what am i doing wrong?!
Cheers, Mario
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list