Monthly Archives: March 2019

Finding a process uptime

Dear All,

I am back with a linux post as was hell occupied with work. I am sharing a simple story where I had a bottleneck of knowing some processes which were up and running for how much time. This helps in monitoring purposes and many of you might be knowing about it but I thought worth sharing. There was one java process which got killed and was restarted this gave me a ticket to debug further and then got to know that we have a command to know how much time the specific process was up and running.

First identify the process id of your process with it’s name.
#ps -ef |grep httpd

identify the pid no from the above command.

#ps -eo pidno,etime
50:08 elasped time

Here elapsed time shows that the process apache(httpd) was up and running from 50 minutes 8 seconds.

Feel free for any queries & comments.

Thanks & Regards,