Linux RedHat - Logging await

-1

How can I create an await log for the devices /dev/emcpower*1. The log should be in the pattern of:

Aug 23 10:00:11 /dev/emcpowera1 2.96
Aug 23 10:00:11 /dev/emcpowerb1 2.91
Aug 23 10:00:13 /dev/emcpowera1 0.90
Aug 23 10:00:13 /dev/emcpowerb1 1.17

The await value should be from iostat $10 cul. Another requirement is that the value should not be from the iostat cache.

Oz Bar-Shalom

Posted 2016-08-23T06:21:59.397

Reputation: 186

Answers

0

I found a solution to log disks latency (await).

I created a script file with this command:

/usr/bin/iostat -x 1 -d /dev/emcpower*1 | awk '{print strftime("[%Y-%m-%d %H:%M:%S]"),$1,$10}' | grep emc >> /var/log/disks-latency.log

Then i created an init.d script (daemon) to run the script as a daemon. and dont forget to create a logrotate to avoid huge log file

Oz Bar-Shalom

Posted 2016-08-23T06:21:59.397

Reputation: 186