Skip to content

Instantly share code, notes, and snippets.

@iambryancs
Created May 12, 2023 00:30
Show Gist options
  • Save iambryancs/494696d47ab9b645c5097f46512fcea4 to your computer and use it in GitHub Desktop.
Save iambryancs/494696d47ab9b645c5097f46512fcea4 to your computer and use it in GitHub Desktop.
Get Linux process elapse time

Get Linux process elapse time

Get process id

$ pidof tar
1388

Use ps with elapse time

$ ps -p 1388 -o etime

ELAPSED
 05-11:03:02

You can also grep the process

$ ps -eo pid,lstart,etime,args | grep tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment