6

Is there a scripting library preferably in Python/Perl/Ruby that allows you to get information on disk, load, a list of processes running, cpu usage in a standard way?

I always end up parsing df, uptime, ps etc. Given that these differ on different Unix flavors and need to be done in a totally different way on Windows, I would have thought that someone would have already done this.

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
Stuart Woodward
  • 2,138
  • 4
  • 21
  • 31
  • I think someone gave a talk at an Australian Railscamp about one. I can't remember any details, though. – Andrew Grimm Jan 04 '12 at 02:40
  • you could call out to the "sar" command or others...http://linuxadmintips.wordpress.com/2011/03/05/server-health-check-status-commands-in-linux/ – rogerdpack Jun 26 '13 at 19:39

3 Answers3

6

Most simple is monit: http://mmonit.com/monit/

A step up, as @lawrencealan mentioned, is Nagios: http://nagios.org/

And here's a new interesting effort: http://amon.cx/

John Bachir
  • 22,495
  • 29
  • 154
  • 227
2

(ruby) Daniel Berger maintains a lot of gems in this field. Look for sys-cpu, sys-uptime, sys-uname, sys-proctable, sys-host, sys-admin, sys-filesystem - all multi-platform AFAIK.

steenslag
  • 79,051
  • 16
  • 138
  • 171
0

Have you looked into Nagios? http://nagios.org/

There are an abundance of agents: http://exchange.nagios.org/directory/Addons/Monitoring-Agents

Larry Williamson
  • 1,149
  • 5
  • 18