3

Possible Duplicate:
How to check how a long a program has been running?

I am interested in doing this purely using bash.

Ankur Agarwal
  • 3,108
  • 10
  • 35
  • 52

1 Answers1

4

ps can fit your needs:

ps -eo pid,command,etime

To get information for a specific process:

ps -o command,etime -p PID
Mu Qiao
  • 164
  • 3