View Full Version : PHP - Show server uptime on Windows box
ironfistchamp
January 8th, 2007, 01:03 PM
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, 01:10 PM
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, 01:21 PM
if you allowed the php script to execute, you could just call the uptime command.
uptime
patty522
January 8th, 2007, 01:32 PM
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, 01:33 PM
Thanks for your help I shall give that a go.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.