36

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.

7 Answers 7

26

You can see this with Process Explorer. In the taskbar menu select View and check Show Process Tree and the Show Lower Pane options. Right click on any column and Select Columns, now click on the Process Performance tab and check the Start 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).

enter image description here

5
  • 1
    Hey TiZon. This looks a really useful tool. Thanks
    – nick
    May 12, 2011 at 10:12
  • Or you can right click, Properties and on Threads tab, there is start time.
    – Betlista
    Aug 11, 2017 at 8:49
  • In the link, Download section, "Run now from Sysinternals Live", when running, the process tree is not clickable in the view. I have windows 7 enterprise, so maybe it is blocked by my firewall.
    – Timo
    Jan 17, 2018 at 13:37
  • @Betlista, there is no threads tab in Properties
    – Timo
    Jan 17, 2018 at 13:37
  • 1
    This answer is outdated. For Process Explorer v16.26, right click the process -> Properties -> Threads tab -> start time is listed below. No need to check Show Process Tree or Show Lower Pane. The Performance tab does not list start time any more. The lower pane isn't used to find the start time.
    – BurnsBA
    Jul 22, 2019 at 13:14
39

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

1
  • I see values for most of the services but the one I want (w3wp) doesn't have a start time listed.
    – sirdank
    Jun 28, 2019 at 15:26
3

If you're on a server where you cannot install any external tool, you still can :

  1. Open the task manager
  2. Click on the process tab
  3. Locate your process
  4. Right click on it
  5. Select the Properties option

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.

3
  • 1
    This only works on Windows 8. If you are still on Windows 7, the Properties option shows properties of the running executable file, not of the process. Mar 12, 2015 at 12:28
  • 2
    Win 8.1 also shows executable file properties
    – TOP KEK
    May 29, 2015 at 11:54
  • Windows 11: this displays the file creation time, not the process creation time.
    – Spike0xff
    Aug 7, 2023 at 17:45
3

In CMD you can use standard Windows Management Instrumentation Command-line (WMIC) utility to get the process start time:

wmic process where Name="<process name>" get CreationDate

or

wmic process where ProcessID="<PID>" get CreationDate

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:

@ECHO OFF
SETLOCAL

IF [%1]==[] (
    ECHO Prints process creation date in ISO format. 
    ECHO:
    ECHO USAGE: %~n0 ^<PID or Process name^>
    EXIT /B 1
)

IF [%~x1]==[.exe] (SET type=Name) ELSE (SET type=ProcessID)

FOR /F "tokens=1,2 delims==" %%a IN ('wmic process where %type%^="%~1" get CreationDate /value') DO (
    IF [%%a]==[CreationDate] SET proc_cd=%%b
)

IF DEFINED proc_cd (
    ECHO %proc_cd:~0,4%-%proc_cd:~4,2%-%proc_cd:~6,2%T%proc_cd:~8,2%:%proc_cd:~10,2%:%proc_cd:~12,2%
)

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.

1

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.

0

maybe you can try procxp http://technet.microsoft.com/en-us/sysinternals/bb896653

0

With the PID from Task Manager, you can use the following Powershell command with the implied -End (Get-Date):

New-Timespan -Start (Get-Process -Id PID).StartTime

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .