PDA

Bekijk de volledige versie : Trouble with RRDTool and updated uClibc



yeager
03-10-2005, 11:48
I donīt need graph generated by rrdtool, i need only a simple webpage whit this:

................Today.......This week.......This month
wlan...........64MB...........564MB............235 4MB
pc1............47MB...........345MB............100 5MB
pc2............09MB...........123MB............054 7MB
pc3............08MB...........096MB............080 2MB

WlanMan
05-10-2005, 13:31
Modify the package on your own ?
Seems no one else is interrested in this at the moment.
For my own, i would like to see something like text stats inbuild to the web interface, but at the moment, no interrest to do it ;).

Greets

_Denis_
20-12-2006, 11:57
Hi,
I had some problems with rrdtool and updated uClibc. So what i am done.
1. Prepared my harddrive for extended packages.
2. Update ipkg as said on http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild
3. Using tutorial on http://wl500g.info/showpost.php?p=18494&postcount=1 install rrdtool
All step done without errors. But when rrtool.sh script try create rrd data file it`s freezed down. I figure out that rrdtool.sh stopped on `rrdtool create "${1}" etc.`.

Anyone can help me with it or recommend some alternative programms for statistics collection?

oleo
20-12-2006, 13:21
rrdtool is the only one giving me a trouble. I am looking for a ways to resolve this issue, but it looks like that isnan() function is constantly called in a loop.

I supose there is a bug in rrdtools or some building info or maybe uclibc problem.

I have native compiled libpng, libart_lgpl, freetype, zlib and rrdtool but produced the same resulting lock up.

Strangely
rrdtool create load.rrd DS:sysload:GAUGE:600:U:U RRA:AVERAGE:0.5:1:48
works, while
rrdtool create loadavg.rrd --step 60 DS:load1:GAUGE:120:0:U \
DS:load5:GAUGE:120:0:U DS:load15:GAUGE:120:0:U RRA:AVERAGE:0.5:1:2160
locks up

_Denis_
20-12-2006, 14:06
oleo, thanks for reply.

But when call rrdtool with different params, it create a file.

For example.

rrdtool create temperature.rrd --step 300 \
DS:temp:GAUGE:600:-273:5000 \
RRA:AVERAGE:0.5:1:1200 \
RRA:MIN:0.5:12:2400 \
RRA:MAX:0.5:12:2400 \
RRA:AVERAGE:0.5:12:2400

Do you know some similar packages for collect statistic data?

oleo
20-12-2006, 14:08
Could you possibly find isolated example that fails. Currently I am creating debug version of rrdtools natively to be debuged on router. And I need minimal example.

_Denis_
20-12-2006, 14:19
What do you mean by isolated example?

Work
rrdtool create test.rrd \
DS:in:DERIVE:600:U:U \
RRA:AVERAGE:0.5:1:600

not work
rrdtool create test1.rrd \
DS:in:DERIVE:600:0:125000000 \
RRA:AVERAGE:0.5:1:600

May be some problems in min max value?


ps
it doesnt like MIN = 0

MMCM
20-12-2006, 15:53
Both commands work for me (WL-500gx, OpenWrt Kamikaze, rrdtool 1.0.50-1).
If prefer rrdtool 1.0 over 1.2 because it's a lot faster generating graphs (2-3secs vs. 30secs) with cgi. I can do without the antialiasing features of rrdtool 1.2.

Is it possible that OpenWrt binaries do work on Olegs firmware?
It will depend on the runtime libaries used, I think...

Oleo:


rrdtool create loadavg.rrd --step 60 DS:load1:GAUGE:120:0:U \
DS:load5:GAUGE:120:0:U DS:load15:GAUGE:120:0:U RRA:AVERAGE:0.5:1:2160

...does work too.

MMCM
20-12-2006, 16:07
my /usr/bin/rrdtool binary links with /lib/ld-uClibc.so.0 which is a symlink to /lib/ld-uClibc-0.9.28.so

oleo
21-12-2006, 11:09
It looks like this is not uClibc problem.
I've compiled 1.0.50 and it works :) while 1.2.15 does not.

Shall we downgrade (easy) or find a bug in 1.2.15 (hard)?

_Denis_
21-12-2006, 11:35
Everything in the nature takes easy way. :)

And as said MMCM rrdtool 1.0.50 is much faster in use.

Oleg
21-12-2006, 12:26
Yes, downgrade to stable version. Newer does not always means better...

oleo
22-12-2006, 10:23
Yes, downgrade to stable version. Newer does not always means better...
I like doing things hard way and started more research on the hang issue of the following one liner with rrdtool-1.2.5:

rrdtool create test1.rrd DS:in:DERIVE:600:0:125000000 RRA:AVERAGE:0.5:1:600
Here are results:

nslu2 feed/nslu2 firmware - works
oleg feed/oleg firmware - fail
ddwrt feed/oleg firmware - fail
ddwrt feed/Xwrt firmware - works
oleg feed/Xwrt firmware - works


I was doing more research as I've hit to similar problem when upgraded gnuplot from 4.0.0 to 4.2rc2. On oleg firmware gnuplot hang on some plots,
while exactly the same gnuplot worked on OpenWRT (Xwrt).

ipkg-0.99.163 is more restrictive on packages that came from different package feeds! Removing gnuplot record from /opt/lib/ipkg/lists/optware is necessary!

root@OpenWrt:/opt/tmp$ wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/gnuplot_4.2.rc2-1_mipsel.ipk
Connecting to ipkg.nslu2-linux.org[140.211.166.82]:80
gnuplot_4.2.rc2-1_mi 100% |*****************************| 890 KB 00:00:00 ETA
root@OpenWrt:/opt/tmp$ /opt/bin/ipkg install gnuplot_4.2.rc2-1_mipsel.ipk
Installing gnuplot (4.2.rc2-1) to opt...
Nothing to be done
Successfully terminated.
Collected errors:
Package gnuplot md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update'.
root@OpenWrt:/opt/tmp$ vi /opt/lib/ipkg/lists/optware
root@OpenWrt:/opt/tmp$ /opt/bin/ipkg install gnuplot_4.2.rc2-1_mipsel.ipk
Installing gnuplot (4.2.rc2-1) to opt...
Configuring gnuplot
Successfully terminated.


Same results were obtained also for gnuplot 4.2rc2 hang problem. Downgrading to 4.0.0 on oleg firmware with

wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/gnuplot_4.0.0-1_mipsel.ipk
ipkg install -force-downgrade gnuplot_4.0.0-1_mipsel.ipk
restored normal gnuplot bahaviour.

The difference between oleg and ddwrt is just in kernel headers. All packages are built upon exactly the same toolchain and config.

My conclusion is, that the problem is within Oleg firmware and not the packages itself. More precisely; I do not blame linux 2.4.20 kernel sources for this. I thing that the problem is that oleg firmware is built with old 0.9.19 uClibc built with old 3.2.3 toolchain.

Having all this in mind I must repeat the question:

Shall we downgrade (easy), or find a bug (hard)?

Oleg
22-12-2006, 11:43
That' strange: your apps are linked against your uclibc, so my firmware is not involved at all. Btw, have you tried using linux headers from the broadcom toolchain?

oleo
22-12-2006, 12:01
Headers were extracted from broadcom toolchain when I was creating buildroot toolchain.

They are located at http://www.wlan-sat.com/boleo/optware/
See http://trac.nslu2-linux.org/optware/browser/trunk/make/buildroot.mk
for details.

On Xwrt you can install either package (oleg|ddwrt) and it works. So the problem must be with firmware itself.

Oleg
22-12-2006, 12:07
:) Does xwrt use 2.4.20 kernel?

oleo
22-12-2006, 12:44
Xwrt is OpenWRT whiterussian and uses 2.4.30 kernel
root@OpenWrt:/opt/share/torrent/work$ uname -a
Linux OpenWrt 2.4.30 #1 Fri Nov 24 23:16:54 EST 2006 mips unknown

oleo
22-12-2006, 16:39
As said before I've compiled natively rrdtool and 1.0.50 work while 1.2.15 hangs.
Now I've prepared cross-compiled version of the rrdtool 1.0.50 and realised that it does not work either. I've tried several options without a success :(

I have also compared both configure logs And I cannot find the difference.
See http://pastebin.ca/288738 or attached diff --side-by-side -d
On the left is cross-compiled config.log | right native compile.

oleo
23-12-2006, 00:38
Later I've remembered that I was using gcc-4.1.1 native buildroot toolchain on rrdtool-1.0.50 and cross-compiling was gcc-3.4.6 . See line 325 on my prevous post.

So I've tried also with gcc-4.1.1 cross toolchain and got positive result :) with several rrdtool create ...

rrdtool-1.2.15 does not work native nor cross.

Tried 4.1.1 cross compiling gnuplot-4.2.rc2 which hung on 3.4.6 on some plots. Compiled with 4.1.1 gnuplot works.

It seems that this 4.1.1 is a way to go. I've tried wild compile of the whole Optware repository before and found some old sources fail to build though.

oleo
31-12-2006, 01:23
Solved problem with rrdtool 1.2.5 by removing -std=gnu99 compiler option. Users should try to upgrade uclibc-opt package too.


There is also rrdcollect package for collecting system statistics. I need some useful examples.

maros
19-01-2007, 08:11
Solved problem with rrdtool 1.2.5 by removing -std=gnu99 compiler option. Users should try to upgrade uclibc-opt package too.


There is also rrdcollect package for collecting system statistics. I need some useful examples.

Hi,
yesterday I switch to "oleg/cross/stable" feed, I've installed the latest rrdtool and uclibc-opt. I have no problem with database creation nor update, the rrdtools hangs on graph creation. But only when the the rr database contains gaps or zero.

I'm monitoring three interfaces: wan, lan and wlan. I don't use the wlan interface, it is disabled. So the database is filled by zeros and the graph was always "blank". Yesterday, after update to "oleg/cross/stable", the rddtool always hangs on creation of wlan graph. So I disabled wlan graph creation. Other two graphs were created without problems.

But then I went sleep and I switch off my computer. So the lan interface was down and cron started to fill the rr database with zero values. And again, it causes hang of lan graph creation. So today morning was the router overloaded because of many "rrdtool graph" commands was still running :(

I had to comment to the lan graph creation and I expected that one small gap or zero in wan database will cause hang of the wlan graph creation.

Command for graph creation:


rrdtool graph /opt/share/www/rrd//landay.png.new -a PNG -s -86400 -w 550 -h 240 -v bytes/s DEF:ds1=/opt/var/lib/rrd//vlan0.rrd:in:AVERAGE DEF:ds2=/opt/var/lib/rrd//vlan0.rrd:out:AVERAGE LINE1:ds1#00FF00:Incoming Traffic GPRINT:ds1:MAX:Max %6.2lf %s GPRINT:ds1:MIN:Min %6.2lf %s GPRINT:ds1:AVERAGE:Avg %6.2lf %s GPRINT:ds1:LAST:Curr %6.2lf %s\n LINE1:ds2#0000FF:Outgoing Traffic GPRINT:ds2:MAX:Max %6.2lf %s GPRINT:ds2:MIN:Min %6.2lf %s GPRINT:ds2:AVERAGE:Avg %6.2lf %s GPRINT:ds2:LAST:Curr %6.2lf %s -t LAN COMMENT:\n COMMENT: Vytvoreno\: 19.01.2007 07\:20\:18


last lines in strace output


[maros@wl-500gp tmp]$ tail -n 30 strace.out
_llseek(3, 18444, [18444], SEEK_SET) = 0
_llseek(3, 18444, [18444], SEEK_SET) = 0
read(3, "\0\3\0\205\377\343\4L\5\360\0\v\0\27\0#\1\n@\32\3\ 245\t"..., 92) = 92
_llseek(3, 15212, [15212], SEEK_SET) = 0
_llseek(3, 18926, [18926], SEEK_SET) = 0
_llseek(3, 18926, [18926], SEEK_SET) = 0
read(3, "\0\3\0\205\377\343\4L\5\325\0\6\0005@\31\5%\2\3\2\ 3%\4"..., 66) = 66
_llseek(3, 15212, [15212], SEEK_SET) = 0
_llseek(3, 17792, [17792], SEEK_SET) = 0
_llseek(3, 17792, [17792], SEEK_SET) = 0
read(3, "\274\210\325*\274\210\325*\273\0\0\0H\4/\2{\1\0\0\300\0"..., 190) = 190
_llseek(3, 15212, [15212], SEEK_SET) = 0
_llseek(3, 18444, [18444], SEEK_SET) = 0
_llseek(3, 18444, [18444], SEEK_SET) = 0
read(3, "\200\1\0\0\0\0\0\0\5\325\0\6\0005@\31\5%\2\3\2\3%\ 4\0\0"..., 92) = 92
_llseek(3, 15212, [15212], SEEK_SET) = 0
_llseek(3, 18926, [18926], SEEK_SET) = 0
_llseek(3, 18926, [18926], SEEK_SET) = 0
read(3, "\200\1\0\0\0\0\0\0\4\'\0\3\0\7\0\33@\r\2\242\0\254 \4\242"..., 66) = 66
_llseek(3, 15212, [15212], SEEK_SET) = 0
_llseek(3, 17530, [17530], SEEK_SET) = 0
_llseek(3, 17530, [17530], SEEK_SET) = 0
read(3, "\0\1\0\366\0\0\4F\5\325\0\n\0&@\24\0\0\0\0\0\0\0\0\0\0"..., 86) = 86
_llseek(3, 15212, [15212], SEEK_SET) = 0
_llseek(3, 17530, [17530], SEEK_SET) = 0
_llseek(3, 17530, [17530], SEEK_SET) = 0
read(3, "\0\1\0\366\0\0\4F\5\325\0\n\0&@\24\3\227\4\2\227\5\210"..., 86) = 86
close(3) = 0
************HANG HERE*********************
--- SIGINT (Interrupt) @ 0 (0) ---
+++ killed by SIGINT +++

maros
19-01-2007, 08:23
Bonus :)

Nice graph shows growing load caused by graph creation process hangs.

oleo
19-01-2007, 09:20
There are some kernel fpemu bugs in Oleg's 7f. Try 7g-pre1 available
at http://wl500g.dyndns.org/7g

This should solve your problems.

I would also like to have your scripts to for creating graphs as samples to include with
rrdtool. And rrdcollect scripts also.

maros
21-01-2007, 16:52
There are some kernel fpemu bugs in Oleg's 7f. Try 7g-pre1 available
at http://wl500g.dyndns.org/7g

This should solve your problems.
Thanks, it works now.

The upgrade was a little bit complicated, first firmware flash failed and I spent two hours to fix it and I also lost my post-firewall script :( (Don't forget to backup your setting before flashing :cool: )



I would also like to have your scripts to for creating graphs as samples to include with
rrdtool. And rrdcollect scripts also.

Sure. It is based on macsat rrdtool tutorial (http://www.macsat.com/rrdtool.php)
I added cpu load and memory usage graphs and archiving.

Script is run each minute from cron. Graphs are in /opt/share/www/rrd/ directory.

oleo
22-01-2007, 16:47
There are some architectural problems with this rrdtool.sh although I must admit it is nice to start with single script.

Could you please restructure this script to use rrdcollect instead of using cron for update.

Running script every minute is not very wise think to do in when low CPU and mem is available
rrdcollect overcomes most of collect problems and acts as daemon without stressing the system for spawning and opening files for update.
creating daily graphs for archiving can be done by cron
for current graphs rrdcgi should be used on demand.
crontab file should be configurable so user can comment out unwanted graphs
system dependent thing could be in separate /opt/etc/stats.conf
database creation should be done by package postinst/prerm scripts


If you are able to provide this I could include this in default rrdcollect package.

maros
22-01-2007, 20:45
OK,
I can try, rrdcollect looks interesting. It will took some time.

Devil-Strike
24-01-2007, 09:49
Thanks, it works now.

The upgrade was a little bit complicated, first firmware flash failed and I spent two hours to fix it and I also lost my post-firewall script :( (Don't forget to backup your setting before flashing :cool: )



Sure. It is based on macsat rrdtool tutorial (http://www.macsat.com/rrdtool.php)
I added cpu load and memory usage graphs and archiving.

Script is run each minute from cron. Graphs are in /opt/share/www/rrd/ directory.


i have replaced the rrdtool.sh with the 1 you provided, but is there more wqhat i must done before i see the cpu/mem usage?

oleo
24-01-2007, 09:57
Here are my minor changes to PATH in attached rrdtool.sh It runs from cron
with /opt/etc/cron.d/macsat

#minute hour mday month wday who command
* * * * * admin /opt/bin/rrdtool.sh >>/opt/var/log/macsat.log


But as I said I don't like it. It could serve as example, though.

Devil-Strike
24-01-2007, 10:12
Here are my minor changes to PATH in attached rrdtool.sh It runs from cron
with /opt/etc/cron.d/macsat

#minute hour mday month wday who command
* * * * * admin /opt/bin/rrdtool.sh >>/opt/var/log/macsat.log


But as I said I don't like it. It could serve as example, though.


1question the graph for mem/cpu is ok but the index.html only shows the 3 original graph wan/lan/wlan how can i add the other grapg mem/cpu?

maros
24-01-2007, 10:17
i have replaced the rrdtool.sh with the 1 you provided, but is there more wqhat i must done before i see the cpu/mem usage?

Did you put it to crontab?

*/1 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1 (Note: "admin" is default user, must be changed if you are using different user)

Is there something interesting in log? (/opt/var/log/rrdtool.log)

Or you can try to run the script with command:

sh -x /opt/bin/rrdtool.sh

I'm working now on new, modular version, using rrdcollect program according to oleo comments. Maybe next week I will have first working version. Actually a module_cpuload is almost done and I need to made some nice cgi script and prepare other modules (memory, netload).

maros
24-01-2007, 10:19
1question the graph for mem/cpu is ok but the index.html only shows the 3 original graph wan/lan/wlan how can i add the other grapg mem/cpu?

Just rename/remove the index.html file and it will be recreated.

oleo
24-01-2007, 10:22
Maybe it should be mentioned again that rrdtool needs Oleg pre 7g firmware
http://wl500g.dyndns.org/7g/

I have noticed that PATH should be added for graphs in rrdtool.sh. That's whi I've included the file.

Devil-Strike
24-01-2007, 10:24
rddtool.sh started at Wed Jan 24 10:10:01 MET 2007
LOAD: 0.07
MEM -> USED: 11440128, CACHE: 16453632, FREE: 2936832
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 3177309 out: 2832967
LAN -> in: 2743646 out: 4249893
WLAN -> in: 0 out: 419446
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Wed Jan 24 10:10:51 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 10:15:01 MET 2007
LOAD: 0.01
MEM -> USED: 11538432, CACHE: 16097280, FREE: 3194880
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 3768712 out: 3398853
LAN -> in: 3272460 out: 4916136
WLAN -> in: 0 out: 493737
rddtool.sh finished at Wed Jan 24 10:15:04 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 10:20:01 MET 2007
LOAD: 0.04
MEM -> USED: 11702272, CACHE: 16162816, FREE: 2965504
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 4219600 out: 3968475
LAN -> in: 3835605 out: 5879429
WLAN -> in: 0 out: 568013
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Wed Jan 24 10:20:51 MET 2007
<------------------------------------------------------------->



is the rrdlog, but the index.html wont change? graphs are created

Edit// using the latest firmware from 7g
Edit2// deleted the html files and now it works, now waiting to see some graphs on the 2.

oleo
24-01-2007, 10:29
It should run every minute and not 5!

But as you see It tooks almost a minute to finish the script. This is bad. Cron ensures cardinality btu again the scripts could stackup on high load. So If you are not doing anithing on the router, the it works. Otherwise you could run in trouble if you run it every minute.

Devil-Strike
24-01-2007, 10:39
It should run every minute and not 5!

But as you see It tooks almost a minute to finish the script. This is bad. Cron ensures cardinality btu again the scripts could stackup on high load. So If you are not doing anithing on the router, the it works. Otherwise you could run in trouble if you run it every minute.

So i need to change it to 1min?
btw whene it create the graph it wont slow down the router jet, whene i download @ fullspeed (20Mbit) i dont see any hickups.

Btw, must i use the latest rrdtool.sh from attached file?
Edit// i have also put this in cronjob */1 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1

Edit2//ok i have waited about 2 hours but nu sing of life from the load/ram usage.

Devil-Strike
24-01-2007, 15:48
hmm ok, 4hours further and now my mem/load graphs are gone, it have worked 1 time after that only the lan/wan/wlan works.


rddtool.sh started at Wed Jan 24 15:50:01 MET 2007
LOAD: 0.06
MEM -> USED: 11976704, CACHE: 15892480, FREE: 2961408
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 390863100 out: 192171190
LAN -> in: 188455985 out: 397968740
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Wed Jan 24 15:50:58 MET 2007


the rrdlog say it works i think, but no graphs for load/mem.

maros
24-01-2007, 17:22
hmm ok, 4hours further and now my mem/load graphs are gone, it have worked 1 time after that only the lan/wan/wlan works.


rddtool.sh started at Wed Jan 24 15:50:01 MET 2007
LOAD: 0.06
MEM -> USED: 11976704, CACHE: 15892480, FREE: 2961408
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 390863100 out: 192171190
LAN -> in: 188455985 out: 397968740
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Wed Jan 24 15:50:58 MET 2007


the rrdlog say it works i think, but no graphs for load/mem.

Gone?
Graphs are always replaced, not deleted. Note: Load and Mem graphs are generated each 7th and network graphs each 10th minute.
Could you post here a listing of /opt/share/www/rrd directory?

ls -la /opt/share/www/rrd

Devil-Strike
24-01-2007, 18:31
Gone?
Graphs are always replaced, not deleted. Note: Load and Mem graphs are generated each 7th and network graphs each 10th minute.
Could you post here a listing of /opt/share/www/rrd directory?

ls -la /opt/share/www/rrd


drwxr-xr-x 3 root root 1024 Jan 24 18:30 .
drwxr-xr-x 4 root root 1024 Jan 23 15:20 ..
drwxr-xr-x 2 root root 1024 Jan 24 09:43 archive
-rw-r--r-- 1 root root 515 Jan 24 15:38 index.html
-rw-rw-rw- 1 root root 43874 Jan 24 18:20 landay.png
-rw-r--r-- 1 root root 27442 Jan 24 04:15 lanmonth.png
-rw-rw-rw- 1 root root 34629 Jan 24 18:01 lanweek.png
-rw-r--r-- 1 root root 23745 Jan 24 04:15 lanyear.png
-rw-rw-rw- 1 root root 26546 Jan 24 18:01 loadweek.png
-rw-rw-rw- 1 root root 34195 Jan 24 18:01 memweek.png
-rw-r--r-- 1 root root 527 Jan 24 15:38 month.html
-rw-rw-rw- 1 root root 46098 Jan 24 18:20 wanday.png
-rw-r--r-- 1 root root 0 Jan 24 18:30 wanday.png.new
-rw-r--r-- 1 root root 30124 Jan 24 04:15 wanmonth.png
-rw-rw-rw- 1 root root 34737 Jan 24 18:01 wanweek.png
-rw-r--r-- 1 root root 24093 Jan 24 04:15 wanyear.png
-rw-r--r-- 1 root root 521 Jan 24 15:38 week.html
-rw-rw-rw- 1 root root 38340 Jan 24 18:20 wlanday.png
-rw-r--r-- 1 root root 26410 Jan 24 04:15 wlanmonth.png
-rw-rw-rw- 1 root root 32385 Jan 24 18:01 wlanweek.png
-rw-r--r-- 1 root root 24062 Jan 24 04:15 wlanyear.png
-rw-r--r-- 1 root root 521 Jan 24 15:38 year.html


here the list.

maros
24-01-2007, 18:42
here the list.

Interesting, the week graphs was created, but no day graphs. :confused:

Could you check the log if there is any error at 17:57, 18:07, 18:17?

Devil-Strike
24-01-2007, 19:05
Interesting, the week graphs was created, but no day graphs. :confused:

Could you check the log if there is any error at 17:57, 18:07, 18:17?


rddtool.sh started at Wed Jan 24 17:55:01 MET 2007
LOAD: 0.01
MEM -> USED: 11284480, CACHE: 15781888, FREE: 3764224
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 11886919 out: 12441979
LAN -> in: 12365186 out: 15980145
WLAN -> in: 0 out: 0
rddtool.sh finished at Wed Jan 24 17:55:03 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 18:00:01 MET 2007
LOAD: 0.00
MEM -> USED: 11284480, CACHE: 15790080, FREE: 3756032
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 11998591 out: 12525933
LAN -> in: 12442683 out: 16127140
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
Weekly Graphs creating.....
647x347
647x347
647x347
647x333
647x389
rddtool.sh finished at Wed Jan 24 18:01:34 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 18:05:01 MET 2007
LOAD: 0.02
MEM -> USED: 11284480, CACHE: 16125952, FREE: 3420160
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 12081450 out: 12595282
LAN -> in: 12505927 out: 16260868
WLAN -> in: 0 out: 0
rddtool.sh finished at Wed Jan 24 18:05:03 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 18:10:01 MET 2007
LOAD: 0.00
MEM -> USED: 11284480, CACHE: 16138240, FREE: 3407872
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 12182532 out: 12657952
LAN -> in: 12564836 out: 16389288
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Wed Jan 24 18:10:54 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 18:15:02 MET 2007
LOAD: 0.01
MEM -> USED: 11284480, CACHE: 16187392, FREE: 3358720
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 12267447 out: 12706014
LAN -> in: 12608775 out: 16503539
WLAN -> in: 0 out: 0
rddtool.sh finished at Wed Jan 24 18:15:04 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Wed Jan 24 18:20:01 MET 2007
LOAD: 0.00
MEM -> USED: 11284480, CACHE: 16199680, FREE: 3346432
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 12348664 out: 12740828
LAN -> in: 12641019 out: 16607806
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Wed Jan 24 18:20:55 MET 2007
<------------------------------------------------------------->


Here is the rrdlog.

maros
24-01-2007, 19:28
Here is the rrdlog.

Thanks, I found the reason :-)

You must change the cron setting to run the script each minute. Edit /opt/etc/crontab and change setting from "*/5" to "*/1"



Old setting:
*/5 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1

New setting:
*/1 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1

Devil-Strike
25-01-2007, 09:54
Thanks, I found the reason :-)

You must change the cron setting to run the script each minute. Edit /opt/etc/crontab and change setting from "*/5" to "*/1"



Old setting:
*/5 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1

New setting:
*/1 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1

i have putting that line there already, but not working:

here is what in crontab

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
# Syntax for lines is : minute hour day month dayofweek command #
*/1 * * * * root run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
*/5 * * * * root run-parts /opt/etc/cron.5mins
01 * * * * root run-parts /opt/etc/cron.hourly
02 4 * * * root run-parts /opt/etc/cron.daily
22 4 * * 0 root run-parts /opt/etc/cron.weekly
42 4 1 * * root run-parts /opt/etc/cron.monthly

maros
25-01-2007, 10:01
i have putting that line there already, but not working:

here is what in crontab

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
# Syntax for lines is : minute hour day month dayofweek command #
*/1 * * * * root run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
*/5 * * * * root run-parts /opt/etc/cron.5mins
01 * * * * root run-parts /opt/etc/cron.hourly
02 4 * * * root run-parts /opt/etc/cron.daily
22 4 * * 0 root run-parts /opt/etc/cron.weekly
42 4 1 * * root run-parts /opt/etc/cron.monthly


Check the log, if is the rrdtool.sh run each minute and don't forget load and memory graphs are generated each 7th minute. So you should wait some time for graphs, 10 minutes in the worst case.

Devil-Strike
25-01-2007, 10:07
Check the log, if is the rrdtool.sh run each minute and don't forget load and memory graphs are generated each 7th minute. So you should wait some time for graphs, 10 minutes in the worst case.

This is what i see on syslog:

Jan 25 09:54:01 /opt/sbin/cron[300]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 09:55:01 /opt/sbin/cron[303]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)
Jan 25 09:55:01 /opt/sbin/cron[304]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 09:56:01 /opt/sbin/cron[416]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 09:57:01 /opt/sbin/cron[418]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 09:58:01 /opt/sbin/cron[420]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 09:59:01 /opt/sbin/cron[422]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 10:00:01 /opt/sbin/cron[425]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)
Jan 25 10:00:01 /opt/sbin/cron[426]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 10:01:01 /opt/sbin/cron[537]: (root) CMD (run-parts /opt/etc/cron.hourly ^M)
Jan 25 10:01:01 /opt/sbin/cron[538]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 10:02:01 /opt/sbin/cron[577]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 10:03:01 /opt/sbin/cron[579]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)


And this is the rrdlog:

rddtool.sh started at Thu Jan 25 09:45:01 MET 2007
LOAD: 0.09
MEM -> USED: 8822784, CACHE: 18665472, FREE: 3342336
SWAP -> USED: 233472, FREE: 345219072
Updating Network Load Databases...
WAN -> in: 1197967135 out: 106104310
LAN -> in: 101619535 out: 1220538076
WLAN -> in: 0 out: 0
rddtool.sh finished at Thu Jan 25 09:45:04 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Thu Jan 25 09:50:01 MET 2007
LOAD: 0.30
MEM -> USED: 8212480, CACHE: 12046336, FREE: 10571776
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 14051 out: 22327
LAN -> in: 19061 out: 40942
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Thu Jan 25 09:51:06 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Thu Jan 25 09:55:01 MET 2007
LOAD: 0.01
MEM -> USED: 10498048, CACHE: 17240064, FREE: 3092480
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 687785 out: 247611
LAN -> in: 279433 out: 1371618
WLAN -> in: 0 out: 0
rddtool.sh finished at Thu Jan 25 09:55:04 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Thu Jan 25 10:00:01 MET 2007
LOAD: 0.00
MEM -> USED: 10514432, CACHE: 17244160, FREE: 3072000
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 1115702 out: 348146
LAN -> in: 392922 out: 1848658
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
Weekly Graphs creating.....
647x347
647x347
647x347
647x333
647x389
rddtool.sh finished at Thu Jan 25 10:01:46 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Thu Jan 25 10:05:01 MET 2007
LOAD: 0.03
MEM -> USED: 10915840, CACHE: 17117184, FREE: 2797568
SWAP -> USED: 0, FREE: 345452544
Updating Network Load Databases...
WAN -> in: 1626407 out: 566577
LAN -> in: 635611 out: 3394315
WLAN -> in: 0 out: 0
rddtool.sh finished at Thu Jan 25 10:05:03 MET 2007
<------------------------------------------------------------->

maros
25-01-2007, 10:33
This is what i see on syslog:

Jan 25 09:54:01 /opt/sbin/cron[300]: (root) CMD (run-parts /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 09:55:01 /opt/sbin/cron[303]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)


And this is the rrdlog:

rddtool.sh started at Thu Jan 25 09:45:01 MET 2007
LOAD: 0.09
MEM -> USED: 8822784, CACHE: 18665472, FREE: 3342336
SWAP -> USED: 233472, FREE: 345219072
Updating Network Load Databases...
WAN -> in: 1197967135 out: 106104310
LAN -> in: 101619535 out: 1220538076
WLAN -> in: 0 out: 0
rddtool.sh finished at Thu Jan 25 09:45:04 MET 2007
<------------------------------------------------------------->


OK, finally (maybe ;-) )

1) You should don't use the run-parts script before rrdtool.sh command.
Change the line to:

*/1 * * * * root nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
2) The script is still run each 5 minute. You must remove the rrdtool.sh call from the "/opt/etc/cron.5mins" directory.

Devil-Strike
25-01-2007, 11:05
OK, finally (maybe ;-) )

1) You should don't use the run-parts script before rrdtool.sh command.
Change the line to:

*/1 * * * * root nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
2) The script is still run each 5 minute. You must remove the rrdtool.sh call from the "/opt/etc/cron.5mins" directory.


is still not working, only the weekly is updated but thats it.
removed rrdrun.sh now nothing is working anymore.

maros
25-01-2007, 11:32
is still not working, only the weekly is updated but thats it.
removed rrdrun.sh now nothing is working anymore.

What are the logs say now?

vladare
25-01-2007, 15:19
is still not working, only the weekly is updated but thats it.
removed rrdrun.sh now nothing is working anymore.

Hm. I have the same problems with rrdtool that you have. Only blank white graphics and no one point.

Devil-Strike
25-01-2007, 15:27
What are the logs say now?

This is the rrdlog:

rddtool.sh started at Thu Jan 25 10:30:01 MET 2007
LOAD: 0.00
MEM -> USED: 10604544, CACHE: 16252928, FREE: 3973120
SWAP -> USED: 327680, FREE: 345124864
Updating Network Load Databases...
WAN -> in: 9566949 out: 1414566
LAN -> in: 1662314 out: 13726954
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Thu Jan 25 10:31:04 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Thu Jan 25 10:35:01 MET 2007
LOAD: 0.03
MEM -> USED: 10989568, CACHE: 16527360, FREE: 3313664
SWAP -> USED: 323584, FREE: 345128960
Updating Network Load Databases...
WAN -> in: 80345046 out: 4113369
LAN -> in: 3969596 out: 85482804
WLAN -> in: 0 out: 0
rddtool.sh finished at Thu Jan 25 10:35:03 MET 2007
<------------------------------------------------------------->


not updated anymore after i removed rrdrun.sh

and this is my syslog:

Jan 25 15:09:57 ntp client: Synchronizing time with time.nist.gov ...
Jan 25 15:10:03 /opt/sbin/cron[1051]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)
Jan 25 15:10:03 /opt/sbin/cron[1052]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:11:01 /opt/sbin/cron[1059]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:12:01 /opt/sbin/cron[1061]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:13:01 /opt/sbin/cron[1063]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:14:01 /opt/sbin/cron[1065]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:15:01 /opt/sbin/cron[1068]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)
Jan 25 15:15:02 /opt/sbin/cron[1069]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:16:01 /opt/sbin/cron[1076]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:17:01 /opt/sbin/cron[1078]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:18:01 /opt/sbin/cron[1080]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:19:01 /opt/sbin/cron[1082]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:20:01 /opt/sbin/cron[1085]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)
Jan 25 15:20:01 /opt/sbin/cron[1086]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:21:01 /opt/sbin/cron[1093]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:22:01 /opt/sbin/cron[1095]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:23:01 /opt/sbin/cron[1097]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:24:01 /opt/sbin/cron[1099]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:25:01 /opt/sbin/cron[1102]: (root) CMD (run-parts /opt/etc/cron.5mins ^M)
Jan 25 15:25:01 /opt/sbin/cron[1103]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)
Jan 25 15:26:01 /opt/sbin/cron[1110]: (root) CMD (nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1^M)


its very strange:(

maros
25-01-2007, 17:08
This is the rrdlog:

rddtool.sh started at Thu Jan 25 10:30:01 MET 2007
LOAD: 0.00
MEM -> USED: 10604544, CACHE: 16252928, FREE: 3973120
SWAP -> USED: 327680, FREE: 345124864
Updating Network Load Databases...
WAN -> in: 9566949 out: 1414566
LAN -> in: 1662314 out: 13726954
WLAN -> in: 0 out: 0
Network Daily Graphs creating.....
647x347
647x347
647x347
rddtool.sh finished at Thu Jan 25 10:31:04 MET 2007
<------------------------------------------------------------->

rddtool.sh started at Thu Jan 25 10:35:01 MET 2007
LOAD: 0.03
MEM -> USED: 10989568, CACHE: 16527360, FREE: 3313664
SWAP -> USED: 323584, FREE: 345128960
Updating Network Load Databases...
WAN -> in: 80345046 out: 4113369
LAN -> in: 3969596 out: 85482804
WLAN -> in: 0 out: 0
rddtool.sh finished at Thu Jan 25 10:35:03 MET 2007
<------------------------------------------------------------->


not updated anymore after i removed rrdrun.sh


its very strange:(

Could you post here the content of the rrdrun.sh script? There is probably wrong path to rrdtool.sh in cron.

To check use:

[maros@wl-500gp root]$ type rrdtool.sh
rrdtool.sh is /opt/bin/rrdtool.sh
[maros@wl-500gp root]$

The path in crontab must be changed to be the same.

Devil-Strike
25-01-2007, 18:39
Could you post here the content of the rrdrun.sh script? There is probably wrong path to rrdtool.sh in cron.

To check use:

[maros@wl-500gp root]$ type rrdtool.sh
rrdtool.sh is /opt/bin/rrdtool.sh
[maros@wl-500gp root]$

The path in crontab must be changed to be the same.

this is my rrdrun.sh

#!/bin/sh
/opt/usr/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1


and this is the the outbut of type rrdtool

[root@Devil-Strike bin]$ type rrdtool
rrdtool is /opt/bin/rrdtool

maros
25-01-2007, 20:32
this is my rrdrun.sh

#!/bin/sh
/opt/usr/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1


Ok, as you can see, you have the rrdtool.sh script placed in "/opt/usr/bin/", but path in crontab is only "/opt/bin/". Update the crontab to:

*/1 * * * * root nice /opt/usr/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
And it should works.

Devil-Strike
26-01-2007, 08:32
Ok, as you can see, you have the rrdtool.sh script placed in "/opt/usr/bin/", but path in crontab is only "/opt/bin/". Update the crontab to:

*/1 * * * * root nice /opt/usr/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
And it should works.

Ok i will try.

wirespot
31-01-2007, 09:14
Can anyone point me to a rrdtool 1.0.50 ipk file, the one that doesn't freeze when rendering certain graphics? All the repositories I've seen seem to include only recent versions.

oleo
31-01-2007, 10:28
Install http://wl500g.dyndns.org/7g/ and then try again

wirespot
31-01-2007, 18:38
Oleg's firmware 1.9.2.7-7g-pre1 seems to make rrdtool work much better. I'm generating 7 different graphics in about 50 seconds, and no more hang up rrdtool's left behind. See this (http://wl500g.info/showpost.php?p=47370&postcount=2) if you're willing to give 7g-pre1 a spin.

wirespot
31-01-2007, 18:38
Ah, that's better. See here:
http://wl500g.info/showpost.php?p=47431&postcount=52

_Denis_
04-02-2007, 14:51
I try understand how rrdcollect works.
I created a rrd base via rrdtool.


rrdtool create eth0.rrd \
DS:bytes_in:DERIVE:600:0:12500000 \
DS:bytes_out:DERIVE:600:0:12500000 \
DS:pkts_in:DERIVE:600:0:12500000 \
DS:pkts_out:DERIVE:600:0:12500000 \
RRA:AVERAGE:0.5:1:576 \
RRA:AVERAGE:0.5:6:672 \
RRA:AVERAGE:0.5:24:732 \
RRA:AVERAGE:0.5:144:1460

than i run rrdcollect with default config file.


...
# Net: statistics
#file:///proc/net/dev
" eth0: %d %d %*d %*d %*d %*d %*d %*d %d %d" eth0.rrd:bytes_in,pkts_in,bytes_out, pkts_out
...

So, it`s update rrdbase every minute, but the value is "NAN".

I use Oleg's firmware 1.9.2.7-7g-pre1 as recommended.

wirespot
04-02-2007, 14:58
FWIW, you've set up the database for a step of 5 minutes. You need the -s parameter to rrdtool create, and the default is 300 seconds. Otherwise, the database definition looks good, so you can rule that out.

Why rrdcollect? I prefer rrdupdate, and collect the numbers myself, this way I can see what's going on. Perhaps you're not getting the numbers you think you are. Or maybe it doesn't run once a minute like you think it is.

And then there's the graph where you could go wrong. How did you define that?

maros
04-02-2007, 15:27
I try understand how rrdcollect works.
I created a rrd base via rrdtool.


...
# Net: statistics
#file:///proc/net/dev
" eth0: %d %d %*d %*d %*d %*d %*d %*d %d %d" eth0.rrd:bytes_in,pkts_in,bytes_out, pkts_out
...

So, it`s update rrdbase every minute, but the value is "NAN".

I use Oleg's firmware 1.9.2.7-7g-pre1 as recommended.

Just remove the space after colon (":").

_Denis_
05-02-2007, 08:49
Rrdcollect is stand alone app, dont need cron for run. And as said developer much faster as rrdtool update. So i just want try it.

I try to remove space after colon, nothing change.
But the strange things happen and with rrdtool update. I a little bit correct "macsat rrdtool tutorial" script for statistic of tun0 (OPENVPN inteface).

First i try collect data from ifconfig, but in/out byte are always zero . (I dont know why). I decide use /proc/net/dev for get a stat. I create base like in tutorial, but when i add data the value is NAN.

Right now i dont had my config file, i will post tonight.

wirespot
05-02-2007, 09:38
Yeah, I had to switch to using /proc/net/dev too. I don't know why macsat used ifconfig, it seems a terribly inefficient way to gather data. I always use /proc files whenever possible.

maros
05-02-2007, 10:20
Rrdcollect is stand alone app, dont need cron for run. And as said developer much faster as rrdtool update. So i just want try it.

I try to remove space after colon, nothing change.
But the strange things happen and with rrdtool update. I a little bit correct "macsat rrdtool tutorial" script for statistic of tun0 (OPENVPN inteface).

First i try collect data from ifconfig, but in/out byte are always zero . (I dont know why). I decide use /proc/net/dev for get a stat. I create base like in tutorial, but when i add data the value is NAN.

Right now i dont had my config file, i will post tonight.

My setting that works:


# Net: statistics
file:///proc/net/dev
" vlan1:%d %*d %*d %*d %*d %*d %*d %*d %d" /opt/var/lib/rrd/test/vlan1.rrd:in,out
" vlan0:%d %*d %*d %*d %*d %*d %*d %*d %d" /opt/var/lib/rrd/test/vlan0.rrd:in,out
" eth1:%d %*d %*d %*d %*d %*d %*d %*d %d" /opt/var/lib/rrd/test/eth1.rrd:in,out
[maros@wl-500gp root]$ cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo:113530488 1341376 0 0 0 0 0 0 113530488 1341376 0 0 0 0 0 0
sit0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth0:2578898335 55172183 1039 0 1005 1005 0 0 2380392205 53092190 0 0 0 0 0 0
eth1: 0 0 0 0 0 1405 0 0 919965 15314 16 0 0 0 0 0
vlan0:3303049714 4772022 0 0 0 0 0 222 1328633450 5193225 0 0 0 0 0 0
vlan1:2577692385 50400031 0 0 0 0 0 1299451 1051758607 47898963 0 0 0 0 0 0
br0:3283961626 4772022 0 0 0 0 0 0 1274601982 4638916 0 0 0 0 0 0

_Denis_
05-02-2007, 22:09
It`s work. My mistake, forgot uncommet file:///proc/net/dev.
2 maros what are you using for create images. rrdcgi or cron with rrdtool?

maros
06-02-2007, 07:38
It`s work. My mistake, forgot uncommet file:///proc/net/dev.
2 maros what are you using for create images. rrdcgi or cron with rrdtool?

I'm using rrdtool, because of archiving stuff. I've made updated version of rrdtool.sh script, sources are here: rrdmonitor (http://mkyral.dyndns.org/data/rrdmonitor/rrdmonitor-1.0.tar.bz2) (right click and "Save as").
You can check it and let me know if you have any comments.

I would like to create some official page for it and maybe create and include package to nslu2 package tree, but I need to find some time first.

_Denis_
06-02-2007, 16:21
I'm using rrdtool, because of archiving stuff. I've made updated version of rrdtool.sh script, sources are here: rrdmonitor (http://mkyral.dyndns.org/data/rrdmonitor/rrdmonitor-1.0.tar.bz2) (right click and "Save as").
You can check it and let me know if you have any comments.

I would like to create some official page for it and maybe create and include package to nslu2 package tree, but I need to find some time first.

Very useful script you made. I had a small problem with config, it not create any images until i have changed premision for /tmp/harddisk/opt/share/www/rrd to 667. May be i wrong but it not good idea to access rwx for "other"?

maros
07-02-2007, 07:41
Very useful script you made. I had a small problem with config, it not create any images until i have changed premision for /tmp/harddisk/opt/share/www/rrd to 667. May be i wrong but it not good idea to access rwx for "other"?

Sorry, I didn't understand your last sentence.

I have some mess on user rights on my router, so it is possible that permissions are not set correctly in the script.

May be I should finally solve it:
- I'm using a renamed "admin" user account that owning most of files.
- My thttpd web server runs as nobody user.
- Disk is mounted via nfs and I want to be able check and change files as my desktop user.

_Denis_
07-02-2007, 08:31
Sorry, I didn't understand your last sentence.


It`s my bad English. :(

What`s the point of archive, bottom of the page? Try figure out, without any results.

oleo
07-02-2007, 11:13
Add the following config:

[admin@oleo root]$ cat /opt/etc/thttpd.conf
dir=/opt/share/www
port=80
user=admin
nochroot
nosymlink
charset=iso-8859-2
cgipat=cgi-bin/*
novhost
logfile=/opt/var/log/thttpd.log
pidfile=/opt/var/run/thttpd.pid

lourenco
06-03-2007, 12:59
Does this mod script work with latest 7f?

I tried to put rrdtool to work with 7f before reading this topic... :( damm!

oleo
06-03-2007, 13:06
Floating poingt bug in kernel is corrected only in http://wl500g.dyndns.org/7g/

@maros : Any progress on rrdmonitor?

tzd99
02-07-2008, 14:49
Hi!

My problem is that the log file is empty and the directories "RRD" under: "/opt/share/www" and "/opt/var/lib/" aren't created. I therefore cannot monitor

I've installed RRDTool via ipkg and that works. I have followed macsats cronguide and tested with the 5 minutes test script in the same guide.
That test script works as well (i have it placed in /opt/etc/cron.5mins/).

I was unable to use the default dir "/opt/usr/bin" since it didn't exist. I've tried although by creating that dir and placing the script there but that didn't help.
I've also tried changing the default dir to "/opt/bin" in the script and also placing the script in there. No luck there I'm afraid.

I have the "rrdrun.sh" script inside /opt/etc/cron.5mins/ and I it's executable.


I'm using lighttpd and perhaps that affects everything?
Since I'm unable to copy text from Putty I have included a printscreen of my currently running processes.

I hope someone might know what this is. Would love to get this working please!

Serpent
02-07-2008, 19:45
...
Since I'm unable to copy text from Putty I have included a printscreen of my currently running processes.
...


Hi,
I can only help you with your putty problem... :o
Select what you want to copy and press Ctrl+Insert. And then paste it in putty with "Shift+Insert", or Ctrl+V in Windows.
Or use, for example:
ps axf > /opt/ps.txt

tzd99
05-07-2008, 00:55
I can paste into putty but not the other way around (copy from putty). Tried via ctrl+insert but taht didn't help I'm afraid. Thanks for your reply though :)

UPDATE: just found out there's some issues with the linux version. Also found out i could use Konsole instead..... now that was a lot easier than puTTY ;)

FastCat
06-09-2008, 22:23
Has installed on wl-700 rrdtool.
The Server lighttpd and php and cron are installed and work.

I try to start this script


#!/bin/sh
#
# macsat RRDTool script for ASUS WL-500g (Deluxe) v1.1 (18-07-2005)
#
# (c) 2005 by macsat@macsat.com
# Feel free to distribute and improve :-)
#
#

# Configuration Start

# Directory for storing RRD Databases
RRDDATA=/opt/var/lib/rrd/

# Directory for storing webpages / images
RRDIMG=/opt/share/www/rrd/


# Configuration End

#Output date for log...
date

if [ ! -d "${RRDDATA}" ]
then
echo "RRD Database dir: $RRDDATA does not exist...Creating Now...."
mkdir -p "${RRDDATA}"
fi

if [ ! -d "${RRDIMG}" ]
then
echo "RRD Image / web dir: $RRDIMG does not exist....Creating Now...."
mkdir -p "${RRDIMG}"
fi


# $1 = html file $2 = Period
CreateHTML ()
{
echo "<HTML><HEAD><TITLE>macsat.com demo RRDTool Traffic Graph Page </TITLE></HEAD><BODY> <h3>Traffic Graphs - ${2} </h3>" > "${1}"
echo "<center><a href='index.html'>Daily Graphs</a> | <a href='week.html'> Weekly Graphs </a> | <a href='month.html'> Monthly Graphs </a> | <a href='year.html'> Yearly Graph </a>" >> "${1}"
echo "<br><br><img src='wan${2}.png'><br><img src='lan${2}.png'><br><img src='wlan${2}.png'><br></CENTER></BODY></HTML>" >> "${1}"

echo "Create started..."

}


if [ ! -f "${RRDIMG}/index.html" ]
then
echo " index.html does not exist.....Creating Now...."
CreateHTML "${RRDIMG}/index.html" day
fi


if [ ! -f "${RRDIMG}/week.html" ]
then
echo " week.html does not exist.....Creating Now...."
CreateHTML "${RRDIMG}/week.html" week
fi

if [ ! -f "${RRDIMG}/month.html" ]
then
echo " month.html does not exist.....Creating Now...."
CreateHTML "${RRDIMG}/month.html" month
fi

if [ ! -f "${RRDIMG}/year.html" ]
then
echo " year.html does not exist.....Creating Now...."
CreateHTML "${RRDIMG}/year.html" year
fi




WANIF=`nvram get wan_ifname`
LANIF=`nvram get lan_ifnames | awk '{print $1}'`
WLANIF=`nvram get wl0_ifname`


#debug lines
echo "WAN Interface: ${WANIF}"
echo "LAN Interface: ${LANIF}"
echo "WLAN Interface: ${WLANIF}"


WANRRD="${RRDDATA}/${WANIF}.rrd"
LANRRD="${RRDDATA}/${LANIF}.rrd"
WLANRRD="${RRDDATA}/${WLANIF}.rrd"


CreateRRD ()
{
rrdtool create "${1}" \
DS:in:DERIVE:600:0:12500000 \
DS:out:DERIVE:600:0:12500000 \
RRA:AVERAGE:0.5:1:576 \
RRA:AVERAGE:0.5:6:672 \
RRA:AVERAGE:0.5:24:732 \
RRA:AVERAGE:0.5:144:1460
}


if [ ! -f "${WANRRD}" ]
then
echo "RRD file : ${WANRRD} does not exist...Creating Now..."
CreateRRD "${WANRRD}"
fi

if [ ! -f "${LANRRD}" ]
then
echo "RRD file : ${LANRRD} does not exist...Creating Now..."
CreateRRD "${LANRRD}"
fi

if [ ! -f "${WLANRRD}" ]
then
echo "RRD file : ${WLANRRD} does not exist...Creating Now..."
CreateRRD "${WLANRRD}"
fi

WANIN=`ifconfig "${WANIF}" |grep bytes|awk -F ":" '{print $2}'|awk '{print $1}'`
WANOUT=`ifconfig "${WANIF}" |grep bytes|awk -F ":" '{print $3}'|awk '{print $1}'`
LANIN=`ifconfig "${LANIF}" |grep bytes|awk -F ":" '{print $2}'|awk '{print $1}'`
LANOUT=`ifconfig "${LANIF}" |grep bytes|awk -F ":" '{print $3}'|awk '{print $1}'`
WLANIN=`ifconfig "${WLANIF}" |grep bytes|awk -F ":" '{print $2}'|awk '{print $1}'`
WLANOUT=`ifconfig "${WLANIF}" |grep bytes|awk -F ":" '{print $3}'|awk '{print $1}'`

# Debug
echo "WAN -> in: ${WANIN} out: ${WANOUT} "
echo "LAN -> in: ${LANIN} out: ${LANOUT}"
echo "WLAN -> in: ${WLANIN} out: ${WLANOUT}"

# Update the Databases
`rrdupdate "${WANRRD}" -t in:out N:"${WANIN}":"${WANOUT}"`
`rrdupdate "${LANRRD}" -t in:out N:"${LANIN}":"${LANOUT}"`
`rrdupdate "${WLANRRD}" -t in:out N:"${WLANIN}":"${WLANOUT}"`

# $1 = ImageFile , $2 = Time in secs to go back , $3 = RRDfil , $4 = GraphText
CreateGraph ()
{
rrdtool graph "${1}.new" -a PNG -s -"${2}" -w 550 -h 240 -v "bytes/s" \
'DEF:ds1='${3}':in:AVERAGE' \
'DEF:ds2='${3}':out:AVERAGE' \
'LINE1:ds1#00FF00:Incoming Traffic' \
GPRINT:ds1:MAX:"Max %6.2lf %s" \
GPRINT:ds1:MIN:"Min %6.2lf %s" \
GPRINT:ds1:AVERAGE:"Avg %6.2lf %s" \
GPRINT:ds1:LAST:"Curr %6.2lf %s\n" \
'LINE1:ds2#0000FF:Outgoing Traffic' \
GPRINT:ds2:MAX:"Max %6.2lf %s" \
GPRINT:ds2:MIN:"Min %6.2lf %s" \
GPRINT:ds2:AVERAGE:"Avg %6.2lf %s" \
GPRINT:ds2:LAST:"Curr %6.2lf %s" \
-t "${4}"
mv -f "${1}.new" "${1}"
}

# Set time-variables
MTIME=`date "+%M"`
HTIME=`date "+%H"`

# Update Daily graphs every 10 mins
if [ "${MTIME}" = 00 ] || [ "${MTIME}" = 10 ] || [ "${MTIME}" = 20 ] || [ "${MTIME}" = 30 ] || [ "${MTIME}" = 40 ] || [ "${MTIME}" = 50 ];
then
# 1 Day Graph
echo "Daily Graphs created....."
CreateGraph "${RRDIMG}/wanday.png" 86400 "${WANRRD}" WAN
CreateGraph "${RRDIMG}/landay.png" 86400 "${LANRRD}" LAN
CreateGraph "${RRDIMG}/wlanday.png" 86400 "${WLANRRD}" WLAN
fi

# Update Weekly graph once an hour
if [ "${MTIME}" = 00 ];
then
# 1 Week Graph
echo "Weekly Graphs created....."
CreateGraph "${RRDIMG}/wanweek.png" 604800 "${WANRRD}" WAN
CreateGraph "${RRDIMG}/lanweek.png" 604800 "${LANRRD}" LAN
CreateGraph "${RRDIMG}/wlanweek.png" 604800 "${WLANRRD}" WLAN
fi

# Update Monthly and Yearly graphs once a day (maby twice a day on 12h settings)
if [ "${HTIME}" = 04 ] && [ "${MTIME}" = 15 ];
then
# 1 Month Graph
echo "Monthly Graphs Created...."
CreateGraph "${RRDIMG}/wanmonth.png" 2678400 "${WANRRD}" WAN
CreateGraph "${RRDIMG}/lanmonth.png" 2678400 "${LANRRD}" LAN
CreateGraph "${RRDIMG}/wlanmonth.png" 2678400 "${WLANRRD}" WLAN
# 1 Year Graph
echo "Yearly Graphs Created...."
CreateGraph "${RRDIMG}/wanyear.png" 31536000 "${WANRRD}" WAN
CreateGraph "${RRDIMG}/lanyear.png" 31536000 "${LANRRD}" LAN
CreateGraph "${RRDIMG}/wlanyear.png" 31536000 "${WLANRRD}" WLAN
fi


echo " <------------------------------------------------------------->"
echo " "




The Directory for storage pics with schedules and for.rrd files this script has created.
And all... In a broad gull a file rrdtool only such messages

Sat Sep 6 10:07:53 UTC 2008
RRD Database dir:/opt/var/lib/rrd/does not exist... Creating Now....
RRD Image / web dir:/opt/share/www/rrd/does not exist.... Creating Now....
syntax error
Sat Sep 6 10:07:56 UTC 2008
syntax error
Sat Sep 6 10:07:58 UTC 2008
syntax error
Sat Sep 6 10:10:39 UTC 2008
syntax error

That was not pleasant to this script ? :confused:
Help pls...

FastCat
07-09-2008, 22:25
The problem has started to dare gradually.
To begin with, what a script (my first message) though see as that has started to work on wl-700g. Its first line should be changed to the

#!/opt/bin/sh

Once again we try to start a script.

[root@WL700gE bin]$ ./rrdtool.sh
Sun Sep 7 19:27:01 UTC 2008
RRD Database dir: /opt/share/www/lighttpd/rrd/ does not exist...Creating Now....
index.html does not exist.....Creating Now....
Create started...
week.html does not exist.....Creating Now....
Create started...
month.html does not exist.....Creating Now....
Create started...
year.html does not exist.....Creating Now....
Create started...
WAN Interface: eth0
LAN Interface: vlan0
WLAN Interface: eth1
RRD file : /opt/share/www/lighttpd/rrd/eth0.rrd does not exist...Creating Now...

Directory rrd it has created and.html files too has created. And here.rrd and pictures he does not wish to create files. A script it is necessary to "hang" (while it violently not to interrupt) with the message which "fat" is allocated (in broad gulls rrdtool anything is not present).

That is interesting. A kind command:

rrdtool create load.rrd DS:sysload:GAUGE:600:U:U RRA:AVERAGE:0.5:1:48
it is carried out perfectly. rrd the file is created.

From here it is possible to draw a conclusion that with program adjustment of mine wl-700g all is good. And a problem in the script.

Help pls to adapt the given script under wl-700g :rolleyes: