CyberBit

Python+MySQL

07. pt-fifo-split


iostat -dxm 1 42 1>iostat.log 2>&1


----------------------------------------

#!/bin/bash

offset=0
lines=4
fifo_file=/tmp/pt-fifo-split
deal_file=/root/test/iostat.log
result_dir=/root/test/io_result
num=1

pt-fifo-split --offset $offset --lines $lines --statistics --force --fifo $fifo_file $deal_file &
sleep 1;

while [ -e $fifo_file ];
do
cat $fifo_file > $result_dir/$num.log;
let num=num+1;
sleep 1;
done

printf "pt-fifo-split finished...\n\n\n"

------------------------------------------

 

posted on 2018-12-01 08:45  CyberBit  阅读(204)  评论(0编辑  收藏  举报

导航