Bug 18848 - new --monitor option
Summary: new --monitor option
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Felix Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 13:44 UTC by Frank Ch. Eigler
Modified: 2015-11-23 21:05 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2015-08-18 13:44:18 UTC
As a part of the interactive-systemtap effort, we'd like to have a way of compiling stap modules so that they can report on their own status, and give a way to control them from the outside.

For example, a new option "stap --monitor" could emit extra code into the module, so that:

- it presents a procfs interface by which stats like this are available:

  - module name, invoker uid, sizes (as per startup dmesg)
  - number of warnings, errors; maybe text of recent errors
  - list of global variables (incl. array sizes)
  - abbreviated list of probes (incl. hit count/times as per stap -t)

- it presents another procfs interface by which control may be exercised:

  - to disable or enable probes (as if by hidden on-the-fly control variables)
  - to reset the global variables (so as to start the script anew)
  - to exit the script

Then the stapio program can connect to those two proc interfaces, poll the former to display, map keyboard inputs for sending to the other.  (The stap --interactive front-end can later also do the same.)
Comment 1 Felix Lu 2015-11-23 21:05:13 UTC
The stap --monitor option has been added.