blob: 80f9a8ccecc5a40e5c5121284e098c56f715800f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff --git a/atop.daily b/atop.daily
index 8943014..edf67a0 100755
--- a/atop.daily
+++ b/atop.daily
@@ -8,13 +8,13 @@ INTERVAL=600 # interval 10 minutes
# verify if atop still runs for daily logging
#
-if [ -e $PIDFILE ] && ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null
+if [ -e $PIDFILE ] && ps | grep `cat $PIDFILE` > /dev/null
then
kill -USR2 `cat $PIDFILE` # final sample and terminate
CNT=0
- while ps -p `cat $PIDFILE` > /dev/null
+ while ps | grep `cat $PIDFILE` > /dev/null
do
let CNT+=1
|