Does anyone know of a way to track how long a server has been up without a reboot? preferably without any 3rd party apps. Its something so basic that I would think it would be included somewhere.
If you've got a long list of events kept, u might be able to see in the event viewer which services started up and be able to derive a time from that....
Take a look at an NT command, "net statistics", which apart from providing all the vital network stats also shows the startup time of an NT server or workstation.
The syntax of the command is:
"net statistics server |more" for server side stats
"net statistics workstation |more" for workstation side stats
The "|more" part is important here as the start time is displayed at the top of the command output.
Startup time of a server can also be seen in the WINS Manager, of course if WINS service is installed. But as one can imagine it shows the start time of the WINS service which is about the same as the startup time of the NT server itself. Since WINS service is set to start automatically it's start time can be considered as the start time of the NT server. But for this you have to be 100% sure that WINS service wasn't stopped/started along the way.
Event log is also an acurate way of doing it but can be little tedious for servers running for months.
There're some other ways too, but of all, I think "net statistics" command is the best.
Just as an aside to this thread, if you want to determine how long any WIN32 computer has been up and running programatically, you can use the GetTickCount API. This will return the number of milliseconds that have elapsed since the machine was started. The resoultion on the number is such that it will not roll over for over 40 days.
Just in case you ever wanted to do this inside of a program.
- Jeff Marler B-)
Perhaps, but the uptime.exe utility will actually break it down a little better by number of days, hours, minutes, seconds, etc. The System Idle timer only shows hours (although you could calc it out by the number of hours, but it's more work that way
I know there's been some excellent replies here already, but just for information:
For another native NT solution to this, Performance Monitor can also report the system uptime with the "System" object and "System Up Time" counter. This value is reported in seconds so it'll need a bit of maths to translate into something useful!
Wouldn't the CPU Time listed for 'System Idle Process' in Task Manager also give this info? Seems to be a consistent running time for the CPU that starts over upon reboot.
No, as it would only give the time the CPU has been idle. If you run a program like SETI@Home (which eats the processor when not in use by other programs), you'll find the System Idle Process CPU counter will be near to 0, regardless of how many days/weeks/months the PC has been up. MCSE NT4/W2K
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.