system info report script

A bash script to report system info, yes, another one. So i need to do it only using bash and standard shell tools. My script generate “raw” info (without format) and a cute html report :)

The idea is to use it in the embedded systems the i use in my job. The script is used to send “raw” info to a monitoring app and to create a html report to be viewed in a java app so no css, js or html4 can be used. Any suggestion or modification is welcome :) The next step is implement bandwidth stats.
What kinf of inof report? cpu, disks, mem, tasks, net, etc…
how it work? very easy

# sh recursos.sh cpu
# 3.3

“3.3” is 3.3% of cpu used

So for a cute html format:

# sh recursos.sh title general system net disks > info.html

and the example is here.
So only need to read the scritp to know all functions that you can use :)
Improves and suggestion are welcome.

UPDATED: version 1.0.9 :)

So download it and enjoy:

  • recursos.sh 1.0
  • In other hand the pics from my birthday in asmterdam have so many fans lately :P


    9 Responses to “system info report script”

    1. 1 kang
      4 May, 2005 at 13:18 pm

      Have you tried munin ?
      althought maybe its no images too :)

    2. 2 John Nilsson
      4 May, 2005 at 20:56 pm

      Whats wrong with gkrellmd?

    3. 16 May, 2005 at 21:11 pm

      munin is nice so i need comunicatin in one way (client->server)
      about gkrllemd is not usefull for monitoring 20 machines with historical records and alerts :P
      thanks both

    4. 17 May, 2005 at 09:38 am

      is it possible to have a version of this showing all information the html version offers, but in some text format, so you can use it in a cronjob using “| mail”?


    5. 17 May, 2005 at 10:43 am

      Yes, try
      sh recursos.sh summary

      if you need more info just edit the script and add to the “summary” function all the other internal functions that you need.


    6. 6 Eli
      28 May, 2005 at 01:56 am

      recuros ibw (and running the function separate from the host script) returns:

      ./recursos.sh: line 123: *8/1024: syntax error: operand expected (error token is “*8/1024”)

      Very cool otherwise! ;)

    7. 28 May, 2005 at 19:41 pm

      strange error. you must have a /tmp/bw-$DEV.tmp after the first run.
      Maybe you are trying to monit another DEV?
      you must define the device the you want in the script search for “DEV=”

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )


    Connecting to %s


    Flickr Photos


    %d bloggers like this: