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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With