DTrace and how much data is my webserver sending out... [Update]
Alan Burlison has pointed out to me that the example I have below is incorrect, the mib probes get called when kstat is updated which may or may not be when the IO is issued. Alan provided me with the followind D script to show what actually happens.
Apologies if my example confused anyone.
The mib provider in DTrace is really, really usefull for nice handy little oneliners, so yesterday I was briefly fiddling around looking at what the webserver on my workstation was doing (apache as bundled in Solaris).
With DTrace this becomes a oneliner
Now as we seem to have inspired Pete Shanahan to write about ticks after asking him yesterday afternoon about the handiest way to give some time related granularity not involving lquantize, we add a tick onto this and get a report with the sum of all data we have sent out every 60 seconds.
Whats really nice here is that this is just traffic from your webserver, not all the traffic thats updating this mib.
(2004-09-09 03:31:59.0)PermalinkComments [3]