SheevaPlug Real time Statistics
From ComputingPlugs
Here are some real time statistics of my SheevaPlug. I decided to make this information public so that others could see a real world example of the SheevaPlug and what it can really handle. I use rrdtool to gather and plot the data. I have the following tasks that are always running on the Sheeva Plug:
- This website, computingplugs.com, runs entirely on the Sheeva Plug. I used Apache + MySQL + MediaWiki to host computingplugs.com. I have a WordPress plugin to MediaWiki that handles comments. I also use awstats to visualize the hosting stats.
- I run a master MythTV backend as described on this page. Mythfilldatabase and MythWeb also runs on the Sheeva Plug.
- MySQL that handles all database access for MediaWiki, Wordpress and MythTV.
- VNC server with 1 session always opened using IceWM as the window manager.
- Postfix mail server that handles local mail only.
- SSH tunnel that is always connected to my work.
- A gkrell session running on the SSH tunnel that I use to monitor the Sheeva Plug at work.
- NFS services for my local network. My MythTV slave backend uses this heavily to store recordings.
- A screen session with Myth alarm running.
Here are tasks that I sometimes run on the SheevaPlug:
- FreeNX Server is always running, but it doesn't use any resource unless a NX session is started. I do not have a constantly running session, but when I do, it runs with Gnome as the window manager.
- Compiling kernels or applications like MythTV.
- rTorrent.
- Pan for Usenet upload/download.
As you can see, I really do use the Sheeva Plug because I see the Sheeva Plug as a server replacement. The Sheeva Plug has been running non-stop for more than a month(6/2/09) now and it handles everything I do comfortably. However, you don't need to take my word for it, you are using the Sheeva Plug right now because computingplugs.com is hosted on it. So what do you think?
Contents |
Real time statistics
I provide 6 different statistics that shows the general health of the SheevaPlug. All statistics are gather once a minute and the charts are redrawn every 10 minutes.
System uptime
CPU usage in percent
CPU loading
Memory usage
The Sheeva Plug comes with 512MBytes of RAM, and I created a 1Gbytes swap space on the USB harddrive.
Network usage
External USB harddisk usage
Scripts
Here are the rrdtool scripts I used to create the real time stats.
|
|
Click here to leave a comment
Did you find this page useful? |
||


Jun 02 2009 2:36 pm
Please keep comments clean and constructive. Inappropriate comments will be removed. Thank you.
Jun 21 2009 12:10 am
Nice Scripts for the Real Time Statistics. May you publish these Scripts ?1
Jun 21 2009 1:12 pm
Sure, why not.
Jun 27 2009 9:58 am
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
Jun 27 2009 12:02 pm
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
Jul 02 2009 7:22 pm
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 !!
Jul 07 2009 11:30 am
yeah, I see it. Odd that it doesn't give me an error on my setup. I've fixed the file. Thanks Vince.
Aug 11 2009 9:57 am
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
Aug 12 2009 7:09 pm
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.
Aug 18 2009 7:36 am
Really nice work you've done here. Great example. Makes my head spin, all the things we can do with this plug.
Oct 26 2009 5:37 pm
I've been thinking about getting one of these for ages, I'm sold now. Keep up the good work.
Oct 27 2009 2:33 am
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?
Oct 27 2009 9:07 am
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.
Oct 30 2009 6:40 pm
Looks you have put to great use the shivaplug... And /. routed me to your page.
Nov 18 2009 7:38 am
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 :(
Dec 06 2009 12:03 am
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 ; }'`;;
Dec 07 2009 11:30 am
Thanks for the fix brentaar. But really, who needs more than 512K of ram? :D
Jan 28 2010 4:21 pm
do you have a guide with any info or steps to duplicate this or something similar?
thanks