Bug 10487 - flight recorder control from script
Summary: flight recorder control from script
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: tapsets (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-05 20:14 UTC by Frank Ch. Eigler
Modified: 2015-08-24 15:48 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 2009-08-05 20:14:30 UTC
For a script running in flight-recorder-on-file mode, it may be
desirable to designate the "current" flight recorder contents as
precious, to be archived separately from the rotating log files.
It could be just a request to rotate to the next file, or a request
to save a snapshot of the current logs elsewhere.

We should consider adding a tapset function (to send a special
message to stapio), or some other mechanism (special variables
to feed to a system(sprintf("cp %s %s", LOGFILE, ARCHIVEFILE)).
Comment 1 Masami Hiramatsu 2009-08-07 20:00:30 UTC
Moving log files will cause heavy i/o load, so I think just leaving current log
files and opening new log file (series) is ok for some cases.
Comment 2 Masami Hiramatsu 2009-08-07 22:37:36 UTC
How about supporting 'dbus' messaging bus on stap? :-)
Comment 3 Frank Ch. Eigler 2015-06-19 16:45:14 UTC
a  { system(sprintf("kill -SIGUSR %d", stp_pid)) }   might do the job
Comment 4 Felix Lu 2015-08-24 15:48:29 UTC
A new tapset function switch_file() provides this functionality.