You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stuart Johnston <sj...@vaultranet.com> on 2004/06/26 00:17:07 UTC
Apache::VMonitor shows only parent process
I have just installed Apache::VMonitor to measure the memory usage of my
mod_perl app. When I run it, it only displays the parent process in the
list. None of the children are listed.
Any suggestions?
System versions:
Debian 3.0
apache-perl: 1.3.26-1-1.26-0woody2
Apache-VMonitor: 2.0
libgtop: 1.0.13-3
Apache-Scoreboard: 0.10
Thanks,
Stuart Johnston
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stas Bekman <st...@stason.org>.
Stuart Johnston wrote:
> Stas Bekman wrote:
>
>> Two things to try:
>>
>> 1) the previous generation
>> http://search.cpan.org/~stas/Apache-VMonitor-0.8/. Ver 2.0 is a
>> complete rewrite to support both mp1 and mp2, 0.8 will work for mp1
>> but probably is the last version of that generation.
>>
>
> Both version have the same problem.
OK, if it fails with 0.8 then it's most likely the problem with
Apache::Scoreboard.
I just double checked it works fine with 1.3.x on linux. Though I'm using the
latest versions:
Apache/1.3.29-dev (Unix) mod_perl/1.29_01-dev
try to upgrade your apache and/or modperl
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stuart Johnston <sj...@vaultranet.com>.
Stas Bekman wrote:
> Two things to try:
>
> 1) the previous generation
> http://search.cpan.org/~stas/Apache-VMonitor-0.8/. Ver 2.0 is a complete
> rewrite to support both mp1 and mp2, 0.8 will work for mp1 but probably
> is the last version of that generation.
>
Both version have the same problem.
> 2) get your sleeves up and dive into the code - it's a trivial perl code.
> 'sub data_apache' is the code you want to look at, the child data
> retrieval happens in the loop:
> for ($i=0; $i < SERVER_LIMIT; $i++) {
>
Looking at version 2.0, each time through the loop it leaves at line
583: next unless $pid;
> also check whether 'sub scoreboard_image' actually returns the image.
It does return an object blessed as 'Apache::Scoreboard' but I don't
know if it is actually valid, beyond that.
Thanks,
Stuart Johnston
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stas Bekman <st...@stason.org>.
Stuart Johnston wrote:
> Perrin Harkins wrote:
>
>> On Mon, 2004-06-28 at 12:56, Stuart Johnston wrote:
>>
>>> ExtendedStatus On
>>> <Location /server-status>
>>> SetHandler server-status
>>> </Location>
>>> <Location /vmonitor>
>>> SetHandler perl-script
>>> PerlHandler Apache::VMonitor
>>> </Location>
>>
>>
>>
>> That's all? Try loading the module from a <Perl> section, as described
>> in the documentation. Make sure you are loading Apache::Scoreboard too.
>
>
> Here is what I have added to the end of a default httpd.conf file. Am I
> missing anything?
>
>
> PerlModule Apache::Scoreboard
> <Location /scoreboard>
> SetHandler perl-script
> PerlHandler Apache::Scoreboard::send
> order deny,allow
> deny from all
> #same config you have for mod_status
> allow from 127.0.0.1 ...
> </Location>
You don't need the /scoreboard part, unless you plan to fetch the scoreboard
to a client that is not running under that Apache server.
> <Location /system/vmonitor>
> SetHandler perl-script
> PerlHandler Apache::VMonitor
> </Location>
> <Perl>
> use Apache::VMonitor();
> $Apache::VMonitor::Config{refresh} = 0;
> $Apache::VMonitor::Config{verbose} = 0;
> $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} = 'size';
> </Perl>
Looks fine.
> Does it matter that my system is not generating a scoreboard file even
> though it is defined in the conf file?
I think all unices use an in-memory scoreboard, so probably this is not an issue.
Two things to try:
1) the previous generation http://search.cpan.org/~stas/Apache-VMonitor-0.8/.
Ver 2.0 is a complete rewrite to support both mp1 and mp2, 0.8 will work for
mp1 but probably is the last version of that generation.
2) get your sleeves up and dive into the code - it's a trivial perl code.
'sub data_apache' is the code you want to look at, the child data retrieval
happens in the loop:
for ($i=0; $i < SERVER_LIMIT; $i++) {
also check whether 'sub scoreboard_image' actually returns the image.
Let me know if you need any help with it.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stuart Johnston <sj...@vaultranet.com>.
Perrin Harkins wrote:
> On Mon, 2004-06-28 at 12:56, Stuart Johnston wrote:
>
>>ExtendedStatus On
>><Location /server-status>
>> SetHandler server-status
>></Location>
>><Location /vmonitor>
>> SetHandler perl-script
>> PerlHandler Apache::VMonitor
>></Location>
>
>
> That's all? Try loading the module from a <Perl> section, as described
> in the documentation. Make sure you are loading Apache::Scoreboard too.
Here is what I have added to the end of a default httpd.conf file. Am I
missing anything?
PerlModule Apache::Scoreboard
<Location /scoreboard>
SetHandler perl-script
PerlHandler Apache::Scoreboard::send
order deny,allow
deny from all
#same config you have for mod_status
allow from 127.0.0.1 ...
</Location>
<Location /system/vmonitor>
SetHandler perl-script
PerlHandler Apache::VMonitor
</Location>
<Perl>
use Apache::VMonitor();
$Apache::VMonitor::Config{refresh} = 0;
$Apache::VMonitor::Config{verbose} = 0;
$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} = 'size';
</Perl>
Does it matter that my system is not generating a scoreboard file even
though it is defined in the conf file?
Thanks,
Stuart Johnston
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2004-06-28 at 12:56, Stuart Johnston wrote:
> ExtendedStatus On
> <Location /server-status>
> SetHandler server-status
> </Location>
> <Location /vmonitor>
> SetHandler perl-script
> PerlHandler Apache::VMonitor
> </Location>
That's all? Try loading the module from a <Perl> section, as described
in the documentation. Make sure you are loading Apache::Scoreboard too.
- Perrin
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stuart Johnston <sj...@vaultranet.com>.
Perrin Harkins wrote:
> On Mon, 2004-06-28 at 11:38, Stuart Johnston wrote:
>
>>Stas Bekman wrote:
>>
>>>Does mod_status show the child procs on the same setup?
>>
>>Yes.
>>
>>
>>>Did Apache::VMonitor's 'make test' pass alright? Admittedly the test
>>>suite needs to be improved to test for this kind of things.
>>
>>Yes. - "All tests successful."
>
>
> How about posting the section of your httpd.conf where you add in
> VMonitor?
ExtendedStatus On
<Location /server-status>
SetHandler server-status
</Location>
<Location /vmonitor>
SetHandler perl-script
PerlHandler Apache::VMonitor
</Location>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stuart Johnston <sj...@vaultranet.com>.
Stas Bekman wrote:
> Stuart Johnston wrote:
>
>> I have just installed Apache::VMonitor to measure the memory usage of
>> my mod_perl app. When I run it, it only displays the parent process
>> in the list. None of the children are listed.
>>
>> Any suggestions?
>>
>> System versions:
>> Debian 3.0
>> apache-perl: 1.3.26-1-1.26-0woody2
>> Apache-VMonitor: 2.0
>> libgtop: 1.0.13-3
>> Apache-Scoreboard: 0.10
>
>
> Does mod_status show the child procs on the same setup?
Yes.
> Did Apache::VMonitor's 'make test' pass alright? Admittedly the test
> suite needs to be improved to test for this kind of things.
Yes. - "All tests successful."
Thanks,
Stuart Johnston
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Apache::VMonitor shows only parent process
Posted by Stas Bekman <st...@stason.org>.
Stuart Johnston wrote:
> I have just installed Apache::VMonitor to measure the memory usage of my
> mod_perl app. When I run it, it only displays the parent process in the
> list. None of the children are listed.
>
> Any suggestions?
>
> System versions:
> Debian 3.0
> apache-perl: 1.3.26-1-1.26-0woody2
> Apache-VMonitor: 2.0
> libgtop: 1.0.13-3
> Apache-Scoreboard: 0.10
Does mod_status show the child procs on the same setup?
Did Apache::VMonitor's 'make test' pass alright? Admittedly the test suite
needs to be improved to test for this kind of things.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html