Simple python scripts to monitor server resources using Google spreadsheets and charts.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LoadMonitor/src
.gitattributes
.gitignore
README.md

README.md

LoadMonitor

General

Simple python scripts to monitor server resources using Google spreadsheets and charts.

Uses google spreadsheet to archive data. Google spreadsheet provides timeline graphs for each resource tracked.

Current implementation tracks:

  • CPU (over 5 seconds)
  • CPU temp
  • Memory utilization (free, used, total)
  • Disk I/O (bytes per second total for disk "sda1")
  • Network load (tx, rx for "eth0")

Project is specific to Raspberry Pi due to CPU temp monitoring.

Usage

  • Make a copy of my google spreadsheet: https://docs.google.com/spreadsheet/ccc?key=0As-0hIWBcQmFdGZzSW1YNGdldjVybnJHYkJFeUFHRGc
  • In your copy of the spreadsheet, go to "Form -> Go to live form". When you get to the next page, copy the form key. The form key is the obscure text after "formkey=" up to the hash ("#") symbol.
  • Edit GoogleSheet.py and paste the key into the value FORMKEY
  • You may have to edit the ENTRIES dictionary in the event those values change; you can confirm this by going to the live form and viewing the source for each entry field.

Limitations

  • Disk I/O only monitors the "sda1" drive. If that drive doesn't exist the script will report "0" every time it runs. This code also assumes each sector is 512 bytes.
  • CPU Temp can be configured for Celsius, Fahrenheit, and Kelvin (for fun). The script is using Fahrenheit by default because I'm a lazy American who can't be bothered memorizing Celsius conversion.
  • If this package of scripts are ever intended to run on a machine that is not a Raspberry Pi, the CPU Temp code should be ignored
  • The network utilization code only monitors the "eth0" network interface. If that interface does not exist or is not used, a "0" will be reported every time the script runs.
  • With the exception of CPU temp, all of the resources this script monitors looks at /proc/ kernel files.

Author

You may contact me at slowikjw at gmail.com.

Enjoy~