Question: How do I check if a process has started? How do I check if my favourite game is running? How do I see if a process is running in linux that I don not want to run.
Answer:
For example I want to see if a rsync is running on a box. But maybe it runs too quickly and you can't catch it with ps aux | grep rsync as this only shows you current processes running and is easily missed if for example this is running locally.
What you need to do is call it with a nifty application called "watch"
All you need to do is give watch a command and it will echo on screen, automatically refreshing, what is currently happening with that.
In my case I am looking for a running RSYNC.
watch "ps aux | grep rsync"
This will then echo the rsync on screen as soon as it runs
By PHPin24 @ 2009-08-06 14:24:53
|