mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-17 17:27:57 +00:00
Fixed report_fio_minus_a and fio_status_minus_a to handle ioMemory and report internal temp, also fixed some bugs
This commit is contained in:
@@ -169,23 +169,25 @@ fio_status_minus_a () {
|
||||
$adapter =~ tr/ /:/;
|
||||
$adapter .= "::" . scalar(@adapters); # To differentiate two adapters with the same name
|
||||
push @adapters, $adapter;
|
||||
my ($connected_modules) = /Connected ioDimm modules?:\s*\n(.+?\n)\n/smg;
|
||||
my ($connected_modules) = /Connected \S+ modules?:\s*\n(.+?\n)\n/smg;
|
||||
my @connected_modules = $connected_modules =~ /\s+([^:]+):.+\n/g;
|
||||
|
||||
print "${adapter}_general $adapter_general";
|
||||
print "${adapter}_modules @connected_modules";
|
||||
|
||||
for my $module (@connected_modules) {
|
||||
my ($attached, $general, $firmware, $media_status) = /
|
||||
my ($attached, $general, $firmware, $temperature, $media_status) = /
|
||||
^ \s* $module \s+ (Attached[^\n]+) \n
|
||||
\s+ ([^\n]+) \n # All the second line
|
||||
.+? (Firmware\s+[^\n]+) \n
|
||||
.+? (Media \s+ status:[^\n]+)
|
||||
.+? (Internal \s+ temperature:[^\n]+) \n
|
||||
.+? ((?:Media | Reserve \s+ space) \s+ status:[^\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";
|
||||
}
|
||||
} while <>;
|
||||
|
||||
|
@@ -891,7 +891,8 @@ report_fio_minus_a () {
|
||||
|
||||
local adapters="$( get_var "adapters" "$file" )"
|
||||
for adapter in $( echo $adapters | awk '{for (i=1; i<=NF; i++) print $i;}' ); do
|
||||
name_val "$(echo "$adapter" | sed 's/:/ /' | sed 's/::[0-9]*$//')" "$(get_var "${adapter}_general" "$file")"
|
||||
local adapter_for_output="$(echo "$adapter" | sed 's/::[0-9]*$//' | tr ':' ' ')"
|
||||
name_val "$adapter_for_output" "$(get_var "${adapter}_general" "$file")"
|
||||
|
||||
local modules="$(get_var "${adapter}_modules" "$file")"
|
||||
for module in $( echo $modules | awk '{for (i=1; i<=NF; i++) print $i;}' ); do
|
||||
@@ -900,6 +901,7 @@ report_fio_minus_a () {
|
||||
name_val "$module" "$(get_var "${adapter}_${module}_attached_as" "$file")"
|
||||
name_val "" "$(get_var "${adapter}_${module}_general" "$file")"
|
||||
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")"
|
||||
local NAME_VAL_LEN=$name_val_len_orig;
|
||||
done
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
plan 52
|
||||
plan 53
|
||||
|
||||
. "$LIB_DIR/alt_cmds.sh"
|
||||
. "$LIB_DIR/log_warn_die.sh"
|
||||
@@ -1588,10 +1588,12 @@ cat <<EOF > "$PT_TMPDIR/expected"
|
||||
fct0 | Attached as 'fioa' (block device)
|
||||
| Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665
|
||||
| Firmware v5.0.7, rev 101971
|
||||
| Internal temperature: 47.7 degC, max 48.2 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
fct1 | Attached as 'fiob' (block device)
|
||||
| Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478
|
||||
| Firmware v5.0.7, rev 101971
|
||||
| Internal temperature: 42.8 degC, max 47.7 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
EOF
|
||||
|
||||
@@ -1603,10 +1605,11 @@ no_diff \
|
||||
|
||||
cat <<EOF > "$PT_TMPDIR/expected"
|
||||
fio Driver | 2.3.1 build 123
|
||||
ioDrive :0 | Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210
|
||||
ioDrive | Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210
|
||||
fct0 | Attached as 'fioa' (block device)
|
||||
| Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210
|
||||
| Firmware v5.0.5, rev 43674
|
||||
| Internal temperature: 53.2 degC, max 62.5 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
EOF
|
||||
|
||||
@@ -1623,19 +1626,23 @@ cat <<EOF > "$PT_TMPDIR/expected"
|
||||
fct0 | Attached as 'fioa' (block device)
|
||||
| Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665
|
||||
| Firmware v5.0.7, rev 101971
|
||||
| Internal temperature: 47.7 degC, max 48.2 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
fct1 | Attached as 'fiob' (block device)
|
||||
| Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478
|
||||
| Firmware v5.0.7, rev 101971
|
||||
| Internal temperature: 42.8 degC, max 47.7 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive Duo | Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40124
|
||||
fct2 | Attached as 'fioc' (block device)
|
||||
| Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665
|
||||
| Firmware v5.0.7, rev 101971
|
||||
| Internal temperature: 47.7 degC, max 48.2 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
fct3 | Attached as 'fiod' (block device)
|
||||
| Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478
|
||||
| Firmware v5.0.7, rev 101971
|
||||
| Internal temperature: 42.8 degC, max 47.7 degC
|
||||
| Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
EOF
|
||||
|
||||
@@ -1645,3 +1652,25 @@ no_diff \
|
||||
"$PT_TMPDIR/got" \
|
||||
"$PT_TMPDIR/expected" \
|
||||
"report_fio_minus_a works with two adapters, each with two modules"
|
||||
|
||||
cat <<EOF > "$PT_TMPDIR/expected"
|
||||
fio Driver | 3.1.5 build 126
|
||||
Dual Controller Adapter | Fusion-io ioDrive2 Duo 2.41TB, Product Number:F01-001-2T41-CS-0001, SN:1150D0121, FIO SN:1150D0121
|
||||
fct0 | Attached as 'fioa' (block device)
|
||||
| SN:1150D0121-1121
|
||||
| Firmware v7.0.0, rev 107322 Public
|
||||
| Internal temperature: 51.68 degC, max 58.08 degC
|
||||
| Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
fct1 | Attached as 'fiob' (block device)
|
||||
| SN:1150D0121-1111
|
||||
| Firmware v7.0.0, rev 107322 Public
|
||||
| Internal temperature: 46.76 degC, max 51.19 degC
|
||||
| Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
EOF
|
||||
|
||||
report_fio_minus_a "$samples/Linux/004/fio-004" > "$PT_TMPDIR/got"
|
||||
|
||||
no_diff \
|
||||
"$PT_TMPDIR/got" \
|
||||
"$PT_TMPDIR/expected" \
|
||||
"report_fio_minus_a works with Dual Controller Adapter / ioMemory modules"
|
||||
|
@@ -5,9 +5,11 @@ ioDrive:Duo::0_fct0_attached_as Attached as 'fioa' (block device)
|
||||
ioDrive:Duo::0_fct0_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665
|
||||
ioDrive:Duo::0_fct0_firmware Firmware v5.0.7, rev 101971
|
||||
ioDrive:Duo::0_fct0_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive:Duo::0_fct0_temperature Internal temperature: 47.7 degC, max 48.2 degC
|
||||
ioDrive:Duo::0_fct1_attached_as Attached as 'fiob' (block device)
|
||||
ioDrive:Duo::0_fct1_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478
|
||||
ioDrive:Duo::0_fct1_firmware Firmware v5.0.7, rev 101971
|
||||
ioDrive:Duo::0_fct1_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive:Duo::0_fct1_temperature Internal temperature: 42.8 degC, max 47.7 degC
|
||||
adapters ioDrive:Duo::0
|
||||
|
||||
|
@@ -5,5 +5,6 @@ ioDrive::0_fct0_attached_as Attached as 'fioa' (block device)
|
||||
ioDrive::0_fct0_general Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210
|
||||
ioDrive::0_fct0_firmware Firmware v5.0.5, rev 43674
|
||||
ioDrive::0_fct0_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive::0_fct0_temperature Internal temperature: 53.2 degC, max 62.5 degC
|
||||
adapters ioDrive::0
|
||||
|
||||
|
@@ -5,19 +5,23 @@ ioDrive:Duo::0_fct0_attached_as Attached as 'fioa' (block device)
|
||||
ioDrive:Duo::0_fct0_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665
|
||||
ioDrive:Duo::0_fct0_firmware Firmware v5.0.7, rev 101971
|
||||
ioDrive:Duo::0_fct0_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive:Duo::0_fct0_temperature Internal temperature: 47.7 degC, max 48.2 degC
|
||||
ioDrive:Duo::0_fct1_attached_as Attached as 'fiob' (block device)
|
||||
ioDrive:Duo::0_fct1_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478
|
||||
ioDrive:Duo::0_fct1_firmware Firmware v5.0.7, rev 101971
|
||||
ioDrive:Duo::0_fct1_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive:Duo::0_fct1_temperature Internal temperature: 42.8 degC, max 47.7 degC
|
||||
ioDrive:Duo::1_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40124
|
||||
ioDrive:Duo::1_modules fct2 fct3
|
||||
ioDrive:Duo::1_fct2_attached_as Attached as 'fioc' (block device)
|
||||
ioDrive:Duo::1_fct2_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665
|
||||
ioDrive:Duo::1_fct2_firmware Firmware v5.0.7, rev 101971
|
||||
ioDrive:Duo::1_fct2_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive:Duo::1_fct2_temperature Internal temperature: 47.7 degC, max 48.2 degC
|
||||
ioDrive:Duo::1_fct3_attached_as Attached as 'fiod' (block device)
|
||||
ioDrive:Duo::1_fct3_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478
|
||||
ioDrive:Duo::1_fct3_firmware Firmware v5.0.7, rev 101971
|
||||
ioDrive:Duo::1_fct3_media_status Media status: Healthy; Reserves: 100.00%, warn at 10.00%
|
||||
ioDrive:Duo::1_fct3_temperature Internal temperature: 42.8 degC, max 47.7 degC
|
||||
adapters ioDrive:Duo::0 ioDrive:Duo::1
|
||||
|
||||
|
Reference in New Issue
Block a user