client: support --status-interval option in client/server mode
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 5 Aug 2018 16:30:14 +0000 (09:30 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 5 Aug 2018 21:12:12 +0000 (15:12 -0600)
This fixes "FIO client/server periodic stats" for non JSON output
(the reporter is using JSON output).
https://www.spinics.net/lists/fio/msg07204.html

Mark -L/--status-interval option with FIO_CLIENT_FLAG, so that the
command line string is sent to the server side.

The client can now control the server to periodically show status,
and each status is sent to the client via fio_server_text_output()
(FIO_NET_CMD_TEXT socket event) in log_info_buf().

Reported-by: Mark Beierl <Mark.Beierl@dell.com>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
init.c

diff --git a/init.c b/init.c
index ede0a8b97c773b2dd971c259c2f05c306dd84afa..06f69719328f575c12c0a2886ef64e9b256d4236 100644 (file)
--- a/init.c
+++ b/init.c
@@ -258,7 +258,7 @@ static struct option l_opts[FIO_NR_OPTIONS] = {
        {
                .name           = (char *) "status-interval",
                .has_arg        = required_argument,
        {
                .name           = (char *) "status-interval",
                .has_arg        = required_argument,
-               .val            = 'L',
+               .val            = 'L' | FIO_CLIENT_FLAG,
        },
        {
                .name           = (char *) "trigger-file",
        },
        {
                .name           = (char *) "trigger-file",