Uptime script
| From: | Dave Milford | Date: | Fri, 13 Jul 2001 13:50:19 +0000 |
| Subject: | Uptime script | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-8310@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to create a little script to show the system uptime (and
hopefully system resource usage) on my Windows 2000 Professional SP2 box.
I'm currently running Apache 1.3.20 and PHP 4.0.6 on it... It should be
noted that I have MS' "uptime" program installed.
So far, I've tried using: system(uptime);
That didn't work. I get the following printed: "Warning: Unable to fork
[uptime] in d:\www\inc_top.html on line 58".
So I hit the PHP website, found out some other methods of doing this, like:
PRINT exec("cmd \\c uptime");
This time it displays: d:\www>
(that's my HTTPd root dir)
How could I get this displaying my uptime, and maybe even resource usage?
Any help would be appreciated.
Thanks
---------------------------
Dave Milford
ICQ : 8516328
Email: davemilford@shaw.ca