Windows 7 or Server 2008 Show running time for a Process

35,900

Solution 1

Using the Powershell Get-Process cmdlet:

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

Solution 2

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.

Share:
35,900

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

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

  • SparedWhisle
    SparedWhisle almost 9 years
    Process Explorer solves the problem.
  • warren
    warren over 8 years
    interestingly - not all processes have a starttime
  • disasteraverted
    disasteraverted over 7 years
    @warren - run it as Administrator and all services have a time.
  • Pacerier
    Pacerier over 7 years
    @Davidw, What about batch command?
  • BenVlodgi
    BenVlodgi over 7 years
    This won't account for the amount of time the computer was in hibernation since the process started.
  • TheCrazyProgrammer
    TheCrazyProgrammer almost 7 years
    @disasteraverted I am running PowerShell ISE as administrator on a WIndows Server 2012 R2, NO, all processes do not have starttime.
  • TheCrazyProgrammer
    TheCrazyProgrammer almost 7 years
    Infact, I do not get starttime for any of them if I do Get-Process
  • Davidw
    Davidw almost 7 years
    You have to specify that object property, it is not visible by default, that's why the Select-Object part of the command.