make it so
This commit is contained in:
15
observe.sh
Executable file
15
observe.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
PID=$1
|
||||
RET=0
|
||||
|
||||
while [ "$RET" == 0 ]; do
|
||||
INP=`ps -o pcpu -p $PID`
|
||||
RET=$?
|
||||
ARR=($INP)
|
||||
echo ${ARR[1]}
|
||||
if [ `echo "${ARR[1]}"'>'50 | bc -l` == 1 ]; then
|
||||
echo dit
|
||||
else
|
||||
echo dah
|
||||
fi
|
||||
sleep 1
|
||||
done
|
Reference in New Issue
Block a user