Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 82196 invoked from network); 2 Dec 2006 02:25:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2006 02:25:27 -0000 Received: (qmail 33612 invoked by uid 500); 2 Dec 2006 02:25:29 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 33597 invoked by uid 500); 2 Dec 2006 02:25:29 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 33586 invoked by uid 99); 2 Dec 2006 02:25:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 18:25:29 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [207.7.158.80] (HELO boom.affinityengines.com) (207.7.158.80) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 18:25:17 -0800 Received: from [10.200.1.30] (unknown [72.18.225.226]) by boom.affinityengines.com (Postfix) with ESMTP id 3B6331DB121; Fri, 1 Dec 2006 18:24:56 -0800 (PST) Message-ID: <4570E377.2070109@earthlink.net> Date: Fri, 01 Dec 2006 18:22:47 -0800 From: David Scott User-Agent: Thunderbird 1.5.0.8 (X11/20061025) MIME-Version: 1.0 To: Jonathan Cc: mod_perl List Subject: Re: Apache2::Status "Memory Usage" fails on Debian References: <03FCC09E-81CD-4863-A535-FCE31FEF33BA@sonous.com> <456D30D6.4050805@p6m7g8.com> <2520E623-B216-4885-9482-7232A42AE379@sonous.com> <456DDD36.8010306@p6m7g8.com> <456DE070.5090307@plusthree.com> <456EE265.2040106@plusthree.com> <456F620F.4010108@earthlink.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The following patch makes life a lot easier: in B::TerseSize: 631c631 < my $script = $q->script_name; --- > my $script = ( defined $q && $q ) ? $q->script_name : $r->uri; The problem is, the Apache 2 API doesn't use CGI query objects at all so you can't use the script name. d Jonathan wrote: > > On Nov 30, 2006, at 5:58 PM, David Scott wrote: > >> This is not a good Apache day. I already sent out a message >> regarding an Apache::Scoreboard problem, and now Apache2::Status >> doesn't work either. > > it's a bug, but i think its platform specific/ odd > > i ran into the same thing a while back > > check out this: > > http://comments.gmane.org/gmane.comp.apache.mod-perl/24906 > > i have 2 posts at the bottom, which i'll just paste here: > > ===== > Jonathan | 13 Aug 00:46 > > I'm finding some issues with the 2 modules > > i think some of it happens when you have a module that has no > subroutines ( ie , a namespace placeholder or something ) > > check out ~ line 551 in Apache2::Status > > adding a few over-the-top checks seems to help, and gets memory use > working on more items > > } (sort { $subs->{$b}->{size} <=> $subs->{$a}->{size} } keys % > $subs); > > + return if ! scalar keys; > + return if ! defined $subs->{$keys[0]}; > + return if ! defined $subs->{$keys[0]}->{count}; > + return if ! defined $subs->{$keys[0]}->{size}; > > my $clen = length $subs->{$keys[0]}->{count}; > my $slen = length $subs->{$keys[0]}->{size}; > > i'll have more fixes as time progresses > > ====== > > Jonathan | 13 Aug 00:56 > > ok, also found > > I also figured this out: > > in B::TerseSize, line 634 > > - my $script = $q->script_name; > > + my $script ; > + if ( defined $q && $q ) > + { > + $script = $q->script_name; > + } > > Killing that makes a lot more things work too. > > The only caveat of that, is that 'memory usage' doesn't appear on / > perl-status/ until you visit a symdump page that contains memory- > usage. i don't know why. but that should only happen on situations > already afflicted by the other bug. so its a stupid new bug instead > of a bad old one. > > ========== > > > > // Jonathan Vanasco > > | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - > | FindMeOn.com - The cure for Multiple Web Personality Disorder > | Web Identity Management and 3D Social Networking > | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - > | RoadSound.com - Tools For Bands, Stuff For Fans > | Collaborative Online Management And Syndication Tools > | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - > > >