52 static struct option long_options[]
53 = { {
"help", no_argument, 0,
'h' }, {
"print", no_argument, 0,
'p' },
54 {
"create", no_argument, 0,
'c' }, {
"truncate", no_argument, 0,
't' },
55 {
"long", no_argument, 0,
'l' }, {
"json", no_argument, 0,
'j' },
56 {
"summary", no_argument, 0,
's' }, {
"replace", required_argument, 0,
'r' },
57 {
"suppress", no_argument, 0,
'f' }, {
"verify", no_argument, 0,
'v' },
58 {
"speed", required_argument, 0,
'x' }, { 0, 0, 0, 0 } };
60 int c = getopt_long(argc, argv,
"vjpctshlfr:x:", long_options, &option_index);
133 if (optind < (argc - 1))
138 if (optind == (argc -1 )) {
140 _path = argv[optind];
147 <<
"usage: xrdreplay [-p|--print] [-c|--create-data] [t|--truncate-data] [-l|--long] [-s|--summary] [-h|--help] [-r|--replace <arg>:=<newarg>] [-f|--suppress] [-v|--verify] [-x|--speed <value] p<recordfilename>]\n"
149 std::cerr <<
" -h | --help : show this help" << std::endl;
151 <<
" -f | --suppress : force to run all IO with all successful result status - suppress all others"
154 <<
" - by default the player won't run with an unsuccessful recorded IO"
156 std::cerr << std::endl;
158 <<
" -p | --print : print only mode - shows all the IO for the given replay file without actually running any IO"
161 <<
" -s | --summary : print summary - shows all the aggregated IO counter summed for all files"
164 <<
" -l | --long : print long - show all file IO counter for each individual file"
166 std::cerr <<
" -v | --verify : verify the existence of all input files"
169 <<
" -x | --speed <x> : change playback speed by factor <x> [ <x> > 0.0 ]"
172 <<
" -r | --replace <a>:=<b> : replace in the argument list the string <a> with <b> "
175 <<
" - option is usable several times e.g. to change storage prefixes or filenames"
177 std::cerr << std::endl;
179 <<
" [recordfilename] : if a file is given, it will be used as record input otherwise STDIN is used to read records!"
182 <<
"example: ... --replace file:://localhost:=root://xrootd.eu/ : redirect local file to remote"
184 std::cerr << std::endl;
double speed()
Definition: XrdClReplayArgs.hh:196
bool option_summary
Definition: XrdClReplayArgs.hh:202
bool option_create
Definition: XrdClReplayArgs.hh:204
bool option_suppress_error
Definition: XrdClReplayArgs.hh:207
void usage()
Definition: XrdClReplayArgs.hh:144
std::string & path()
Definition: XrdClReplayArgs.hh:198
bool create()
Definition: XrdClReplayArgs.hh:191
bool option_truncate
Definition: XrdClReplayArgs.hh:205
std::vector< std::string > & regex()
Definition: XrdClReplayArgs.hh:197
bool json()
Definition: XrdClReplayArgs.hh:193
bool summary()
Definition: XrdClReplayArgs.hh:189
bool print()
Definition: XrdClReplayArgs.hh:190
bool verify()
Definition: XrdClReplayArgs.hh:195
std::string _path
Definition: XrdClReplayArgs.hh:211
bool truncate()
Definition: XrdClReplayArgs.hh:192
bool option_json
Definition: XrdClReplayArgs.hh:206
double option_speed
Definition: XrdClReplayArgs.hh:209
ReplayArgs(int argc, char *argv[])
Definition: XrdClReplayArgs.hh:38
bool option_long
Definition: XrdClReplayArgs.hh:201
std::vector< std::string > option_regex
Definition: XrdClReplayArgs.hh:210
bool option_verify
Definition: XrdClReplayArgs.hh:208
Args parse for XrdClReplay.
Definition: XrdClReplayArgs.hh:35
bool longformat()
Definition: XrdClReplayArgs.hh:188
bool option_print
Definition: XrdClReplayArgs.hh:203
bool suppress_error()
Definition: XrdClReplayArgs.hh:194