25

Is there any simple way to show how long a specific PID instance has been active?

31

Using the Powershell Get-Process cmdlet:

Get-Process | Select-Object id, starttime, name | Sort-Object id

  • 6
    interestingly - not all processes have a starttime – warren Oct 5 '15 at 19:29
  • 8
    @warren - run it as Administrator and all services have a time. – disasteraverted Aug 30 '16 at 5:08
  • @Davidw, What about batch command? – Pacerier Dec 26 '16 at 3:33
  • This won't account for the amount of time the computer was in hibernation since the process started. – BenVlodgi Dec 27 '16 at 8:02
  • @disasteraverted I am running PowerShell ISE as administrator on a WIndows Server 2012 R2, NO, all processes do not have starttime. – TheCrazyProgrammer May 10 '17 at 22:41
10

Gregg,

I know that Process Explorer will show this, sort of.

Get it here: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

If you run it, right click on a process and choose Properties it will show you the start time of the process (and you can click on the Threads tab there to see individual thread start times).

enter image description here

Alternatively in Process Explorer you can click View, Select Columns, choose the Process Performance tab, and choose Start Time and then it will show that column in the main window for all PIDs.

You might need to do your own math on the individual threads within that process (again the threads tab) and the current date/time to get a true "how long" answer.

  • 2
    Process Explorer solves the problem. – David Dai May 27 '15 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy