This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: per-entity statistics



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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]