Sorry for the delay, here is the result, not quite sure this is exactly what
you want:

while (true); do cat /proc/meminfo /proc/stat /proc/[1-9]*/stat
/proc/[1-9]*/status > /dev/null; sleep 5; done &
[1] 31676

root@media:~# ps aux | grep [3]1676
root     31676  0.0  0.0   6024  2632 pts/2    S    14:19   0:00 -bash

kill 31676


This is a bash process so doubt that is what you are looking for.

The only other way I know is this:
while (true); do cat /proc/meminfo /proc/stat /proc/[1-9]*/stat
/proc/[1-9]*/status > /dev/null; sleep 5; done

 ps aux | grep [s]leep
root     32022  0.0  0.0   3768   332 pts/2    S+   14:23   0:00 sleep 5

root@media:~# killall sleep


This doesn't work, but obviously it is a forked process, not sure how to
kill the main process?



--
View this message in context: 
http://nongnu.13855.n7.nabble.com/Unable-to-stop-monit-tp208452p209217.html
Sent from the monit-general mailing list archive at Nabble.com.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to