note 22548 deleted from ref.exec by hholzgra
| From: | hholzgra@php.net | Date: | Sun, 30 Jul 2006 13:22:52 +0000 |
| Subject: | note 22548 deleted from ref.exec by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115347@lists.php.net to get a copy of this message | ||
Note Submitter: ronnyab at online dot no
----
Instead of getting the whole package of load average and date, get only the days of uptime!
Use this code:
$uptime = exec("expr $(awk '{print $1}' < /proc/uptime | awk -F. '{print
$1}' ) / 86400");
print("Uptime: $uptime days");
This will print "Uptime x days"!