On 1/20/12 11:20 AM, Kyle Hailey wrote:
I want to measure incoming/outgoing HTTP traffic in bytes.
Seems simple using the examples in Brendan's DTrace book talks.
HTTP is discussed starting on p609.
There is a data structure that looks great:
typedef struct {
string hri_uri; /* uri requested */
string hri_user; /* authenticated user */
string hri_method; /* method name (GET, POST, ...) */
string hri_useragent; /* "User-agent" header (browser) */
uint64_t hri_request; /* request id, unique at a given time */
u*int64_t hri_bytesread; /* bytes SENT to the client */*
*uint64_t hri_byteswritten; /* bytes RECEIVED from the client */*
uint32_t hri_respcode; /* response code */
} http_reqinfo_t;
but I don't see it on illumos:
http://src.illumos.org/source/search?q=&project=illumos-gate&defs=http_reqinfo_t&refs=&path=&hist=
Nor do I see any http probes as mentioned int he examples
$ sudo dtrace -ln 'http*:::'
ID PROVIDER MODULE FUNCTION NAME
dtrace: failed to match http*:::: No probe matches description
Looking for any pointers on measuring http traffic.
Hi Kyle,
You're right, there is nothing in illumos related to this. This snippet
happens to be from a version of USDT probes added to apache. For an easy
way to do this with apache you should see what Dave Pacheco did with
mod-usdt here: https://github.com/davepacheco/mod_usdt.
If you want this for something that isn't apache, you're going to have
to implement USDT probes for your webserver. More info on that and the
history of where Brendan's example came from are here:
http://dtrace.org/blogs/dap/2011/12/13/usdt-providers-redux/.
Robert
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org