bash calculate job duration
I need to know how long the particular job is running on my system
The approach to get Code:
start_time=`ps -ef | grep <job_name> | awk '{print $3}' ` Code:
date today Any ideas or solutions? |
What about this:
Code:
time command |
No, for this I need to start a certain process in "time" command. But the process is started as a child from another script and I cannot modify it.
I found better solution [CODE]ps -eo pid,etime,comm[CODE] it gives me just what I need |
All times are GMT -5. The time now is 08:38 PM. |