Add short option for iointerface
This commit is contained in:
parent
70bd09276d
commit
f72fabaae7
@ -58,7 +58,6 @@ def ioping_output_shell():
|
||||
print(stdout)
|
||||
else:
|
||||
print(stderr)
|
||||
|
||||
return returncode
|
||||
|
||||
|
||||
@ -71,17 +70,17 @@ def ioping_output_telegraf():
|
||||
return returncode
|
||||
|
||||
ioping_statistic_keys = [
|
||||
'statistics_count',
|
||||
'runtime',
|
||||
'iops',
|
||||
'transfer_speed',
|
||||
'min_request_time',
|
||||
'avg_request_time',
|
||||
'max_request_time',
|
||||
'std_deviation_request_time',
|
||||
'total_requests',
|
||||
'total_running_time'
|
||||
]
|
||||
'statistics_count',
|
||||
'runtime',
|
||||
'iops',
|
||||
'transfer_speed',
|
||||
'min_request_time',
|
||||
'avg_request_time',
|
||||
'max_request_time',
|
||||
'std_deviation_request_time',
|
||||
'total_requests',
|
||||
'total_running_time'
|
||||
]
|
||||
|
||||
try:
|
||||
ioping_statistics = dict(zip(ioping_statistic_keys, stdout.split()))
|
||||
@ -97,24 +96,24 @@ def ioping_output_telegraf():
|
||||
def get_parser():
|
||||
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument('-c', '--count',
|
||||
help = 'stop after <count> requests',
|
||||
default = '10')
|
||||
help = 'stop after <count> requests',
|
||||
default = '10')
|
||||
parser.add_argument('-i', '--interval',
|
||||
help = 'interval between requests',
|
||||
default = '1s')
|
||||
parser.add_argument('--iointerface',
|
||||
help = 'Which ionterface to use: async|cached|direct|sync|dsync',
|
||||
default = '')
|
||||
help = 'interval between requests',
|
||||
default = '1s')
|
||||
parser.add_argument('-l', '--location',
|
||||
help = 'directory|file|device to test. Best would be a directory to not shred anything accidentially',
|
||||
default = '/tmp')
|
||||
help = 'directory|file|device to test. Best would be a directory to not shred anything accidentially',
|
||||
default = '/tmp')
|
||||
parser.add_argument('-m', '--mode',
|
||||
help = 'Which output to use: shell|telegraf',
|
||||
default = 'telegraf')
|
||||
help = 'Which output to use: shell|telegraf',
|
||||
default = 'telegraf')
|
||||
parser.add_argument('-n', '--iointerface',
|
||||
help = 'Which ionterface to use: async|cached|direct|sync|dsync',
|
||||
default = '')
|
||||
parser.add_argument('-w', '--read-write',
|
||||
help = 'Use read-write test instead of read.',
|
||||
action = 'store_true',
|
||||
default = 'False')
|
||||
help = 'Use read-write test instead of read.',
|
||||
action = 'store_true',
|
||||
default = 'False')
|
||||
return parser
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user