1. Hi guest,
    register now to 12n3 forum and become a member of this great family!
    You will have the rights to download attachment and post your messages in every section of this forum and you can have access to all secret zone that are now hidden to you.
    So, Register Now it's free!
  2. Please, remember to read the short and small rules that this forum has.
    Read them here in this section: Forum's Rules, FAQ, Readme First

Show server load html script

Discussion in 'Webmaster' started by Galerio, Dec 10, 2011.

  1. Galerio Administrator

    This is a html page that shows the server load so you can monitor your server status in a very easy and clean way. Just create a php file, name it as you want, for example "load.php" and then upload it to your server in a directory accessible by your web browser.
    Put this code inside load.php:
    PHP:
    <html>
    <head>
    </head>
    <body>
    <?php
            $loadArray 
    sys_getloadavg();
            
    $load"Server Load: ".$loadArray[0]." / ".$loadArray[1]." / ".$loadArray[2];
    ?>
    <?php 
    echo $load;?> <br />
    <?php echo date("r"); ?>  <br />
    Another way to show server load if the lines above don't function:<br />
    <?php  $load1=@file_get_contents('/proc/loadavg');
    echo 
    $load1;?>
    </body>
    </html>

Share This Page