Since commit
aee2ab6775d9, we open the log files for writing and
truncate the output. This breaks when you have multiple jobs with
the same name, as will happen with numjobs=x. Instead of reverting
this part of the commit, lets keep the truncate open and instead
store log files separately. This makes more sense anyway, since
otherwise the logs are all the entries from job X, then all the
entries from job Y, etc. It's easy enough to collate the logs,
should anyone want to do that.
Signed-off-by: Jens Axboe <axboe@fb.com>
jobs in their lifetime. The included fio_generate_plots
script uses gnuplot to turn these text files into nice
graphs. See write_lat_log for behaviour of given
- filename. For this option, the suffix is _bw.log.
+ filename. For this option, the suffix is _bw.x.log, where
+ x is the index of the job (1..N, where N is the number of
+ jobs).
write_lat_log=str Same as write_bw_log, except that this option stores io
submission, completion, and total latencies instead. If no
write_lat_log=foo
- The actual log names will be foo_slat.log, foo_clat.log,
- and foo_lat.log. This helps fio_generate_plot fine the logs
- automatically.
+ The actual log names will be foo_slat.x.log, foo_clat.x.log,
+ and foo_lat.x.log, where x is the index of the job (1..N,
+ where N is the number of jobs). This helps fio_generate_plot
+ fine the logs automatically.
write_iops_log=str Same as write_bw_log, but writes IOPS. If no filename is
given with this option, the default filename of
- "jobname_type.log" is used. Even if the filename is given,
- fio will still append the type of log.
+ "jobname_type.x.log" is used,where x is the index of the job
+ (1..N, where N is the number of jobs). Even if the filename
+ is given, fio will still append the type of log.
log_avg_msec=int By default, fio will log an entry in the iops, latency,
or bw log for every IO that completes. When writing to the
store data of the bandwidth of the jobs in their lifetime. The included
fio_generate_plots script uses gnuplot to turn these text files into nice
graphs. See \fBwrite_lat_log\fR for behaviour of given filename. For this
-option, the postfix is _bw.log.
+option, the postfix is _bw.x.log, where x is the index of the job (1..N,
+where N is the number of jobs)
.TP
.BI write_lat_log \fR=\fPstr
Same as \fBwrite_bw_log\fR, but writes I/O completion latencies. If no
-filename is given with this option, the default filename of "jobname_type.log"
-is used. Even if the filename is given, fio will still append the type of log.
+filename is given with this option, the default filename of
+"jobname_type.x.log" is used, where x is the index of the job (1..N, where
+N is the number of jobs). Even if the filename is given, fio will still
+append the type of log.
.TP
.BI write_iops_log \fR=\fPstr
Same as \fBwrite_bw_log\fR, but writes IOPS. If no filename is given with this
-option, the default filename of "jobname_type.log" is used. Even if the
-filename is given, fio will still append the type of log.
+option, the default filename of "jobname_type.x.log" is used, where x is the
+index of the job (1..N, where N is the number of jobs). Even if the filename
+is given, fio will still append the type of log.
.TP
.BI log_avg_msec \fR=\fPint
By default, fio will log an entry in the iops, latency, or bw log for every
else
suf = "log";
- snprintf(logname, sizeof(logname), "%s_lat.%s",
- o->lat_log_file, suf);
+ snprintf(logname, sizeof(logname), "%s_lat.%d.%s",
+ o->lat_log_file, td->thread_number, suf);
setup_log(&td->lat_log, &p, logname);
- snprintf(logname, sizeof(logname), "%s_slat.%s",
- o->lat_log_file, suf);
+ snprintf(logname, sizeof(logname), "%s_slat.%d.%s",
+ o->lat_log_file, td->thread_number, suf);
setup_log(&td->slat_log, &p, logname);
- snprintf(logname, sizeof(logname), "%s_clat.%s",
- o->lat_log_file, suf);
+ snprintf(logname, sizeof(logname), "%s_clat.%d.%s",
+ o->lat_log_file, td->thread_number, suf);
setup_log(&td->clat_log, &p, logname);
}
if (o->bw_log_file) {
else
suf = "log";
- snprintf(logname, sizeof(logname), "%s_bw.%s",
- o->bw_log_file, suf);
+ snprintf(logname, sizeof(logname), "%s_bw.%d.%s",
+ o->bw_log_file, td->thread_number, suf);
setup_log(&td->bw_log, &p, logname);
}
if (o->iops_log_file) {
else
suf = "log";
- snprintf(logname, sizeof(logname), "%s_iops.%s",
- o->iops_log_file, suf);
+ snprintf(logname, sizeof(logname), "%s_iops.%d.%s",
+ o->iops_log_file, td->thread_number, suf);
setup_log(&td->iops_log, &p, logname);
}