@@ -15,6 +15,7 @@ def wizard(params,server_info):
15
15
params ["max_duration" ] = get_test_duration ()
16
16
params ["polling_interval" ], tmap_result = get_tmap_interval ()
17
17
params ["fio_flag" ] = get_fio_setting ()
18
+ params ["fio_write" ] = get_fio_write ()
18
19
params ["graph_flag" ] = get_graph_flag ()
19
20
params ["graph_settings" ] = get_graph_settings (params ,server_info ,tmap_result ) if params ["graph_flag" ] else {}
20
21
params ["rsync_settings" ] = get_rsync_params ()
@@ -104,6 +105,24 @@ def get_fio_setting():
104
105
flag = False
105
106
return flag
106
107
108
+ def get_fio_write ():
109
+ selection = ""
110
+ flag = True
111
+ while selection not in ["y" ,"Y" ,"n" ,"N" ]:
112
+ selection = input ("Would you like to perform WRITES on all storage disks between measurements using fio? (y/n): " )
113
+ if selection not in ["y" ,"Y" ,"n" ,"N" ]:
114
+ print ("Invalid selection. Try again." )
115
+ if selection in ["y" ,"Y" ]:
116
+ confirm = input ("Are you sure? Data can and will be corrupted on your storage disks if you write. (type 'yesiamsure' to confirm): " )
117
+ if confirm == "yesiamsure" :
118
+ flag = True
119
+ else :
120
+ print ("yesiamsure not entered. Defaulting to read only." )
121
+ flag = False
122
+ if selection in ["n" ,"N" ]:
123
+ flag = False
124
+ return flag
125
+
107
126
def get_graph_flag ():
108
127
selection = ""
109
128
flag = True
@@ -177,17 +196,15 @@ def run_tplot(params):
177
196
#./tplot -o output/$TEST_NAME.csv -d 120 -i 10 -s 3 -f
178
197
steady_state = 3 + int ((60 / params ["polling_interval" ]))
179
198
180
- command = "./tplot -o output/{tn}.csv -d {dur} -i {pi} -s {ss} {fio}" .format (
199
+ command = "./tplot -o output/{tn}.csv -d {dur} -i {pi} -s {ss} {fio} {write} " .format (
181
200
tn = params ["test_name" ],
182
201
dur = params ["max_duration" ],
183
202
pi = params ["polling_interval" ],
184
203
ss = steady_state ,
185
- fio = "-f" if params ["fio_flag" ] else ""
204
+ fio = "-f" if params ["fio_flag" ] else "" ,
205
+ write = "-w" if params ["fio_flag" ] and params ["fio_write" ] else ""
186
206
)
187
207
return os .system (command )
188
-
189
-
190
-
191
208
192
209
193
210
def run_csv_converter (params ):
@@ -243,6 +260,7 @@ def main():
243
260
"max_duration" : 3600 ,
244
261
"polling_interval" : 60 ,
245
262
"fio_flag" : True ,
263
+ "write_flag" : False ,
246
264
"graph_flag" : True ,
247
265
"graph_settings" : {},
248
266
"rsync_settings" : {}
0 commit comments