This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: per-entity statistics
- From: Li Guanglei <guanglei at cn dot ibm dot com>
- To: Martin Peschke <mp3 at de dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Fri, 13 Jan 2006 10:33:56 +0800
- Subject: Re: per-entity statistics
- Organization: IBM CSTL
- References: <43C5154C.7080106@de.ibm.com>
Besides, is there a good way to pass LUN selections to a
systemtap script? Or would it be best, as mentioned above,
to regenerate a script with the selection stuff being
built in?
Martin
We could use the -D option of stap to pass user defined value into
stap scripts. Here is an example:
---- var.stp ------
function logvar()
%{
_stp_printf("LUN: %d\n", LUN);
%}
probe end
{
logvar()
}
---- end of var.stp ----
You can run this script by:
stap -g -D LUN=110 var.stp
then it will print:
LUN: 110
The Linux Kernel Event Trace tool I released does a vary limited
filtering about each probe. The only filtering is based on pid, and
some of the probes even don't filter by pid. One reason of the limited
filtering is that we initially want to let this tool gather as more
info as possible, and then the post processing tool could work on a
larger set of data to dig more info. The idea is something like:
gather once, postprocess&analyze multiple times.
But anyway, how the tool should work need to be based on the practice
and experience of the users of this tool, just like you :-). And I
will be glad if you could give more feedbacks about it, such as
additions of filters, more event hooks.
Thanks.