SheevaPlug Real time Statistics
Realtime statistics of the sheevaplug
This entry was posted
on Tuesday, June 2nd, 2009 at 2:35 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
Please keep comments clean and constructive. Inappropriate comments will be removed. Thank you.
Nice Scripts for the Real Time Statistics. May you publish these Scripts ?1
Sure, why not.
I’m getting a failure message on my sheeva trying to run memory.sh create - any ideas ?
Here’s a transcript…
/usr/bin/rrdtool create /tmp/rrd/memory.rrd -s 60 DS:totalmem:GAUGE:180:U:U DS:usedmem:GAUGE:180:U:U DS:freemem:GAUGE:180:U:U DS:totalswap:GAUGE:180:U:U DS:usedswap:GAUGE:180:U:U DS:freeswap:GAUGE:180:U:U RRA:AVERAGE:0.5:1:1440 RRA:MAX:0.5:1440:1 RRA:min:0.5:1440:1
ERROR: Unrecognized consolidation function
I didn’t run into that problem so I don’t know for sure. Quick googling shows something with the rrd data file. Maybe it was created with a different version of rrdtool? For the record, I’m using rrdtool version 1.3.1
The problem is your memory.sh create section specifies a “min” when it should be “MIN” in uppercase. Change that and it all works fine. Thanks much for the scripts !!
yeah, I see it. Odd that it doesn’t give me an error on my setup. I’ve fixed the file. Thanks Vince.
Didn’t get ANY of those scripts working, looks like there are additional dependancies.
root@ubuntu:~# chmod +x *.sh
root@ubuntu:~# ls
backup.sh ethernet.sh load.sh mbox memory.sh sda2.sh uptime.sh
root@ubuntu:~# ./ethernet.sh
Invalid option.
root@ubuntu:~# ./memory.sh
Invalid option.
root@ubuntu:~# ./sda2.sh
Invalid option.
root@ubuntu:~# ./uptime.sh
./uptime.sh: line 3: /usr/bin/pnmpad: No such file or directory
./uptime.sh: line 3: /usr/bin/pnmcrop: No such file or directory
./uptime.sh: line 3: /usr/bin/pbmtext: No such file or directory
./uptime.sh: line 4: /usr/bin/convert: No such file or directory
First of all you need to give the scripts (except uptime.sh) an argument like create, update or graph. That explains the problem of “Invalid option”.
For uptime.sh, you need to install netpbm and imagemagick. Both are available in the repository.
Really nice work you’ve done here. Great example. Makes my head spin, all the things we can do with this plug.
I’ve been thinking about getting one of these for ages, I’m sold now. Keep up the good work.
Very nice scripts, thanks.
I will try to modify them to draw also weekly and monthly graphs.
You run all the scripts with cron to get 1min update and 10min graph?
yeah, I have a cron job that runs every minute to collect data, and another that runs every 10 minutes to redraw the graph for the website.
Looks you have put to great use the shivaplug… And /. routed me to your page.
on memory.png - isn’t the index of the vertical scale wrong? shouldn’t it say MB?
but silly me can’t find a way to change this
The memory script should be modified. The line reads as:
N:`/usr/bin/free -o | grep “Mem” | /usr/bin/gawk ‘{ print $2″:”$3″:”$4 ; }’`:`/usr/bin/free -o | grep “Swap” | /usr/bin/gawk ‘{ print $2″:”$3″:”$4 ; }’`;;
This returns kiloBytes, which is default, instead of Bytes. That throws off the graph, since it assumes the data will be in Bytes.
Adding a b flag should fix the issue, the flag returns Bytes giving the correct scale.
After a quick test, the mem usage corresponds with the data that top gives.
Example of new line:
N:`/usr/bin/free -ob | grep “Mem” | /usr/bin/gawk ‘{ print $2″:”$3″:”$4 ; }’`:`/usr/bin/free -ob | grep “Swap” | /usr/bin/gawk ‘{ print $2″:”$3″:”$4 ; }’`;;
Thanks for the fix brentaar. But really, who needs more than 512K of ram?
do you have a guide with any info or steps to duplicate this or something similar?
thanks
Hello,
I have tried these scripts on my sheevaPlug with default Ubuntu OS installed and I cannot get any results.
Actually in the log I see error at update like Error mmaping file /xxx/xxx/xxx.rrd ‘: Invalid argument
If I look at the generated files and graph I have only NaN values.
Did anyone get this problem ? I tried to compile rrdtool from source but got the same behavior.