#!/bin/sh
GVF=FIO-VERSION-FILE
-DEF_VER=fio-2.0.9
+DEF_VER=fio-2.0.10
LF='
'
points in the job file. A stone wall also implies starting
a new reporting group.
-new_group Start a new reporting group. If this option isn't given,
- jobs in a file will be part of the same reporting group
- unless separated by a stone wall (or if it's a group
- by itself, with the numjobs option).
+new_group Start a new reporting group. See: group_reporting.
numjobs=int Create the specified number of clones of this job. May be
used to setup a larger number of threads/processes doing
- the same thing. We regard that grouping of jobs as a
- specific group.
-
-group_reporting If 'numjobs' is set, it may be interesting to display
- statistics for the group as a whole instead of for each
- individual job. This is especially true of 'numjobs' is
- large, looking at individual thread/process output quickly
- becomes unwieldy. If 'group_reporting' is specified, fio
- will show the final report per-group instead of per-job.
+ the same thing. Each thread is reported separately; to see
+ statistics for all clones as a whole, use group_reporting in
+ conjunction with new_group.
+
+group_reporting It may sometimes be interesting to display statistics for
+ groups of jobs as a whole instead of for each individual job.
+ This is especially true if 'numjobs' is used; looking at
+ individual thread/process output quickly becomes unwieldy.
+ To see the final report per-group instead of per-job, use
+ 'group_reporting'. Jobs in a file will be part of the same
+ reporting group, unless if separated by a stonewall, or by
+ using 'new_group'.
thread fio defaults to forking jobs, however if this option is
given, fio will use pthread_create(3) to create threads
[net] proto=str The network protocol to use. Accepted values are:
tcp Transmission control protocol
- udp Unreliable datagram protocol
+ udp User datagram protocol
unix UNIX domain socket
When the protocol is TCP or UDP, the port must also be given,
act.sa_flags = SA_RESTART;
sigaction(SIGTERM, &act, NULL);
+/* Windows uses SIGBREAK as a quit signal from other applications */
+#ifdef WIN32
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = sig_int;
+ act.sa_flags = SA_RESTART;
+ sigaction(SIGBREAK, &act, NULL);
+#endif
+
memset(&act, 0, sizeof(act));
act.sa_handler = sig_show_status;
act.sa_flags = SA_RESTART;
act.sa_flags = SA_RESTART;
sigaction(SIGTERM, &act, NULL);
+/* Windows uses SIGBREAK as a quit signal from other applications */
+#ifdef WIN32
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = sig_int;
+ act.sa_flags = SA_RESTART;
+ sigaction(SIGBREAK, &act, NULL);
+#endif
+
memset(&act, 0, sizeof(act));
act.sa_handler = sig_show_status;
act.sa_flags = SA_RESTART;
if (!terse)
log_info("\nDisk stats (read/write):\n");
- if (terse && terse_version == 4) {
+ if (output_format == FIO_OUTPUT_JSON) {
array = json_create_array();
json_object_add_value_array(parent, "disk_util", array);
}
du = flist_entry(entry, struct disk_util, list);
aggregate_slaves_stats(du);
- if (terse && terse_version == 4)
+ if (output_format == FIO_OUTPUT_JSON)
print_disk_util_json(du, array);
else
print_disk_util(&du->dus, &du->agg, terse);
},
{ .ival = "udp",
.oval = FIO_TYPE_UDP,
- .help = "Unreliable Datagram Protocol",
+ .help = "User Datagram Protocol",
},
{ .ival = "unix",
.oval = FIO_TYPE_UNIX,
td_verror(td, EINVAL, "bad direction");
return 1;
}
-
+
return 0;
}
struct netio_options *o = td->eo;
int ret;
+#ifdef WIN32
+ WSADATA wsd;
+ WSAStartup(MAKEWORD(2,2), &wsd);
+#endif
+
if (td_random(td)) {
log_err("fio: network IO can't be random\n");
return 1;
Transmission control protocol
.TP
.B udp
-Unreliable datagram protocol
+User datagram protocol
.TP
.B unix
UNIX domain socket
io_u->error = 0;
flist_del(&io_u->list);
- flist_add(&io_u->list, &td->io_u_busylist);
+ flist_add_tail(&io_u->list, &td->io_u_busylist);
td->cur_depth++;
io_u->flags |= IO_U_F_IN_CUR_DEPTH;
} else if (td->o.verify_async) {
char buf[128];
long l;
- sprintf(buf, "%lu", page_size);
+ sprintf(buf, "%lu", (unsigned long) page_size);
fio_keywords[0].replace = strdup(buf);
mb_memory = os_phys_mem() / (1024 * 1024);
#define POSIX_MADV_RANDOM MADV_RANDOM
#endif
+#define os_ctime_r(x, y, z) ctime_r((x), (y), (z))
+#define FIO_OS_HAS_CTIME_R
+
typedef psetid_t os_cpu_mask_t;
typedef struct solaris_rand_seed os_random_state_t;
typedef socklen_t fio_socklen_t;
#endif
+#ifndef FIO_OS_HAS_CTIME_R
+#define os_ctime_r(x, y, z) ctime_r((x), (y))
+#endif
+
#ifdef FIO_USE_GENERIC_SWAP
static inline uint16_t fio_swap16(uint16_t val)
{
<Product Id="2BA394F9-0D9E-4597-BB9D-6B18097D64BB"\r
Codepage="1252" Language="1033"\r
Manufacturer="fio" Name="fio"\r
- UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.9">\r
+ UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.10">\r
<Package \r
Comments="Contact: Your local administrator"\r
Description="Flexible IO Tester"\r
va_start(v, message);
len = _vscprintf(message, v);
output = malloc(len + sizeof(char));
- vsprintf_s(output, len + sizeof(char), message, v);
+ vsprintf(output, message, v);
WriteFile(log_file, output, len, &bytes_written, NULL);
va_end(v);
- free(output);
+ free(output);
}
int kill(pid_t pid, int sig)
break;
}
+ /* Don't allow Windows to cache the write: flush it to disk */
+ _commit(fd);
+
bytes_remaining -= bytes_written;
}
int i;
int rc;
- if (timeout != -1)
+ if (timeout != -1) {
to = &tv;
-
- to->tv_sec = timeout / 1000;
- to->tv_usec = (timeout % 1000) * 1000;
+ to->tv_sec = timeout / 1000;
+ to->tv_usec = (timeout % 1000) * 1000;
+ }
FD_ZERO(&readfds);
FD_ZERO(&writefds);
errno = ENOSPC;
WSACleanup();
+
return ret;
}
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+ return inet_pton(AF_INET, cp, inp);
+}
+
int inet_pton(int af, const char *restrict src, void *restrict dst)
{
INT status = SOCKET_ERROR;
return;
time(&time_p);
- ctime_r((const time_t *) &time_p, time_buf);
+ os_ctime_r((const time_t *) &time_p, time_buf, sizeof(time_buf));
if (!ts->error) {
log_info("%s: (groupid=%d, jobs=%d): err=%2d: pid=%d: %s",