public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* New probe alias for accepting stdin input
       [not found] <1223082201.26399017.1498488995234.JavaMail.zimbra@redhat.com>
@ 2017-06-26 16:04 ` Aaron Merey
  0 siblings, 0 replies; only message in thread
From: Aaron Merey @ 2017-06-26 16:04 UTC (permalink / raw)
  To: systemtap

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-26 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1223082201.26399017.1498488995234.JavaMail.zimbra@redhat.com>
2017-06-26 16:04 ` New probe alias for accepting stdin input Aaron Merey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).