(E-Mail Removed) wrote:
> I'm running an Apache HTTP server on a Linux OS and would like to
> measure the total time a request spends in the system. From the tcp
> connection appears in the backlog queue until the response is
> sent. I need to make this measurement available in a c-program. Is
> this possible? Could I use the proc-system in some way?
I suspect only if you hack the kernel.
Or, if you were willing to spin and burn a bunch of cycles, you could
run tcpdump to get the timestamps of arriving SYNchronize segments and
compare them with the timestamps of accept() calls traced via truss.
Of course, with all that added overhead, either Heisenberg comes to
get you, or you are going to be scratched by Schrodinger's Cat. As it
were...
> Also, is there an easy way to see how many requests that are in the
> backlog queue?
IIRC there are some changes coming in later 2.6 kernels where either
the recv-q or the send-q field of netstat will show that.
rick jones
--
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...