This is dependent on having your backhand-handler in the same
place on every host and on the same port, but I've found this useful
for moving from host to host and getting both mod_backhand information,
as well as general apache information. Adding a link to a perl, ruby,
and php status page shouldn't be hard, but I haven't found an
aestheticly nice way of doing that yet... or one that's mod_* aware.
This first patch is only for mod_backhand browsing, the second
is for backhand and server-status. Local configuration dependent
however... -sc
Index: back_util.c
===================================================================
RCS file: /storage/cvs/jesus/mod_backhand/back_util.c,v
retrieving revision 1.15
diff -u -r1.15 back_util.c
--- back_util.c 2001/07/06 01:09:38 1.15
+++ back_util.c 2001/10/02 19:26:53
@@ -179,7 +179,8 @@
tempport);
hostaddress[21] = '\0';
if(serverstats[i].contact.sin_addr.s_addr!=0)
- ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD><TD>%s</TD>\
+ ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD>\
+<TD><A href=\"%s://%s:%d%s\">%s</A></TD>\
<TD align=right>%d</TD><TD align=center>%s</TD><TD align=right>%d</TD>\
<TD align=left>%d</TD><TD align=center>%d/%d</TD><TD align=center>%d [%d]</TD>\
<TD align=right>%d</TD>\
@@ -187,6 +188,10 @@
(!is_alive(i,SERVER_TIMEOUT,now))?"#ff4444":
(i%2)?"#aaaaaa":"#cccccc",
i, /* Entry */
+ (r->server->port == 443 ? "https" : "http"), /* Protocol */
+ serverstats[i].hostname, /* hostname */
+ r->server->port, /* port number */
+ r->unparsed_uri, /* URI */
serverstats[i].hostname, /* hostname */
(int)(time(NULL) - serverstats[i].mtime), /* Age */
hostaddress, /* aaa.bbb.ccc.ddd:port */
Index: back_util.c
===================================================================
RCS file: /storage/cvs/jesus/mod_backhand/back_util.c,v
retrieving revision 1.15
diff -u -r1.15 back_util.c
--- back_util.c 2001/07/06 01:09:38 1.15
+++ back_util.c 2001/10/02 19:38:36
@@ -179,16 +179,23 @@
tempport);
hostaddress[21] = '\0';
if(serverstats[i].contact.sin_addr.s_addr!=0)
- ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD><TD>%s</TD>\
-<TD align=right>%d</TD><TD align=center>%s</TD><TD align=right>%d</TD>\
-<TD align=left>%d</TD><TD align=center>%d/%d</TD><TD align=center>%d [%d]</TD>\
-<TD align=right>%d</TD>\
+ ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD>\
+<TD><A href=\"%s://%s:%d%s\">%s</A></TD>\
+<TD align=right>%d</TD><TD align=center><A href=\"%s://%s/server-status/\">%s</A></TD>\
+<TD align=right>%d</TD><TD align=left>%d</TD><TD align=center>%d/%d</TD>\
+<TD align=center>%d [%d]</TD><TD align=right>%d</TD>\
<TD align=center>%d</TD><TD align=right>%f/%d</TD><TD align=right>%f</TD></TR>\n",
(!is_alive(i,SERVER_TIMEOUT,now))?"#ff4444":
(i%2)?"#aaaaaa":"#cccccc",
i, /* Entry */
+ (r->server->port == 443 ? "https" : "http"), /* Protocol */
serverstats[i].hostname, /* hostname */
+ r->server->port, /* port number */
+ r->unparsed_uri, /* URI */
+ serverstats[i].hostname, /* hostname */
(int)(time(NULL) - serverstats[i].mtime), /* Age */
+ (r->server->port == 443 ? "https" : "http"), /* Protocol */
+ hostaddress, /* aaa.bbb.ccc.ddd:port */
hostaddress, /* aaa.bbb.ccc.ddd:port */
serverstats[i].tmem, /* Total physical memory */
serverstats[i].amem, /* Avilable memory */
--
Sean Chittenden
place on every host and on the same port, but I've found this useful
for moving from host to host and getting both mod_backhand information,
as well as general apache information. Adding a link to a perl, ruby,
and php status page shouldn't be hard, but I haven't found an
aestheticly nice way of doing that yet... or one that's mod_* aware.
This first patch is only for mod_backhand browsing, the second
is for backhand and server-status. Local configuration dependent
however... -sc
Index: back_util.c
===================================================================
RCS file: /storage/cvs/jesus/mod_backhand/back_util.c,v
retrieving revision 1.15
diff -u -r1.15 back_util.c
--- back_util.c 2001/07/06 01:09:38 1.15
+++ back_util.c 2001/10/02 19:26:53
@@ -179,7 +179,8 @@
tempport);
hostaddress[21] = '\0';
if(serverstats[i].contact.sin_addr.s_addr!=0)
- ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD><TD>%s</TD>\
+ ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD>\
+<TD><A href=\"%s://%s:%d%s\">%s</A></TD>\
<TD align=right>%d</TD><TD align=center>%s</TD><TD align=right>%d</TD>\
<TD align=left>%d</TD><TD align=center>%d/%d</TD><TD align=center>%d [%d]</TD>\
<TD align=right>%d</TD>\
@@ -187,6 +188,10 @@
(!is_alive(i,SERVER_TIMEOUT,now))?"#ff4444":
(i%2)?"#aaaaaa":"#cccccc",
i, /* Entry */
+ (r->server->port == 443 ? "https" : "http"), /* Protocol */
+ serverstats[i].hostname, /* hostname */
+ r->server->port, /* port number */
+ r->unparsed_uri, /* URI */
serverstats[i].hostname, /* hostname */
(int)(time(NULL) - serverstats[i].mtime), /* Age */
hostaddress, /* aaa.bbb.ccc.ddd:port */
Index: back_util.c
===================================================================
RCS file: /storage/cvs/jesus/mod_backhand/back_util.c,v
retrieving revision 1.15
diff -u -r1.15 back_util.c
--- back_util.c 2001/07/06 01:09:38 1.15
+++ back_util.c 2001/10/02 19:38:36
@@ -179,16 +179,23 @@
tempport);
hostaddress[21] = '\0';
if(serverstats[i].contact.sin_addr.s_addr!=0)
- ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD><TD>%s</TD>\
-<TD align=right>%d</TD><TD align=center>%s</TD><TD align=right>%d</TD>\
-<TD align=left>%d</TD><TD align=center>%d/%d</TD><TD align=center>%d [%d]</TD>\
-<TD align=right>%d</TD>\
+ ap_rprintf(r, "<TR bgcolor=%s><TD align=center>%d</TD>\
+<TD><A href=\"%s://%s:%d%s\">%s</A></TD>\
+<TD align=right>%d</TD><TD align=center><A href=\"%s://%s/server-status/\">%s</A></TD>\
+<TD align=right>%d</TD><TD align=left>%d</TD><TD align=center>%d/%d</TD>\
+<TD align=center>%d [%d]</TD><TD align=right>%d</TD>\
<TD align=center>%d</TD><TD align=right>%f/%d</TD><TD align=right>%f</TD></TR>\n",
(!is_alive(i,SERVER_TIMEOUT,now))?"#ff4444":
(i%2)?"#aaaaaa":"#cccccc",
i, /* Entry */
+ (r->server->port == 443 ? "https" : "http"), /* Protocol */
serverstats[i].hostname, /* hostname */
+ r->server->port, /* port number */
+ r->unparsed_uri, /* URI */
+ serverstats[i].hostname, /* hostname */
(int)(time(NULL) - serverstats[i].mtime), /* Age */
+ (r->server->port == 443 ? "https" : "http"), /* Protocol */
+ hostaddress, /* aaa.bbb.ccc.ddd:port */
hostaddress, /* aaa.bbb.ccc.ddd:port */
serverstats[i].tmem, /* Total physical memory */
serverstats[i].amem, /* Avilable memory */
--
Sean Chittenden