diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-09-16 16:08:25 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2009-09-16 16:08:25 -0400 |
commit | bc7cd435fc98bb3af93b6dc09a2c1f5e3b0423d9 (patch) | |
tree | 34f197d87f8673eed74c5359d9a0e39f883811bd /staprun.8.in | |
parent | ae98ab3529e00906645c9a2d0a30f36d9d534f3e (diff) | |
download | systemtap-steved-bc7cd435fc98bb3af93b6dc09a2c1f5e3b0423d9.tar.gz systemtap-steved-bc7cd435fc98bb3af93b6dc09a2c1f5e3b0423d9.tar.xz systemtap-steved-bc7cd435fc98bb3af93b6dc09a2c1f5e3b0423d9.zip |
Signal-based file switching support for relay/ring buffer.
* runtime/staprun/relay.c (switch_outfile): New function for file switching.
(reader_thread): Don't assign empty_handler to SIGUSR2, and switch output
file when receiving signal(SIGUSR2) on ppoll.
(switchfile_handler): Send SIGUSR2 signal to reader threads for file
switching.
(init_relayfs): Assign switchfile_handler to SIGUSR2.
* staprun.1.in: Add FILE SWITCHING BY SIGNAL section.
Diffstat (limited to 'staprun.8.in')
-rw-r--r-- | staprun.8.in | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/staprun.8.in b/staprun.8.in index 5fe2e7fa..5bf2ec61 100644 --- a/staprun.8.in +++ b/staprun.8.in @@ -138,6 +138,39 @@ To reattach to a kernel module, the .I staprun .B \-A option would be used. + +.SH FILE SWITCHING BY SIGNAL +After the +.I staprun +launched the +.I stapio +, users can command it to switch output file to next file when it +outputs to file(s) (running staprun with +.B \-o +option) by sending a +.B SIGUSR2 +signal to the +.I stapio +process. When it receives SIGUSR2, it will switch output file to +new file with suffix +.I .N +where N is the sequential number. +For example, +.PP +\& $ staprun \-o foo ... +.PP +outputs trace logs to +.I foo +and if it receives +.B SIGUSR2 +signal, it switches output to +.I foo.1 +file. And receiving +.B SIGUSR2 +again, it switches to +.I foo.2 +file. + .SH SAFETY AND SECURITY Systemtap is an administrative tool. It exposes kernel internal data structures and potentially private user information. See the |