My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com









Wednesday, February 26, 2014

Using PS command to get Time a Process runs (etime) On Mac Unix etc

Its a simple command but very useful.

To see the results for a single process,  just add a grep at the end for the process' name. For example:

$ ps -ax -o etime,command -c | grep AnwarApp

Please note above that AnwarApp is nothing but your Process name.
You shall get a detailed running time information of this process the.

Result:
08-02:10:05 AnwarApp

This means that on my Mac, the AnwarApp has been running for eight days, two hours, ten minutes, and 5 seconds. 

I believe you got your work done.
So, cheers!!