Say I have a process that I have spawned on the terminal, for instance vagrant up
If I need to see how long it has been running, I’d have to open a new terminal window then get the process ID it has, I’lltype in ps aux | grep "vagrant up" to see which ID the process has.
Sample output will be as below

To see how long process 9534 has been running, on the terminal window, I’ll type in
ps -o pid,comm,cmd,start,etime -p 9534
This will return the process ID and how long it has been currently running, the output will be as below

You can see all the info about the process above.
Kwaheri kwa sasa
Leave a comment