Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Server Load Status  (Read 4333 times)

0 Members and 1 Guest are viewing this topic.

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Server Load Status
« on: July 07, 2005, 12:50:59 am »

Hi its me again  ;D

Would like to request this mod which displays the status of the server's load. Thanks
« Last Edit: July 15, 2005, 10:10:37 pm by OmegaGOD »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Server Load Status
« Reply #1 on: July 07, 2005, 03:24:24 am »

Why?  What would be the benefit of such an addition?  How does this relate to Coppermine?
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Re: Server Load Status
« Reply #2 on: July 07, 2005, 03:58:06 am »

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
Logged
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Server Load Status
« Reply #3 on: July 07, 2005, 10:02:56 am »

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.
Logged

Nibbler

  • Guest
Re: Server Load Status
« Reply #4 on: July 07, 2005, 08:38:23 pm »

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.
Logged

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Re: Server Load Status
« Reply #5 on: July 08, 2005, 06:18:01 pm »

thanks for the help guys  :D
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Server Load Status
« Reply #6 on: July 15, 2005, 09:17:39 pm »

it's pretty easy for nix.... just some preg_match on uptime... that's it

Code: [Select]
<?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

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Re: Server Load Status
« Reply #7 on: July 15, 2005, 10:10:16 pm »

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.
Logged
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.