Hi its me again ;D
Would like to request this mod which displays the status of the server's load. Thanks
Why? What would be the benefit of such an addition? How does this relate to Coppermine?
I'm not sure if this is really a feature that would be benificial to most users. This is more of a server script and not coppermine related. It sounds like you want custom options for your specific implementation of CPG. If this is something that you would really like on your site, I would recommend putting a request in our Freelancers / Paid Help board. Maybe someone there would be willing to code it for you for a couple of bucks.
Freelancers / Paid Help Board -> http://forum.coppermine-gallery.net/index.php?board=30.0
--OmegaGOD
how's coppermine to "know" your server load? How should a php script find out? Of course, you could store two temporary time stamps: one, when the script starts executing and one when it ends. By comparing those two time stamps, you could get an idea how fast the page was built and as a result get an idea on the server load, but it'd be only a rough estimate. Imo it'd be better to use dedicated monitoring tools to find out about server performance.
You can just read the values from /proc/loadavg if you're on a *nix server, it's not particularly difficult. Makes sense to get to know the load pattern of your server and avoid using batch add when server load is high. I may code it as a mod at some point.
thanks for the help guys :D
it's pretty easy for nix.... just some preg_match on uptime... that's it
<?php
preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/",@exec('uptime'),$load);
echo $load[1].", ".$load[2].", ".$load[3]."";
?>
Windows as far as I know doesn't save load averages
I am marking this thread as invalid as it is not a valid feature request for CPG. This is more of a server feature request.
@Stramm, Thanks for contributing that sniplet of code.