Ok - a contribution to all the helpful CDI folks. The following Awk
script will show you the UR (read-ahead utilization ratio) and the BR
(bufwaits ratio). Art Kagel gets all the credit for the formulas - I
just got sick of using my calculator.
----------------------------------------
awk '
/[a-zA-Z]/ {
for(i=1; i<=NF; i++){
name[i] = $i;
}
}
/[0-9]/ {
for(i=1; i<=NF; i++){
content[name[i]] = $i;
}
}
END {
ixdaRA = content["ixda-RA"];
idxRA = content["idx-RA"];
daRA = content["da-RA"];
RApgsused = content["RA-pgsused"];
print "Read Utilization (UR): ", ((ixdaRA + idxRA + daRA) /
RApgsused) * 100, "%";
bufwaits = content["bufwaits"];
bufwrits = content["bufwrits"];
pagreads = content["pagreads"];
print "Bufwaits Ratio(BR): ", ((bufwaits/(pagreads + bufwrits)) *
100), "%";
}
'
----------------------------------------------------------
The UR should ideally be VERY near 100% - the higher the better.
The BR should be below 7% - the lower the better.
Check CDI archives for more info.
The awk script is handed the output of onstat -p, and then fills an
associative array with the labels and values. This works with my
7.31.UC2, and can be extended to chew on whatever onstat output.
Save the script as onstat.awk or whatever, then:
onstat -p | onstat.awk
Cheers
allen