/usr/sbin/dtrace -q -Z -32 -n ' /* # Program: Request Size Distribution # # Author: Matty # # Current Version: 0.1a # # Revision History: # Version 0.1a # # Last Updated: 11-25-2005 # # Purpose: Prints a frequency distribution with request sizes. # # Installation: # Copy the shell script to a suitable location # # CDDL HEADER START # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at Docs/cddl1.txt # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # CDDL HEADER END # # Example: # $ requestsize.d # dtrace: script 'requestsize.d' matched 1 probe #^C # # httpd 5549 # value ------------- Distribution ------------- count # -1 | 0 # 0 |@@@@@@@@@@@@@@@@@@@@@@@@ 43 # 1 | 0 # 2 | 0 # 4 | 0 # 8 | 0 # 16 | 0 # 32 | 0 # 64 | 0 # 128 | 0 # 256 |@@@@ 8 # 512 | 0 # 1024 | 0 # 2048 |@@@@@@@@@@@@ 22 # 4096 | 0 */ dtrace:::BEGIN { printf("Sampling request size data (Control-C to stop and print)\n"); } ::apache_log_request:log-request { this->request_size = (int)*(uintptr_t *)copyin(arg0 + 100, sizeof(int)); @size[execname,pid] = quantize(this->request_size); }'