You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2002/03/27 03:28:37 UTC

[Fwd: [PATCH scoreboard] adding port entry]

Is there anything wrong with this patch? Thanks.

-------- Original Message --------
Subject: [PATCH scoreboard] adding port entry
Date: Fri, 15 Mar 2002 11:58:31 +0800 (SGT)
From: Stas Bekman <st...@stason.org>
Reply-To: dev@httpd.apache.org
To: dev@httpd.apache.org

When running port based vhosts we want to see the ports in the
mod_status's output (or other tools working with scoreboard). Otherwise
there is no added value in displaying vhosts entry at all.

The following patch adds the port entry to the worker_score struct. And
I've a patch for mod_status, but will wait first for Jeff to commit my
previous patch and the post it here.

Index: include/scoreboard.h
===================================================================
RCS file: /home/cvspublic/httpd-2.0/include/scoreboard.h,v
retrieving revision 1.44
diff -u -r1.44 scoreboard.h
--- include/scoreboard.h	13 Mar 2002 20:47:42 -0000	1.44
+++ include/scoreboard.h	15 Mar 2002 03:47:46 -0000
@@ -75,6 +75,7 @@
  #include "apr_thread_proc.h"
  #include "apr_portable.h"
  #include "apr_shm.h"
+#include "apr_network_io.h"

  /* Scoreboard file, if there is one */
  #ifndef DEFAULT_SCOREBOARD
@@ -156,6 +157,7 @@
      char client[32];		/* Keep 'em small... */
      char request[64];		/* We just want an idea... */
      char vhost[32];	        /* What virtual host is being accessed? */
+    apr_port_t port;           /* On which port */
  };

  typedef struct {
Index: server/scoreboard.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/scoreboard.c,v
retrieving revision 1.62
diff -u -r1.62 scoreboard.c
--- server/scoreboard.c	13 Mar 2002 20:48:00 -0000	1.62
+++ server/scoreboard.c	15 Mar 2002 03:47:46 -0000
@@ -464,6 +464,7 @@
              }
              apr_cpystrn(ws->vhost, r->server->server_hostname,
                          sizeof(ws->vhost));
+            ws->port = r->server->port;
          }
      }




_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

-- 


__________________________________________________________________
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


Re: [Fwd: [PATCH scoreboard] adding port entry]

Posted by Stas Bekman <st...@stason.org>.
Jim Jagielski wrote:
> At 10:28 AM +0800 3/27/02, Stas Bekman wrote:
> 
>>Is there anything wrong with this patch? Thanks.
>>
> 
> 
> Nothing that I can see... I just don't see the need. We assume that
> knowledge of the virtual host implies knowledge of the IP address
> and port. We don't place the IP address of IP-based vhosts in the
> 'board.

When you look at the output of mod_status (or Apache::VMonitor, the perl 
brother of mod_status) you cannot tell one port based vhost from 
another. Users ask me to present this info in Apache::VMonitor, because 
they want to tell one vhost from another in the output, but I cannot 
help them if the scoreboard doesn't have this info.

As for IP addresses, why not adding these too in parallel with ports?

After all mod_status is for showing the status of the server, why not 
showing information that's useful and essential to users of this module?

Thanks.

__________________________________________________________________
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


Re: [Fwd: [PATCH scoreboard] adding port entry]

Posted by Jim Jagielski <ji...@jaguNET.com>.
At 10:28 AM +0800 3/27/02, Stas Bekman wrote:
>Is there anything wrong with this patch? Thanks.
>

Nothing that I can see... I just don't see the need. We assume that
knowledge of the virtual host implies knowledge of the IP address
and port. We don't place the IP address of IP-based vhosts in the
'board.
-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson