You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Stuart, Ed" <Ed...@austinenergy.com> on 2006/05/05 15:32:46 UTC

[users@httpd] Session Count Question From a Newbie

Hello all;

I new to the administration of an Apache web server and am looking for a
way to see how many clients are connected to the web server.  We're
running Apache 2.0.46 on Red Hat AS 4. Netstat gives me connection info,
but shows multiple connections for the clients.  How can I report how
many clients are connected to the web server at a given time?

Ed
**Please apply a generous amount of all the usual disclaimers here.**




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Session Count Question From a Newbie

Posted by Joshua Slive <jo...@slive.ca>.
On 5/5/06, Stuart, Ed <Ed...@austinenergy.com> wrote:
> Hello all;
>
> I new to the administration of an Apache web server and am looking for a
> way to see how many clients are connected to the web server.  We're
> running Apache 2.0.46 on Red Hat AS 4. Netstat gives me connection info,
> but shows multiple connections for the clients.  How can I report how
> many clients are connected to the web server at a given time?

There is also mod_status's server-status handler.  But it will also
give "multiple connections for the clients".  That is because browsers
make multiple connections to the server when downloading all the
objects from a page.  The only way to tell what connections come from
a particular user is to track sessions using cookies or similar
techniques.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Session Count Question From a Newbie

Posted by John Hicks <jo...@gulfbridge.net>.
Stuart, Ed wrote:
> Hello all;
> 
> I new to the administration of an Apache web server and am looking for a
> way to see how many clients are connected to the web server.  We're
> running Apache 2.0.46 on Red Hat AS 4. Netstat gives me connection info,
> but shows multiple connections for the clients.  How can I report how
> many clients are connected to the web server at a given time?
> 
> Ed

Just a quick sanity check:

You do understand that there is a big difference between a session 
(referenced in your subject) and a connection (referenced in your 
message body)?

And you do understand that a connection lasts only for a single 
request/response, i.e. less than a second? An active user is constantly 
making new connections (for each request).

A session, by definition, lasts over a series of requests/responses. But 
it is not part of the HTTP protocol and so must be managed (and counted) 
programatically via PHP, perl, autc.

Moreover, there isn't an exact way to tell when a session has ended. 
They are usually programmed to time out after a certain number of 
minutes of inactivity.

Websites that report the "number of users currently online" probably 
cheat a bit by counting either the sessions or distinct IP connections 
made over the last five or ten minutes.

--J

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Session Count Question From a Newbie

Posted by maillists <li...@gmnet.net>.
On Fri, 2006-05-05 at 08:32 -0500, Stuart, Ed wrote:
> Hello all;
> 
> I new to the administration of an Apache web server and am looking for a
> way to see how many clients are connected to the web server.  We're
> running Apache 2.0.46 on Red Hat AS 4. Netstat gives me connection info,
> but shows multiple connections for the clients.  How can I report how
> many clients are connected to the web server at a given time?
> 
> Ed
> **Please apply a generous amount of all the usual disclaimers here.**
> 
> 

Hi,

To see live connections, you can use the following:
# watch tail /var/log/httpd/access_log

To report on connections over time, you might want to use something like
webalizer

Hope that helps,
Rick




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Session Count Question From a Newbie

Posted by Victor Trac <vi...@gmail.com>.
May not be exactly what you're looking for, but try:

http://www.webta.org/projects/apachetop/

-Victor

On 5/5/06, Stuart, Ed <Ed...@austinenergy.com> wrote:
> Hello all;
>
> I new to the administration of an Apache web server and am looking for a
> way to see how many clients are connected to the web server.  We're
> running Apache 2.0.46 on Red Hat AS 4. Netstat gives me connection info,
> but shows multiple connections for the clients.  How can I report how
> many clients are connected to the web server at a given time?
>
> Ed
> **Please apply a generous amount of all the usual disclaimers here.**
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


--
http://www.victortrac.com