Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

How can I get the Apache server number?

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


mirkperl at gmail

Oct 14, 2009, 12:14 PM

Post #1 of 2 (543 views)
Permalink
How can I get the Apache server number?

Say you're using the prefork MPM and you have 200 Apache children. Is
there a way, within mod_perl, to find out what the server number is
for the apache child in which mod_perl is running? Not the PID
number, but the server number (or whatever it's called) -- i.e., a
number between 1 and 200 that indicates which "slot" you're taking up
in the Apache list of children.

Thanks!
Adam


mirkperl at gmail

Oct 19, 2009, 10:59 AM

Post #2 of 2 (493 views)
Permalink
Re: How can I get the Apache server number? [In reply to]

By looking at the apache source code, I've determined that the
connection->id is the server slot number when using the pre-fork MPM.
Yay!


On Sat, Oct 17, 2009 at 10:34 AM, Paul Silevitch <paul [at] silevitch> wrote:
> I think the "id" method in Apache2::Connection module returns the slot
> number (starting at 0).  The documentation seems a little misleading
> (http://perl.apache.org/docs/2.0/api/Apache2/Connection.html#C_id_).  Anyone
> else ever use this method for this purpose?
> Thanks,
> Paul
>
> On Wed, Oct 14, 2009 at 3:14 PM, Adam Woodworth <mirkperl [at] gmail> wrote:
>>
>> Say you're using the prefork MPM and you have 200 Apache children.  Is
>> there a way, within mod_perl, to find out what the server number is
>> for the apache child in which mod_perl is running?  Not the PID
>> number, but the server number (or whatever it's called) -- i.e., a
>> number between 1 and 200 that indicates which "slot" you're taking up
>> in the Apache list of children.
>>
>> Thanks!
>> Adam
>
>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.