Potential issue with parsing fio output in parser_fio.sh
Not sure if the format of the output produced by fio has changed, but parser_fio.sh does not seem to be picking up the right fields for the jq parsing.
To Reproduce Steps to reproduce the behavior:
- sudo yum install fio (fio-3.19, HC, CentOS-HPC 8.1)
- See sample output file produced by a variation of fio.pbs. Line of interest is as follows: READ: bw=611MiB/s (641MB/s), 611MiB/s-611MiB/s (641MB/s-641MB/s), io=512MiB (537MB), run=838-838msec
- Parser fails when run as-is. Remove the '|tonumber' from the parser to see that the fields being picked up appear incorrectly
@vermagit is this specific to CentOS 8.1 ?
This should not be specific to 8.1, but I'd guess specific to the fio-3.19 version maybe. I can share sample output files being written since that is the source of the discrepancy as the parser seems to be expecting a different format.
I think if may be easier to use the fio --output-format=json to specify you want fio output in json format directly and then parse that file. e.g to extract fio File size, Block size, numjobs and read BW
jq '.jobs[]."job options".size,.jobs[]."job options".bs,.jobs[]."job options".numjobs,.jobs[].read.bw' fio_output.json "2G" "4M" "4" 2616533
good suggestion @garvct , @vermagit please feel free to contribute via a PR