SheevaPlug Real time Statistics

Realtime statistics of the sheevaplug

19 Responses to “SheevaPlug Real time Statistics”

  1. Kenny says:

    Please keep comments clean and constructive. Inappropriate comments will be removed. Thank you.

  2. wintermite says:

    Nice Scripts for the Real Time Statistics. May you publish these Scripts ?1

  3. Vince says:

    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

    • Kenny says:

      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

  4. Vince says:

    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 !!

  5. MarkG says:

    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

    • Kenny says:

      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.

  6. Brad says:

    Really nice work you’ve done here. Great example. Makes my head spin, all the things we can do with this plug.

  7. Simon says:

    I’ve been thinking about getting one of these for ages, I’m sold now. Keep up the good work.

  8. chemary says:

    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?

  9. R says:

    Looks you have put to great use the shivaplug… And /. routed me to your page.

  10. markusk says:

    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 :(

    • brentaar says:

      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 ; }’`;;

  11. A says:

    do you have a guide with any info or steps to duplicate this or something similar?

    thanks

  12. Mass-Yas says:

    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.

Leave a Reply

You must be logged in to post a comment.