atop.daily: removed dependency from procps
This patch allows atop to not work only with procps, but with busybox ps too. Distribution with small amount of packages and embedded systems can benefit from this. Thanks for considering. .:Francesco Colista
Development is certainly not frozen.
In my opinion, the proposed modification does not work properly any more with procps ps since no flags are passed (ps does not show the daemon processes, like atop). I propose another modification that does not depend on ps any more:
if [ -e $PIDFILE ] && grep -q 'atop$' /proc/`cat $PIDFILE`/comm
Can you confirm that this works with busybox?
It works, but after thinking a little bit more, I think that it's better to use "pidof". This is implemented both in procps and in busybox too:
if [ -e $PIDFILE ] && pidof atop|awk '{print $1}';
Francesco
If more atop processes are active (e.g. the daemon running in the background and a couple of interactive atop processes in the foreground), pidof shows more that one PID. You still don't know which PID is the one related to the background atop (the PID that should be compared to the PID found in the pid file).
Gerlof