aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2017-08-22 16:41:17 +0000
committerSteve Wills <swills@FreeBSD.org>2017-08-22 16:41:17 +0000
commit9e206eb55e75db3f87a67b1320259746bd8f6adf (patch)
treef62bf63e00d20098f3ec7627336e200fb1b479bb
parentb6fe25b6f7b369a818cb4b84b73b6a0b8aadb5af (diff)
downloadports-9e206eb55e75db3f87a67b1320259746bd8f6adf.tar.gz
ports-9e206eb55e75db3f87a67b1320259746bd8f6adf.zip
Notes
-rw-r--r--net-mgmt/nagios-check_cpu_usage/Makefile1
-rw-r--r--net-mgmt/nagios-check_cpu_usage/files/check_cpu_usage2
2 files changed, 2 insertions, 1 deletions
diff --git a/net-mgmt/nagios-check_cpu_usage/Makefile b/net-mgmt/nagios-check_cpu_usage/Makefile
index b953f28e87d0..e45ae308ffc4 100644
--- a/net-mgmt/nagios-check_cpu_usage/Makefile
+++ b/net-mgmt/nagios-check_cpu_usage/Makefile
@@ -3,6 +3,7 @@
PORTNAME= nagios-check_cpu_usage
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= # none
DISTFILES= # none
diff --git a/net-mgmt/nagios-check_cpu_usage/files/check_cpu_usage b/net-mgmt/nagios-check_cpu_usage/files/check_cpu_usage
index d9a9e4c8641d..1300cc6285f3 100644
--- a/net-mgmt/nagios-check_cpu_usage/files/check_cpu_usage
+++ b/net-mgmt/nagios-check_cpu_usage/files/check_cpu_usage
@@ -101,7 +101,7 @@ fi
warn=$1
crit=$3
-cpu_all=$( vmstat -c 2 -n 0 | tail -n 1 | awk '{print $15 " " $16 " " $17}' )
+cpu_all=$( iostat -c 2 -t proc | tail -n 1 | awk '{print $3 " " $5 " " $7}' )
cpu_user=$( echo $cpu_all | awk '{print $1}')
cpu_sys=$( echo $cpu_all | awk '{print $2}')
cpu_idle=$( echo $cpu_all | awk '{print $3}')