Windows 7 startup / boot time

I want to check the operating system startup time. That is, during the last month when Windows booted. Is it possible to find out?

+4
source share
6 answers

PowerShell and the system event log are perfectly designed for this task. Note. Events with identifier 12 represent the System Start Up event, and identifier 13 represents System Shutdown . The following PowerShell script will provide one-month startup and shutdown times for your system.

echo "Start time:" Get-EventLog System -After 12/21/2011 | ? {$_.EventId -eq 12} | % {$_.TimeGenerated} echo "Shutdown time:" Get-EventLog System -After 12/21/2011 | ? {$_.EventId -eq 13} | % {$_.TimeGenerated} 

Substitute 12/21/2011 for any date. Click Start, type powershell, and then type Windows PowerShell.

+15
source

maybe in windows xp just type

 systeminfo| find "System Up Time" 

The system runtime is displayed.

+5
source

Below are the following steps to verify that your system is running \ uptime .

  • Open the task manager (using alt + ctrl + del, then click " Start Task Manager " or go to the start menu command and enter "taskmgr.exe", then press enter).
  • Go to the Perfomance tab
  • Find the System group next to the bottom environment

Then it will say uptime in the format DD :: HH :: MM :: SS.

+4
source

To find out this information, you can write grep through the event log

+2
source

If you are trying to use the logs of all start-up and shutdown periods, you will need some kind of log. You can either write your own or take a look at what Microsoft provided in Windows 7. To do this, take a look at the next tutorial.

http://www.sevenforums.com/tutorials/177443-gathering-startup-shutdown-sleep-hibernate-reboot-trace.html

+2
source

You want to do this with a programming code. Like in C / C ++ code?

GetTickCount64 () returns the number of milliseconds since the system started. Vista and more. (So ​​this should work for Windows 7).

If you need to run operating systems older than Vista or the Win2K8 server, there is the usual old GetTickCount () - which returns to zero after 49.7 days or so.

Then use the other functions of the time / date function to get the current time. Subtract the value returned by GetTickCount or GetTickCount64 from the current time. This is when the system was last started.

+1
source

Source: https://habr.com/ru/post/1392287/


All Articles