uptime and php

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: mike hoy
Dátum:  
Címzett: plug-discuss
Tárgy: uptime and php
Gurus of computer wisdom...

for the heck of it decided to add #uptime to my site

just to hopefully one day brag how long my linux server has been running

so i found a php function that displays uptime:

<?php
    echo exec('uptime');
?>


the only problem is that #uptime outputs too much info..

ex: 13:11:38 up 12 days, 21:40, 4 users, load average: 0.00, 0.00, 0.02

I check the man page to see if there was a flag that I could use with
#uptime so I would only get something like

12 days


any ideas?

mike h

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss