Windows 8 reports WRONG uptime (possibly total Hybrid-Boot uptime)

10

1

Wrong Uptime

The up time shown in the picture is 6 Days, 1 hour, 34 Minutes, 22 seconds. I turned on this Laptop just about 7 min ago.

I actually think it like, Windows 8 reports the total up time while in Hybrid-Boot mode. How do I get the real up time?? Also, why does Windows reports it that way??

Is there any way to get the real up time in GUI way (for my n00b friend)??


UPDATE: I disabled Hybrid-Boot and rebooted. It now results the right uptime. Also, doing a full shutdown with shutdown /s /t 0 also works.

Little more explanation, My question is that How to get the actual up-time (time from when we powered the system on) even if the Hybrid-Boot is enabled? Possibly in stock Windows without any external program, though not necessary.

Any explanation to this?

Akshat Mittal

Posted 2013-03-11T12:50:57.223

Reputation: 2 195

1Can you clarify what you mean by "real up time"? What did you do 7 minutes ago exactly? – David Schwartz – 2013-03-11T13:07:46.363

Real up time means the actual time from when I turned on the system. (That's what I did 7 min ago, turn on the Laptop!) – Akshat Mittal – 2013-03-11T13:32:54.597

8The legacy definition for uptime is the time that the computer has been running since the kernel initialized itself. Since hybrid boot is just a special type of suspend (there was previously suspend to RAM and Hibernate), it doesn't count as "shutting down", because the same instance of the Windows kernel is used. – allquixotic – 2013-03-11T13:56:12.730

@allquixotic True, That's why I thought it would be Hybrid-Boot up time. – Akshat Mittal – 2013-03-11T14:15:13.810

I guess you din't actually got the Question. I want to ask that how to get the actual up-time even when Hybrid-Boot in enabled. I am updating the question. – Akshat Mittal – 2013-03-12T14:25:56.487

Answers

5

You want to get an out-of-the-box solution to find out the uptime of your machine since the last hybrid shutdown / fast startup took place, right?

You can get this information (as provided by @allquixotic) from the EventLog using PowerShell like this:

PS c:\> Write-Host $("{0:c}" -f ((Get-Date)- (Get-EventLog -LogName system -Source "Microsoft-Windows-Power-Troubleshooter" -Newest 1).TimeGenerated))

To embed powershell command into a Windows shell script you can do this instead:

c:\> powershell.exe -nologo -command Write-Host $('Time since last ''Fast Startup'': {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -Source \"Microsoft-Windows-Power-Troubleshooter\" -Newest 1).TimeGenerated))

Howerver, to get this to work out of the box, you could set it into a permanent environment variable like this instead:

c:\> setx HardwareUptime "powershell.exe -nologo -command Write-Host $('Uptime since last ''Fast Startup'': {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -Source 'Microsoft-Windows-Power-Troubleshooter' -Newest 1).TimeGenerated))"

so, you can then get it to work by opening up a cmd window and doing:

c:\> %HardwareUpTime%

UPDATE:

I just found today that using the above entry in the event log will also take into account "Sleep" or suspend mode, so running %HardwareUpTime% will tell you the elapsed time since the PC resumed from sleeping if you let it do so.

Therefore, here it is:

setx HardwareUptime "powershell.exe -nologo -command Write-Host $('Uptime since hardware boot: {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -InstanceId 27 -Newest 1).TimeGenerated)); Write-Host $('Uptime since system resumed: {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -Source 'Microsoft-Windows-Power-Troubleshooter' -Newest 1).TimeGenerated));"

I've modified the command a little bit to be more explicit and give you both pieces of information:

  • Elapsed time since Windows booted (either after a hybrid shutdown, full shutdown or simple reboot or hibernation).

  • Elapsed time since Windows resumed execution (after returning from sleep mode).

NOTE: If the system didn't sleep in between, both times will be the same.

asm00

Posted 2013-03-11T12:50:57.223

Reputation: 166

This seems to me like a nice solution. – Akshat Mittal – 2013-12-21T17:58:55.340

4

Taken from here:

Check the Windows Event Log.

  1. Press Windows Key+r

  2. Enter in the box, %windir%\system32\eventvwr.msc /s

  3. Click "Create Custom View..." on the right-hand side.

  4. Set the settings like this: power-troubleshooter

  5. Click OK

  6. When prompted, give the custom view a name (this can be anything you want)

  7. It will display the list of resume times

allquixotic

Posted 2013-03-11T12:50:57.223

Reputation: 32 256

Ok, Its nice. Its somewhat what I want. What if I am a n00b?? Its just not suitable. Also, It results the last resume time, for up time I need to minus it from my current time. Is there any direct method for up time, maybe in command-line?? I am up voting, but not accepting. – Akshat Mittal – 2013-03-11T14:16:52.640

There's no shrinkwrapped solution for this AFAIK. You'd have to write a program. Maybe I will.... – allquixotic – 2013-03-11T15:04:45.817

Okay, I'll try that later maybe. – Akshat Mittal – 2013-03-11T15:29:10.163

1

You should disable Hybrid-Boot and reboot. It should display the right uptime. Also, doing a full shutdown with shutdown /s /t 0 also works.

Kruug

Posted 2013-03-11T12:50:57.223

Reputation: 5 078

This is exactly what I wrote in Update – Akshat Mittal – 2013-03-12T05:29:25.453

@AkshatMittal Yes it is, but I figured you'd like to accept an answer :) – Kruug – 2013-03-12T13:25:09.890

No. -_- The question is that "How to get the real up-time in GUI form?" – Akshat Mittal – 2013-03-12T13:29:05.700

Well, first you would have to disable your Hybrid-Boot as uptime starts counting from the time the kernel was initialized. That's the only way. – Kruug – 2013-03-12T13:31:32.617

The only way, sure? – Akshat Mittal – 2013-03-12T14:26:26.050

0

this also happens in older Version (XP, Vista,7) when you use hibernation. The time gets only reseted when you do a full boot, but the Win8 fast startup is no longer a full boot. It is a combination of logging the user off + Hibernation.

magicandre1981

Posted 2013-03-11T12:50:57.223

Reputation: 86 560