#include <string.h>
#include <errno.h>
#include <sys/ipc.h>
-#ifndef FIO_NO_HAVE_SHM_H
-#include <sys/shm.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
#include "fio.h"
+#ifndef FIO_NO_HAVE_SHM_H
+#include <sys/shm.h>
+#endif
+
#include "parse.h"
#include "smalloc.h"
#include "filehash.h"
static int max_jobs = FIO_MAX_JOBS;
static int dump_cmdline;
static int def_timeout;
+static int parse_only;
static struct thread_data def_thread;
struct thread_data *threads = NULL;
int exitall_on_terminate = 0;
int output_format = FIO_OUTPUT_NORMAL;
int eta_print = FIO_ETA_AUTO;
+int eta_new_line = 0;
+unsigned long long mlock_size = 0;
FILE *f_out = NULL;
FILE *f_err = NULL;
char **job_sections = NULL;
.has_arg = required_argument,
.val = 'e' | FIO_CLIENT_FLAG,
},
+ {
+ .name = (char *) "eta-newline",
+ .has_arg = required_argument,
+ .val = 'E' | FIO_CLIENT_FLAG,
+ },
{
.name = (char *) "debug",
.has_arg = required_argument,
.val = 'd' | FIO_CLIENT_FLAG,
},
+ {
+ .name = (char *) "parse-only",
+ .has_arg = no_argument,
+ .val = 'P' | FIO_CLIENT_FLAG,
+ },
{
.name = (char *) "section",
.has_arg = required_argument,
/*
* if we are just dumping the output command line, don't add the job
*/
- if (dump_cmdline) {
+ if (dump_cmdline || parse_only) {
put_job(td);
return 0;
}
printf(" --debug=options\tEnable debug logging. May be one/more of:\n"
"\t\t\tprocess,file,io,mem,blktrace,verify,random,parse,\n"
"\t\t\tdiskutil,job,mutex,profile,time,net\n");
+ printf(" --parse-only\t\tParse options only, don't start any IO\n");
printf(" --output\t\tWrite output to file\n");
printf(" --runtime\t\tRuntime in seconds\n");
printf(" --latency-log\t\tGenerate per-job latency logs\n");
printf(" --showcmd\t\tTurn a job file into command line options\n");
printf(" --eta=when\t\tWhen ETA estimate should be printed\n");
printf(" \t\tMay be \"always\", \"never\" or \"auto\"\n");
+ printf(" --eta-newline=time\tForce a new line for every 'time'");
+ printf(" period passed\n");
printf(" --readonly\t\tTurn on safety read-only checks, preventing"
" writes\n");
printf(" --section=name\tOnly run specified section in job file\n");
else if (!strcmp("never", optarg))
eta_print = FIO_ETA_NEVER;
break;
+ case 'E': {
+ long long t = 0;
+
+ if (str_to_decimal(optarg, &t, 0, NULL)) {
+ log_err("fio: failed parsing eta time %s\n", optarg);
+ exit_val = 1;
+ do_exit++;
+ }
+ eta_new_line = t;
+ break;
+ }
case 'd':
if (set_debug(optarg))
do_exit++;
break;
+ case 'P':
+ parse_only = 1;
+ break;
case 'x': {
size_t new_size;
fio_options_free(&def_thread);
if (!thread_number) {
- if (dump_cmdline)
+ if (dump_cmdline || parse_only)
return 0;
if (exec_profile)
return 0;