cat latency_s.output | grep -v "mysql" | awk '{print $4, " ", $7, " ", $9, " ", $11," ", $13}'
mysql -p'' -Bse'select event_name , total_latency from sys.x$io_global_by_wait_by_latency order by event_name' > io_global_by_wait_by_latency.old while true do sleep 1 mv io_global_by_wait_by_latency.new io_global_by_wait_by_latency.old mysql -p'' -Bse'select event_name , total_latency from sys.x$io_global_by_wait_by_latency order by event_name' > io_global_by_wait_by_latency.new timestamp=`date` echo -n $timestamp echo -n " " paste io_global_by_wait_by_latency.old io_global_by_wait_by_latency.new | awk '{print $1, " ", ($4-$2)/1000.0/1000/1000}' | awk '{if ($2) print $2 ," ", $1 ;}' | paste -sd' ' done