make it so

This commit is contained in:
2017-10-10 16:30:00 +02:00
commit 36a526a95b
5 changed files with 59 additions and 0 deletions

15
observe.sh Executable file
View 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