Skip to content
Snippets Groups Projects
Commit aa78838b authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

check_cpu: remove useless parts

parent ebb05e55
Branches
No related tags found
No related merge requests found
......@@ -26,8 +26,6 @@
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.9
tmpfile=/tmp/check_cpu_$$
# ----------------------------------------------------------------------
# functions
# ----------------------------------------------------------------------
......@@ -110,17 +108,6 @@ typeset -i iMinCpuUsageToShowProcesses=$( ph.getValueWithParam 50 p "$@")
# top -b -n 1 | head -5 | grep "^\%Cpu" >$tmpfile
# FIX read cpu from 2nd output of top
# top -b -n 2 -d 0.1 | grep -i "^\%Cpu" | tail -1 >$tmpfile
# cpuUser=$( awk '{ print $2 }' $tmpfile)
# cpuSystem=$( awk '{ print $4 }' $tmpfile)
# cpuNice=$( awk '{ print $6 }' $tmpfile)
# cpuIdle=$( awk '{ print $8 }' $tmpfile)
# cpuWait=$( awk '{ print $10 }' $tmpfile)
# cpuHi=$( awk '{ print $12 }' $tmpfile)
# cpuSi=$( awk '{ print $14 }' $tmpfile)
# cpuSt=$( awk '{ print $16 }' $tmpfile)
# rm -f $tmpfile
data=$( top -b -n 2 -d 0.1 | grep -i "^\%Cpu" | tail -1 | cut -f 2- -d ':' | tr ',' "\n" )
cpuUser=$( echo "$data" | grep "us" | awk '{ print $1 }' )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment