fio作图

fio --filename=test_file  --direct=1 --rw=randwrite --numjobs=1 --iodepth=16 \
--ioengine=libaio  --bs=4k --group_reporting --name=zhangyi --log_avg_msec=500 \
--write_bw_log=test-fio --write_lat_log=test-fio --write_iops_log=test-fio --size=1G  

结果如下有:

[root@localhost pra]# ls
fio.sh             test-fio_clat.1.log  test-fio_lat.1.log
test-fio_bw.1.log  test-fio_iops.1.log  test-fio_slat.1.log

把结果的格式中的1去掉

可以用for 循环

for i in clat lat slat bw iops;do
	mv test-fio_$i.1.log rbd_$i.log
done

```bash
[root@localhost pra]# ls
fio.sh  rbd_bw.log  rbd_clat.log  rbd_iops.log  rbd_lat.log  rbd_slat.log

在执行如下命令将自动将clat bw iops slat 相关log转化为SVG图片,命令中的bw是生成文件的前缀

 fio_generate_plots bw
bw-bw.svg    bw-lat.svg          fio.sh        rbd_iops.log
bw-clat.svg  bw-slat.svg         rbd_bw.log    rbd_lat.log
bw-iops.svg  fio_generate_plots  rbd_clat.log  rbd_slat.log

生成PNG图片;

fio2gnuplot -b -g
[root@localhost pra]# fio2gnuplot -b -g 
1 files Selected with pattern '*_bw.log'
 |-> rbd_bw.log

Running gnuplot Rendering

Rendering traces are available in the current directory
[root@localhost pra]# ls
bw-bw.svg    fio_generate_plots   rbd_bw.log    result.average.png
bw-clat.svg  fio.sh               rbd_clat.log  result.max.png
bw-iops.svg  rbd_bw-2Draw.png     rbd_iops.log  result.min.png
bw-lat.svg   rbd_bw-2Dsmooth.png  rbd_lat.log   result.stddev.png
bw-slat.svg  rbd_bw-2Dtrend.png   rbd_slat.log
-p<pattern>或--pattern<pattern>:用于选择fio输入文件的glob模式
-b或--bandwidth:用于选择*_bw.log文件的预定义模式
-i或--iops:用于选择*_iops.log文件的预定义模式
-g或--gnuplot:在退出之前渲染gnuplot跟踪
-o或--outputfile<file>:gnuplot跟踪的基本名称
-如果已定义,则使用模式设置Basename
-d或--outputdir<dir>:gnuplot渲染文件的目录
-t或--title<title>:gnuplot跟踪的标题
-使用在fio跟踪中检测到的块大小设置标题
-G或--全局<type>:在中搜索<type>。全局文件按模式匹配
-可用类型有:min、max、avg、stddev
-.global扩展名自动添加
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值