I cannot get Apache::VMonitor working in Apache2
Asked Answered
B

1

6

I am moving from Apache 1.3 to Apache 2.063 and am having trouble getting Apache::VMonitor working.

I tried a setup like this, similar to how I had it setup in my old Apache:

<Perl>
  use Apache::VMonitor();
  $Apache::VMonitor::Config{BLINKING} = 1;
  $Apache::VMonitor::Config{refresh}  = 0;
  $Apache::VMonitor::Config{verbose}  = 1;
  $Apache::VMonitor::Config{system}   = 1;
  $Apache::VMonitor::Config{apache}   = 1;
  $Apache::VMonitor::Config{procs}    = 1;
  $Apache::VMonitor::Config{mount}    = 1;
  $Apache::VMonitor::Config{fs_usage} = 1;
  $Apache::VMonitor::Config{apache_sort_by}  = 'vsize';
  $Apache::VMonitor::PROC_REGEX = join "\|", qw(.*)
</Perl>

<Location /vmonitor>
  SetHandler perl-script
  PerlHandler Apache::VMonitor
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1
  Allow from X.X.X.X ## really a valid IP
</Location>

When I try to start my server I get this error:

ap_scoreboard_image doesn't exist at ...

I found a note in the Apache::VMonitor documentation that says:

NOTE For Apache versions later than 2.0.53 (veriied on 2.0.54, 2.0.55, and 2.0.58), loading Apache::VMonitor in sections and/or PostConfigRequire files does not work due to a change in when Apache initialises the scoreboard object.

The problem is that it doesn't say when I can initialize the scoreboard object in later versions of Apache. I tried to omit the "use" statement and get this error:

panic: del_backref during global destruction.

* Error code 255

Does anyone have any idea how to get this working? I am not stuck on using Apache::VMonitor, I am open to suggestions if anyone can suggest an alternate way to parse and display data from Apache's scoreboard.

Boisvert answered 30/4, 2012 at 20:22 Comment(4)
Maybe start up a wrapper that waits for scoreboard to come up and them launches VMonitor.Foldaway
Confirming that Apache::Scoreboard suffered bitrot and needs to be brought up-to-date with modern versions of httpd.Adequacy
This should really be asked on Server Fault rather than here. I would have marked it for migration if it didn't have an open bounty (preventing that)Interlock
@Interlock - bounty is closed, if you still think this is more appropriate to Server Fault, feel free to mark it.Mysterious
M
5

I've pushed V2.07 to CPAN which should fix the issue (and also removed the dependency on GTop if you don't need the information it provides, or are running on Windows).

Using the previous release (V2.06), you should be able to initialise it in your script/application. Basically anywhere after the start-up phase as, if I remember correctly, there's no scoreboard until the child threads/processes are created.

The source is on github ( http://github.com/mjharwood/Apache--VMonitor-2.0 ) should you want it.

Mysterious answered 28/5, 2012 at 15:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.