RE: [PHP] Uptime script?
| From: | Patrik Wallstrom | Date: | Wed, 16 May 2001 08:34:09 +0000 |
| Subject: | RE: [PHP] Uptime script? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53000@lists.php.net to get a copy of this message | ||
On Wed, 16 May 2001, Ben Cairns wrote:
> >I know I've seen one before, and before I go write my own version, does
> >anyone know of a PHP script that echoes the uptime of a server (Linux) in
> >days,hour,minutes, etc?
>
> Does anyone know a script to do this under WinNT?
For Linux it is easy, just read the /proc/uptime file:
$uptimevalues = file("/proc/uptime");
The first value from /proc/uptime is the uptime, the second is the idle
time for the cpu.
NT is harder. I don't know anything about that.
--
patrik wallstrom | f o o d f i g h t
tel: +46-8-6188428 | s t o c k h o l m
gsm: +46-708405080 | - - - - - - - - -