Difference between revisions of "Cmd tools"
(Created page with "= All of these commands must be run from a command line prompt or window, what used to be called the DOS prompt! = <br /> To see how long a Windows computer has been turned on fo...") |
|||
Line 8: | Line 8: | ||
You will get an output similar to this: | You will get an output similar to this: | ||
<pre style="color:blue"> | <pre style="color:blue"> | ||
− | Server Statistics for \\ | + | Server Statistics for \\COMPUTER_NAME |
Revision as of 02:36, 25 October 2015
All of these commands must be run from a command line prompt or window, what used to be called the DOS prompt!
To see how long a Windows computer has been turned on for since the last time it was turned off or rebooted, there is no UNIX/Linux equivalent of the command "uptime", which shows you exactly how long the machine has been "Up" or turned on for. A command to get that same information is a subset of the "net" family of command line commands.
So, to see how long your Windows computer has been turned on for since it was last turned off or reboots, type this from the command prompt:
net statistics server
and hit the "ENTER" key. You will get an output similar to this:
Server Statistics for \\COMPUTER_NAME Statistics since 9/27/2015 4:55:18 PM Sessions accepted 1 Sessions timed-out 0 Sessions errored-out 328 Kilobytes sent 925 Kilobytes received 4351 Mean response time (msec) 0 System errors 0 Permission violations 0 Password violations 4 Files accessed 0 Communication devices accessed 0 Print jobs spooled 0 Times buffers exhausted Big buffers 0 Request buffers 0 The command completed successfully.
You can shorten the command as well, like this:
net stats srv
Also, you can filter out all of the data and information provided by the output of this command by piping the output of the command into the findstr command to only display the one line we are looking for, that starts with "Statistics since...", like this:
net stats srv | findstr "since"
Which produces an output similar to this:
Statistics since 9/27/2015 4:55:18 PM
This gives you exactly what you are looking for, as the date and time indicates when the computer was powered on since it's been currently running.
More command line info to come as I have time. Thanks for checking this and all of my other Wiki tips, tricks, and helpful information about all things computers!