View Full Version : PHP - Show server uptime on Windows box
ironfistchamp
January 8th, 2007, 08:03 AM
Hey all
Does anyone know how I can write a script to show the servers uptime? It is a windows box so any tutorials or scripts I have found don't work (*nix only).
Thanks
Ironfistchamp
Jussi Kukkonen
January 8th, 2007, 08:10 AM
I don't know PHP, so you'll have to figure out the integration yourself, but I did have to find out about this a few years back (when I still had something to do with Windows)
On XP:
Systeminfo | Find "Up Time"
This should work on older systems too, but it only gives you the start date:
net stats srv
enopepsoo
January 8th, 2007, 08:21 AM
if you allowed the php script to execute, you could just call the uptime command.
uptime
patty522
January 8th, 2007, 08:32 AM
Hey all
Does anyone know how I can write a script to show the servers uptime? It is a windows box so any tutorials or scripts I have found don't work (*nix only).
Thanks
Ironfistchamp
its a server2003 if that makes any difference
ironfistchamp
January 8th, 2007, 08:33 AM
Thanks for your help I shall give that a go.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.