I can't get Apache :: VMonitor to work in Apache2

I am moving from Apache 1.3 to Apache 2.063, and it is difficult for me to work with Apache :: VMonitor .

I tried a setting similar to the way I installed it 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 XXXX ## really a valid IP </Location> 

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

ap_scoreboard_image does not exist ...

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

NOTE. For versions of Apache later than 2.0.53 (tested 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 when Apache initializes the scoreboard object.

The problem is that it does not 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 know how to do this? I'm not stuck with using Apache :: VMonitor, I'm open to suggestions if anyone can offer an alternative way to analyze and display data from the Apache scoreboard.

+6
source share
1 answer

I moved V2.07 to CPAN, which should fix the problem (and also remove the GTop dependency if you don't need the information that it provides or works on Windows).

Using the previous version (V2.06), you can initialize it in your script / application. Basically, somewhere after the start-up phase, because, if I remember correctly, there is no display until child threads / processes are created.

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

+5
source

Source: https://habr.com/ru/post/914579/


All Articles