diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-03-20 12:11:30 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2009-03-20 12:11:30 -0400 |
commit | acd56c22068963ad48f39890f5307600ff7d5278 (patch) | |
tree | acd04f64c1e90a1399c3682a93580b8a9313c82b /runtime/staprun/staprun.h | |
parent | 54892f28a2747079fae4aa35b80598cbb993a4c3 (diff) | |
download | systemtap-steved-acd56c22068963ad48f39890f5307600ff7d5278.tar.gz systemtap-steved-acd56c22068963ad48f39890f5307600ff7d5278.tar.xz systemtap-steved-acd56c22068963ad48f39890f5307600ff7d5278.zip |
PR6930: stapio: support file switching
Add file-switching option(-S size[,N]) to stapio. This option has two
arguments, 'size' and 'N', and requires -o option.
- When the size of output file exceeds specified 'size'MB, staprun switches
output file to the next file. For this purpose, all output file has a serial
number as a suffix only when user specifies this option.
- Using this option in bulk mode, the output file name will be
'FILE_cpuX.SERIAL'.
- When the number of files exceeds specified N, staprun removes the oldest
file. This argument can be omitted.
Diffstat (limited to 'runtime/staprun/staprun.h')
-rw-r--r-- | runtime/staprun/staprun.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h index b380cebd..6d0f9179 100644 --- a/runtime/staprun/staprun.h +++ b/runtime/staprun/staprun.h @@ -9,7 +9,7 @@ * * Copyright (C) 2005-2008 Red Hat Inc. */ - +#define _FILE_OFFSET_BITS 64 #include <stdio.h> #include <stdlib.h> #include <ctype.h> @@ -117,7 +117,9 @@ int init_relayfs(void); void close_relayfs(void); int init_oldrelayfs(void); void close_oldrelayfs(int); +int write_realtime_data(void *data, ssize_t nb); void setup_signals(void); +int make_outfile_name(char *buf, int max, int fnum, int cpu); /* staprun_funcs.c */ void setup_staprun_signals(void); const char *moderror(int err); @@ -158,6 +160,8 @@ extern int delete_mod; extern int load_only; extern int need_uprobes; extern int daemon_mode; +extern off_t fsize_max; +extern int fnum_max; /* getopt variables */ extern char *optarg; |