Report Rated PBW for fio cards

This commit is contained in:
Brian Fraser
2012-08-24 19:39:58 -03:00
parent b503715944
commit ed7b497590
5 changed files with 16 additions and 6 deletions

View File

@@ -176,18 +176,21 @@ fio_status_minus_a () {
print "${adapter}_modules @connected_modules";
for my $module (@connected_modules) {
my ($attached, $general, $firmware, $temperature, $media_status) = /
my ($rest, $attached, $general, $firmware, $temperature, $media_status) = /(
^ \s* $module \s+ (Attached[^\n]+) \n
\s+ ([^\n]+) \n # All the second line
.+? (Firmware\s+[^\n]+) \n
.+? (Internal \s+ temperature:[^\n]+) \n
.+? ((?:Media | Reserve \s+ space) \s+ status:[^\n]+)
/xsm;
.+? ((?:Media | Reserve \s+ space) \s+ status:[^\n]+) \n
.+?(?:\n\n|\z)
)/xsm;
my ($pbw) = $rest =~ /.+?(Rated \s+ PBW:[^\n]+)/xsm;
print "${adapter}_${module}_attached_as $attached";
print "${adapter}_${module}_general $general";
print "${adapter}_${module}_firmware $firmware";
print "${adapter}_${module}_media_status $media_status";
print "${adapter}_${module}_temperature $temperature";
print "${adapter}_${module}_rated_pbw $pbw" if $pbw;
}
} while <>;

View File

@@ -903,6 +903,9 @@ report_fio_minus_a () {
name_val "" "$(get_var "${adapter}_${module}_firmware" "$file")"
name_val "" "$(get_var "${adapter}_${module}_temperature" "$file")"
name_val "" "$(get_var "${adapter}_${module}_media_status" "$file")"
if [ "$(get_var "${adapter}_${module}_rated_pbw" "$file")" ]; then
name_val "" "$(get_var "${adapter}_${module}_rated_pbw" "$file")"
fi
local NAME_VAL_LEN=$name_val_len_orig;
done
done