HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

total I/O by disk over time

 
klb
Valued Contributor

total I/O by disk over time



My first stab at it using iostat...

#!/usr/bin/ksh

#
# The interval must be 1 second, otherwise results are useless
iostat 1 | awk 'BEGIN {
iter_count = 0
report_interval = 600
num_disks = 0
init_started = 0
init = 1
}
{
if ( init == 1 && $1 !~ "^$" && $1 !~ "device" ) {
init_started = 1;
dio[$1] = 0;
dnm[num_disks] = $1;
num_disks++;
continue;
}

if ( init_started == 1 && $1 ~ "^$" ) {
# Display and clear the arrays every report_interval
if ( iter_count >= report_interval ) {
system("date");
printf("%-15s %12s ( interval: %d seconds )\n\n",
"device","MBytes", report_interval);
for ( i=0; i < num_disks; i++ ) {
printf("%-12s %12d\n",dnm[i], dio[dnm[i]]/1024);
dio[dnm[i]] = 0;
}
printf("\n");
system(""); # force awk to flush its output buffer
iter_count=0;
}
else
iter_count++;
init=0;
continue;
}
# Capture the interval's I/O for this disk
dio[$1] = dio[$1] + $2;
}'

Testing with report_interval set to 5 seconds and generating a known amount of I/O appeared to report correct totals ( write ).

-klb
1 REPLY
Emil Velez
Honored Contributor

Re: total I/O by disk over time

Many times systems have measureware loaded on them. Using the extract command you can get the 5 minute I/O totals and 1 hour summaries.

In addition it will collect data per disk, lv, filesystem and you can get the 5 minute data and 1 hour data.

If you do not have the enterprise or MC oe and it includes measureware. You could consider loading it and it will be fully functional once for 60 days. You can do alot of analysis of your system for 60 days.

It collects about 400 performance metrics on your system.