projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define SIGUSR1 to inform fio to dump run stats while continuing to run
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index dd75882c54f3714db8d8ca37e7119b91be742a66..ee6765ed7adf9671c5cc131909e80ebe2e5abdff 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-344,6
+344,11
@@
static void sig_int(int sig)
fio_clients_terminate();
}
fio_clients_terminate();
}
+static void sig_show_status(int sig)
+{
+ show_running_run_stats();
+}
+
static void client_signal_handler(void)
{
struct sigaction act;
static void client_signal_handler(void)
{
struct sigaction act;
@@
-357,6
+362,11
@@
static void client_signal_handler(void)
act.sa_handler = sig_int;
act.sa_flags = SA_RESTART;
sigaction(SIGTERM, &act, NULL);
act.sa_handler = sig_int;
act.sa_flags = SA_RESTART;
sigaction(SIGTERM, &act, NULL);
+
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = sig_show_status;
+ act.sa_flags = SA_RESTART;
+ sigaction(SIGUSR1, &act, NULL);
}
static void probe_client(struct fio_client *client)
}
static void probe_client(struct fio_client *client)