Jump to content

Server load.


Tjoene

Recommended Posts

Try putting this code at the very start of your PHP script:

 

<?php
$loadavg_array = explode(" ", file_get_contents("/proc/loadavg"));
$loadavg = $loadavg_array[2];
?>

 

and put this at the very end:

 

<?php
$loadavg_array = explode(" ", file_get_contents("/proc/loadavg"));
$loadavg2 = $loadavg_array[2];
$load = $loadavg2 - $loadavg;
echo "Approx script server load: [ $load ]";
?>

Link to comment
Share on other sites

Guest Geoff
Is there a way to determent how much server load your site causes?

 

No, only the collective server load. However, we will be able to determine if your site is causing +20 load.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...