Windows – Find your ‘Uptime’

KB ID 0000552 

Problem

There are lots of reasons you might want to know your PC/Servers uptime, to make sure a client has rebooted a server (like you asked them to), or to see if a server has had a BSOD and rebooted overnight, etc.

Check Uptime with Task Manager

You can get your uptime from the Task Manager’s “Performance” tab.

To launch Task Manger

Start > Run > Taskmgr.exe {enter}. or Press CTRL+SHIFT+ESC, or Right click the Task bar > Select Task Manager.  > Options

 

Use PowerShell to find Server Boot time

From Powershell Use the following syntax;

[box]

[Management.ManagementDateTimeConverter]::ToDateTime((Get-WmiObject Win32_OperatingSystem).LastBootUpTime)

[/box]

Use PowerShell to find Uptime

From Powershell Use the following syntax;

[box]

(Get-Date) - [Management.ManagementDateTimeConverter]::ToDateTime((Get-WmiObject Win32_OperatingSystem).LastBootUpTime)

[/box]

Option 3 – Use Systeminfo to find Uptime

From command line execute the Systeminfo | find /I “boot” command;

 

Option 3 -Use Net Statistics to find Uptime

You can get uptime information by either querying the workstation service, or the server service, issue either, the following command;

[box]

net statistics workstation

[/box]

Or the following command;

[box]

net statistics server

[/box]

Option 4 – Use Uptime.exe to find Uptime

Download uptime and put a copy in your “System32” Directory, you can then use the uptime command.

Option 5 – Use WMI (Windows Management Instrumentation) to find Uptime

Issue the following command;

[box]

wmic os get lastbootuptime

[/box]

As you can see the result is not pretty, it is presented in UTC format.

20120109081112.925800+000 = Year 2010, Month 01, Day 09, Time 08:11:12

Option 6 – Check the Event Log to find Uptime

Launch the Event Viewer (eventvr.msc) > Windows Logs > System Log > Find > Search for Event ID 6005, (Note: This event gets logged each time the server boots, as the event log service starts). Event ID 6006 will be labeled as “The event log service was stopped.” This is synonymous with system shutdown.

 

Note: Event 6013 is periodically logged this shows the machines uptime at that point.

Note:  In the event of an abnormal shutdown look for Event ID 6009 indicates the processor information detected during boot time. Event ID 6008 will let you know that the system started after it was not shut down properly.

Option 1 – Use Uptime.exe to get a Remote Machines Uptime

Already mentioned above download uptime and extract it to your system32 directory. Then to get a remote machines uptime, use the following command;

[box]

uptime {Name of Remote PC}

[/box]

Use Powershell to get a Remote Machines Uptime

Use the following syntax;

[box]

[Management.ManagementDateTimeConverter]::ToDateTime((Get-WmiObject Win32_OperatingSystem -ComputerName RemoteMachine).LastBootUpTime)

[/box]

Related Articles, References, Credits, or External Links

NA

Lenovo ThinkPad – ‘Where is the Pause/Break Key?’

KB ID 0000930

Problem

Much as I like my new S531 work ThinkPad, I thought after discovering it had no serial port, no RGB monitor port, and the worst touch-pad in the entire history of input devices (I now carry a mouse it’s so bad!), that my bad experiences were over. That was until I needed to reset a password on a Cisco Router, and needed to send a ‘Break’ keystroke. There is no pause break key?

Solution

Initially I tossed the cable over to my colleague who sent the keystroke for me, then the second time I went down to the workshop and grabbed a spare USB keyboard and used that.

However, I thought that’s no good if I’m on a client site and I need to reset a router, switch, or firewall password. So when I got home I dragged out a Cisco router and set about working out how to do it.

Option 1

You can use the following key stroke to send a ‘break’, Fn+Ctrl+P. (Note: to Pause it would be Fn+P).

Success!

Option 2

If you are using PuTTY, you can send a ‘Break’ Keystroke via Special Command > Break.

Option 3

Press Windows Key+R > osk {Enter} > Ctrl > Pause.

Related Articles, References, Credits, or External Links

NA