Windows 7 or Server 2008 Show running time for a Process
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).
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.
Related videos on Youtube
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
Is there any simple way to show how long a specific PID instance has been active?
-
Pacerier over 7 yearsHere too: superuser.com/q/772815/78897
-
-
SparedWhisle almost 9 yearsProcess Explorer solves the problem.
-
warren over 8 yearsinterestingly - not all processes have a
starttime
-
disasteraverted over 7 years@warren - run it as Administrator and all services have a time.
-
Pacerier over 7 years@Davidw, What about batch command?
-
BenVlodgi over 7 yearsThis won't account for the amount of time the computer was in hibernation since the process started.
-
TheCrazyProgrammer almost 7 years@disasteraverted I am running PowerShell ISE as administrator on a WIndows Server 2012 R2,
NO
, all processes do not havestarttime
. -
TheCrazyProgrammer almost 7 yearsInfact, I do not get starttime for any of them if I do
Get-Process
-
Davidw almost 7 yearsYou have to specify that object property, it is not visible by default, that's why the Select-Object part of the command.