At 08:37 PM 1/21/2005 -0500, Stas Bekman wrote:
Todd Finney wrote:
Unlikely. The errant processes all seem to be daemontools programs like supervise and svcscanboot. Those processes are started long before apache starts, and they exist until after it goes away.
Understood. In which case I don't know what the problem is. I'd have been more helpful if I could reproduce it here.
Can you give this a try?
------------------------------------------
#!/usr/bin/perl -w
use strict;
$|++;
use Apache::Scoreboard;
my $image=Apache::Scoreboard->fetch("[a scoreboard location]");
for (my $parent = $image->parent; $parent; $parent = $parent->next) {
my $pid = $parent->pid;
print $pid,': ',(`/bin/ps --no-headers $pid` || "Process Not Found\n" );
}
Yup, it works perfectly fine for me. Only httpd procs are printed and they all exist. I'm in the process of writing a test suite for Apache-Scoreboard 1.x, so one can just write 'make test' if they have a problem.
So I'm not sure why do you see a different behavior.
------------------------------------------ (How is this different from iterating @{$image->pids()}?)
You can't do much with pids after you get them. But if that's all you want to get, it should be the same.
Unless I'm completely misunderstanding the man page for Apache::Scoreboard, this should spit out a list of Apache processes. I'm getting stuff like this instead:
(incomplete listing...)
51825: Process Not Found
17057: 17057 ? S 0:01 /usr/local/apache-perl-1.3.33_5.8c/bin/httpd
51581: Process Not Found
17139: 17139 ? S 0:01 /usr/local/apache-perl-1.3.33_5.8c/bin/httpd
52940: Process Not Found
16615: Process Not Found
51785: Process Not Found
16632: Process Not Found
47713: Process Not Found
16633: Process Not Found
47502: Process Not Found
16673: 16673 ? S 0:02 /usr/local/apache-perl-1.3.33_5.8c/bin/httpd
46439: Process Not Found
16493: Process Not Found
46848: Process Not Found
But it's consistent with the above loop, right? (i.e. it spits the same non-existing procs)
VMonitor 2.02's `make test` is complaining loudly most of the time, failing tests 3-6. It managed to succeed once, though. If I go ahead and install it anyway, pulling up the VMonitor page causes the process to segfault.
Ouch. Most likely it was introduced by Apache-Scoreboard's last change. Please try with this patch:
I'm not sure if it's related, but this:
------------------------------------------ #!/usr/bin/perl -w use strict; $|++; use Apache::Scoreboard; my $image=Apache::Scoreboard->fetch("[a scoreboard url]"); for (my $parent = $image->parent; $parent; $parent = $parent->next) { my $server = $parent->server; #Apache::ServerScore object print $server->vhost,"\n"; } ------------------------------------------
still segfults on my machine. VMonitor is working fine, though.
Yup, I get it too. Blame the lack of the test suite. Hopefully we will gradually create one. I'm starting with your test cases that you've reported.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com