Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Simple bash script, to check the output of ps for a defined service/program name and it's cpu usage. Usage: check_ps_cpu -w <warning> -c <critical> -p <process name> Returns a warning/critical message, when the cpu usage is above the threshold or when the monitored service is not running at all. Can be easily adopted to monitor other values of ps, by adding your own ps parameters in the following line --- snipp --- CHECK_PROCESS="$(/bin/ps -eo pcpu,comm,user,pid,time | sort -rnk1 | grep $PROCESS)" --- snipp --- Be warned about my poor programming skillz. Just thought this script might be useful for someone, so i added it here...
Current Version
Last Release Date
November 23, 2011
Owner
Mike Kesler
License
Other
Simple bash script, to check the output of ps for a defined service/program name and it's cpu usage.
Usage: check_ps_cpu -w <warning> -c <critical> -p <process name>
Returns a warning/critical message, when the cpu usage is above the threshold or when the monitored service is not running at all.
Can be easily adopted to monitor other values of ps, by adding your own ps parameters in the following line
--- snipp --- CHECK_PROCESS="$(/bin/ps -eo pcpu,comm,user,pid,time | sort -rnk1 | grep $PROCESS)" --- snipp ---
Be warned about my poor programming skillz. Just thought this script might be useful for someone, so i added it here...
You must be logged in to submit a review.
To:
From: