fio2gnuplot: Adding verbose option
[fio.git] / tools / plot / fio2gnuplot.py
CommitLineData
9402b895
EV
1#!/usr/bin/python
2#
3# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
4# Author: Erwan Velu <erwan@enovance.com>
5#
6# The license below covers all files distributed with fio unless otherwise
7# noted in the file itself.
8#
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License version 2 as
11# published by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22import os
23import fnmatch
24import sys
25import getopt
26import re
27import math
795ae706 28import shutil
9402b895
EV
29
30def find_file(path, pattern):
31 fio_data_file=[]
32 # For all the local files
33 for file in os.listdir(path):
34 # If the file math the regexp
35 if fnmatch.fnmatch(file, pattern):
36 # Let's consider this file
37 fio_data_file.append(file)
38
39 return fio_data_file
40
1cc6579e 41def generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir):
649d3011 42 if verbose: print "Generating rendering scripts"
5923d3a5
EV
43 filename=gnuplot_output_dir+'mygraph'
44 f=open(filename,'w')
795ae706
EV
45
46 # Plotting 3D or comparing graphs doesn't have a meaning unless if there is at least 2 traces
d270b8bc 47 if len(fio_data_file) > 1:
1cc6579e 48 f.write("call \'%s/graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode))
67b7db1e 49
795ae706
EV
50 # Setting up the compare files that will be plot later
51 compare=open(gnuplot_output_dir + 'compare.gnuplot','w')
52 compare.write('''
53set title '%s'
54set terminal png size 1280,1024
55set ytics axis out auto
56set key top left reverse
57set xlabel "Time (Seconds)"
58set ylabel '%s'
795ae706 59set yrange [0:]
b68e5f80 60set style line 1 lt 1 lw 3 pt 3 linecolor rgb "green"
795ae706
EV
61'''% (title,mode))
62 compare.close()
63 #Copying the common file for all kind of graph (raw/smooth/trend)
64 compare_raw_filename="compare-%s-2Draw" % (gnuplot_output_filename)
65 compare_smooth_filename="compare-%s-2Dsmooth" % (gnuplot_output_filename)
66 compare_trend_filename="compare-%s-2Dtrend" % (gnuplot_output_filename)
67 shutil.copy(gnuplot_output_dir+'compare.gnuplot',gnuplot_output_dir+compare_raw_filename+".gnuplot")
68 shutil.copy(gnuplot_output_dir+'compare.gnuplot',gnuplot_output_dir+compare_smooth_filename+".gnuplot")
69 shutil.copy(gnuplot_output_dir+'compare.gnuplot',gnuplot_output_dir+compare_trend_filename+".gnuplot")
70
71 #Setting up a different output filename for each kind of graph
72 compare_raw=open(gnuplot_output_dir+compare_raw_filename + ".gnuplot",'a')
73 compare_raw.write("set output '%s.png'\n" % compare_raw_filename)
74 compare_smooth=open(gnuplot_output_dir+compare_smooth_filename+".gnuplot",'a')
75 compare_smooth.write("set output '%s.png'\n" % compare_smooth_filename)
76 compare_trend=open(gnuplot_output_dir+compare_trend_filename+".gnuplot",'a')
77 compare_trend.write("set output '%s.png'\n" % compare_trend_filename)
78
b68e5f80
EV
79 # Let's plot the average value for all the traces
80 global_disk_perf = sum(disk_perf, [])
81 global_avg = average(global_disk_perf)
82 compare_raw.write("plot %s w l ls 1 ti 'Global average value (%.2f)'" % (global_avg,global_avg));
83 compare_smooth.write("plot %s w l ls 1 ti 'Global average value (%.2f)'" % (global_avg,global_avg));
84 compare_trend.write("plot %s w l ls 1 ti 'Global average value (%.2f)'" % (global_avg,global_avg));
85
67b7db1e
EV
86 pos=0
87 # Let's create a temporary file for each selected fio file
88 for file in fio_data_file:
89 tmp_filename = "gnuplot_temp_file.%d" % pos
795ae706
EV
90
91 # Plotting comparing graphs doesn't have a meaning unless if there is at least 2 traces
92 if len(fio_data_file) > 1:
93 # Adding the plot instruction for each kind of comparing graphs
b68e5f80
EV
94 compare_raw.write(",\\\n'%s' using 2:3 with linespoints title '%s'" % (tmp_filename,fio_data_file[pos]))
95 compare_smooth.write(",\\\n'%s' using 2:3 smooth csplines title '%s'" % (tmp_filename,fio_data_file[pos]))
96 compare_trend.write(",\\\n'%s' using 2:3 smooth bezier title '%s'" % (tmp_filename,fio_data_file[pos]))
795ae706
EV
97
98 png_file=file.replace('.log','')
67b7db1e
EV
99 raw_filename = "%s-2Draw" % (png_file)
100 smooth_filename = "%s-2Dsmooth" % (png_file)
101 trend_filename = "%s-2Dtrend" % (png_file)
102 avg = average(disk_perf[pos])
428b4f6b 103 f.write("call \'%s/graph2D.gpm\' \'%s' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%f\'\n" % (gpm_dir,title,tmp_filename,fio_data_file[pos],raw_filename,mode,smooth_filename,trend_filename,avg))
67b7db1e
EV
104 pos = pos +1
105
795ae706
EV
106 # Plotting comparing graphs doesn't have a meaning unless if there is at least 2 traces
107 if len(fio_data_file) > 1:
108 os.remove(gnuplot_output_dir+"compare.gnuplot")
109 compare_raw.close()
110 compare_smooth.close()
111 compare_trend.close()
9402b895
EV
112 f.close()
113
1cc6579e 114def generate_gnuplot_math_script(title,gnuplot_output_filename,mode,average,gnuplot_output_dir,gpm_dir):
5923d3a5
EV
115 filename=gnuplot_output_dir+'mymath';
116 f=open(filename,'a')
1cc6579e 117 f.write("call \'%s/math.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\' %s\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode,average))
9402b895
EV
118 f.close()
119
5923d3a5 120def compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir):
649d3011 121 if verbose: print "Processing data file 2/2"
9402b895
EV
122 temp_files=[]
123 pos=0
5923d3a5 124
9402b895
EV
125 # Let's create a temporary file for each selected fio file
126 for file in fio_data_file:
5923d3a5 127 tmp_filename = "%sgnuplot_temp_file.%d" % (gnuplot_output_dir, pos)
9402b895
EV
128 temp_files.append(open(tmp_filename,'r'))
129 pos = pos +1
130
1cc6579e 131 f = open(gnuplot_output_dir+gnuplot_output_filename, "w")
9402b895
EV
132 index=0
133 # Let's add some information
134 for tempfile in temp_files:
135 f.write("# Disk%d was coming from %s\n" % (index,fio_data_file[index]))
136 f.write(tempfile.read())
137 f.write("\n")
138 tempfile.close()
139 index = index + 1
140 f.close()
141
142def average(s): return sum(s) * 1.0 / len(s)
143
932f303b
EV
144def compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir, min_time, max_time):
145 end_time=max_time
146 if end_time == -1:
147 end_time="infinite"
649d3011 148 if verbose: print "Processing data file 1/2 with %s<time<%s" % (min_time,end_time)
9402b895
EV
149 files=[]
150 temp_outfile=[]
151 blk_size=0
152 for file in fio_data_file:
153 files.append(open(file))
154 pos = len(files) - 1
5923d3a5 155 tmp_filename = "%sgnuplot_temp_file.%d" % (gnuplot_output_dir,pos)
09f30f43
EV
156 gnuplot_file=open(tmp_filename,'w')
157 temp_outfile.append(gnuplot_file)
158 gnuplot_file.write("#Temporary file based on file %s\n" % file)
9402b895
EV
159 disk_perf.append([])
160
161 shall_break = False
162 while True:
163 current_line=[]
f9846c39
EV
164 nb_empty_files=0
165 nb_files=len(files)
51d52208
EV
166 for myfile in files:
167 s=myfile.readline().replace(',',' ').split()
9402b895 168 if not s:
f9846c39 169 nb_empty_files+=1
4ff1f2d0 170 s="-1, 0, 0, 0".replace(',',' ').split()
f9846c39
EV
171
172 if (nb_empty_files == nb_files):
9402b895
EV
173 shall_break=True
174 break;
f9846c39 175
9402b895
EV
176 current_line.append(s);
177
178 if shall_break == True:
179 break
180
181 last_time = -1
ffab7c2f 182 index=-1
9402b895 183 perfs=[]
ffab7c2f
EV
184 for line in enumerate(current_line):
185 # Index will be used to remember what file was featuring what value
186 index=index+1
187
188 time, perf, x, block_size = line[1]
9402b895 189 if (blk_size == 0):
32deaac9
EV
190 try:
191 blk_size=int(block_size)
192 except:
193 print "Error while reading the following line :"
194 print line
195 sys.exit(1);
9402b895
EV
196
197 # We ignore the first 500msec as it doesn't seems to be part of the real benchmark
198 # Time < 500 usually reports BW=0 breaking the min computing
ffab7c2f
EV
199 if (min_time == 0):
200 min_time==0.5
201
202 # Then we estimate if the data we got is part of the time range we want to plot
203 if ((float(time)>(float(min_time)*1000)) and ((int(time) < (int(max_time)*1000)) or max_time==-1)):
932f303b 204 disk_perf[index].append(int(perf))
ffab7c2f 205 perfs.append("%d %s %s"% (index, time, perf))
9402b895
EV
206
207 # If we reach this point, it means that all the traces are coherent
208 for p in enumerate(perfs):
ffab7c2f
EV
209 index, perf_time,perf = p[1].split()
210 temp_outfile[int(index)].write("%s %.2f %s\n" % (index, float(float(perf_time)/1000), perf))
d7e30e61 211
9402b895
EV
212
213 for file in files:
214 file.close()
215 for file in temp_outfile:
216 file.close()
217 return blk_size
218
1cc6579e 219def compute_math(fio_data_file, title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir):
649d3011 220 if verbose: print "Computing Maths"
9402b895
EV
221 global_min=[]
222 global_max=[]
5923d3a5
EV
223 average_file=open(gnuplot_output_dir+gnuplot_output_filename+'.average', 'w')
224 min_file=open(gnuplot_output_dir+gnuplot_output_filename+'.min', 'w')
225 max_file=open(gnuplot_output_dir+gnuplot_output_filename+'.max', 'w')
226 stddev_file=open(gnuplot_output_dir+gnuplot_output_filename+'.stddev', 'w')
227 global_file=open(gnuplot_output_dir+gnuplot_output_filename+'.global','w')
9402b895
EV
228
229 min_file.write('DiskName %s\n' % mode)
230 max_file.write('DiskName %s\n'% mode)
231 average_file.write('DiskName %s\n'% mode)
232 stddev_file.write('DiskName %s\n'% mode )
233 for disk in xrange(len(fio_data_file)):
234# print disk_perf[disk]
235 min_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
236 max_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
237 average_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
238 stddev_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
239 avg = average(disk_perf[disk])
240 variance = map(lambda x: (x - avg)**2, disk_perf[disk])
241 standard_deviation = math.sqrt(average(variance))
242# print "Disk%d [ min=%.2f max=%.2f avg=%.2f stddev=%.2f \n" % (disk,min(disk_perf[disk]),max(disk_perf[disk]),avg, standard_deviation)
243 average_file.write('%d %d\n' % (disk, avg))
244 stddev_file.write('%d %d\n' % (disk, standard_deviation))
245 local_min=min(disk_perf[disk])
246 local_max=max(disk_perf[disk])
247 min_file.write('%d %d\n' % (disk, local_min))
248 max_file.write('%d %d\n' % (disk, local_max))
249 global_min.append(int(local_min))
250 global_max.append(int(local_max))
251
252 global_disk_perf = sum(disk_perf, [])
253 avg = average(global_disk_perf)
254 variance = map(lambda x: (x - avg)**2, global_disk_perf)
255 standard_deviation = math.sqrt(average(variance))
256
257 global_file.write('min=%.2f\n' % min(global_disk_perf))
258 global_file.write('max=%.2f\n' % max(global_disk_perf))
259 global_file.write('avg=%.2f\n' % avg)
260 global_file.write('stddev=%.2f\n' % standard_deviation)
261 global_file.write('values_count=%d\n' % len(global_disk_perf))
262 global_file.write('disks_count=%d\n' % len(fio_data_file))
263 #print "Global [ min=%.2f max=%.2f avg=%.2f stddev=%.2f \n" % (min(global_disk_perf),max(global_disk_perf),avg, standard_deviation)
264
265 average_file.close()
266 min_file.close()
267 max_file.close()
268 stddev_file.close()
269 global_file.close()
270 try:
1cc6579e 271 os.remove(gnuplot_output_dir+'mymath')
9402b895
EV
272 except:
273 True
274
1cc6579e
EV
275 generate_gnuplot_math_script("Average values of "+title,gnuplot_output_filename+'.average',mode,int(avg),gnuplot_output_dir,gpm_dir)
276 generate_gnuplot_math_script("Min values of "+title,gnuplot_output_filename+'.min',mode,average(global_min),gnuplot_output_dir,gpm_dir)
277 generate_gnuplot_math_script("Max values of "+title,gnuplot_output_filename+'.max',mode,average(global_max),gnuplot_output_dir,gpm_dir)
278 generate_gnuplot_math_script("Standard Deviation of "+title,gnuplot_output_filename+'.stddev',mode,int(standard_deviation),gnuplot_output_dir,gpm_dir)
9402b895
EV
279
280def parse_global_files(fio_data_file, global_search):
281 max_result=0
282 max_file=''
283 for file in fio_data_file:
284 f=open(file)
285 disk_count=0
286 search_value=-1
287
288 # Let's read the complete file
289 while True:
290 try:
291 # We do split the name from the value
292 name,value=f.readline().split("=")
293 except:
294 f.close()
295 break
296 # If we ended the file
297 if not name:
298 # Let's process what we have
299 f.close()
300 break
301 else:
302 # disks_count is not global_search item
303 # As we need it for some computation, let's save it
304 if name=="disks_count":
305 disks_count=int(value)
306
307 # Let's catch the searched item
308 if global_search in name:
309 search_value=float(value)
310
311 # Let's process the avg value by estimated the global bandwidth per file
312 # We keep the biggest in memory for reporting
313 if global_search == "avg":
314 if (disks_count > 0) and (search_value != -1):
315 result=disks_count*search_value
316 if (result > max_result):
317 max_result=result
318 max_file=file
319 # Let's print the avg output
320 if global_search == "avg":
321 print "Biggest aggregated value of %s was %2.f in file %s\n" % (global_search, max_result, max_file)
322 else:
323 print "Global search %s is not yet implemented\n" % global_search
324
795ae706
EV
325def render_gnuplot(fio_data_file, gnuplot_output_dir):
326 print "Running gnuplot Rendering"
9402b895 327 try:
795ae706
EV
328 # Let's render all the compared files if some
329 if len(fio_data_file) > 1:
649d3011 330 if verbose: print " |-> Rendering comparing traces"
795ae706 331 os.system("cd %s; for i in *.gnuplot; do gnuplot $i; done" % gnuplot_output_dir)
649d3011 332 if verbose: print " |-> Rendering math traces"
5923d3a5 333 os.system("cd %s; gnuplot mymath" % gnuplot_output_dir)
649d3011 334 if verbose: print " |-> Rendering 2D & 3D traces"
5923d3a5 335 os.system("cd %s; gnuplot mygraph" % gnuplot_output_dir)
d0b4ba6c
EV
336
337 name_of_directory="the current"
338 if gnuplot_output_dir != "./":
339 name_of_directory=gnuplot_output_dir
340 print "\nRendering traces are available in %s directory" % name_of_directory
9402b895
EV
341 except:
342 print "Could not run gnuplot on mymath or mygraph !\n"
343 sys.exit(1);
344
345def print_help():
932f303b 346 print 'fio2gnuplot.py -ghbiod -t <title> -o <outputfile> -p <pattern> -G <type> -m <time> -M <time>'
9402b895
EV
347 print
348 print '-h --help : Print this help'
349 print '-p <pattern> or --pattern <pattern> : A pattern in regexp to select fio input files'
350 print '-b or --bandwidth : A predefined pattern for selecting *_bw.log files'
351 print '-i or --iops : A predefined pattern for selecting *_iops.log files'
352 print '-g or --gnuplot : Render gnuplot traces before exiting'
353 print '-o or --outputfile <file> : The basename for gnuplot traces'
354 print ' - Basename is set with the pattern if defined'
5923d3a5 355 print '-d or --outputdir <dir> : The directory where gnuplot shall render files'
9402b895
EV
356 print '-t or --title <title> : The title of the gnuplot traces'
357 print ' - Title is set with the block size detected in fio traces'
358 print '-G or --Global <type> : Search for <type> in .global files match by a pattern'
359 print ' - Available types are : min, max, avg, stddev'
360 print ' - The .global extension is added automatically to the pattern'
932f303b
EV
361 print '-m or --min_time <time> : Only consider data starting from <time> seconds (default is 0)'
362 print '-M or --max_time <time> : Only consider data ending before <time> seconds (default is -1 aka nolimit)'
649d3011 363 print '-v or --verbose : Increasing verbosity'
9402b895
EV
364
365def main(argv):
366 mode='unknown'
367 pattern=''
368 pattern_set_by_user=False
369 title='No title'
370 gnuplot_output_filename='result'
5923d3a5 371 gnuplot_output_dir='./'
1cc6579e 372 gpm_dir="/usr/share/fio/"
9402b895
EV
373 disk_perf=[]
374 run_gnuplot=False
375 parse_global=False
376 global_search=''
932f303b
EV
377 min_time=0
378 max_time=-1
649d3011
EV
379 global verbose
380 verbose=False
9402b895 381
1cc6579e
EV
382 if not os.path.isfile(gpm_dir+'math.gpm'):
383 gpm_dir="/usr/local/share/fio/"
384 if not os.path.isfile(gpm_dir+'math.gpm'):
385 print "Looks like fio didn't got installed properly as no gpm files found in '/usr/share/fio' or '/usr/local/share/fio'\n"
386 sys.exit(3)
387
9402b895 388 try:
649d3011 389 opts, args = getopt.getopt(argv[1:],"ghbivo:d:t:p:G:m:M:",['bandwidth', 'iops', 'pattern', 'outputfile', 'outputdir', 'title', 'min_time', 'max_time', 'gnuplot', 'Global', 'help', 'verbose'])
9402b895 390 except getopt.GetoptError:
853fd2c4 391 print "Error: One of the option passed to the cmdline was not supported"
5a4f574e 392 print "Please fix your command line or read the help (-h option)"
9402b895
EV
393 sys.exit(2)
394
395 for opt, arg in opts:
396 if opt in ("-b", "--bandwidth"):
397 pattern='*_bw.log'
398 elif opt in ("-i", "--iops"):
399 pattern='*_iops.log'
649d3011
EV
400 elif opt in ("-v", "--verbose"):
401 verbose=True
9402b895
EV
402 elif opt in ("-p", "--pattern"):
403 pattern_set_by_user=True
404 pattern=arg
405 pattern=pattern.replace('\\','')
406 elif opt in ("-o", "--outputfile"):
407 gnuplot_output_filename=arg
5923d3a5
EV
408 elif opt in ("-d", "--outputdir"):
409 gnuplot_output_dir=arg
410 if not gnuplot_output_dir.endswith('/'):
411 gnuplot_output_dir=gnuplot_output_dir+'/'
412 if not os.path.exists(gnuplot_output_dir):
413 os.makedirs(gnuplot_output_dir)
9402b895
EV
414 elif opt in ("-t", "--title"):
415 title=arg
932f303b
EV
416 elif opt in ("-m", "--min_time"):
417 min_time=arg
418 elif opt in ("-M", "--max_time"):
419 max_time=arg
9402b895
EV
420 elif opt in ("-g", "--gnuplot"):
421 run_gnuplot=True
422 elif opt in ("-G", "--Global"):
423 parse_global=True
424 global_search=arg
425 elif opt in ("-h", "--help"):
426 print_help()
427 sys.exit(1)
428
429 # Adding .global extension to the file
430 if parse_global==True:
431 if not gnuplot_output_filename.endswith('.global'):
432 pattern = pattern+'.global'
433
434 fio_data_file=find_file('.',pattern)
435 if len(fio_data_file) == 0:
436 print "No log file found with pattern %s!" % pattern
437 sys.exit(1)
356a65dd
EV
438 else:
439 print "%d files Selected with pattern '%s'" % (len(fio_data_file), pattern)
9402b895
EV
440
441 fio_data_file=sorted(fio_data_file, key=str.lower)
442 for file in fio_data_file:
356a65dd 443 print ' |-> %s' % file
9402b895
EV
444 if "_bw.log" in file :
445 mode="Bandwidth (KB/sec)"
446 if "_iops.log" in file :
447 mode="IO per Seconds (IO/sec)"
448 if (title == 'No title') and (mode != 'unknown'):
449 if "Bandwidth" in mode:
450 title='Bandwidth benchmark with %d fio results' % len(fio_data_file)
451 if "IO" in mode:
452 title='IO benchmark with %d fio results' % len(fio_data_file)
453
356a65dd 454 print
9402b895
EV
455 #We need to adjust the output filename regarding the pattern required by the user
456 if (pattern_set_by_user == True):
457 gnuplot_output_filename=pattern
458 # As we do have some regexp in the pattern, let's make this simpliest
459 # We do remove the simpliest parts of the expression to get a clear file name
460 gnuplot_output_filename=gnuplot_output_filename.replace('-*-','-')
461 gnuplot_output_filename=gnuplot_output_filename.replace('*','-')
462 gnuplot_output_filename=gnuplot_output_filename.replace('--','-')
463 gnuplot_output_filename=gnuplot_output_filename.replace('.log','')
464 # Insure that we don't have any starting or trailing dash to the filename
465 gnuplot_output_filename = gnuplot_output_filename[:-1] if gnuplot_output_filename.endswith('-') else gnuplot_output_filename
466 gnuplot_output_filename = gnuplot_output_filename[1:] if gnuplot_output_filename.startswith('-') else gnuplot_output_filename
467
468 if parse_global==True:
469 parse_global_files(fio_data_file, global_search)
470 else:
932f303b 471 blk_size=compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir,min_time,max_time)
9402b895 472 title="%s @ Blocksize = %dK" % (title,blk_size/1024)
5923d3a5 473 compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir)
1cc6579e
EV
474 compute_math(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
475 generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
9402b895
EV
476
477 if (run_gnuplot==True):
795ae706 478 render_gnuplot(fio_data_file, gnuplot_output_dir)
9402b895
EV
479
480 # Cleaning temporary files
481 try:
482 os.remove('gnuplot_temp_file.*')
483 except:
484 True
485
486#Main
487if __name__ == "__main__":
488 sys.exit(main(sys.argv))