我无法让Apache::VMonitor在Apache2中工作

时间:2022-10-06 10:13:20

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

我正在从Apache 1.3迁移到Apache 2.063,在使Apache::VMonitor工作方面遇到了麻烦。

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

我尝试过这样的设置,类似于我在旧的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 ...

ap_scoreboard_image在…

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

我在Apache:::VMonitor文档中发现了一条说明:

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.

对于2.0.53以后的Apache版本(在2.0.54、2.0.55和2.0.58上进行了验证),请注意,在节和/或PostConfigRequire文件中加载Apache:::VMonitor由于Apache初始化记分牌对象时发生的更改而无法工作。

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:

问题在于,它并没有说什么时候我可以在Apache的后续版本中初始化scoreboard对象。我试图忽略“使用”语句并得到这个错误:

panic: del_backref during global destruction.

恐慌:全球毁灭期间的del_backref。

* Error code 255

*错误代码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.

有人知道怎么让这个工作吗?我不需要使用Apache::VMonitor,如果有人可以提出一种从Apache的记分板解析和显示数据的替代方法,我愿意接受建议。

1 个解决方案

#1


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

我已经将V2.07推给了CPAN, CPAN应该会修复这个问题(如果您不需要GTop提供的信息,或者不需要GTop提供的信息,或者在Windows上运行的话,还会删除对GTop的依赖)。

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.

使用之前的版本(V2.06),您应该能够在脚本/应用程序中初始化它。基本上在启动阶段之后的任何地方,如果我没记错的话,在创建子线程/进程之前都没有记分牌。

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

如果您需要,源文件在github (http://github.com/mjharwood/apache-- vmonitor2.0)上。

#1


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

我已经将V2.07推给了CPAN, CPAN应该会修复这个问题(如果您不需要GTop提供的信息,或者不需要GTop提供的信息,或者在Windows上运行的话,还会删除对GTop的依赖)。

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.

使用之前的版本(V2.06),您应该能够在脚本/应用程序中初始化它。基本上在启动阶段之后的任何地方,如果我没记错的话,在创建子线程/进程之前都没有记分牌。

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

如果您需要,源文件在github (http://github.com/mjharwood/apache-- vmonitor2.0)上。