Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
This Plugin provides hopefully all the info you would ever need about your CPU: - Returns Stats for User, System, and IOWait - Allows for setting Warning/Critical levels globally or for each individual stat - When a Warning or Critical threshold is reached for User or System stats, the plugin also returns a list of the 5 processes using the most CPU - Returns Performance Data
Current Version
Last Release Date
2014-08-22
Owner
Warren
Download URL
https://exchange.nagios.org/wp-content/uploads/project-files/2014/08/check_cpu_linux.sh
Compatible With
Check Script
PNP4Nagios Template
This is a variant on the check script made by Andreas Baess with some new features.
This Plugin provides hopefully all the info you would ever need about your CPU:
- Returns Stats for User, System, and IOWait - Allows for setting Warning/Critical levels globally or for each individual stat - When a Warning or Critical threshold is reached for User or System stats, the plugin also returns a list of the 5 processes using the most CPU - Returns Performance Data
Plugin Requirements: - IOStat This is not included by default with all linux distros. To install on Ubuntu (and probably other Debian variants) - apt-get install sysstat
Usage Info (this can also be found using -h):
-w <number> : Global Warning level in % for user/system/io-wait cpu -uw <number> : Warning level in % for user cpu -iw <number> : Warning level in % for IO_wait cpu -sw <number> : Warning level in % for system cpu -c <number> : Global Critical level in % for user/system/io-wait cpu -uc <number> : Critical level in % for user cpu -ic <number> : Critical level in % for IO_wait cpu -sc <number> : Critical level in % for system cpu -i <number> : Interval in seconds for iostat (default : 1) -n <number> : Number report for iostat (default : 3)
I have also included a pnp4nagios template for any interested.
Works good, just be sure to dos2unix the file like so: dos2unix check_cpu_linux.sh
keep getting error if i execute the script directly. bash: ./check_cpu_linux.sh: /bin/bash^M: bad interpreter: No such file or directory if i comment out the shabang (#!/bin/bash) header. then i get this error. ./check_cpu_linux.sh ./check_cpu_linux.sh: line 36: $'r': command not found ./check_cpu_linux.sh: line 38: $'r': command not found ./check_cpu_linux.sh: line 40: $'r': command not found ./check_cpu_linux.sh: line 46: $'r': command not found ./check_cpu_linux.sh: line 58: $'r': command not found ./check_cpu_linux.sh: line 63: $'r': command not found ./check_cpu_linux.sh: line 68: $'r': command not found ./check_cpu_linux.sh: line 70: syntax error near unexpected token `$'{r'' '/check_cpu_linux.sh: line 70: `print_release() {
You must be logged in to submit a review.
To:
From: