From 24ae24a64e3b706a1827c41d745035302a04a30c Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Fri, 24 Aug 2012 17:01:47 -0300 Subject: [PATCH 1/6] Fix for 952722: pt-summary to show information about Fusion-io cards --- lib/bash/collect_system_info.sh | 57 +++++++ lib/bash/report_system_info.sh | 27 ++++ t/lib/bash/collect_system_info.sh | 10 +- t/lib/bash/report_system_info.sh | 69 ++++++++- t/pt-summary/samples/Linux/004/fio-001 | 13 ++ .../samples/Linux/004/fio-001_original_output | 71 +++++++++ t/pt-summary/samples/Linux/004/fio-002 | 9 ++ .../samples/Linux/004/fio-002_original_output | 44 ++++++ t/pt-summary/samples/Linux/004/fio-003 | 23 +++ .../samples/Linux/004/fio-003_original_output | 140 ++++++++++++++++++ t/pt-summary/samples/fio-status-001.txt | 71 +++++++++ t/pt-summary/samples/fio-status-002.txt | 44 ++++++ t/pt-summary/samples/fio-status-003.txt | 140 ++++++++++++++++++ 13 files changed, 716 insertions(+), 2 deletions(-) create mode 100644 t/pt-summary/samples/Linux/004/fio-001 create mode 100644 t/pt-summary/samples/Linux/004/fio-001_original_output create mode 100644 t/pt-summary/samples/Linux/004/fio-002 create mode 100644 t/pt-summary/samples/Linux/004/fio-002_original_output create mode 100644 t/pt-summary/samples/Linux/004/fio-003 create mode 100644 t/pt-summary/samples/Linux/004/fio-003_original_output create mode 100644 t/pt-summary/samples/fio-status-001.txt create mode 100644 t/pt-summary/samples/fio-status-002.txt create mode 100644 t/pt-summary/samples/fio-status-003.txt diff --git a/lib/bash/collect_system_info.sh b/lib/bash/collect_system_info.sh index 562afaeb..28593629 100644 --- a/lib/bash/collect_system_info.sh +++ b/lib/bash/collect_system_info.sh @@ -56,6 +56,7 @@ setup_commands () { CMD_LSB_RELEASE="$( _which lsb_release 2>/dev/null )" CMD_ETHTOOL="$( _which ethtool 2>/dev/null )" CMD_GETCONF="$( _which getconf 2>/dev/null )" + CMD_FIO_STATUS="$( _which fio-status 2>/dev/null )" } collect_system_data () { local PTFUNCNAME=collect_system_data; @@ -132,6 +133,9 @@ collect_system_data () { local PTFUNCNAME=collect_system_data; fi fi + # Fusion-io cards + fio_status_minus_a "$data_dir/fusion-io_card" + # Clean the data directory, don't leave empty files for file in $data_dir/*; do # The vmstat file gets special treatmeant, see above. @@ -140,6 +144,59 @@ collect_system_data () { local PTFUNCNAME=collect_system_data; done } +fio_status_minus_a () { + local file="$1" + local full_output="${file}_original_output" + [ -z "$CMD_FIO_STATUS" ] && return; + $CMD_FIO_STATUS -a > "$full_output" + + cat <<'EOP' > "$PT_TMPDIR/fio_status_format.pl" + my $tmp_adapter; + while (<>) { + if ( /Fusion-io driver version:\s*(.+)/ ) { + print "driver_version $1" + } + next unless /^Adapter:(.+)/; + $tmp_adapter = $1; + last; + } + + $/ = "\nAdapter: "; + $_ = $tmp_adapter . "\n" . scalar(<>); + my @adapters; + do { + my ($adapter, $adapter_general) = /\s*(.+)\s*\n\s*(.+)/m; + $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_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) = / + ^ \s* $module \s+ (Attached[^\n]+) \n + \s+ ([^\n]+) \n # All the second line + .+? (Firmware\s+[^\n]+) \n + .+? (Media \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"; + } + } while <>; + + print "adapters @adapters\n"; + + exit; +EOP + + perl -wln "$PT_TMPDIR/fio_status_format.pl" "$full_output" > "$file" +} + linux_exclusive_collection () { local PTFUNCNAME=linux_exclusive_collection; local data_dir="$1" diff --git a/lib/bash/report_system_info.sh b/lib/bash/report_system_info.sh index 09b9646c..a1664706 100644 --- a/lib/bash/report_system_info.sh +++ b/lib/bash/report_system_info.sh @@ -884,6 +884,28 @@ parse_uptime () { ' "$file" } +report_fio_minus_a () { + local file="$1" + + name_val "fio Driver" "$(get_var driver_version "$file")" + + 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 modules="$(get_var "${adapter}_modules" "$file")" + for module in $( echo $modules | awk '{for (i=1; i<=NF; i++) print $i;}' ); do + local name_val_len_orig=$NAME_VAL_LEN; + local NAME_VAL_LEN=16 + 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}_media_status" "$file")" + local NAME_VAL_LEN=$name_val_len_orig; + done + done +} + # The sum of all of the above report_system_summary () { local PTFUNCNAME=report_system_summary; local data_dir="$1" @@ -938,6 +960,11 @@ report_system_summary () { local PTFUNCNAME=report_system_summary; # ######################################################################## # TODO: Add info about software RAID + if [ -s "$data_dir/fusion-io_card" ]; then + section "Fusion-io Card" + report_fio_minus_a "$data_dir/fusion-io_card" + fi + if [ -s "$data_dir/mounted_fs" ]; then section "Mounted Filesystems" parse_filesystems "$data_dir/mounted_fs" "${platform}" diff --git a/t/lib/bash/collect_system_info.sh b/t/lib/bash/collect_system_info.sh index 90248ad8..9cecde90 100644 --- a/t/lib/bash/collect_system_info.sh +++ b/t/lib/bash/collect_system_info.sh @@ -155,7 +155,7 @@ fake_command () { printf "#!/usr/bin/env bash\necho \"${output}\"\n" > "$PT_TMPDIR/${cmd}_replacement" chmod +x "$PT_TMPDIR/${cmd}_replacement" - eval "CMD_$(echo $cmd | tr '[a-z]' '[A-Z]')=\"$PT_TMPDIR/${cmd}_replacement\"" + eval "CMD_$(echo $cmd | tr '[a-z]' '[A-Z]' | tr '\-' '_')=\"$PT_TMPDIR/${cmd}_replacement\"" } test_linux_exclusive_collection () { @@ -312,3 +312,11 @@ EOF mkdir "$PT_TMPDIR/dmidecode_system_info" test_dmidecode_system_info "$PT_TMPDIR/dmidecode_system_info" +# fio_status_minus_a + +for i in $( seq 1 3 ); do + fake_command "fio-status" "\"; cat $samples/fio-status-00${i}.txt; echo \"" + fio_status_minus_a "$PT_TMPDIR/got" + + no_diff "$PT_TMPDIR/got" "$samples/Linux/004/fio-00$i" "fio_status_minus_a works for fio-status-00${i}.txt" +done \ No newline at end of file diff --git a/t/lib/bash/report_system_info.sh b/t/lib/bash/report_system_info.sh index a5a29a8a..0bc75242 100644 --- a/t/lib/bash/report_system_info.sh +++ b/t/lib/bash/report_system_info.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -plan 49 +plan 52 . "$LIB_DIR/alt_cmds.sh" . "$LIB_DIR/log_warn_die.sh" @@ -1578,3 +1578,70 @@ no_diff "$PT_TMPDIR/got" "$samples/Linux/output_002.txt" "Linux/002 (CentOS 5.7, report_system_summary "$samples/Linux/003" | tail -n +3 > "$PT_TMPDIR/got" no_diff "$PT_TMPDIR/got" "$samples/Linux/output_003.txt" "Linux/003 (CentOS 5.7, as non-root)" + +# pt-summary to show information about Fusion-io cards +# https://bugs.launchpad.net/percona-toolkit/+bug/952722 + +cat < "$PT_TMPDIR/expected" + fio Driver | 2.3.1 build 123 + ioDrive Duo | Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 + 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 + | 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 + | Media status: Healthy; Reserves: 100.00%, warn at 10.00% +EOF + +report_fio_minus_a "$samples/Linux/004/fio-001" > "$PT_TMPDIR/got" +no_diff \ + "$PT_TMPDIR/got" \ + "$PT_TMPDIR/expected" \ + "report_fio_minus_a works with one adapter and two modules" + +cat < "$PT_TMPDIR/expected" + fio Driver | 2.3.1 build 123 + ioDrive :0 | 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 + | Media status: Healthy; Reserves: 100.00%, warn at 10.00% +EOF + +report_fio_minus_a "$samples/Linux/004/fio-002" > "$PT_TMPDIR/got" + +no_diff \ + "$PT_TMPDIR/got" \ + "$PT_TMPDIR/expected" \ + "report_fio_minus_a works with one adapter and one module" + +cat < "$PT_TMPDIR/expected" + fio Driver | 2.3.1 build 123 + ioDrive Duo | Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 + 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 + | 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 + | 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 + | 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 + | Media status: Healthy; Reserves: 100.00%, warn at 10.00% +EOF + +report_fio_minus_a "$samples/Linux/004/fio-003" > "$PT_TMPDIR/got" + +no_diff \ + "$PT_TMPDIR/got" \ + "$PT_TMPDIR/expected" \ + "report_fio_minus_a works with two adapters, each with two modules" diff --git a/t/pt-summary/samples/Linux/004/fio-001 b/t/pt-summary/samples/Linux/004/fio-001 new file mode 100644 index 00000000..bb03b326 --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-001 @@ -0,0 +1,13 @@ +driver_version 2.3.1 build 123 +ioDrive:Duo::0_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 +ioDrive:Duo::0_modules fct0 fct1 +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_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% +adapters ioDrive:Duo::0 + diff --git a/t/pt-summary/samples/Linux/004/fio-001_original_output b/t/pt-summary/samples/Linux/004/fio-001_original_output new file mode 100644 index 00000000..891e3ab4 --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-001_original_output @@ -0,0 +1,71 @@ +Found 2 ioDrives in this system with 1 ioDrive Duo +Fusion-io driver version: 2.3.1 build 123 + +Adapter: ioDrive Duo + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 + ioDrive Duo HL, PN:00190000003, Mfr:003, Date:20100621 + External Power Override: ON + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 12.04V, min 12.00V, max 12.27V + PCIE Bus current: avg 1.49A, max 2.81A + PCIE Bus power: avg 15.07W, max 33.77W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + PCIE bus errors: correctable, unsupported request + PCIE negotiated link: 8 lanes at 5.00 Gbits/sec each, 4000 MBytes/sec total + Connected ioDimm modules: + fct0: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + fct1: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + +fct0 Attached as 'fioa' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 0 Upper of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0b:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:000000001a090132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 47.7 degC, max 48.2 degC + Board temperature: 42 degC + Internal voltage: avg 1.025V, max 1.028V + Aux voltage: avg 2.464V, max 2.467V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 275,933,273,649,736 + Physical bytes read : 226,433,727,856,720 + RAM usage: + Current: 284,895,232 bytes + Peak : 284,895,232 bytes + +fct1 Attached as 'fiob' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 1 Lower of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0c:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:00000000194e0132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 42.8 degC, max 47.7 degC + Board temperature: 35 degC + Internal voltage: avg 1.008V, max 1.011V + Aux voltage: avg 2.461V, max 2.461V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 189,256,225,503,040 + Physical bytes read : 166,909,962,030,960 + RAM usage: + Current: 52,754,432 bytes + Peak : 52,754,432 bytes diff --git a/t/pt-summary/samples/Linux/004/fio-002 b/t/pt-summary/samples/Linux/004/fio-002 new file mode 100644 index 00000000..4ecd4b09 --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-002 @@ -0,0 +1,9 @@ +driver_version 2.3.1 build 123 +ioDrive::0_general Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210 +ioDrive::0_modules fct0 +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% +adapters ioDrive::0 + diff --git a/t/pt-summary/samples/Linux/004/fio-002_original_output b/t/pt-summary/samples/Linux/004/fio-002_original_output new file mode 100644 index 00000000..e08e5462 --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-002_original_output @@ -0,0 +1,44 @@ +Found 1 ioDrive in this system +Fusion-io driver version: 2.3.1 build 123 + +Adapter: ioDrive + Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210 + Pseudo Low-Profile ioDIMM Adapter, PN:00119200000, Mfr:000, Date:20101222 + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 11.90V, min 11.77V, max 11.93V + PCIE Bus current: avg 0.40A, max 1.60A + PCIE Bus power: avg 4.80W, max 18.80W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + Sufficient power available: Unknown + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Connected ioDimm module: + fct0: 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 + ioDrive 720GB, PN:00214102701, Mfr:004, Date:20101222 + Located in slot 0 Upper of ioDrive SN:122210 + Powerloss protection: protected + PCI:0a:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.5, rev 43674 + 720.00 GBytes block device size, 812 GBytes physical device size + Format: block, v300, 1,406,251,904 sectors, 512 bytes per sector + Error correction: 39 bits per 960 bytes + FPGA ID:0 Format UID:00000001dd620132b86600330bcab400 + PCIE slot available power: unavailable + Sufficient power available: Unknown + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 53.2 degC, max 62.5 degC + Board temperature: 38 degC + Internal voltage: avg 0.996V, max 0.999V + Aux voltage: avg 2.461V, max 2.464V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 395,271,132,925,136 + Physical bytes read : 407,978,357,472,336 + RAM usage: + Current: 244,996,096 bytes + Peak : 244,996,096 bytes diff --git a/t/pt-summary/samples/Linux/004/fio-003 b/t/pt-summary/samples/Linux/004/fio-003 new file mode 100644 index 00000000..3612566c --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-003 @@ -0,0 +1,23 @@ +driver_version 2.3.1 build 123 +ioDrive:Duo::0_general Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 +ioDrive:Duo::0_modules fct0 fct1 +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_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::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_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% +adapters ioDrive:Duo::0 ioDrive:Duo::1 + diff --git a/t/pt-summary/samples/Linux/004/fio-003_original_output b/t/pt-summary/samples/Linux/004/fio-003_original_output new file mode 100644 index 00000000..495b1349 --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-003_original_output @@ -0,0 +1,140 @@ +Found 4 ioDrives in this system with 2 ioDrive Duo +Fusion-io driver version: 2.3.1 build 123 + +Adapter: ioDrive Duo + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 + ioDrive Duo HL, PN:00190000003, Mfr:003, Date:20100621 + External Power Override: ON + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 12.04V, min 12.00V, max 12.27V + PCIE Bus current: avg 1.49A, max 2.81A + PCIE Bus power: avg 15.07W, max 33.77W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + PCIE bus errors: correctable, unsupported request + PCIE negotiated link: 8 lanes at 5.00 Gbits/sec each, 4000 MBytes/sec total + Connected ioDimm modules: + fct0: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + fct1: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + +fct0 Attached as 'fioa' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 0 Upper of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0b:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:000000001a090132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 47.7 degC, max 48.2 degC + Board temperature: 42 degC + Internal voltage: avg 1.025V, max 1.028V + Aux voltage: avg 2.464V, max 2.467V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 275,933,273,649,736 + Physical bytes read : 226,433,727,856,720 + RAM usage: + Current: 284,895,232 bytes + Peak : 284,895,232 bytes + +fct1 Attached as 'fiob' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 1 Lower of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0c:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:00000000194e0132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 42.8 degC, max 47.7 degC + Board temperature: 35 degC + Internal voltage: avg 1.008V, max 1.011V + Aux voltage: avg 2.461V, max 2.461V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 189,256,225,503,040 + Physical bytes read : 166,909,962,030,960 + RAM usage: + Current: 52,754,432 bytes + Peak : 52,754,432 bytes + +Adapter: ioDrive Duo + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40124 + ioDrive Duo HL, PN:00190000003, Mfr:003, Date:20100621 + External Power Override: ON + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 12.04V, min 12.00V, max 12.27V + PCIE Bus current: avg 1.49A, max 2.81A + PCIE Bus power: avg 15.07W, max 33.77W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + PCIE bus errors: correctable, unsupported request + PCIE negotiated link: 8 lanes at 5.00 Gbits/sec each, 4000 MBytes/sec total + Connected ioDimm modules: + fct2: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + fct3: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + +fct2 Attached as 'fioc' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 0 Upper of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0b:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:000000001a090132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 47.7 degC, max 48.2 degC + Board temperature: 42 degC + Internal voltage: avg 1.025V, max 1.028V + Aux voltage: avg 2.464V, max 2.467V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 275,933,273,649,736 + Physical bytes read : 226,433,727,856,720 + RAM usage: + Current: 284,895,232 bytes + Peak : 284,895,232 bytes + +fct3 Attached as 'fiod' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 1 Lower of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0c:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:00000000194e0132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 42.8 degC, max 47.7 degC + Board temperature: 35 degC + Internal voltage: avg 1.008V, max 1.011V + Aux voltage: avg 2.461V, max 2.461V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 189,256,225,503,040 + Physical bytes read : 166,909,962,030,960 + RAM usage: + Current: 52,754,432 bytes + Peak : 52,754,432 bytes diff --git a/t/pt-summary/samples/fio-status-001.txt b/t/pt-summary/samples/fio-status-001.txt new file mode 100644 index 00000000..891e3ab4 --- /dev/null +++ b/t/pt-summary/samples/fio-status-001.txt @@ -0,0 +1,71 @@ +Found 2 ioDrives in this system with 1 ioDrive Duo +Fusion-io driver version: 2.3.1 build 123 + +Adapter: ioDrive Duo + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 + ioDrive Duo HL, PN:00190000003, Mfr:003, Date:20100621 + External Power Override: ON + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 12.04V, min 12.00V, max 12.27V + PCIE Bus current: avg 1.49A, max 2.81A + PCIE Bus power: avg 15.07W, max 33.77W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + PCIE bus errors: correctable, unsupported request + PCIE negotiated link: 8 lanes at 5.00 Gbits/sec each, 4000 MBytes/sec total + Connected ioDimm modules: + fct0: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + fct1: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + +fct0 Attached as 'fioa' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 0 Upper of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0b:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:000000001a090132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 47.7 degC, max 48.2 degC + Board temperature: 42 degC + Internal voltage: avg 1.025V, max 1.028V + Aux voltage: avg 2.464V, max 2.467V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 275,933,273,649,736 + Physical bytes read : 226,433,727,856,720 + RAM usage: + Current: 284,895,232 bytes + Peak : 284,895,232 bytes + +fct1 Attached as 'fiob' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 1 Lower of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0c:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:00000000194e0132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 42.8 degC, max 47.7 degC + Board temperature: 35 degC + Internal voltage: avg 1.008V, max 1.011V + Aux voltage: avg 2.461V, max 2.461V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 189,256,225,503,040 + Physical bytes read : 166,909,962,030,960 + RAM usage: + Current: 52,754,432 bytes + Peak : 52,754,432 bytes diff --git a/t/pt-summary/samples/fio-status-002.txt b/t/pt-summary/samples/fio-status-002.txt new file mode 100644 index 00000000..e08e5462 --- /dev/null +++ b/t/pt-summary/samples/fio-status-002.txt @@ -0,0 +1,44 @@ +Found 1 ioDrive in this system +Fusion-io driver version: 2.3.1 build 123 + +Adapter: ioDrive + Fusion-io ioDrive 720GB, Product Number:FS1-003-721-CS SN:122210 + Pseudo Low-Profile ioDIMM Adapter, PN:00119200000, Mfr:000, Date:20101222 + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 11.90V, min 11.77V, max 11.93V + PCIE Bus current: avg 0.40A, max 1.60A + PCIE Bus power: avg 4.80W, max 18.80W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + Sufficient power available: Unknown + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Connected ioDimm module: + fct0: 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 + ioDrive 720GB, PN:00214102701, Mfr:004, Date:20101222 + Located in slot 0 Upper of ioDrive SN:122210 + Powerloss protection: protected + PCI:0a:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.5, rev 43674 + 720.00 GBytes block device size, 812 GBytes physical device size + Format: block, v300, 1,406,251,904 sectors, 512 bytes per sector + Error correction: 39 bits per 960 bytes + FPGA ID:0 Format UID:00000001dd620132b86600330bcab400 + PCIE slot available power: unavailable + Sufficient power available: Unknown + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 53.2 degC, max 62.5 degC + Board temperature: 38 degC + Internal voltage: avg 0.996V, max 0.999V + Aux voltage: avg 2.461V, max 2.464V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 395,271,132,925,136 + Physical bytes read : 407,978,357,472,336 + RAM usage: + Current: 244,996,096 bytes + Peak : 244,996,096 bytes diff --git a/t/pt-summary/samples/fio-status-003.txt b/t/pt-summary/samples/fio-status-003.txt new file mode 100644 index 00000000..495b1349 --- /dev/null +++ b/t/pt-summary/samples/fio-status-003.txt @@ -0,0 +1,140 @@ +Found 4 ioDrives in this system with 2 ioDrive Duo +Fusion-io driver version: 2.3.1 build 123 + +Adapter: ioDrive Duo + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40123 + ioDrive Duo HL, PN:00190000003, Mfr:003, Date:20100621 + External Power Override: ON + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 12.04V, min 12.00V, max 12.27V + PCIE Bus current: avg 1.49A, max 2.81A + PCIE Bus power: avg 15.07W, max 33.77W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + PCIE bus errors: correctable, unsupported request + PCIE negotiated link: 8 lanes at 5.00 Gbits/sec each, 4000 MBytes/sec total + Connected ioDimm modules: + fct0: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + fct1: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + +fct0 Attached as 'fioa' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 0 Upper of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0b:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:000000001a090132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 47.7 degC, max 48.2 degC + Board temperature: 42 degC + Internal voltage: avg 1.025V, max 1.028V + Aux voltage: avg 2.464V, max 2.467V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 275,933,273,649,736 + Physical bytes read : 226,433,727,856,720 + RAM usage: + Current: 284,895,232 bytes + Peak : 284,895,232 bytes + +fct1 Attached as 'fiob' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 1 Lower of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0c:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:00000000194e0132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 42.8 degC, max 47.7 degC + Board temperature: 35 degC + Internal voltage: avg 1.008V, max 1.011V + Aux voltage: avg 2.461V, max 2.461V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 189,256,225,503,040 + Physical bytes read : 166,909,962,030,960 + RAM usage: + Current: 52,754,432 bytes + Peak : 52,754,432 bytes + +Adapter: ioDrive Duo + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:40124 + ioDrive Duo HL, PN:00190000003, Mfr:003, Date:20100621 + External Power Override: ON + External Power: NOT connected + Powerloss protection: available + PCIE Bus voltage: avg 12.04V, min 12.00V, max 12.27V + PCIE Bus current: avg 1.49A, max 2.81A + PCIE Bus power: avg 15.07W, max 33.77W + PCIE Power limit threshold: 24.75W + PCIE slot available power: unavailable + PCIE bus errors: correctable, unsupported request + PCIE negotiated link: 8 lanes at 5.00 Gbits/sec each, 4000 MBytes/sec total + Connected ioDimm modules: + fct2: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + fct3: Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + +fct2 Attached as 'fioc' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06665 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 0 Upper of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0b:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:000000001a090132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 47.7 degC, max 48.2 degC + Board temperature: 42 degC + Internal voltage: avg 1.025V, max 1.028V + Aux voltage: avg 2.464V, max 2.467V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 275,933,273,649,736 + Physical bytes read : 226,433,727,856,720 + RAM usage: + Current: 284,895,232 bytes + Peak : 284,895,232 bytes + +fct3 Attached as 'fiod' (block device) + Fusion-io ioDrive Duo 640GB, Product Number:FS3-202-321-CS SN:06478 + ioDIMM3, PN:00119401203, Mfr:003, Date:20100621 + Located in slot 1 Lower of ioDrive Duo SN:40123 + Powerloss protection: protected + PCI:0c:00.0 + Vendor:1aed, Device:1005, Sub vendor:1aed, Sub device:1010 + Firmware v5.0.7, rev 101971 + 322.55 GBytes block device size, 396 GBytes physical device size + Format: block, v300, 78,748,288 sectors, 4096 bytes per sector + Error correction: 11 bits per 240 bytes + FPGA ID:0 Format UID:00000000194e0132b60d001c77abcc03 + PCIE slot available power: 25.00W + PCIE negotiated link: 4 lanes at 2.50 Gbits/sec each, 1000 MBytes/sec total + Internal temperature: 42.8 degC, max 47.7 degC + Board temperature: 35 degC + Internal voltage: avg 1.008V, max 1.011V + Aux voltage: avg 2.461V, max 2.461V + Media status: Healthy; Reserves: 100.00%, warn at 10.00% + Lifetime data volumes: + Physical bytes written: 189,256,225,503,040 + Physical bytes read : 166,909,962,030,960 + RAM usage: + Current: 52,754,432 bytes + Peak : 52,754,432 bytes From 1d3bf2c82bc155d87c04fc7bae238c9d2fc99731 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Fri, 24 Aug 2012 17:03:26 -0300 Subject: [PATCH 2/6] Updated modules for pt-summary --- bin/pt-summary | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/bin/pt-summary b/bin/pt-summary index 68662a0c..55f61006 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -792,6 +792,7 @@ setup_commands () { CMD_LSB_RELEASE="$( _which lsb_release 2>/dev/null )" CMD_ETHTOOL="$( _which ethtool 2>/dev/null )" CMD_GETCONF="$( _which getconf 2>/dev/null )" + CMD_FIO_STATUS="$( _which fio-status 2>/dev/null )" } collect_system_data () { local PTFUNCNAME=collect_system_data; @@ -859,12 +860,67 @@ collect_system_data () { local PTFUNCNAME=collect_system_data; fi fi + fio_status_minus_a "$data_dir/fusion-io_card" + for file in $data_dir/*; do [ "$file" = "vmstat" ] && continue [ ! -s "$file" ] && rm "$file" done } +fio_status_minus_a () { + local file="$1" + local full_output="${file}_original_output" + [ -z "$CMD_FIO_STATUS" ] && return; + $CMD_FIO_STATUS -a > "$full_output" + + cat <<'EOP' > "$PT_TMPDIR/fio_status_format.pl" + my $tmp_adapter; + while (<>) { + if ( /Fusion-io driver version:\s*(.+)/ ) { + print "driver_version $1" + } + next unless /^Adapter:(.+)/; + $tmp_adapter = $1; + last; + } + + $/ = "\nAdapter: "; + $_ = $tmp_adapter . "\n" . scalar(<>); + my @adapters; + do { + my ($adapter, $adapter_general) = /\s*(.+)\s*\n\s*(.+)/m; + $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_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) = / + ^ \s* $module \s+ (Attached[^\n]+) \n + \s+ ([^\n]+) \n # All the second line + .+? (Firmware\s+[^\n]+) \n + .+? (Media \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"; + } + } while <>; + + print "adapters @adapters\n"; + + exit; +EOP + + perl -wln "$PT_TMPDIR/fio_status_format.pl" "$full_output" > "$file" +} + linux_exclusive_collection () { local PTFUNCNAME=linux_exclusive_collection; local data_dir="$1" @@ -1997,6 +2053,28 @@ parse_uptime () { ' "$file" } +report_fio_minus_a () { + local file="$1" + + name_val "fio Driver" "$(get_var driver_version "$file")" + + 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 modules="$(get_var "${adapter}_modules" "$file")" + for module in $( echo $modules | awk '{for (i=1; i<=NF; i++) print $i;}' ); do + local name_val_len_orig=$NAME_VAL_LEN; + local NAME_VAL_LEN=16 + 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}_media_status" "$file")" + local NAME_VAL_LEN=$name_val_len_orig; + done + done +} + report_system_summary () { local PTFUNCNAME=report_system_summary; local data_dir="$1" @@ -2040,6 +2118,11 @@ report_system_summary () { local PTFUNCNAME=report_system_summary; section_Memory "$platform" "$data_dir" + if [ -s "$data_dir/fusion-io_card" ]; then + section "Fusion-io Card" + report_fio_minus_a "$data_dir/fusion-io_card" + fi + if [ -s "$data_dir/mounted_fs" ]; then section "Mounted Filesystems" parse_filesystems "$data_dir/mounted_fs" "${platform}" From 878528b859263308264f76b07c7bb3576bc93355 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Fri, 24 Aug 2012 18:23:30 -0300 Subject: [PATCH 3/6] Fixed report_fio_minus_a and fio_status_minus_a to handle ioMemory and report internal temp, also fixed some bugs --- lib/bash/collect_system_info.sh | 8 ++++--- lib/bash/report_system_info.sh | 4 +++- t/lib/bash/report_system_info.sh | 33 ++++++++++++++++++++++++-- t/pt-summary/samples/Linux/004/fio-001 | 2 ++ t/pt-summary/samples/Linux/004/fio-002 | 1 + t/pt-summary/samples/Linux/004/fio-003 | 4 ++++ 6 files changed, 46 insertions(+), 6 deletions(-) diff --git a/lib/bash/collect_system_info.sh b/lib/bash/collect_system_info.sh index 28593629..20a3753f 100644 --- a/lib/bash/collect_system_info.sh +++ b/lib/bash/collect_system_info.sh @@ -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 <>; diff --git a/lib/bash/report_system_info.sh b/lib/bash/report_system_info.sh index a1664706..c6fcb9c1 100644 --- a/lib/bash/report_system_info.sh +++ b/lib/bash/report_system_info.sh @@ -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 diff --git a/t/lib/bash/report_system_info.sh b/t/lib/bash/report_system_info.sh index 0bc75242..6f7d384d 100644 --- a/t/lib/bash/report_system_info.sh +++ b/t/lib/bash/report_system_info.sh @@ -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 < "$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 < "$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 < "$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 < "$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" diff --git a/t/pt-summary/samples/Linux/004/fio-001 b/t/pt-summary/samples/Linux/004/fio-001 index bb03b326..0879f307 100644 --- a/t/pt-summary/samples/Linux/004/fio-001 +++ b/t/pt-summary/samples/Linux/004/fio-001 @@ -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 diff --git a/t/pt-summary/samples/Linux/004/fio-002 b/t/pt-summary/samples/Linux/004/fio-002 index 4ecd4b09..73e31d22 100644 --- a/t/pt-summary/samples/Linux/004/fio-002 +++ b/t/pt-summary/samples/Linux/004/fio-002 @@ -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 diff --git a/t/pt-summary/samples/Linux/004/fio-003 b/t/pt-summary/samples/Linux/004/fio-003 index 3612566c..0ba06793 100644 --- a/t/pt-summary/samples/Linux/004/fio-003 +++ b/t/pt-summary/samples/Linux/004/fio-003 @@ -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 From 848c2ea8c3117288a19b62f61e5003e736c1a5a0 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Fri, 24 Aug 2012 18:25:10 -0300 Subject: [PATCH 4/6] Updated pt-summary --- bin/pt-summary | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/pt-summary b/bin/pt-summary index 55f61006..f7cfc4be 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -893,23 +893,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 <>; @@ -2060,7 +2062,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 @@ -2069,6 +2072,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 From b50371594490a1d3ae5c1f0f76d0a32fb050bf27 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Fri, 24 Aug 2012 18:25:59 -0300 Subject: [PATCH 5/6] Forgotten sample files --- t/pt-summary/samples/Linux/004/fio-004 | 15 ++++++ t/pt-summary/samples/fio-status-004.txt | 67 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 t/pt-summary/samples/Linux/004/fio-004 create mode 100644 t/pt-summary/samples/fio-status-004.txt diff --git a/t/pt-summary/samples/Linux/004/fio-004 b/t/pt-summary/samples/Linux/004/fio-004 new file mode 100644 index 00000000..768bf623 --- /dev/null +++ b/t/pt-summary/samples/Linux/004/fio-004 @@ -0,0 +1,15 @@ +driver_version 3.1.5 build 126 +Dual:Controller:Adapter::0_general Fusion-io ioDrive2 Duo 2.41TB, Product Number:F01-001-2T41-CS-0001, SN:1150D0121, FIO SN:1150D0121 +Dual:Controller:Adapter::0_modules fct0 fct1 +Dual:Controller:Adapter::0_fct0_attached_as Attached as 'fioa' (block device) +Dual:Controller:Adapter::0_fct0_general SN:1150D0121-1121 +Dual:Controller:Adapter::0_fct0_firmware Firmware v7.0.0, rev 107322 Public +Dual:Controller:Adapter::0_fct0_media_status Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00% +Dual:Controller:Adapter::0_fct0_temperature Internal temperature: 51.68 degC, max 58.08 degC +Dual:Controller:Adapter::0_fct1_attached_as Attached as 'fiob' (block device) +Dual:Controller:Adapter::0_fct1_general SN:1150D0121-1111 +Dual:Controller:Adapter::0_fct1_firmware Firmware v7.0.0, rev 107322 Public +Dual:Controller:Adapter::0_fct1_media_status Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00% +Dual:Controller:Adapter::0_fct1_temperature Internal temperature: 46.76 degC, max 51.19 degC +adapters Dual:Controller:Adapter::0 + diff --git a/t/pt-summary/samples/fio-status-004.txt b/t/pt-summary/samples/fio-status-004.txt new file mode 100644 index 00000000..dc9b5ff0 --- /dev/null +++ b/t/pt-summary/samples/fio-status-004.txt @@ -0,0 +1,67 @@ +Found 2 ioMemory devices in this system with 1 ioDrive Duo +Fusion-io driver version: 3.1.5 build 126 + +Adapter: Dual Controller Adapter + Fusion-io ioDrive2 Duo 2.41TB, Product Number:F01-001-2T41-CS-0001, SN:1150D0121, FIO SN:1150D0121 + ioDrive2 Adapter Controller, PN:PA004134003 + SMP(AVR) Versions: App Version: 1.0.15.0, Boot Version: 0.0.3.1 + External Power: connected + PCIe Bus voltage: avg 11.90V + PCIe Bus current: avg 1.78A + PCIe Bus power: avg 21.19W + PCIe Power limit threshold: 24.75W + PCIe slot available power: unavailable + PCIe bus errors: correctable, unsupported request + PCIe negotiated link: 8 lanes at 5.0 Gt/sec each, 2000.00 MBytes/sec total + Connected ioMemory modules: + fct0: SN:1150D0121-1121 + fct1: SN:1150D0121-1111 + +fct0 Attached as 'fioa' (block device) + SN:1150D0121-1121 + SMP(AVR) Versions: App Version: 1.0.17.0, Boot Version: 0.0.4.1 + Located in slot 1 Lower of ioDrive2 Adapter Controller SN:1150D0121 + Powerloss protection: protected + PCI:0f:00.0 + Vendor:1aed, Device:2001, Sub vendor:1aed, Sub device:2001 + Firmware v7.0.0, rev 107322 Public + 1205.00 GBytes block device size + Format: v500, 2353515625 sectors of 512 bytes + PCIe slot available power: 25.00W + PCIe negotiated link: 4 lanes at 5.0 Gt/sec each, 2000.00 MBytes/sec total + Internal temperature: 51.68 degC, max 58.08 degC + Internal voltage: avg 1.01V, max 1.02V + Aux voltage: avg 2.49V, max 2.49V + Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00% + Rated PBW: 17.00 PB, 98.41% remaining + Lifetime data volumes: + Physical bytes written: 270,530,692,575,920 + Physical bytes read : 229,918,969,663,096 + RAM usage: + Current: 775,441,152 bytes + Peak : 783,316,032 bytes + + +fct1 Attached as 'fiob' (block device) + SN:1150D0121-1111 + SMP(AVR) Versions: App Version: 1.0.17.0, Boot Version: 0.0.4.1 + Located in slot 0 Upper of ioDrive2 Adapter Controller SN:1150D0121 + Powerloss protection: protected + PCI:10:00.0 + Vendor:1aed, Device:2001, Sub vendor:1aed, Sub device:2001 + Firmware v7.0.0, rev 107322 Public + 1205.00 GBytes block device size + Format: v500, 2353515625 sectors of 512 bytes + PCIe slot available power: 25.00W + PCIe negotiated link: 4 lanes at 5.0 Gt/sec each, 2000.00 MBytes/sec total + Internal temperature: 46.76 degC, max 51.19 degC + Internal voltage: avg 1.02V, max 1.03V + Aux voltage: avg 2.48V, max 2.49V + Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00% + Rated PBW: 17.00 PB, 98.95% remaining + Lifetime data volumes: + Physical bytes written: 179,006,818,219,320 + Physical bytes read : 155,705,441,146,928 + RAM usage: + Current: 77,667,712 bytes + Peak : 77,667,712 bytes From ed7b497590db1a28f72374dc06a2d04698ab5987 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Fri, 24 Aug 2012 19:39:58 -0300 Subject: [PATCH 6/6] Report Rated PBW for fio cards --- lib/bash/collect_system_info.sh | 9 ++++++--- lib/bash/report_system_info.sh | 3 +++ t/lib/bash/collect_system_info.sh | 6 +++--- t/lib/bash/report_system_info.sh | 2 ++ t/pt-summary/samples/Linux/004/fio-004 | 2 ++ 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/bash/collect_system_info.sh b/lib/bash/collect_system_info.sh index 20a3753f..ecf4a75f 100644 --- a/lib/bash/collect_system_info.sh +++ b/lib/bash/collect_system_info.sh @@ -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 <>; diff --git a/lib/bash/report_system_info.sh b/lib/bash/report_system_info.sh index c6fcb9c1..1a10bd78 100644 --- a/lib/bash/report_system_info.sh +++ b/lib/bash/report_system_info.sh @@ -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 diff --git a/t/lib/bash/collect_system_info.sh b/t/lib/bash/collect_system_info.sh index 9cecde90..c8bded5d 100644 --- a/t/lib/bash/collect_system_info.sh +++ b/t/lib/bash/collect_system_info.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -plan 40 +plan 44 PT_TMPDIR="$TEST_PT_TMPDIR" PATH="$PATH:$PERCONA_TOOLKIT_SANDBOX/bin" @@ -314,9 +314,9 @@ test_dmidecode_system_info "$PT_TMPDIR/dmidecode_system_info" # fio_status_minus_a -for i in $( seq 1 3 ); do +for i in $( seq 1 4 ); do fake_command "fio-status" "\"; cat $samples/fio-status-00${i}.txt; echo \"" fio_status_minus_a "$PT_TMPDIR/got" no_diff "$PT_TMPDIR/got" "$samples/Linux/004/fio-00$i" "fio_status_minus_a works for fio-status-00${i}.txt" -done \ No newline at end of file +done diff --git a/t/lib/bash/report_system_info.sh b/t/lib/bash/report_system_info.sh index 6f7d384d..77201727 100644 --- a/t/lib/bash/report_system_info.sh +++ b/t/lib/bash/report_system_info.sh @@ -1661,11 +1661,13 @@ Dual Controller Adapter | Fusion-io ioDrive2 Duo 2.41TB, Product Number:F01-001- | 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% + | Rated PBW: 17.00 PB, 98.41% remaining 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% + | Rated PBW: 17.00 PB, 98.95% remaining EOF report_fio_minus_a "$samples/Linux/004/fio-004" > "$PT_TMPDIR/got" diff --git a/t/pt-summary/samples/Linux/004/fio-004 b/t/pt-summary/samples/Linux/004/fio-004 index 768bf623..cbf58bdc 100644 --- a/t/pt-summary/samples/Linux/004/fio-004 +++ b/t/pt-summary/samples/Linux/004/fio-004 @@ -6,10 +6,12 @@ Dual:Controller:Adapter::0_fct0_general SN:1150D0121-1121 Dual:Controller:Adapter::0_fct0_firmware Firmware v7.0.0, rev 107322 Public Dual:Controller:Adapter::0_fct0_media_status Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00% Dual:Controller:Adapter::0_fct0_temperature Internal temperature: 51.68 degC, max 58.08 degC +Dual:Controller:Adapter::0_fct0_rated_pbw Rated PBW: 17.00 PB, 98.41% remaining Dual:Controller:Adapter::0_fct1_attached_as Attached as 'fiob' (block device) Dual:Controller:Adapter::0_fct1_general SN:1150D0121-1111 Dual:Controller:Adapter::0_fct1_firmware Firmware v7.0.0, rev 107322 Public Dual:Controller:Adapter::0_fct1_media_status Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00% Dual:Controller:Adapter::0_fct1_temperature Internal temperature: 46.76 degC, max 51.19 degC +Dual:Controller:Adapter::0_fct1_rated_pbw Rated PBW: 17.00 PB, 98.95% remaining adapters Dual:Controller:Adapter::0