X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=init.c;h=f0ad01936a33bf136dc1bc7f7b54d4d9a4657626;hb=f2a2ce0eedb44eaa8689e4cbfa77c79b1751b216;hp=fca74fe22bd1101f03813e19f937609ab7d1e07e;hpb=798827c895a585f284842f6b99378be19c821263;p=fio.git diff --git a/init.c b/init.c index fca74fe2..f0ad0193 100644 --- a/init.c +++ b/init.c @@ -22,6 +22,7 @@ #include "verify.h" #include "profile.h" #include "server.h" +#include "idletime.h" #include "lib/getopt.h" @@ -212,6 +213,11 @@ static struct option l_opts[FIO_NR_OPTIONS] = { .has_arg = no_argument, .val = 'T', }, + { + .name = (char *) "idle-prof", + .has_arg = required_argument, + .val = 'I', + }, { .name = NULL, }, @@ -1290,6 +1296,9 @@ static void usage(const char *name) printf(" --server=args\t\tStart a backend fio server\n"); printf(" --daemonize=pidfile\tBackground fio server, write pid to file\n"); printf(" --client=hostname\tTalk to remote backend fio server at hostname\n"); + printf(" --idle-prof=option\tReport cpu idleness on a system or percpu basis\n" + "\t\t\t(option=system,percpu) or run unit work\n" + "\t\t\tcalibration only (option=calibrate)\n"); printf("\nFio was written by Jens Axboe "); printf("\n Jens Axboe \n"); } @@ -1611,6 +1620,14 @@ int parse_cmd_line(int argc, char *argv[]) case 'D': pid_file = strdup(optarg); break; + case 'I': + if ((ret = fio_idle_prof_parse_opt(optarg))) { + /* exit on error and calibration only */ + do_exit++; + if (ret == -1) + exit_val = 1; + } + break; case 'C': if (is_backend) { log_err("fio: can't be both client and server\n");