Posts

Showing posts from January, 2015

Process uptime - Linux

How to find the uptime of a Linux Process ----------------------------------------------------- 1. Login to the server as root. 2. Run the below provided command ps -eo pid,comm,lstart,etime,time,args | grep process-name Acronyms PID - Process ID .ie. the ID of the process that we are searching. comm - Display the process name. lstart - The time at which the process is started. etime - The time elapsed once the process is started. args - command with options and arguments. process-name - The process for which we need to check uptime. For eg : :~$ ps -eo pid,comm,lstart,etime,time,args | grep cron   937 cron            Fri Jan 30 09:42:17 2015       37:36 00:00:00 cron The cron deamon is running in the server from 9:42 AM and is alive for 37 minutes till now. Check the etime field. (37:36) This is how we can detect the uptime of a process in Linux. Added on Jan 30 10.26 AM