Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How long has my server been up? 8

Status
Not open for further replies.

nlm9802

IS-IT--Management
Oct 10, 2000
409
0
0
US
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.

thanks
-Nick
 
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....

 
Good things come in small packages...

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.

Hope this helps.

Mubashir
 
Ah, net statistics. just what I was looking for, thank you
The event config was good also, but thats a looooong list to look through :)

thanks again
 
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-)
 
OK, so it's been almost a year, but here's my two cents:

uptime.exe in the Win2k Resource Kit. Works great!
 
What about the system idle process in Task Manager.

Isn't this accurate enough

Nick
 
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 :)
 
Star for you lifegard2. Uptime is simple and if I needed, easy to add in a script to monitor domains.

[thumbsup2]
 
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!
 
Uptime.exe from the resource kit will get what you want. this is not 3rd party, so to speak.
 
Keep ii simple, go to your pagefile in explorer and see when it was created !!!!!
 
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. [auto] MCSE NT4/W2K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top