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]

New probe alias for accepting stdin input


Hello all,

A new probe alias, input.char, has recently been added to Systemtap.
This alias makes data from stdin available during the runtime of
the kernel module. 

The probe handler is triggered each time a character is read from stdin.
The current character can be accessed in the string variable '$value'.
Characters are read from stdin one by one as soon as they are available.
If stdin is connected to a terminal and input.char is found in the script,
Systemtap will put the terminal into non-canonical mode for the duration
of the probing. Therefore there is no newline buffering. Additional information
can be found in the "INPUT" section of the stapprobes man page.

One possible use of input.char is dynamically modifying display parameters.
An example of this can be found in EXAMPLES/general/eventcount_interactive.stp.
This is a modified version of eventcount.stp, a script which periodically prints
counts of specified events along with their tid's. Using input.char,
eventcount_interactive.stp allows this information to be sorted according to
different parameters during the script's execution.

If anyone has any feedback to offer, I'd be happy to hear it.

Best Regards,

Aaron Merey


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