Shell Script + Google Chart Tools / Image Charts – Parte 2

Dando continuidade ao assunto, agora tive a sacada de gerar o chart/googleOMeter do load average.

  #!/bin/bash                                                                                                                              
  # 
  #
  load()
  {
  #limite = threshold
  limite="5"
  load5=$(awk '{print $1}' /proc/loadavg)
  echo
  echo "http://chart.apis.google.com/chart?chxr=0,0,5&chxt=y&chs=700x240&cht=gm&chco=FF9900,00FF00|FF0000&chds=0,"$limite"&chd=t:"$load5"&chl="$load5"&chtt=$(hostname)+load+average"
  }
  load
Advertisements

3 thoughts on “Shell Script + Google Chart Tools / Image Charts – Parte 2

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s