Is there a way to determine the 'uptime' of a process in Windows. Disappointed to find that it is not one of the attributes available when using the Task Manager.
Is there a way to determine the 'uptime' of a process in Windows. Disappointed to find that it is not one of the attributes available when using the Task Manager.
This can be done using Powershell.
Run it as admin and then execute
Get-Process | select name, starttime
You will get a list of all running processes and their start times
Referenced from: http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/18/powertip-use-powershell-to-easily-see-process-start-time.aspx
You can see this with Process Explorer. In the taskbar menu select
View
and checkShow Process Tree
and theShow Lower Pane
options. Right click on any column andSelect Columns
, now click on theProcess Performance
tab and check theStart Time
box.Community Update:
As mentioned in the comments, in more recent versions of the tool (currently as of 2019), the information has been relocated into the image tab of the property sheets regarding each process-tree item (Just
double-click
the process name, no other steps are required).If you're on a server where you cannot install any external tool, you still can :
You can see a "creation date" right there, which should be the creation date of your process. With a simple substraction you can deduce the uptime.
In CMD you can use standard Windows Management Instrumentation Command-line (WMIC) utility to get the process start time:
or
You'll get a datetime like this:
20201021010512.852810+180
.Format:
YYYYMMDDHHMMSS.ssssss+MMM(UTC offset)
If you want a more readable representation you'd need to prep it with a script. Here I have written a little batch script for the purpose:
Feed it with a PID or a process name ending with .exe and it will output when the process was started. Caveat: If there are many processes with the same name it would output the time only for the last one started.
Open Task Manager and right-click on the process. Choose Properties in the menu and look at the field Accessed in the first tab. Unless multiple instances have been started this will give you the start time of the process.
maybe you can try procxp http://technet.microsoft.com/en-us/sysinternals/bb896653
With the PID from Task Manager, you can use the following Powershell command with the implied -End (Get-Date):