Check to see if a process is running

To see if a process is running, you can use the kill command:

kill -0 <pid>

You can then look at the return result to see if it was running. This is a little better than the typical “ps|grep” method.

Leave a Reply

Your email address will not be published. Required fields are marked *