LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Server load code Apache+PHP (https://www.linuxquestions.org/questions/linux-software-2/server-load-code-apache-php-273284/)

mindfrost82 01-03-2005 09:12 AM

Server load code Apache+PHP
 
I know this code is out there, but I'm having a hard time finding it.

On my website, I want it to display what the server load is...like:

0.02 0.05 0.01

I've seen it before on sites.

I have Slackware 10, Apache 1.3.33, PHP, MySQL.

Please let me know what the code is, if its PHP or something else.

Thanks

phil.d.g 01-03-2005 10:43 AM

PHP Code:

<?php
  $uptime 
exec('uptime');
  
$cpu_load substr($uptime, -16);
  echo 
$cpu_load;
?>



All times are GMT -5. The time now is 04:20 AM.