From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23935 invoked by alias); 6 Oct 2005 17:37:57 -0000 Mailing-List: contact systemtap-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sources.redhat.com Received: (qmail 23633 invoked by uid 22791); 6 Oct 2005 17:37:49 -0000 Message-ID: <434560E9.1040303@us.ibm.com> Date: Thu, 06 Oct 2005 17:37:00 -0000 From: Badari Pulavarty User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Frank Ch. Eigler" CC: systemtap@sources.redhat.com Subject: Re: simple (dumb) script to track sizes of IOs References: <1128617293.4754.101.camel@dyn9047017102.beaverton.ibm.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-q4/txt/msg00013.txt.bz2 Frank Ch. Eigler wrote: > pbadari wrote: > > >>Here is a simple systemtap script to track the sizes of IOs >>that are getting generated (to the driver). > > > That's block i/o only right? Yes. > > >>[...] >>Is there a way, I can print in the order of IO sizes easily ? > > > There will be a way of iterating in a sorted order, probably > expressed syntactically like this: > > # function report () { > # foreach (ascending(io) in iosizes) { > # if (iosizes[io]) # ... > # } > Does this functionality exists today ? > >>[...]# stap -g iosizes.stp [...] > > > Your script does not need guru mode. Merely reading $rq->nr_sectors > is fine without that. You also don't need to check "if (iosizes[io])" > since zero-valued array elements do not appear in foreach() > iterations. Thanks. Is there some documentation on the allowed syntax and library functions ? Thanks, Badari