I'm spending a lot of time manually reporting basic Linux system stats that I get from either Cacti monitoring tool and/or Top and ps command. I'm essentially writing a report in following format:
Host: <name value> CPU Util: <value> (if Idle % is 100 - 60% print "Good" ; if Idle % is 60 - 30% print "Fair"; if Idle % is 30 - 0% print "Bad") Memory Util: <value> (if Free Mem % is 100 - 60% print "Good" ; if Free Mem % is 60 - 30% print "Fair"; if Free Mem % is 30 - 0% print "Bad") Up since: (check date PID was started; calculate number of days/hours PID has been runninig; print value) Email Frequency: Select (every 60 mins | every 24 hours ) Format HTML Send email to recipients End.
I'm pretty sure this could be done in Shell scripting and Cron job, not sure if it would be easier as a Perl script. Either way I'm open to learning the most efficient and simplest solution for the above admin task.