Also get the latest version from here and check the demo graphs.
hello, the linesays it all. Bash should not be installed in /bin. Are you sure you installed bash via ipkg? Because bash is an optional package and is not installed by default. Also if you want to properly display disk data you should install coreutils. Check this tutorial.Code:bash: ./rrdstorm.sh: /bin/bash: bad interpreter: No such file or directory
Short said:
Get rrdstorm.sh from http://wl500ginfo.pastebin.com/f789cf38a and edit ./rrdstorm.sh for proper grep functions in disk section
mnt should be changed to whatever you use for mount.Code:RRDuVAL[5]=' SP=$(/opt/bin/coreutils-df "-B1") echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"): echo -n $(echo "$SP"|grep mnt|awk "{print \$3\":\"\$2}") echo '
In shell
Then edit crontabCode:ipkg install coreutils ipkg install bash ipkg install cron bash rrdstorm.sh create 0 1 3 4 5 6
with these valuesCode:vi /opt/ect/crontab
and chmod itCode:*/1 * * * * admin bash /path to/rrdstorm.sh update 0 1 3 4 5 6 */22 * * * * admin bash /path to/rrdstorm.sh graph_cron s 0 1 3 4 5 6 0 */1 * * * admin bash /path to/rrdstorm.sh graph_cron h 0 1 3 4 5 6 3 */6 * * * admin bash /path to/rrdstorm.sh graph 0 1 3 4 5 6and this is pretty much it. Good luck!Code:chmod 0600 /opt/ect/crontab
Last edited by cupacup; 29-07-2008 at 23:46.
Also get the latest version from here and check the demo graphs.
Last edited by cupacup; 29-07-2008 at 16:48. Reason: demo graphs
Yeah, i noticed the version change when you uploaded the new file. I got both the old and the new one. I also noticed that i was stupid with the bash thingie, and edited the post above. Gonna try now what u posted. Thanks.
WL-500gP V2 - Oleg Firmware
Ok, this is what i did:
Changed:
withCode:SP=$(/opt/bin/coreutils-df "-B1") echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"): echo -n $(echo "$SP"|grep mnt|awk "{print \$3\":\"\$2}") echo ' RRDgUM[5]='space (bytes)' RRDgLIST[5]="30 31 32 33 34 35" RRDgDEF[5]=$(cat <<EOF 'DEF:optzasede=\$RRD:optzasede:AVERAGE' 'DEF:optprosto=\$RRD:optprosto:AVERAGE' 'DEF:mntzasede=\$RRD:mntzasede:AVERAGE' 'DEF:mntprosto=\$RRD:mntprosto:AVERAGE' 'CDEF:bo=mntzasede,UN,0,mntzasede,IF,0,GT,UNKN,INF,IF' 'AREA:bo#DDDDDD:' 'AREA:mntzasede#CC0033:/mnt:' 'CDEF:root=mntzasede,mntprosto,+' 'VDEF:sumr=root,LAST'
I don`t know if that is good. I have like, 1 partition mounted to /opt and the other to /tmp/mnt/disc0_3 since I head oleg`s firmware doesn`t mount it anywhere else.Code:SP=$(df) echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"): echo -n $(echo "$SP"|grep tmp|awk "{print \$3\":\"\$2}") echo ' RRDgUM[5]='space (bytes)' RRDgLIST[5]="30 31 32 33 34 35" RRDgDEF[5]=$(cat <<EOF 'DEF:optzasede=\$RRD:optzasede:AVERAGE' 'DEF:optprosto=\$RRD:optprosto:AVERAGE' 'DEF:mntzasede=\$RRD:mntzasede:AVERAGE' 'DEF:mntprosto=\$RRD:mntprosto:AVERAGE' 'CDEF:bo=mntzasede,UN,0,mntzasede,IF,0,GT,UNKN,INF,IF' 'AREA:bo#DDDDDD:' 'AREA:mntzasede#CC0033:/tmp/mnt/disc0_3:' 'CDEF:root=mntzasede,mntprosto,+' 'VDEF:sumr=root,LAST'
Don`t know how correct that edit is.
And another thing, the script seems to run successfully, but it doesn`t generate any output. The RRDDATA and RRDOUTPUT folders are empty after script execution.
I think it crashes silently or something.
I am already running rrdtools for traffic if it makes a difference.
-- BTW, awesome demo.
WL-500gP V2 - Oleg Firmware
This is how it should look like.
You can check if rrd database is beeing updated with rrd with this:Code:SP=$(/opt/bin/coreutils-df "-B1") echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"): echo -n $(echo "$SP"|grep disc0_3|awk "{print \$3\":\"\$2}") echo ' RRDgUM[5]='space (bytes)' RRDgLIST[5]="30 31 32 33 34 35" RRDgDEF[5]=$(cat <<EOF 'DEF:optzasede=\$RRD:optzasede:AVERAGE' 'DEF:optprosto=\$RRD:optprosto:AVERAGE' 'DEF:mntzasede=\$RRD:mntzasede:AVERAGE' 'DEF:mntprosto=\$RRD:mntprosto:AVERAGE' 'CDEF:bo=mntzasede,UN,0,mntzasede,IF,0,GT,UNKN,INF,IF' 'AREA:bo#DDDDDD:' 'AREA:mntzasede#CC0033:disc0_3:' 'CDEF:root=mntzasede,mntprosto,+' 'VDEF:sumr=root,LAST'
Code:[admin@dz0ny root]$ rrdtool lastupdate /path to/hdd.rrd optprosto optzasede mntprosto mntzasede 1217337065: 264934400 226105344 73048051712 79097274368
Last edited by cupacup; 29-07-2008 at 23:46. Reason: URL
Thanks for the quick answer. I re-downloaded the file, and made the following modifications
instead ofCode:#!/opt/bin/bash
the modification u pasted now, with disc0_3, andCode:#!/bin/bash
to reflect the settings i`m using.Code:RRDTOOL=/opt/bin/rrdtool RRDUPDATE=/opt/bin/rrdupdate RRDDATA=/opt/var/lib/rrd RRDOUTPUT=/opt/wwwroot/rrd/hdd FORCEGRAPH=no
This is what it shows when i run it
It runs with no visible errors, but it kinda` doesn`t do anything.Code:[xxx@xxx bin]$ ./rrdstorm.sh [xxx@xxx bin]$ ls /opt/var/lib/rrd/ total 188 drwxr-xr-x 2 xxx root 4096 Jul 29 13:09 . drwxr-xr-x 4 xxx root 4096 Jul 29 13:09 .. -rw-r--r-- 1 xxx root 56736 Jul 29 16:17 eth1.rrd -rw-r--r-- 1 xxx root 56736 Jul 29 16:17 vlan0.rrd -rw-r--r-- 1 xxx root 56736 Jul 29 16:17 vlan1.rrd [xxx@xxx bin]$ ls /opt/wwwroot/rrd/hdd total 8 drwxr-xr-x 2 tbone root 4096 Jul 29 15:11 . drwxr-xr-x 3 tbone root 4096 Jul 29 16:15 ..
Any idea ?
WL-500gP V2 - Oleg Firmware
Hello, yes because it should not. trythis one is for initial creating of databases an htmlfilesCode:.rrdstorm.sh create 0 1 3 4 5 6
this one is for updating valuesCode:.rrdstorm.sh update 0 1 3 4 5 6
this one is for generating graphsCode:.rrdstorm.sh graph 0 1 3 4 5 6
and this one is for quick updatesCode:.rrdstorm.sh graph_cron s 0 1 3 4 5 6
I hope it works for you.
Last edited by cupacup; 29-07-2008 at 14:47.
Yup, worked. Nifty looking graphs
Thanks for everything mate.
WL-500gP V2 - Oleg Firmware
Still no run here.
When i execute i get :
./rrdstorm.sh : line 594 : syntax error near unexpected token `) '
./rrdstorm.sh : line 594 : ` help)'
Between ` and help in line 2 is some spaces, but forum deleted them.
In cron modifications is done and modifications of script is the disk0_3 on right section and right paths for files.
Maybe my copy/paste skills is outdated
Try with different editors and browsers on win/router but same result.
Lordbone you can upload the file here ?
Last edited by poiu; 29-07-2008 at 18:57.
Yup, here u go mate:
You can get it from here
Good luck with it
WL-500gP V2 - Oleg Firmware
Thank you lordbone, your file work ok, maybe the script get tainted on source ...
Still prezentation is bad, need enter by hand cpu/hdd/ etc, the index is build empty, overall graphics is nice
rrd graph for wl500gp http://wl500ginfo.pastebin.com/f63a4f212
No harm done, copacup, we all tanks you for sharing your work with us ^^ .
But a beauty will be if the graphics are build in main page, not spread.
This is html work i think, but not any skills here, again..
Overall charge on processor power is around 20% so i will live with, hope the Asus will too,, the another scripts find it around charge like 50% so was innaceptable, so i will let your script work.
Another thing, wlan is blank, because of interface diferences between v1 and v2 ?
And to kill cpu temp because wont work anyway what is needit ?
LE: Y want to kill memory alocation/load/cpu temp to save power, i wont need it, is a quick way to do it besides try to comment some portions of script ?
The 1,2,3,4,5,6, way will do ?
Last edited by poiu; 30-07-2008 at 21:31.
Yes you could do it or simply delete all html files and issue command. Little explanation 0 is LOAD, 1 is MEMORY, 2 nothing yet, 3 CPU, WAN 4, DISK 5 and 6 WLAN.Code:rrdstorm.sh create 4 5 6
So if you want to create, for example just stats for disk, you would issue command rrdstorm create 5, values would get updated by rrdstorm update 5 and so on.
LE: If you want just some graphs on main page, you can edit index html. And place those images there.
Last edited by cupacup; 31-07-2008 at 00:04.
rrd graph for wl500gp http://wl500ginfo.pastebin.com/f63a4f212