1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

80 Commits

Author SHA1 Message Date
Joe Orton
25c9f93504 * modules/generators/mod_status.c: Mark private global variables
as static.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104029 13f79535-47bb-0310-9956-ffa450edef68
2004-06-24 11:25:18 +00:00
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
d0e05bada9 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102565 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:07:22 +00:00
André Malo
0d57db3af2 apply Apache License, 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102524 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:19:28 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
468254b6b0 mod_status: Report total CPU time accurately when using a threaded
MPM.

Note: It worked before with linuxthreads and it still does.  But now
it works with normal thread implementations too.

PR:     23795


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101614 13f79535-47bb-0310-9956-ffa450edef68
2003-10-29 20:56:28 +00:00
André Malo
6e81ba064e fix mod_status compilation on Win32 (stolen from mod_dav).
We should consider a rename of AP_*_HOOK_* to CORE_*_HOOK_* ;-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100737 13f79535-47bb-0310-9956-ffa450edef68
2003-07-22 20:01:43 +00:00
Joe Orton
f1ba7c37fb Add optional hook to extend mod_status output.
* configure.in: Add modules/generators to include path.

* Makefile.in: Install mod_status.h.

* modules/generators/mod_status.h: New file.

* modules/generators/mod_status.c: Implement ap_run_status_hook.
(status_handler): Run status hooks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100724 13f79535-47bb-0310-9956-ffa450edef68
2003-07-21 14:48:02 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Brian Pane
27b74224a5 Replaced APR_USEC_PER_SEC division with apr_time_sec macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95917 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 18:20:13 +00:00
Brian Pane
520e9383b4 Send output to the next filter even on header_only requests in mod_status
and mod_info


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95654 13f79535-47bb-0310-9956-ffa450edef68
2002-06-13 19:54:52 +00:00
Greg Ames
d7c369a57d tweak "requests currently being processed". It is confusing to not have
old generation requests included after a graceful restart.  But we
shouldn't count workers who are starting up.

OTOH, the "ready" counter needs to pay attention to the generation, so it
stays in sync with how p_i_s_m counts idle workers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95272 13f79535-47bb-0310-9956-ffa450edef68
2002-05-24 20:15:07 +00:00
Jeff Trawick
bc0cf18899 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95151 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:33:10 +00:00
Brian Pane
6b59ee40b9 Skip a potentially heavyweight call to sysconf, plus some
local variable initializations, in the common case where the
request is not for the server status page


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94745 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 04:48:11 +00:00
Jeff Trawick
3f3d6de769 move a loop-invariant computation out of the thread loop and
at the same time quiet a gcc warning (it assumed that thread_limit
could be zero, which would leave ps_record uninitialized when
referenced after the end of the thread loop)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94579 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 11:18:41 +00:00
Doug MacEachern
4157e579bf PR:
Obtained from:
Submitted by:   Ryan Morgan <rmorgan@covalent.net>
Reviewed by:	dougm, jimjag
Change mod_status to use scoreboard accessor functions so it can
be used in any MPM without having to be recompiled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94558 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 01:55:44 +00:00
Bill Stoddard
d5c24720dc Commit 1 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments on the call to aligh with ap_set_content_length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94056 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:41:55 +00:00
Bill Stoddard
470edb9dd8 First commit to introduce accessor function to set r->content_type..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94027 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 01:58:47 +00:00
William A. Rowe Jr
d07e31f81f Simplify s/APR_OS_PROC_T_FMT/APR_PID_T_FMT/, apr_os_foo entities aren't
for external consumption.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93969 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:42:46 +00:00
Jeff Trawick
5ae24550fc speed up the short_report path... we were unnecessarily
walking the scoreboard

Submitted by:	Stas Bekman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93955 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 15:30:22 +00:00
Jeff Trawick
8a5b90c365 Factor out a bunch of commonality between the HAVE_TIMES path and
the !HAVE_TIMES path.  This will help avoid future errors similar
to the ones fixed earlier today.

The code change also has the benefit of getting the paren-matching
feature of some editors to work properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93954 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 15:16:27 +00:00
Jeff Trawick
d403a74533 fix a couple of formatting bugs in the !HAVE_TIMES path
(somebody forgot to convert floating point format to
long integer format when APR-izing the time)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93951 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 12:40:39 +00:00
Jeff Trawick
f3084243f2 make mod_status a little faster by checking for an active server sooner in
the main loop

clean up the main loop by continuing when the server isn't active instead
of introducing yet another level of nesting


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93950 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 12:04:58 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Jeff Trawick
ea0096097b zap some crufty NO_GETTIMEOFDAY code
Submitted by:       Stas Bekman
Reviewed by:        Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93902 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 13:08:49 +00:00
Jeff Trawick
5baa83e59f fix the calculation of request time in mod_status
(currently nobody sets the start/stop times so this fix isn't
immediately apparent)

Submitted by:    Stas Bekman
Reviewed by:     Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93901 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 12:40:59 +00:00
Justin Erenkrantz
31eaa061ce The style police at work.
(Justin took a minor pass at this on top of Sander's patch.)

Submitted by:	Sander Striker <striker@apache.org>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93695 13f79535-47bb-0310-9956-ffa450edef68
2002-03-04 10:46:22 +00:00
Bill Stoddard
02d9c8800b De-tabify...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93603 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 18:57:26 +00:00
Bill Stoddard
b1e828a3bf This fixes a bug in mod_status on Windows where restart time was not
properly initialized.

Move ap_restart_time into the scoreboard global area so the child process
on non-forking platforms can have access to it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93502 13f79535-47bb-0310-9956-ffa450edef68
2002-02-19 21:09:27 +00:00
William A. Rowe Jr
7e1113f913 This patch eliminated from the _SHARED_ segment of the scoreboard all
pointer math.  This is required for portable scoreboards.

  vhost becomes the 'vhost name string' so it now survives ap_generation
  clicks.  next was apparently never used.

  This patch also accounts for the changes to the apr_shm api, and gives
  Win32 the magic of a shared scoreboard.

  Breakage aplenty on non-win32 platforms, I suspect, but this radical
  surgery, and culling of unused functions, was really, really needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92791 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 00:28:00 +00:00
Jeff Trawick
0ea28da356 Stop using HARD_SERVER_LIMIT/HARD_THREAD_LIMIT all over the place
and instead use the mpm query function to retrieve those limits and
use those dynamically-retrieved values when walking the scoreboard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92510 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 04:59:13 +00:00
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
Jeff Trawick
513f380012 fix a *printf() format
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91435 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 19:53:36 +00:00
William A. Rowe Jr
d2f9c10bb0 Clean up some warnings by summing bytecounts into apr_off_t holders
instead of ulongs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91218 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 15:51:07 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
Greg Ames
f61f91fc70 don't count workers in processes which aren't actively serving requests.
it is necessary to check for the generation as well as "quiescing", in the
case of a restart where no workers have seen the PoD yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89821 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 06:22:32 +00:00
Greg Ames
d45e862714 mod_status: don't include workers from dead or quiescing processes in the
"requests currently being processed" or "idle" counts

also, change term from "servers" to "workers" - servers sounds like what
you call the whole thing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89820 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 05:35:06 +00:00
William A. Rowe Jr
7c66cd12b1 More pendantic changes for HTML 3.2/4.01 Transitional compliance, and
XHTML 1.0 legibility.  One XHTML issue remains, <td nowrap>, which has
  an issue that "attribute minimization is not supported in XML".  Since
  ?notables drops that thorny issue, I'm ignoring this for now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89752 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 01:25:24 +00:00
William A. Rowe Jr
6e1243809f Some cast magic for intentional float/int transformations, but I have
no idea what exactly this computation was trying to accomplish...

    req_time = (long)(((ws_record.stop_time - ws_record.start_time) * 1000)
		    + ((ws_record.stop_time - ws_record.start_time) / 1000));


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89712 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 21:15:54 +00:00
Greg Ames
5139e492bd scratch an old itch - give lingering close its own state in the scoreboard.
clean up SERVER_ACCEPTING and SERVER_QUEUEING (never set) while I'm at it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89542 13f79535-47bb-0310-9956-ffa450edef68
2001-07-12 03:20:50 +00:00
Greg Ames
537f07df5e fix pid numbers in mod_status output when using a threaded mpm. pid_buffer was
being indexed by worker slot during initialization, then by process slot when
generating output.

This saves a little storage and a few cycles, too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89534 13f79535-47bb-0310-9956-ffa450edef68
2001-07-10 22:50:54 +00:00
Jeff Trawick
e47fad222b handle the SERVER_IDLE_KILL state in some of the ExtendedStatus=On
output

I don't have 100% confidence in my guess as to why some of the state labels
are in bold and some aren't (e.g., "<b>Write</b>" vs. "Graceful".  Hopefully
any rhyme or reason to it is maintained with my change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89249 13f79535-47bb-0310-9956-ffa450edef68
2001-05-31 18:10:04 +00:00
Jeff Trawick
303a191fdd a worker being cleaned up is not processing a request; filter out such
workers when counting the number of requests being processed

we won't count such workers as idle either, since they aren't available
to process new requests


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89248 13f79535-47bb-0310-9956-ffa450edef68
2001-05-30 14:14:26 +00:00
Paul J. Reder
1b2262dd30 Make first phase changes to the scoreboard data structures in
preparation for the rewriting of the scoreboard per my posted
design notes. [Paul J. Reder]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89115 13f79535-47bb-0310-9956-ffa450edef68
2001-05-15 02:38:17 +00:00
Jeff Trawick
e4fad412b8 minor scoreboard/status improvements:
. get the SS field in extended status output formatted correctly
  (seconds since beginning of request shouldn't be a huge
  negative number :) )
. use APR_OS_PID_T_FMT and pid_t where appropriate in mod_status
  to avoid casting, some of which may have been broken on some
  architectures


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89048 13f79535-47bb-0310-9956-ffa450edef68
2001-05-07 16:24:14 +00:00
Jeff Trawick
99ba37d329 Get rid of some Apache 1.x OPTIMIZE_TIMEOUTS cruft. Other logic
in 1.3 which used this stuff would send SIGALRM to children in
certain circumstances.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89047 13f79535-47bb-0310-9956-ffa450edef68
2001-05-07 15:49:42 +00:00
Paul J. Reder
a3d7fb947d Changes required to make prefork clean up idle children properly. There was a window during which a starting worker deadlocks when an idle cleanup arrives before it completes init. Apache then keeps trying to cleanup the same deadlocked worker forever (until higher pids come along, but it still will never reduce below the deadlocked pid). Thus the number of children would not reduce to the correct idle level.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88741 13f79535-47bb-0310-9956-ffa450edef68
2001-04-06 20:12:09 +00:00
Jeff Trawick
7f17e1292a Fix a problem displaying status when a threaded MPM is used.
The line

   int indx = (i * HARD_THREAD_LIMIT) + j;

in the vicinity of the change was bad; k needed to be added
instead of j.

I swapped the use of j and k in this section so that i and j
had the same meaning as in an earlier nested loop.  I suspect
that the difference in meaning is what led to the bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88397 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 18:41:44 +00:00
William A. Rowe Jr
16231360f1 Goodbye ap_send_http_header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 15:24:09 +00:00
Bill Stoddard
6fcbaceea5 Performance: apr_now() was being called for -all- requests. Call it only
for calls to server-status.  This module is still a mess...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88265 13f79535-47bb-0310-9956-ffa450edef68
2001-02-21 21:02:57 +00:00