[Orca-users] Question on AIX iostat - orca-aix-stat.pl
Yaple, James A.
James.Yaple at mail.va.gov
Thu Nov 18 05:41:18 PST 2004
The system wide read/write per second graph does not reset to zero on our
AIX systems, it accumulates. Right now, it indicates 600 G per second. I
examined the script (snippet below) to determine why. It looks like the
read and write throughput is gathered on the first iteration of iostat, when
it should be gathering on the second.
Am I way off here? These are the first AIX systems we have Orca'd so
perhaps its a definition problem on my end.
This snippet is from the current snapshot of orca-aix-stat.pl.
Any help appreciated.
James
=======================
## Get iostat data
$disk_t = 0;
$disk_rK = 0;
$disk_wK = 0;
undef %disks;
open IN, "iostat -d 1 2|";
while (<IN>) {
if (/^(\S+)\s+\S+\s+\S+\s+(\S+)\s+(\d+)\s+(\d+)/) {
my $disk = $1;
my $tps = $2;
my $rK = $3;
my $wK = $4;
if (not $disks{$disk}) {
$disks{$disk}++; # Get rK & wK from first pass.
$disk_rK += $rK;
$disk_wK += $wK;
} else {
$disk_t += $tps; # Get trans per sec from second pass.
}
}
}
close IN;
$iostat_header = "disk_t/s\tdisk_rK/s\tdisk_wK/s\t";
$iostat_info = "${disk_t}\t${disk_rK}\t${disk_wK}";
=====================
More information about the Orca-users
mailing list