mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
Combine and update all pt-summary tests to new format.
This commit is contained in:
198
bin/pt-summary
198
bin/pt-summary
@@ -136,13 +136,14 @@ group_concat () {
|
||||
# Parse Linux's /proc/cpuinfo, which should be stored in /tmp/percona-toolkit.
|
||||
# ##############################################################################
|
||||
parse_proc_cpuinfo () {
|
||||
local file=$1
|
||||
# Physical processors are indicated by distinct 'physical id'. Virtual CPUs
|
||||
# are indicated by paragraphs -- one per paragraph. We assume that all
|
||||
# processors are identical, i.e. that there are not some processors with dual
|
||||
# cores and some with quad cores.
|
||||
virtual=$(grep -c ^processor /tmp/percona-toolkit);
|
||||
physical=$(grep 'physical id' /tmp/percona-toolkit | sort -u | wc -l);
|
||||
cores=$(grep 'cpu cores' /tmp/percona-toolkit | head -n 1 | cut -d: -f2);
|
||||
virtual=$(grep -c ^processor $file);
|
||||
physical=$(grep 'physical id' $file | sort -u | wc -l);
|
||||
cores=$(grep 'cpu cores' $file | head -n 1 | cut -d: -f2);
|
||||
|
||||
# Older kernel won't have 'physical id' or 'cpu cores'.
|
||||
if [ "${physical}" = "0" ]; then physical=${virtual}; fi
|
||||
@@ -155,17 +156,17 @@ parse_proc_cpuinfo () {
|
||||
|
||||
name_val "Processors" "physical = ${physical}, cores = ${cores}, virtual = ${virtual}, hyperthreading = ${htt}"
|
||||
|
||||
awk -F: '/cpu MHz/{print $2}' /tmp/percona-toolkit \
|
||||
| sort | uniq -c > /tmp/percona-toolkit2
|
||||
name_val "Speeds" "$(group_concat /tmp/percona-toolkit2)"
|
||||
awk -F: '/cpu MHz/{print $2}' $file \
|
||||
| sort | uniq -c > "$file.unq"
|
||||
name_val "Speeds" "$(group_concat "$file.unq")"
|
||||
|
||||
awk -F: '/model name/{print $2}' /tmp/percona-toolkit \
|
||||
| sort | uniq -c > /tmp/percona-toolkit2
|
||||
name_val "Models" "$(group_concat /tmp/percona-toolkit2)"
|
||||
awk -F: '/model name/{print $2}' $file \
|
||||
| sort | uniq -c > "$file-2"
|
||||
name_val "Models" "$(group_concat "$file.unq")"
|
||||
|
||||
awk -F: '/cache size/{print $2}' /tmp/percona-toolkit \
|
||||
| sort | uniq -c > /tmp/percona-toolkit2
|
||||
name_val "Caches" "$(group_concat /tmp/percona-toolkit2)"
|
||||
awk -F: '/cache size/{print $2}' $file \
|
||||
| sort | uniq -c > "$file.unq"
|
||||
name_val "Caches" "$(group_concat "$file.unq")"
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
@@ -196,16 +197,18 @@ parse_psrinfo_cpus() {
|
||||
# Parse the output of 'free -b' plus the contents of /proc/meminfo
|
||||
# ##############################################################################
|
||||
parse_free_minus_b () {
|
||||
physical=$(awk '/Mem:/{print $3}' "${1}")
|
||||
swap=$(awk '/Swap:/{print $3}' "${1}")
|
||||
virtual=$(shorten $(($physical + $swap)))
|
||||
local file=$1
|
||||
|
||||
name_val Total $(shorten $(awk '/Mem:/{print $2}' "${1}"))
|
||||
name_val Free $(shorten $(awk '/Mem:/{print $4}' "${1}"))
|
||||
local physical=$(awk '/Mem:/{print $3}' "${file}")
|
||||
local swap=$(awk '/Swap:/{print $3}' "${file}")
|
||||
local virtual=$(shorten $(($physical + $swap)))
|
||||
|
||||
name_val Total $(shorten $(awk '/Mem:/{print $2}' "${file}"))
|
||||
name_val Free $(shorten $(awk '/Mem:/{print $4}' "${file}"))
|
||||
name_val Used "physical = $(shorten ${physical}), swap = $(shorten ${swap}), virtual = ${virtual}"
|
||||
name_val Buffers $(shorten $(awk '/Mem:/{print $6}' "${1}"))
|
||||
name_val Caches $(shorten $(awk '/Mem:/{print $7}' "${1}"))
|
||||
name_val Dirty "$(awk '/Dirty:/ {print $2, $3}' "${1}")"
|
||||
name_val Buffers $(shorten $(awk '/Mem:/{print $6}' "${file}"))
|
||||
name_val Caches $(shorten $(awk '/Mem:/{print $7}' "${file}"))
|
||||
name_val Dirty "$(awk '/Dirty:/ {print $2, $3}' "${file}")"
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
@@ -233,10 +236,10 @@ parse_memory_sysctl_freebsd() {
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
# Parse memory devices from the output of 'dmidecode', which should be stored in
|
||||
# /tmp/percona-toolkit.
|
||||
# Parse memory devices from the output of 'dmidecode'.
|
||||
# ##############################################################################
|
||||
parse_dmidecode_mem_devices () {
|
||||
local file=$1
|
||||
echo " Locator Size Speed Form Factor Type Type Detail"
|
||||
echo " ========= ======== ================= ============= ============= ==========="
|
||||
# Print paragraphs containing 'Memory Device\n', extract the desired bits,
|
||||
@@ -254,7 +257,7 @@ parse_dmidecode_mem_devices () {
|
||||
-e 's/</{/g' \
|
||||
-e 's/>/}/g' \
|
||||
-e 's/[ \t]*\n/\n/g' \
|
||||
/tmp/percona-toolkit \
|
||||
$file \
|
||||
| awk -F: '/Size|Type|Form.Factor|Type.Detail|[^ ]Locator/{printf("|%s", $2)}/Speed/{print "|" $2}' \
|
||||
| sed -e 's/No Module Installed/{EMPTY}/' \
|
||||
| sort \
|
||||
@@ -292,10 +295,11 @@ parse_ip_s_link () {
|
||||
# Parse the output of 'netstat -antp' which should be in /tmp/percona-toolkit.
|
||||
# ##############################################################################
|
||||
parse_netstat () {
|
||||
local file=$1
|
||||
echo " Connections from remote IP addresses"
|
||||
awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ {
|
||||
print substr($5, 0, index($5, ":") - 1);
|
||||
}' /tmp/percona-toolkit | sort | uniq -c \
|
||||
}' $file | sort | uniq -c \
|
||||
| awk "{
|
||||
fuzzy_var=\$1;
|
||||
${fuzzy_formula}
|
||||
@@ -305,7 +309,7 @@ parse_netstat () {
|
||||
echo " Connections to local IP addresses"
|
||||
awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ {
|
||||
print substr($4, 0, index($4, ":") - 1);
|
||||
}' /tmp/percona-toolkit | sort | uniq -c \
|
||||
}' $file | sort | uniq -c \
|
||||
| awk "{
|
||||
fuzzy_var=\$1;
|
||||
${fuzzy_formula}
|
||||
@@ -315,7 +319,7 @@ parse_netstat () {
|
||||
echo " Connections to top 10 local ports"
|
||||
awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ {
|
||||
print substr($4, index($4, ":") + 1);
|
||||
}' /tmp/percona-toolkit | sort | uniq -c | sort -rn | head -n10 \
|
||||
}' $file | sort | uniq -c | sort -rn | head -n10 \
|
||||
| awk "{
|
||||
fuzzy_var=\$1;
|
||||
${fuzzy_formula}
|
||||
@@ -324,7 +328,7 @@ parse_netstat () {
|
||||
echo " States of connections"
|
||||
awk '$1 ~ /^tcp/ {
|
||||
print $6;
|
||||
}' /tmp/percona-toolkit | sort | uniq -c | sort -rn \
|
||||
}' $file | sort | uniq -c | sort -rn \
|
||||
| awk "{
|
||||
fuzzy_var=\$1;
|
||||
${fuzzy_formula}
|
||||
@@ -397,6 +401,7 @@ parse_filesystems () {
|
||||
# multiple fdisk -l outputs in the file.
|
||||
# ##############################################################################
|
||||
parse_fdisk () {
|
||||
local file=$1
|
||||
awk '
|
||||
BEGIN {
|
||||
format="%-12s %4s %10s %10s %18s\n";
|
||||
@@ -422,7 +427,7 @@ parse_fdisk () {
|
||||
}
|
||||
printf(format, $1, "Part", start, end, sprintf("%.0f", (end - start) * units));
|
||||
}
|
||||
' /tmp/percona-toolkit
|
||||
' $file
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
@@ -430,17 +435,18 @@ parse_fdisk () {
|
||||
# virtualization.
|
||||
# ##############################################################################
|
||||
parse_virtualization_dmesg () {
|
||||
if grep -qi -e vmware -e vmxnet -e 'paravirtualized kernel on vmi' /tmp/percona-toolkit; then
|
||||
local file=$1
|
||||
if grep -qi -e vmware -e vmxnet -e 'paravirtualized kernel on vmi' $file; then
|
||||
echo "VMWare";
|
||||
elif grep -qi -e 'paravirtualized kernel on xen' -e 'Xen virtual console' /tmp/percona-toolkit; then
|
||||
elif grep -qi -e 'paravirtualized kernel on xen' -e 'Xen virtual console' $file; then
|
||||
echo "Xen";
|
||||
elif grep -qi qemu /tmp/percona-toolkit; then
|
||||
elif grep -qi qemu $file; then
|
||||
echo "QEmu";
|
||||
elif grep -qi 'paravirtualized kernel on KVM' /tmp/percona-toolkit; then
|
||||
elif grep -qi 'paravirtualized kernel on KVM' $file; then
|
||||
echo "KVM";
|
||||
elif grep -q VBOX /tmp/percona-toolkit; then
|
||||
elif grep -q VBOX $file; then
|
||||
echo "VirtualBox";
|
||||
elif grep -qi 'hd.: Virtual .., ATA.*drive' /tmp/percona-toolkit; then
|
||||
elif grep -qi 'hd.: Virtual .., ATA.*drive' $file; then
|
||||
echo "Microsoft VirtualPC";
|
||||
fi
|
||||
}
|
||||
@@ -461,7 +467,8 @@ parse_virtualization_generic() {
|
||||
# Ethernet cards.
|
||||
# ##############################################################################
|
||||
parse_ethernet_controller_lspci () {
|
||||
grep -i ethernet /tmp/percona-toolkit | cut -d: -f3 | while read line; do
|
||||
local file=$1
|
||||
grep -i ethernet $file | cut -d: -f3 | while read line; do
|
||||
name_val Controller "${line}"
|
||||
done
|
||||
}
|
||||
@@ -471,20 +478,21 @@ parse_ethernet_controller_lspci () {
|
||||
# controllers.
|
||||
# ##############################################################################
|
||||
parse_raid_controller_lspci () {
|
||||
if grep -q "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS" /tmp/percona-toolkit; then
|
||||
local file=$1
|
||||
if grep -q "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS" $file; then
|
||||
echo 'LSI Logic MegaRAID SAS'
|
||||
elif grep -q "Fusion-MPT SAS" /tmp/percona-toolkit; then
|
||||
elif grep -q "Fusion-MPT SAS" $file; then
|
||||
echo 'Fusion-MPT SAS'
|
||||
elif grep -q "RAID bus controller: LSI Logic / Symbios Logic Unknown" /tmp/percona-toolkit; then
|
||||
elif grep -q "RAID bus controller: LSI Logic / Symbios Logic Unknown" $file; then
|
||||
echo 'LSI Logic Unknown'
|
||||
elif grep -q "RAID bus controller: Adaptec AAC-RAID" /tmp/percona-toolkit; then
|
||||
elif grep -q "RAID bus controller: Adaptec AAC-RAID" $file; then
|
||||
echo 'AACRAID'
|
||||
elif grep -q "3ware [0-9]* Storage Controller" /tmp/percona-toolkit; then
|
||||
elif grep -q "3ware [0-9]* Storage Controller" $file; then
|
||||
echo '3Ware'
|
||||
elif grep -q "Hewlett-Packard Company Smart Array" /tmp/percona-toolkit; then
|
||||
elif grep -q "Hewlett-Packard Company Smart Array" $file; then
|
||||
echo 'HP Smart Array'
|
||||
elif grep -q " RAID bus controller: " /tmp/percona-toolkit; then
|
||||
awk -F: '/RAID bus controller\:/ {print $3" "$5" "$6}' /tmp/percona-toolkit
|
||||
elif grep -q " RAID bus controller: " $file; then
|
||||
awk -F: '/RAID bus controller\:/ {print $3" "$5" "$6}' $file
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -493,14 +501,15 @@ parse_raid_controller_lspci () {
|
||||
# controllers.
|
||||
# ##############################################################################
|
||||
parse_raid_controller_dmesg () {
|
||||
local file=$1
|
||||
pat='scsi[0-9].*: .*'
|
||||
if grep -qi "${pat}megaraid" /tmp/percona-toolkit; then
|
||||
if grep -qi "${pat}megaraid" $file; then
|
||||
echo 'LSI Logic MegaRAID SAS'
|
||||
elif grep -q "Fusion MPT SAS" /tmp/percona-toolkit; then
|
||||
elif grep -q "Fusion MPT SAS" $file; then
|
||||
echo 'Fusion-MPT SAS'
|
||||
elif grep -q "${pat}aacraid" /tmp/percona-toolkit; then
|
||||
elif grep -q "${pat}aacraid" $file; then
|
||||
echo 'AACRAID'
|
||||
elif grep -q "${pat}3ware [0-9]* Storage Controller" /tmp/percona-toolkit; then
|
||||
elif grep -q "${pat}3ware [0-9]* Storage Controller" $file; then
|
||||
echo '3Ware'
|
||||
fi
|
||||
}
|
||||
@@ -510,20 +519,22 @@ parse_raid_controller_dmesg () {
|
||||
# /tmp/percona-toolkit
|
||||
# ##############################################################################
|
||||
parse_hpacucli () {
|
||||
grep 'logicaldrive\|physicaldrive' /tmp/percona-toolkit
|
||||
local file=$1
|
||||
grep 'logicaldrive\|physicaldrive' $file
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
# Parse the output of arcconf, which should be stored in /tmp/percona-toolkit
|
||||
# ##############################################################################
|
||||
parse_arcconf () {
|
||||
model=$(awk -F: '/Controller Model/{print $2}' /tmp/percona-toolkit)
|
||||
chan="$(awk -F: '/Channel description/{print $2}' /tmp/percona-toolkit)"
|
||||
cache="$(awk -F: '/Installed memory/{print $2}' /tmp/percona-toolkit)"
|
||||
status="$(awk -F: '/Controller Status/{print $2}' /tmp/percona-toolkit)"
|
||||
local file=$1
|
||||
model=$(awk -F: '/Controller Model/{print $2}' $file)
|
||||
chan="$(awk -F: '/Channel description/{print $2}' $file)"
|
||||
cache="$(awk -F: '/Installed memory/{print $2}' $file)"
|
||||
status="$(awk -F: '/Controller Status/{print $2}' $file)"
|
||||
name_val Specs "${model/ /},${chan},${cache} cache,${status}"
|
||||
|
||||
battery=$(grep -A5 'Controller Battery Info' /tmp/percona-toolkit \
|
||||
battery=$(grep -A5 'Controller Battery Info' $file \
|
||||
| awk '/Capacity remaining/ {c=$4}
|
||||
/Status/ {s=$3}
|
||||
/Time remaining/ {t=sprintf("%dd%dh%dm", $7, $9, $11)}
|
||||
@@ -536,9 +547,8 @@ parse_arcconf () {
|
||||
echo
|
||||
echo " LogicalDev Size RAID Disks Stripe Status Cache"
|
||||
echo " ========== ========= ==== ===== ====== ======= ======="
|
||||
for dev in $(awk '/Logical device number/{print $4}' /tmp/percona-toolkit); do
|
||||
sed -n -e "/^Logical device .* ${dev}$/,/^$\|^Logical device number/p" \
|
||||
/tmp/percona-toolkit \
|
||||
for dev in $(awk '/Logical device number/{print $4}' $file); do
|
||||
sed -n -e "/^Logical device .* ${dev}$/,/^$\|^Logical device number/p" $file \
|
||||
| awk '
|
||||
/Logical device name/ {d=$5}
|
||||
/Size/ {z=$3 " " $4}
|
||||
@@ -564,7 +574,7 @@ parse_arcconf () {
|
||||
|
||||
# Find the paragraph with physical devices, tabularize with assoc arrays.
|
||||
tempresult=""
|
||||
sed -n -e '/Physical Device information/,/^$/p' /tmp/percona-toolkit \
|
||||
sed -n -e '/Physical Device information/,/^$/p' $file \
|
||||
| awk -F: '
|
||||
/Device #[0-9]/ {
|
||||
device=substr($0, index($0, "#"));
|
||||
@@ -611,32 +621,33 @@ parse_arcconf () {
|
||||
}
|
||||
}
|
||||
}'
|
||||
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
# Parse the output of "lsiutil -i -s" from /tmp/percona-toolkit
|
||||
# Parse the output of "lsiutil -i -s".
|
||||
# ##############################################################################
|
||||
parse_fusionmpt_lsiutil () {
|
||||
local file=$1
|
||||
echo
|
||||
awk '/LSI.*Firmware/ { print " ", $0 }' /tmp/percona-toolkit
|
||||
grep . /tmp/percona-toolkit | sed -n -e '/B___T___L/,$ {s/^/ /; p}'
|
||||
awk '/LSI.*Firmware/ { print " ", $0 }' $file
|
||||
grep . $file | sed -n -e '/B___T___L/,$ {s/^/ /; p}'
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
# Parse the output of MegaCli64 -AdpAllInfo -aALL from /tmp/percona-toolkit.
|
||||
# ##############################################################################
|
||||
parse_lsi_megaraid_adapter_info () {
|
||||
name=$(awk -F: '/Product Name/{print substr($2, 2)}' /tmp/percona-toolkit);
|
||||
int=$(awk '/Host Interface/{print $4}' /tmp/percona-toolkit);
|
||||
prt=$(awk '/Number of Backend Port/{print $5}' /tmp/percona-toolkit);
|
||||
bbu=$(awk '/^BBU :/{print $3}' /tmp/percona-toolkit);
|
||||
mem=$(awk '/Memory Size/{print $4}' /tmp/percona-toolkit);
|
||||
vdr=$(awk '/Virtual Drives/{print $4}' /tmp/percona-toolkit);
|
||||
dvd=$(awk '/Degraded/{print $3}' /tmp/percona-toolkit);
|
||||
phy=$(awk '/^ Disks/{print $3}' /tmp/percona-toolkit);
|
||||
crd=$(awk '/Critical Disks/{print $4}' /tmp/percona-toolkit);
|
||||
fad=$(awk '/Failed Disks/{print $4}' /tmp/percona-toolkit);
|
||||
local file=$1
|
||||
name=$(awk -F: '/Product Name/{print substr($2, 2)}' $file);
|
||||
int=$(awk '/Host Interface/{print $4}' $file);
|
||||
prt=$(awk '/Number of Backend Port/{print $5}' $file);
|
||||
bbu=$(awk '/^BBU :/{print $3}' $file);
|
||||
mem=$(awk '/Memory Size/{print $4}' $file);
|
||||
vdr=$(awk '/Virtual Drives/{print $4}' $file);
|
||||
dvd=$(awk '/Degraded/{print $3}' $file);
|
||||
phy=$(awk '/^ Disks/{print $3}' $file);
|
||||
crd=$(awk '/Critical Disks/{print $4}' $file);
|
||||
fad=$(awk '/Failed Disks/{print $4}' $file);
|
||||
name_val Model "${name}, ${int} interface, ${prt} ports"
|
||||
name_val Cache "${mem} Memory, BBU ${bbu}"
|
||||
}
|
||||
@@ -646,9 +657,10 @@ parse_lsi_megaraid_adapter_info () {
|
||||
# /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL
|
||||
# ##############################################################################
|
||||
parse_lsi_megaraid_bbu_status () {
|
||||
charge=$(awk '/Relative State/{print $5}' /tmp/percona-toolkit);
|
||||
temp=$(awk '/^Temperature/{print $2}' /tmp/percona-toolkit);
|
||||
soh=$(awk '/isSOHGood:/{print $2}' /tmp/percona-toolkit);
|
||||
local file=$1
|
||||
charge=$(awk '/Relative State/{print $5}' $file);
|
||||
temp=$(awk '/^Temperature/{print $2}' $file);
|
||||
soh=$(awk '/isSOHGood:/{print $2}' $file);
|
||||
name_val BBU "${charge}% Charged, Temperature ${temp}C, isSOHGood=${soh}"
|
||||
}
|
||||
|
||||
@@ -659,11 +671,12 @@ parse_lsi_megaraid_bbu_status () {
|
||||
# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
|
||||
# ##############################################################################
|
||||
parse_lsi_megaraid_devices () {
|
||||
local file=$1
|
||||
echo
|
||||
echo " PhysiclDev Type State Errors Vendor Model Size"
|
||||
echo " ========== ==== ======= ====== ======= ============ ==========="
|
||||
for dev in $(awk '/Device Id/{print $3}' /tmp/percona-toolkit); do
|
||||
sed -e '/./{H;$!d;}' -e "x;/Device Id: ${dev}/!d;" /tmp/percona-toolkit \
|
||||
for dev in $(awk '/Device Id/{print $3}' $file); do
|
||||
sed -e '/./{H;$!d;}' -e "x;/Device Id: ${dev}/!d;" $file \
|
||||
| awk '
|
||||
/Media Type/ {d=substr($0, index($0, ":") + 2)}
|
||||
/PD Type/ {t=$3}
|
||||
@@ -687,6 +700,7 @@ parse_lsi_megaraid_devices () {
|
||||
# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll
|
||||
# ##############################################################################
|
||||
parse_lsi_megaraid_virtual_devices () {
|
||||
local file=$1
|
||||
# Somewhere on the Internet, I found the following guide to understanding the
|
||||
# RAID level, but I don't know the source anymore.
|
||||
# Primary-0, Secondary-0, RAID Level Qualifier-0 = 0
|
||||
@@ -757,7 +771,7 @@ parse_lsi_megaraid_virtual_devices () {
|
||||
devices[device ",stripe"], devices[device ",state"],
|
||||
devices[device ",wpolicy"] ", " devices[device ",rpolicy"]);
|
||||
}
|
||||
}' /tmp/percona-toolkit
|
||||
}' $file
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
@@ -930,7 +944,7 @@ main () {
|
||||
dmesg > /tmp/percona-toolkit 2>/dev/null
|
||||
fi
|
||||
if [ -s /tmp/percona-toolkit ]; then
|
||||
virt="$(parse_virtualization_dmesg)"
|
||||
virt="$(parse_virtualization_dmesg /tmp/percona-toolkit)"
|
||||
fi
|
||||
if [ -z "${virt}" ]; then
|
||||
if which lspci >/dev/null 2>&1; then
|
||||
@@ -962,7 +976,7 @@ main () {
|
||||
section Processor
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
cat /proc/cpuinfo > /tmp/percona-toolkit 2>/dev/null
|
||||
parse_proc_cpuinfo
|
||||
parse_proc_cpuinfo /tmp/percona-toolkit
|
||||
elif [ "${platform}" = "FreeBSD" ]; then
|
||||
parse_sysctl_cpu_freebsd /tmp/percona-toolkit.sysctl
|
||||
elif [ "${platform}" = "SunOS" ]; then
|
||||
@@ -994,7 +1008,7 @@ main () {
|
||||
fi
|
||||
|
||||
if which dmidecode >/dev/null 2>&1 && dmidecode > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_dmidecode_mem_devices
|
||||
parse_dmidecode_mem_devices /tmp/percona-toolkit
|
||||
fi
|
||||
|
||||
# ########################################################################
|
||||
@@ -1027,7 +1041,7 @@ main () {
|
||||
|
||||
# Relies on /tmp/percona-toolkit having data from the Disk Schedulers loop.
|
||||
section "Disk_Partioning"
|
||||
parse_fdisk
|
||||
parse_fdisk /tmp/percona-toolkit
|
||||
|
||||
section "Kernel_Inode_State"
|
||||
for file in dentry-state file-nr inode-nr; do
|
||||
@@ -1051,14 +1065,14 @@ main () {
|
||||
# /var/log/dmesg if possible.
|
||||
# ########################################################################
|
||||
if which lspci >/dev/null 2>&1 && lspci > /tmp/percona-toolkit 2>/dev/null; then
|
||||
controller="$(parse_raid_controller_lspci)"
|
||||
controller="$(parse_raid_controller_lspci /tmp/percona-toolkit)"
|
||||
fi
|
||||
if [ -z "${controller}" ]; then
|
||||
cat /var/log/dmesg > /tmp/percona-toolkit 2>/dev/null
|
||||
if [ ! -s /tmp/percona-toolkit ]; then
|
||||
dmesg > /tmp/percona-toolkit 2>/dev/null
|
||||
fi
|
||||
controller="$(parse_raid_controller_dmesg)"
|
||||
controller="$(parse_raid_controller_dmesg /tmp/percona-toolkit)"
|
||||
fi
|
||||
|
||||
name_val Controller "${controller:-No RAID controller detected}"
|
||||
@@ -1072,28 +1086,28 @@ main () {
|
||||
notfound=""
|
||||
if [ "${controller}" = "AACRAID" ]; then
|
||||
if arcconf getconfig 1 > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_arcconf
|
||||
parse_arcconf /tmp/percona-toolkit
|
||||
elif ! which arcconf >/dev/null 2>&1; then
|
||||
notfound="e.g. http://www.adaptec.com/en-US/support/raid/scsi_raid/ASR-2120S/"
|
||||
fi
|
||||
elif [ "${controller}" = "HP Smart Array" ]; then
|
||||
if hpacucli ctrl all show config > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_hpacucli
|
||||
parse_hpacucli /tmp/percona-toolkit
|
||||
elif ! which hpacucli >/dev/null 2>&1; then
|
||||
notfound="your package repository or the manufacturer's website"
|
||||
fi
|
||||
elif [ "${controller}" = "LSI Logic MegaRAID SAS" ]; then
|
||||
if MegaCli64 -AdpAllInfo -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_lsi_megaraid_adapter_info
|
||||
parse_lsi_megaraid_adapter_info /tmp/percona-toolkit
|
||||
elif ! which MegaCli64 >/dev/null 2>&1; then
|
||||
notfound="your package repository or the manufacturer's website"
|
||||
fi
|
||||
if MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_lsi_megaraid_bbu_status
|
||||
parse_lsi_megaraid_bbu_status /tmp/percona-toolkit
|
||||
fi
|
||||
if MegaCli64 -LdPdInfo -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_lsi_megaraid_virtual_devices
|
||||
parse_lsi_megaraid_devices
|
||||
parse_lsi_megaraid_virtual_devices /tmp/percona-toolkit
|
||||
parse_lsi_megaraid_devices /tmp/percona-toolkit
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1109,7 +1123,7 @@ main () {
|
||||
if [ "${platform}" = "Linux" ]; then
|
||||
section Network_Config
|
||||
if which lspci > /dev/null 2>&1 && lspci > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_ethernet_controller_lspci
|
||||
parse_ethernet_controller_lspci /tmp/percona-toolkit
|
||||
fi
|
||||
if sysctl net.ipv4.tcp_fin_timeout > /dev/null 2>&1; then
|
||||
name_val "FIN Timeout" "$(sysctl net.ipv4.tcp_fin_timeout)"
|
||||
@@ -1129,7 +1143,7 @@ main () {
|
||||
if [ "${platform}" = "Linux" ]; then
|
||||
section Network_Connections
|
||||
if netstat -antp > /tmp/percona-toolkit 2>/dev/null; then
|
||||
parse_netstat
|
||||
parse_netstat /tmp/percona-toolkit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -1152,7 +1166,7 @@ main () {
|
||||
section "Simplified_and_fuzzy_rounded_vmstat_(wait_please)"
|
||||
vmstat 1 5 > /tmp/percona-toolkit
|
||||
if [ "${platform}" = "Linux" ]; then
|
||||
format_vmstat
|
||||
format_vmstat /tmp/percona-toolkit
|
||||
else
|
||||
# TODO: simplify/format for other platforms
|
||||
cat /tmp/percona-toolkit
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_filesystems samples/df-mount-003.txt Linux
|
||||
|
||||
cat <<EOF > $1
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/sda1 99M 13% ext3 rw /boot
|
||||
/dev/sda2 540G 89% ext3 rw /
|
||||
tmpfs 48G 0% tmpfs rw /dev/shm
|
||||
EOF
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_filesystems samples/df-mount-004.txt Linux
|
||||
|
||||
cat <<EOF > $1
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/sda1 9.9G 34% ext3 rw /
|
||||
/dev/sdb 414G 1% ext3 rw /mnt
|
||||
none 7.6G 0% devpts rw,gid=5,mode=620 /dev/shm
|
||||
none 7.6G 0% tmpfs rw /dev/shm
|
||||
none 7.6G 0% binfmt_misc rw /dev/shm
|
||||
none 7.6G 0% proc rw /dev/shm
|
||||
none 7.6G 0% sysfs rw /dev/shm
|
||||
EOF
|
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_filesystems samples/df-mount-005.txt Linux
|
||||
|
||||
cat <<EOF > $1
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/cciss/c0d0p1 99M 24% ext3 rw /boot
|
||||
/dev/mapper/VolGroup00-LogVol00 194G 58% ext3 rw /
|
||||
/dev/mapper/VolGroup00-mysql_log 191G 4% ext3 rw /data/mysql-log
|
||||
/dev/mapper/VolGroup01-mysql_data 1008G 44% ext3 rw,noatime /data/mysql-data
|
||||
tmpfs 48G 0% tmpfs rw /dev/shm
|
||||
EOF
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_filesystems samples/df-mount-006.txt FreeBSD
|
||||
|
||||
# This one is from FreeBSD.
|
||||
|
||||
cat <<EOF > $1
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/ad0s1a 496M 32% ufs local /
|
||||
/dev/ad0s1d 1.1G 1% ufs local, soft-updates /var
|
||||
/dev/ad0s1e 496M 0% ufs local, soft-updates /tmp
|
||||
/dev/ad0s1f 17G 9% ufs local, soft-updates /usr
|
||||
devfs 1.0K 100% devfs local /dev
|
||||
EOF
|
0
t/pt-summary/vmstat-simplify → t/pt-summary/format_vmstat.sh
Executable file → Normal file
0
t/pt-summary/vmstat-simplify → t/pt-summary/format_vmstat.sh
Executable file → Normal file
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_fusionmpt_lsiutil
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
/proc/mpt/ioc0 LSI Logic SAS1068E B3 MPT 105 Firmware 00192f00 IOC 0
|
||||
B___T___L Type Vendor Product Rev SASAddress PhyNum
|
||||
0 0 0 Disk Dell VIRTUAL DISK 1028
|
||||
0 2 0 Disk Dell VIRTUAL DISK 1028
|
||||
0 8 0 EnclServ DP BACKPLANE 1.05 510240805f4feb00 8
|
||||
Hidden RAID Devices:
|
||||
B___T Device Vendor Product Rev SASAddress PhyNum
|
||||
0 1 PhysDisk 0 SEAGATE ST373455SS S52A 5000c50012a8ac61 1
|
||||
0 9 PhysDisk 1 SEAGATE ST373455SS S52A 5000c50012a8a24d 0
|
||||
0 3 PhysDisk 2 SEAGATE ST3146855SS S52A 5000c500130fcaed 3
|
||||
0 10 PhysDisk 3 SEAGATE ST3146855SS S52A 5000c500131093f5 2
|
||||
EOF
|
||||
|
||||
cat samples/lsiutil-001.txt > $2
|
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_fusionmpt_lsiutil
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
/proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0
|
||||
B___T___L Type Vendor Product Rev SASAddress PhyNum
|
||||
0 1 0 Disk LSILOGIC Logical Volume 3000
|
||||
Hidden RAID Devices:
|
||||
B___T Device Vendor Product Rev SASAddress PhyNum
|
||||
0 2 PhysDisk 0 IBM-ESXS ST9300603SS F B536 5000c5001d784329 1
|
||||
0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17152 0
|
||||
EOF
|
||||
|
||||
cat samples/lsiutil-002.txt > $2
|
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_fusionmpt_lsiutil
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
/proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0
|
||||
B___T___L Type Vendor Product Rev SASAddress PhyNum
|
||||
0 1 0 Disk LSILOGIC Logical Volume 3000
|
||||
Hidden RAID Devices:
|
||||
B___T Device Vendor Product Rev SASAddress PhyNum
|
||||
0 2 PhysDisk 0 IBM-ESXS MBD2300RC SB17 500000e113c00ed2 1
|
||||
0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17ee2 0
|
||||
EOF
|
||||
|
||||
cat samples/lsiutil-003.txt > $2
|
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_lsi_megaraid_bbu_status
|
||||
|
||||
cat <<EOF > $1
|
||||
BBU | 100% Charged, Temperature 18C, isSOHGood=Yes
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
BBU status for Adapter: 0
|
||||
|
||||
BatteryType: BBU
|
||||
Voltage: 4072 mV
|
||||
Current: 0 mA
|
||||
Temperature: 18 C
|
||||
Firmware Status: 00000000
|
||||
|
||||
Battery state:
|
||||
|
||||
GasGuageStatus:
|
||||
Fully Discharged : No
|
||||
Fully Charged : Yes
|
||||
Discharging : Yes
|
||||
Initialized : Yes
|
||||
Remaining Time Alarm : No
|
||||
Remaining Capacity Alarm: No
|
||||
Discharge Terminated : No
|
||||
Over Temperature : No
|
||||
Charging Terminated : No
|
||||
Over Charged : No
|
||||
|
||||
Relative State of Charge: 100 %
|
||||
Charger Status: Complete
|
||||
Remaining Capacity: 867 mAh
|
||||
Full Charge Capacity: 867 mAh
|
||||
isSOHGood: Yes
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
@@ -1,100 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_lsi_megaraid_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
PhysiclDev Type State Errors Vendor Model Size
|
||||
========== ==== ======= ====== ======= ============ ===========
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
|
||||
Adapter #0
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 0
|
||||
Device Id: 0
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f8cf9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 0(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 1
|
||||
Device Id: 1
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f5c35
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 1(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 2
|
||||
Device Id: 2
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079fc0c9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 2(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 3
|
||||
Device Id: 3
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079dc339
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 3(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
@@ -1,134 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_lsi_megaraid_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
PhysiclDev Type State Errors Vendor Model Size
|
||||
========== ==== ======= ====== ======= ============ ===========
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
|
||||
|
||||
Adapter #0
|
||||
|
||||
Number of Virtual Disks: 2
|
||||
Virtual Disk: 0 (Target Id: 0)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 0
|
||||
Device Id: 0
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f8cf9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 0(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 1
|
||||
Device Id: 1
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f5c35
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 1(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Virtual Disk: 1 (Target Id: 1)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 2
|
||||
Device Id: 2
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079fc0c9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 2(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 3
|
||||
Device Id: 3
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079dc339
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 3(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
@@ -1,132 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_lsi_megaraid_virtual_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
|
||||
========== ========= ========== ===== ======= ====== ======= =========
|
||||
0(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
|
||||
1(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
|
||||
|
||||
Adapter #0
|
||||
|
||||
Number of Virtual Disks: 2
|
||||
Virtual Disk: 0 (Target Id: 0)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 0
|
||||
Device Id: 0
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f8cf9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 0(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 1
|
||||
Device Id: 1
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f5c35
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 1(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Virtual Disk: 1 (Target Id: 1)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 2
|
||||
Device Id: 2
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079fc0c9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 2(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 3
|
||||
Device Id: 3
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079dc339
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 3(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_lsi_megaraid_virtual_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
|
||||
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
|
||||
========== ========= ========== ===== ======= ====== ======= =========
|
||||
0(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
|
||||
1(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll
|
||||
|
||||
|
||||
Adapter 0 -- Virtual Drive Information:
|
||||
Virtual Disk: 0 (Target Id: 0)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Virtual Disk: 1 (Target Id: 1)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_netstat
|
||||
|
||||
cat <<EOF > $1
|
||||
Connections from remote IP addresses
|
||||
192.168.243.72 1
|
||||
192.168.243.81 2
|
||||
Connections to local IP addresses
|
||||
192.168.243.71 3
|
||||
Connections to top 10 local ports
|
||||
3306 3
|
||||
States of connections
|
||||
ESTABLISHED 4
|
||||
LISTEN 15
|
||||
EOF
|
||||
|
||||
cat samples/netstat-001.txt > $2
|
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_arcconf
|
||||
|
||||
cat <<EOF > $1
|
||||
Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal
|
||||
Battery | 99%, 3d1h11m remaining, Optimal
|
||||
|
||||
LogicalDev Size RAID Disks Stripe Status Cache
|
||||
========== ========= ==== ===== ====== ======= =======
|
||||
Raid10-A 571392 MB 10 4 256 KB Optimal On (WB)
|
||||
|
||||
PhysiclDev State Speed Vendor Model Size Cache
|
||||
========== ======= ============= ======= ============ =========== =======
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
EOF
|
||||
|
||||
cat samples/arcconf-002.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_dmesg
|
||||
|
||||
cat <<EOF > $1
|
||||
Fusion-MPT SAS
|
||||
EOF
|
||||
|
||||
cat samples/dmesg-001.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_dmesg
|
||||
|
||||
cat <<EOF > $1
|
||||
AACRAID
|
||||
EOF
|
||||
|
||||
cat samples/dmesg-002.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_dmesg
|
||||
|
||||
cat <<EOF > $1
|
||||
LSI Logic MegaRAID SAS
|
||||
EOF
|
||||
|
||||
cat samples/dmesg-003.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_dmesg
|
||||
|
||||
cat <<EOF > $1
|
||||
AACRAID
|
||||
EOF
|
||||
|
||||
cat samples/dmesg-004.txt > $2
|
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_dmidecode_mem_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
1024 kB 33 MHz Other Flash Non-Volatile
|
||||
D5 4096 MB 1066 MHz DIMM Other Other
|
||||
D8 4096 MB 1066 MHz DIMM Other Other
|
||||
D0 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D0 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D1 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D1 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D2 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D2 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D3 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D3 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D4 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D4 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D5 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D6 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D6 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D7 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D7 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D8 {EMPTY} 1333 MHz DIMM Other Other
|
||||
EOF
|
||||
|
||||
cat samples/dmidecode-003.txt > $2
|
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_dmidecode_mem_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
DIMM_A2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
EOF
|
||||
|
||||
cat samples/dmidecode-004.txt > $2
|
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_dmidecode_mem_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
P1-DIMM1A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM2A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM3A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM1A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM2A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM3A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
4096 kB 33 MHz (30.3 ns) Other Flash Non-Volatile
|
||||
P1-DIMM1B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM1C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM2B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM2C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM3B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM3C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM1B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM1C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM2B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM2C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM3B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM3C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
EOF
|
||||
|
||||
cat samples/dmidecode-005.txt > $2
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_ip_s_link /tmp/percona-toolkit
|
||||
|
||||
cat <<EOF > $1
|
||||
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
|
||||
========= ========= ========== ========== ========== ========== ==========
|
||||
lo 3000000 25000 0 3000000 25000 0
|
||||
eth0 175000000 30000000 0 125000000 900000 0
|
||||
wlan0 50000000 80000 0 20000000 90000 0
|
||||
vboxnet0 0 0 0 0 0 0
|
||||
EOF
|
||||
|
||||
cat samples/ip-s-link-001.txt > $2
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_ip_s_link /tmp/percona-toolkit
|
||||
|
||||
cat <<EOF > $1
|
||||
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
|
||||
========= ========= ========== ========== ========== ========== ==========
|
||||
lo 3500000000 350000000 0 3500000000 350000000 0
|
||||
eth0 1750000000 1250000000 0 3500000000 700000000 0
|
||||
eth1 1250000000 60000000 0 900000000 50000000 0
|
||||
sit0 0 0 0 0 0 0
|
||||
EOF
|
||||
|
||||
cat samples/ip-s-link-002.txt > $2
|
@@ -1,237 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_lsi_megaraid_adapter_info
|
||||
|
||||
cat <<EOF > $1
|
||||
Model | PERC 6/i Integrated, PCIE interface, 8 ports
|
||||
Cache | 256MB Memory, BBU Present
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
[root@pc-db1]# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL
|
||||
|
||||
Adapter #0
|
||||
|
||||
==============================================================================
|
||||
Versions
|
||||
================
|
||||
Product Name : PERC 6/i Integrated
|
||||
Serial No : 1122334455667788
|
||||
FW Package Build: 6.0.1-0080
|
||||
|
||||
Mfg. Data
|
||||
================
|
||||
Mfg. Date : 06/08/07
|
||||
Rework Date : 06/08/07
|
||||
Revision No :
|
||||
Battery FRU : N/A
|
||||
|
||||
Image Versions In Flash:
|
||||
================
|
||||
FW Version : 1.11.52-0349
|
||||
BIOS Version : NT13-2
|
||||
WebBIOS Version : 1.1-32-e_11-Rel
|
||||
Ctrl-R Version : 1.01-010B
|
||||
Boot Block Version : 1.00.00.01-0008
|
||||
|
||||
Pending Images In Flash
|
||||
================
|
||||
None
|
||||
|
||||
PCI Info
|
||||
================
|
||||
Vendor Id : 1000
|
||||
Device Id : 0060
|
||||
SubVendorId : 1028
|
||||
SubDeviceId : 1f0c
|
||||
|
||||
Host Interface : PCIE
|
||||
|
||||
Number of Frontend Port: 0
|
||||
Device Interface : PCIE
|
||||
|
||||
Number of Backend Port: 8
|
||||
Port : Address
|
||||
0 5000c500079f8cf9
|
||||
1 5000c500079f5c35
|
||||
2 5000c500079fc0c9
|
||||
3 5000c500079dc339
|
||||
4 0000000000000000
|
||||
5 0000000000000000
|
||||
6 0000000000000000
|
||||
7 0000000000000000
|
||||
|
||||
HW Configuration
|
||||
================
|
||||
SAS Address : 5001e4f021048f00
|
||||
BBU : Present
|
||||
Alarm : Absent
|
||||
NVRAM : Present
|
||||
Serial Debugger : Present
|
||||
Memory : Present
|
||||
Flash : Present
|
||||
Memory Size : 256MB
|
||||
|
||||
Settings
|
||||
================
|
||||
Current Time : 20:31:29 5/13, 2010
|
||||
Predictive Fail Poll Interval : 300sec
|
||||
Interrupt Throttle Active Count : 16
|
||||
Interrupt Throttle Completion : 50us
|
||||
Rebuild Rate : 30%
|
||||
PR Rate : 30%
|
||||
Resynch Rate : 30%
|
||||
Check Consistency Rate : 30%
|
||||
Reconstruction Rate : 30%
|
||||
Cache Flush Interval : 4s
|
||||
Max Drives to Spinup at One Time : 2
|
||||
Delay Among Spinup Groups : 12s
|
||||
Physical Drive Coercion Mode : 128MB
|
||||
Cluster Mode : Disabled
|
||||
Alarm : Disabled
|
||||
Auto Rebuild : Enabled
|
||||
Battery Warning : Enabled
|
||||
Ecc Bucket Size : 15
|
||||
Ecc Bucket Leak Rate : 1440 Minutes
|
||||
Restore HotSpare on Insertion : Disabled
|
||||
Expose Enclosure Devices : Disabled
|
||||
Maintain PD Fail History : Disabled
|
||||
Host Request Reordering : Enabled
|
||||
Auto Detect BackPlane Enabled : SGPIO/i2c SEP
|
||||
Load Balance Mode : Auto
|
||||
Any Offline VD Cache Preserved : No
|
||||
|
||||
Capabilities
|
||||
================
|
||||
RAID Level Supported : RAID0, RAID1, RAID5, RAID6, RAID10, RAID50, RAID60
|
||||
Supported Drives : SAS, SATA
|
||||
|
||||
Allowed Mixing:
|
||||
|
||||
Mix In Enclosure Allowed
|
||||
|
||||
Status
|
||||
================
|
||||
ECC Bucket Count : 0
|
||||
|
||||
Limitations
|
||||
================
|
||||
Max Arms Per VD : 32
|
||||
Max Spans Per VD : 8
|
||||
Max Arrays : 128
|
||||
Max Number of VDs : 64
|
||||
Max Parallel Commands : 1008
|
||||
Max SGE Count : 80
|
||||
Max Data Transfer Size : 8192 sectors
|
||||
Max Strips PerIO : 42
|
||||
Min Stripe Size : 8kB
|
||||
Max Stripe Size : 1024kB
|
||||
|
||||
Device Present
|
||||
================
|
||||
Virtual Drives : 2
|
||||
Degraded : 0
|
||||
Offline : 0
|
||||
Physical Devices : 5
|
||||
Disks : 4
|
||||
Critical Disks : 0
|
||||
Failed Disks : 0
|
||||
|
||||
Supported Adapter Operations
|
||||
================
|
||||
Rebuild Rate : Yes
|
||||
CC Rate : Yes
|
||||
BGI Rate : Yes
|
||||
Reconstruct Rate : Yes
|
||||
Patrol Read Rate : Yes
|
||||
Alarm Control : Yes
|
||||
Cluster Support : No
|
||||
BBU : Yes
|
||||
Spanning : Yes
|
||||
Dedicated Hot Spare : Yes
|
||||
Revertible Hot Spares : No
|
||||
Foreign Config Import : Yes
|
||||
Self Diagnostic : Yes
|
||||
Allow Mixed Redundancy on Array : No
|
||||
Global Hot Spares : Yes
|
||||
Deny SCSI Passthrough : No
|
||||
Deny SMP Passthrough : No
|
||||
Deny STP Passthrough : No
|
||||
|
||||
Supported VD Operations
|
||||
================
|
||||
Read Policy : Yes
|
||||
Write Policy : Yes
|
||||
IO Policy : Yes
|
||||
Access Policy : Yes
|
||||
Disk Cache Policy : Yes
|
||||
Reconstruction : Yes
|
||||
Deny Locate : No
|
||||
Deny CC : No
|
||||
|
||||
Supported PD Operations
|
||||
================
|
||||
Force Online : Yes
|
||||
Force Offline : Yes
|
||||
Force Rebuild : Yes
|
||||
Deny Force Failed : No
|
||||
Deny Force Good/Bad : No
|
||||
Deny Missing Replace : No
|
||||
Deny Clear : No
|
||||
Deny Locate : No
|
||||
Disable Copyback : No
|
||||
Enable Copyback on SMART : No
|
||||
Enable Copyback to SSD on SMART error : No
|
||||
|
||||
Error Counters
|
||||
================
|
||||
Memory Correctable Errors : 0
|
||||
Memory Uncorrectable Errors : 0
|
||||
|
||||
Cluster Information
|
||||
================
|
||||
Cluster Permitted : No
|
||||
Cluster Active : No
|
||||
|
||||
Default Settings
|
||||
================
|
||||
Phy Polarity : 0
|
||||
Phy PolaritySplit : 0
|
||||
Background Rate : 30
|
||||
Stripe Size : 64kB
|
||||
Flush Time : 4 seconds
|
||||
Write Policy : WB
|
||||
Read Policy : None
|
||||
Cache When BBU Bad : Disabled
|
||||
Cached IO : No
|
||||
SMART Mode : Mode 6
|
||||
Alarm Disable : No
|
||||
Coercion Mode : 128MB
|
||||
ZCR Config : Unknown
|
||||
Dirty LED Shows Drive Activity : No
|
||||
BIOS Continue on Error : No
|
||||
Spin Down Mode : None
|
||||
Allowed Device Type : SAS/SATA Mix
|
||||
Allow Mix In Enclosure : Yes
|
||||
Allow HDD SAS/SATA Mix In VD : No
|
||||
Allow SSD SAS/SATA Mix In VD : No
|
||||
Allow HDD/SAS Mix In VD : No
|
||||
Allow SATA In Cluster : No
|
||||
Max Chained Enclosures : 1
|
||||
Disable Ctrl-R : No
|
||||
Enable Web BIOS : No
|
||||
Direct PD Mapping : Yes
|
||||
BIOS Enumerate VDs : Yes
|
||||
Restore Hot Spare on Insertion : No
|
||||
Expose Enclosure Devices : No
|
||||
Maintain PD Fail History : No
|
||||
Disable Puncturing : No
|
||||
Zero Based Enclosure Enumeration : Yes
|
||||
PreBoot CLI Enabled : No
|
||||
LED Show Drive Activity : No
|
||||
Cluster Disable : Yes
|
||||
SAS Disable : No
|
||||
Auto Detect BackPlane Enable : SGPIO/i2c SEP
|
||||
Delay during POST : 0
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_lspci
|
||||
|
||||
cat <<EOF > $1
|
||||
Fusion-MPT SAS
|
||||
EOF
|
||||
|
||||
cat samples/lspci-001.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_lspci
|
||||
|
||||
cat <<EOF > $1
|
||||
LSI Logic Unknown
|
||||
EOF
|
||||
|
||||
cat samples/lspci-002.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_lspci
|
||||
|
||||
cat <<EOF > $1
|
||||
AACRAID
|
||||
EOF
|
||||
|
||||
cat samples/lspci-003.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_lspci
|
||||
|
||||
cat <<EOF > $1
|
||||
LSI Logic MegaRAID SAS
|
||||
EOF
|
||||
|
||||
cat samples/lspci-004.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_raid_controller_lspci
|
||||
|
||||
cat <<EOF > $1
|
||||
HP Smart Array
|
||||
EOF
|
||||
|
||||
cat samples/lspci-006.txt > $2
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
#parse_virtualization_dmesg
|
||||
|
||||
cat <<EOF > $1
|
||||
Xen
|
||||
EOF
|
||||
|
||||
cat samples/dmesg-006.txt > $2
|
27
t/pt-summary/parse-arcconf-01 → t/pt-summary/parse_arcconf.sh
Executable file → Normal file
27
t/pt-summary/parse-arcconf-01 → t/pt-summary/parse_arcconf.sh
Executable file → Normal file
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
#parse_arcconf
|
||||
|
||||
cat <<EOF > $1
|
||||
TESTS=2
|
||||
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal
|
||||
Battery | 99%, 3d1h11m remaining, Optimal
|
||||
|
||||
@@ -17,7 +18,7 @@ cat <<EOF > $1
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146855SS 140014 MB On (WB)
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
cat <<EOF > $TMPDIR/in
|
||||
# /usr/StorMan/arcconf getconfig 1
|
||||
Controllers found: 1
|
||||
----------------------------------------------------------------------
|
||||
@@ -152,3 +153,23 @@ Physical Device information
|
||||
Command completed successfully.
|
||||
|
||||
EOF
|
||||
parse_arcconf $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal
|
||||
Battery | 99%, 3d1h11m remaining, Optimal
|
||||
|
||||
LogicalDev Size RAID Disks Stripe Status Cache
|
||||
========== ========= ==== ===== ====== ======= =======
|
||||
Raid10-A 571392 MB 10 4 256 KB Optimal On (WB)
|
||||
|
||||
PhysiclDev State Speed Vendor Model Size Cache
|
||||
========== ======= ============= ======= ============ =========== =======
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
|
||||
EOF
|
||||
parse_arcconf samples/arcconf-002.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
103
t/pt-summary/parse_dmidecode_mem_devices.sh
Normal file
103
t/pt-summary/parse_dmidecode_mem_devices.sh
Normal file
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
|
||||
TESTS=5
|
||||
|
||||
TEST_NAME="dmidecode-001.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
SODIMM0 2048 MB 800 MHz SODIMM Other Synchronous
|
||||
SODIMM1 2048 MB 800 MHz SODIMM Other Synchronous
|
||||
EOF
|
||||
parse_dmidecode_mem_devices samples/dmidecode-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmidecode-002.tx"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
DIMM1 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM2 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM3 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM4 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM5 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM6 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM7 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM8 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
EOF
|
||||
parse_dmidecode_mem_devices samples/dmidecode-002.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmidecode-003.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
1024 kB 33 MHz Other Flash Non-Volatile
|
||||
D5 4096 MB 1066 MHz DIMM Other Other
|
||||
D8 4096 MB 1066 MHz DIMM Other Other
|
||||
D0 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D0 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D1 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D1 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D2 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D2 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D3 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D3 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D4 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D4 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D5 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D6 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D6 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D7 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D7 {EMPTY} 1333 MHz DIMM Other Other
|
||||
D8 {EMPTY} 1333 MHz DIMM Other Other
|
||||
EOF
|
||||
parse_dmidecode_mem_devices samples/dmidecode-003.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmidecode-004.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
DIMM_A2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_A4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
DIMM_B4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
|
||||
EOF
|
||||
parse_dmidecode_mem_devices samples/dmidecode-004.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmidecode-005.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
P1-DIMM1A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM2A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM3A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM1A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM2A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM3A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
|
||||
4096 kB 33 MHz (30.3 ns) Other Flash Non-Volatile
|
||||
P1-DIMM1B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM1C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM2B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM2C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM3B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P1-DIMM3C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM1B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM1C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM2B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM2C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM3B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
P2-DIMM3C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
|
||||
EOF
|
||||
parse_dmidecode_mem_devices samples/dmidecode-005.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
7
t/pt-summary/parse-lspci-ethernet-01 → t/pt-summary/parse_ethernet_controller_lspci.sh
Executable file → Normal file
7
t/pt-summary/parse-lspci-ethernet-01 → t/pt-summary/parse_ethernet_controller_lspci.sh
Executable file → Normal file
@@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
#parse_ethernet_controller_lspci
|
||||
|
||||
cat <<EOF > $1
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Controller | Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
|
||||
Controller | Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
|
||||
EOF
|
||||
|
||||
cat samples/lspci-001.txt > $2
|
||||
parse_ethernet_controller_lspci samples/lspci-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
7
t/pt-summary/parse-fdisk-01 → t/pt-summary/parse_fdisk.sh
Executable file → Normal file
7
t/pt-summary/parse-fdisk-01 → t/pt-summary/parse_fdisk.sh
Executable file → Normal file
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
#parse_fdisk
|
||||
|
||||
cat <<EOF > $1
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Device Type Start End Size
|
||||
============ ==== ========== ========== ==================
|
||||
/dev/dm-0 Disk 494609104896
|
||||
@@ -10,5 +9,5 @@ Device Type Start End Size
|
||||
/dev/sda1 Part 1 26 205632000
|
||||
/dev/sda2 Part 26 60801 499891392000
|
||||
EOF
|
||||
|
||||
cp samples/fdisk-01.txt $2
|
||||
parse_fdisk samples/fdisk-01.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
@@ -1,26 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This test file must be ran by util/test-bash-functions.
|
||||
TESTS=4
|
||||
|
||||
TESTS=2
|
||||
|
||||
TEST_NAME="df-mount-001.txt"
|
||||
TEST_NAME="df-mount-003.txt Linux"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/mapper/vg_ginger-lv_root 454G 6% ext4 rw /
|
||||
/dev/sda1 194M 31% ext4 rw /boot
|
||||
tmpfs 2.0G 1% tmpfs rw /dev/shm
|
||||
/dev/sda1 99M 13% ext3 rw /boot
|
||||
/dev/sda2 540G 89% ext3 rw /
|
||||
tmpfs 48G 0% tmpfs rw /dev/shm
|
||||
EOF
|
||||
parse_filesystems "samples/df-mount-001.txt" "Linux" > $TMPDIR/got
|
||||
parse_filesystems samples/df-mount-003.txt Linux > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="df-mount-002.txt"
|
||||
TEST_NAME="df-mount-004.txt Linux"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/mapper/VolGroup00-LogVol00 62G 56% ext3 rw /
|
||||
/dev/mapper/VolGroup01-MySQLData00 67G 20% ext3 rw /var/lib/mysql
|
||||
/dev/sda3 190M 11% ext3 rw /boot
|
||||
tmpfs 7.9G 0% tmpfs rw /dev/shm
|
||||
/dev/sda1 9.9G 34% ext3 rw /
|
||||
/dev/sdb 414G 1% ext3 rw /mnt
|
||||
none 7.6G 0% devpts rw,gid=5,mode=620 /dev/shm
|
||||
none 7.6G 0% tmpfs rw /dev/shm
|
||||
none 7.6G 0% binfmt_misc rw /dev/shm
|
||||
none 7.6G 0% proc rw /dev/shm
|
||||
none 7.6G 0% sysfs rw /dev/shm
|
||||
EOF
|
||||
parse_filesystems "samples/df-mount-002.txt" "Linux" > $TMPDIR/got
|
||||
parse_filesystems samples/df-mount-004.txt Linux > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="df-mount-005.txt Linux"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/cciss/c0d0p1 99M 24% ext3 rw /boot
|
||||
/dev/mapper/VolGroup00-LogVol00 194G 58% ext3 rw /
|
||||
/dev/mapper/VolGroup00-mysql_log 191G 4% ext3 rw /data/mysql-log
|
||||
/dev/mapper/VolGroup01-mysql_data 1008G 44% ext3 rw,noatime /data/mysql-data
|
||||
tmpfs 48G 0% tmpfs rw /dev/shm
|
||||
EOF
|
||||
parse_filesystems samples/df-mount-005.txt Linux > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="df-mount-006.txt FreeBSD"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Filesystem Size Used Type Opts Mountpoint
|
||||
/dev/ad0s1a 496M 32% ufs local /
|
||||
/dev/ad0s1d 1.1G 1% ufs local, soft-updates /var
|
||||
/dev/ad0s1e 496M 0% ufs local, soft-updates /tmp
|
||||
/dev/ad0s1f 17G 9% ufs local, soft-updates /usr
|
||||
devfs 1.0K 100% devfs local /dev
|
||||
EOF
|
||||
parse_filesystems samples/df-mount-006.txt FreeBSD > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
9
t/pt-summary/parse-free-minus-b → t/pt-summary/parse_free_minus_b.sh
Executable file → Normal file
9
t/pt-summary/parse-free-minus-b → t/pt-summary/parse_free_minus_b.sh
Executable file → Normal file
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
#parse_free_minus_b /tmp/percona-toolkit
|
||||
|
||||
cat <<EOF > $1
|
||||
TESTS=1
|
||||
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Total | 3.89G
|
||||
Free | 1.42G
|
||||
Used | physical = 2.47G, swap = 0.00k, virtual = 2.47G
|
||||
@@ -10,7 +11,7 @@ cat <<EOF > $1
|
||||
Dirty | 60 kB
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
cat <<EOF > $TMPDIR/in
|
||||
total used free shared buffers cached
|
||||
Mem: 4182048768 2653696000 1528352768 0 138240000 2060787712
|
||||
-/+ buffers/cache: 454668288 3727380480
|
||||
@@ -61,3 +62,5 @@ Hugepagesize: 2048 kB
|
||||
DirectMap4k: 10232 kB
|
||||
DirectMap2M: 897024 kB
|
||||
EOF
|
||||
parse_free_minus_b $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
49
t/pt-summary/parse_fusionmpt_lsiutil.sh
Normal file
49
t/pt-summary/parse_fusionmpt_lsiutil.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
TESTS=3
|
||||
|
||||
TEST_NAME="lsiutil-001.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
/proc/mpt/ioc0 LSI Logic SAS1068E B3 MPT 105 Firmware 00192f00 IOC 0
|
||||
B___T___L Type Vendor Product Rev SASAddress PhyNum
|
||||
0 0 0 Disk Dell VIRTUAL DISK 1028
|
||||
0 2 0 Disk Dell VIRTUAL DISK 1028
|
||||
0 8 0 EnclServ DP BACKPLANE 1.05 510240805f4feb00 8
|
||||
Hidden RAID Devices:
|
||||
B___T Device Vendor Product Rev SASAddress PhyNum
|
||||
0 1 PhysDisk 0 SEAGATE ST373455SS S52A 5000c50012a8ac61 1
|
||||
0 9 PhysDisk 1 SEAGATE ST373455SS S52A 5000c50012a8a24d 0
|
||||
0 3 PhysDisk 2 SEAGATE ST3146855SS S52A 5000c500130fcaed 3
|
||||
0 10 PhysDisk 3 SEAGATE ST3146855SS S52A 5000c500131093f5 2
|
||||
EOF
|
||||
parse_fusionmpt_lsiutil samples/lsiutil-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="lsiutil-002.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
/proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0
|
||||
B___T___L Type Vendor Product Rev SASAddress PhyNum
|
||||
0 1 0 Disk LSILOGIC Logical Volume 3000
|
||||
Hidden RAID Devices:
|
||||
B___T Device Vendor Product Rev SASAddress PhyNum
|
||||
0 2 PhysDisk 0 IBM-ESXS ST9300603SS F B536 5000c5001d784329 1
|
||||
0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17152 0
|
||||
EOF
|
||||
parse_fusionmpt_lsiutil samples/lsiutil-002.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="lsiutil-003.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
/proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0
|
||||
B___T___L Type Vendor Product Rev SASAddress PhyNum
|
||||
0 1 0 Disk LSILOGIC Logical Volume 3000
|
||||
Hidden RAID Devices:
|
||||
B___T Device Vendor Product Rev SASAddress PhyNum
|
||||
0 2 PhysDisk 0 IBM-ESXS MBD2300RC SB17 500000e113c00ed2 1
|
||||
0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17ee2 0
|
||||
EOF
|
||||
parse_fusionmpt_lsiutil samples/lsiutil-003.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
7
t/pt-summary/parse-hpacucli-01 → t/pt-summary/parse_hpacucli.sh
Executable file → Normal file
7
t/pt-summary/parse-hpacucli-01 → t/pt-summary/parse_hpacucli.sh
Executable file → Normal file
@@ -1,13 +1,12 @@
|
||||
#!/bin/bash
|
||||
#parse_hpacucli
|
||||
|
||||
cat <<EOF > $1
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
logicaldrive 1 (136.7 GB, RAID 1, OK)
|
||||
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
|
||||
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
cat <<EOF > $TMPDIR/in
|
||||
|
||||
Smart Array P400i in Slot 0 (Embedded) (sn: PH73MU7325 )
|
||||
|
||||
@@ -20,3 +19,5 @@ Smart Array P400i in Slot 0 (Embedded) (sn: PH73MU7325 )
|
||||
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
|
||||
|
||||
EOF
|
||||
parse_hpacucli $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
27
t/pt-summary/parse_ip_s_link.sh
Normal file
27
t/pt-summary/parse_ip_s_link.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
TESTS=2
|
||||
|
||||
TEST_NAME="ip-s-link-001.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
|
||||
========= ========= ========== ========== ========== ========== ==========
|
||||
lo 3000000 25000 0 3000000 25000 0
|
||||
eth0 175000000 30000000 0 125000000 900000 0
|
||||
wlan0 50000000 80000 0 20000000 90000 0
|
||||
vboxnet0 0 0 0 0 0 0
|
||||
EOF
|
||||
parse_ip_s_link samples/ip-s-link-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="ip-s-link-002.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
|
||||
========= ========= ========== ========== ========== ========== ==========
|
||||
lo 3500000000 350000000 0 3500000000 350000000 0
|
||||
eth0 1750000000 1250000000 0 3500000000 700000000 0
|
||||
eth1 1250000000 60000000 0 900000000 50000000 0
|
||||
sit0 0 0 0 0 0 0
|
||||
EOF
|
||||
parse_ip_s_link samples/ip-s-link-002.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
695
t/pt-summary/parse_lsi_megaraid.sh
Normal file
695
t/pt-summary/parse_lsi_megaraid.sh
Normal file
@@ -0,0 +1,695 @@
|
||||
#!/bin/bash
|
||||
|
||||
TESTS=6
|
||||
|
||||
# ############################################################################
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
BBU | 100% Charged, Temperature 18C, isSOHGood=Yes
|
||||
EOF
|
||||
|
||||
cat <<EOF > $TMPDIR/in
|
||||
BBU status for Adapter: 0
|
||||
|
||||
BatteryType: BBU
|
||||
Voltage: 4072 mV
|
||||
Current: 0 mA
|
||||
Temperature: 18 C
|
||||
Firmware Status: 00000000
|
||||
|
||||
Battery state:
|
||||
|
||||
GasGuageStatus:
|
||||
Fully Discharged : No
|
||||
Fully Charged : Yes
|
||||
Discharging : Yes
|
||||
Initialized : Yes
|
||||
Remaining Time Alarm : No
|
||||
Remaining Capacity Alarm: No
|
||||
Discharge Terminated : No
|
||||
Over Temperature : No
|
||||
Charging Terminated : No
|
||||
Over Charged : No
|
||||
|
||||
Relative State of Charge: 100 %
|
||||
Charger Status: Complete
|
||||
Remaining Capacity: 867 mAh
|
||||
Full Charge Capacity: 867 mAh
|
||||
isSOHGood: Yes
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
||||
parse_lsi_megaraid_bbu_status $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
# ############################################################################
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
PhysiclDev Type State Errors Vendor Model Size
|
||||
========== ==== ======= ====== ======= ============ ===========
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
EOF
|
||||
|
||||
cat <<EOF > $TMPDIR/in
|
||||
|
||||
Adapter #0
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 0
|
||||
Device Id: 0
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f8cf9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 0(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 1
|
||||
Device Id: 1
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f5c35
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 1(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 2
|
||||
Device Id: 2
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079fc0c9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 2(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 3
|
||||
Device Id: 3
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079dc339
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 3(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
||||
parse_lsi_megaraid_devices $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
|
||||
# ############################################################################
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
PhysiclDev Type State Errors Vendor Model Size
|
||||
========== ==== ======= ====== ======= ============ ===========
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
|
||||
EOF
|
||||
|
||||
cat <<EOF > $TMPDIR/in
|
||||
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
|
||||
|
||||
Adapter #0
|
||||
|
||||
Number of Virtual Disks: 2
|
||||
Virtual Disk: 0 (Target Id: 0)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 0
|
||||
Device Id: 0
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f8cf9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 0(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 1
|
||||
Device Id: 1
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f5c35
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 1(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Virtual Disk: 1 (Target Id: 1)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 2
|
||||
Device Id: 2
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079fc0c9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 2(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 3
|
||||
Device Id: 3
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079dc339
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 3(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
||||
parse_lsi_megaraid_devices $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
# ############################################################################
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
|
||||
========== ========= ========== ===== ======= ====== ======= =========
|
||||
0(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
|
||||
1(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
|
||||
EOF
|
||||
|
||||
cat <<EOF > $TMPDIR/in
|
||||
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
|
||||
|
||||
Adapter #0
|
||||
|
||||
Number of Virtual Disks: 2
|
||||
Virtual Disk: 0 (Target Id: 0)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 0
|
||||
Device Id: 0
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f8cf9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 0(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 1
|
||||
Device Id: 1
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079f5c35
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 1(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
Virtual Disk: 1 (Target Id: 1)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Number of Spans: 1
|
||||
Span: 0 - Number of PDs: 2
|
||||
PD: 0 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 2
|
||||
Device Id: 2
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079fc0c9
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 2(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
PD: 1 Information
|
||||
Enclosure Device ID: 32
|
||||
Slot Number: 3
|
||||
Device Id: 3
|
||||
Sequence Number: 2
|
||||
Media Error Count: 0
|
||||
Other Error Count: 0
|
||||
Predictive Failure Count: 0
|
||||
Last Predictive Failure Event Seq Number: 0
|
||||
PD Type: SAS
|
||||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||||
Firmware state: Online
|
||||
SAS Address(0): 0x5000c500079dc339
|
||||
SAS Address(1): 0x0
|
||||
Connected Port Number: 3(path0)
|
||||
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
|
||||
Foreign State: None
|
||||
Media Type: Hard Disk Device
|
||||
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
||||
parse_lsi_megaraid_virtual_devices $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
# ############################################################################
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
|
||||
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
|
||||
========== ========= ========== ===== ======= ====== ======= =========
|
||||
0(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
|
||||
1(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
|
||||
EOF
|
||||
|
||||
cat <<EOF > $TMPDIR/in
|
||||
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll
|
||||
|
||||
|
||||
Adapter 0 -- Virtual Drive Information:
|
||||
Virtual Disk: 0 (Target Id: 0)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
Virtual Disk: 1 (Target Id: 1)
|
||||
Name:
|
||||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||||
Size:69376MB
|
||||
State: Optimal
|
||||
Stripe Size: 64kB
|
||||
Number Of Drives:2
|
||||
Span Depth:1
|
||||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||||
Access Policy: Read/Write
|
||||
Disk Cache Policy: Disk's Default
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
||||
parse_lsi_megaraid_virtual_devices $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
|
||||
# ############################################################################
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Model | PERC 6/i Integrated, PCIE interface, 8 ports
|
||||
Cache | 256MB Memory, BBU Present
|
||||
EOF
|
||||
|
||||
cat <<EOF > $TMPDIR/in
|
||||
[root@pc-db1]# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL
|
||||
|
||||
Adapter #0
|
||||
|
||||
==============================================================================
|
||||
Versions
|
||||
================
|
||||
Product Name : PERC 6/i Integrated
|
||||
Serial No : 1122334455667788
|
||||
FW Package Build: 6.0.1-0080
|
||||
|
||||
Mfg. Data
|
||||
================
|
||||
Mfg. Date : 06/08/07
|
||||
Rework Date : 06/08/07
|
||||
Revision No :
|
||||
Battery FRU : N/A
|
||||
|
||||
Image Versions In Flash:
|
||||
================
|
||||
FW Version : 1.11.52-0349
|
||||
BIOS Version : NT13-2
|
||||
WebBIOS Version : 1.1-32-e_11-Rel
|
||||
Ctrl-R Version : 1.01-010B
|
||||
Boot Block Version : 1.00.00.01-0008
|
||||
|
||||
Pending Images In Flash
|
||||
================
|
||||
None
|
||||
|
||||
PCI Info
|
||||
================
|
||||
Vendor Id : 1000
|
||||
Device Id : 0060
|
||||
SubVendorId : 1028
|
||||
SubDeviceId : 1f0c
|
||||
|
||||
Host Interface : PCIE
|
||||
|
||||
Number of Frontend Port: 0
|
||||
Device Interface : PCIE
|
||||
|
||||
Number of Backend Port: 8
|
||||
Port : Address
|
||||
0 5000c500079f8cf9
|
||||
1 5000c500079f5c35
|
||||
2 5000c500079fc0c9
|
||||
3 5000c500079dc339
|
||||
4 0000000000000000
|
||||
5 0000000000000000
|
||||
6 0000000000000000
|
||||
7 0000000000000000
|
||||
|
||||
HW Configuration
|
||||
================
|
||||
SAS Address : 5001e4f021048f00
|
||||
BBU : Present
|
||||
Alarm : Absent
|
||||
NVRAM : Present
|
||||
Serial Debugger : Present
|
||||
Memory : Present
|
||||
Flash : Present
|
||||
Memory Size : 256MB
|
||||
|
||||
Settings
|
||||
================
|
||||
Current Time : 20:31:29 5/13, 2010
|
||||
Predictive Fail Poll Interval : 300sec
|
||||
Interrupt Throttle Active Count : 16
|
||||
Interrupt Throttle Completion : 50us
|
||||
Rebuild Rate : 30%
|
||||
PR Rate : 30%
|
||||
Resynch Rate : 30%
|
||||
Check Consistency Rate : 30%
|
||||
Reconstruction Rate : 30%
|
||||
Cache Flush Interval : 4s
|
||||
Max Drives to Spinup at One Time : 2
|
||||
Delay Among Spinup Groups : 12s
|
||||
Physical Drive Coercion Mode : 128MB
|
||||
Cluster Mode : Disabled
|
||||
Alarm : Disabled
|
||||
Auto Rebuild : Enabled
|
||||
Battery Warning : Enabled
|
||||
Ecc Bucket Size : 15
|
||||
Ecc Bucket Leak Rate : 1440 Minutes
|
||||
Restore HotSpare on Insertion : Disabled
|
||||
Expose Enclosure Devices : Disabled
|
||||
Maintain PD Fail History : Disabled
|
||||
Host Request Reordering : Enabled
|
||||
Auto Detect BackPlane Enabled : SGPIO/i2c SEP
|
||||
Load Balance Mode : Auto
|
||||
Any Offline VD Cache Preserved : No
|
||||
|
||||
Capabilities
|
||||
================
|
||||
RAID Level Supported : RAID0, RAID1, RAID5, RAID6, RAID10, RAID50, RAID60
|
||||
Supported Drives : SAS, SATA
|
||||
|
||||
Allowed Mixing:
|
||||
|
||||
Mix In Enclosure Allowed
|
||||
|
||||
Status
|
||||
================
|
||||
ECC Bucket Count : 0
|
||||
|
||||
Limitations
|
||||
================
|
||||
Max Arms Per VD : 32
|
||||
Max Spans Per VD : 8
|
||||
Max Arrays : 128
|
||||
Max Number of VDs : 64
|
||||
Max Parallel Commands : 1008
|
||||
Max SGE Count : 80
|
||||
Max Data Transfer Size : 8192 sectors
|
||||
Max Strips PerIO : 42
|
||||
Min Stripe Size : 8kB
|
||||
Max Stripe Size : 1024kB
|
||||
|
||||
Device Present
|
||||
================
|
||||
Virtual Drives : 2
|
||||
Degraded : 0
|
||||
Offline : 0
|
||||
Physical Devices : 5
|
||||
Disks : 4
|
||||
Critical Disks : 0
|
||||
Failed Disks : 0
|
||||
|
||||
Supported Adapter Operations
|
||||
================
|
||||
Rebuild Rate : Yes
|
||||
CC Rate : Yes
|
||||
BGI Rate : Yes
|
||||
Reconstruct Rate : Yes
|
||||
Patrol Read Rate : Yes
|
||||
Alarm Control : Yes
|
||||
Cluster Support : No
|
||||
BBU : Yes
|
||||
Spanning : Yes
|
||||
Dedicated Hot Spare : Yes
|
||||
Revertible Hot Spares : No
|
||||
Foreign Config Import : Yes
|
||||
Self Diagnostic : Yes
|
||||
Allow Mixed Redundancy on Array : No
|
||||
Global Hot Spares : Yes
|
||||
Deny SCSI Passthrough : No
|
||||
Deny SMP Passthrough : No
|
||||
Deny STP Passthrough : No
|
||||
|
||||
Supported VD Operations
|
||||
================
|
||||
Read Policy : Yes
|
||||
Write Policy : Yes
|
||||
IO Policy : Yes
|
||||
Access Policy : Yes
|
||||
Disk Cache Policy : Yes
|
||||
Reconstruction : Yes
|
||||
Deny Locate : No
|
||||
Deny CC : No
|
||||
|
||||
Supported PD Operations
|
||||
================
|
||||
Force Online : Yes
|
||||
Force Offline : Yes
|
||||
Force Rebuild : Yes
|
||||
Deny Force Failed : No
|
||||
Deny Force Good/Bad : No
|
||||
Deny Missing Replace : No
|
||||
Deny Clear : No
|
||||
Deny Locate : No
|
||||
Disable Copyback : No
|
||||
Enable Copyback on SMART : No
|
||||
Enable Copyback to SSD on SMART error : No
|
||||
|
||||
Error Counters
|
||||
================
|
||||
Memory Correctable Errors : 0
|
||||
Memory Uncorrectable Errors : 0
|
||||
|
||||
Cluster Information
|
||||
================
|
||||
Cluster Permitted : No
|
||||
Cluster Active : No
|
||||
|
||||
Default Settings
|
||||
================
|
||||
Phy Polarity : 0
|
||||
Phy PolaritySplit : 0
|
||||
Background Rate : 30
|
||||
Stripe Size : 64kB
|
||||
Flush Time : 4 seconds
|
||||
Write Policy : WB
|
||||
Read Policy : None
|
||||
Cache When BBU Bad : Disabled
|
||||
Cached IO : No
|
||||
SMART Mode : Mode 6
|
||||
Alarm Disable : No
|
||||
Coercion Mode : 128MB
|
||||
ZCR Config : Unknown
|
||||
Dirty LED Shows Drive Activity : No
|
||||
BIOS Continue on Error : No
|
||||
Spin Down Mode : None
|
||||
Allowed Device Type : SAS/SATA Mix
|
||||
Allow Mix In Enclosure : Yes
|
||||
Allow HDD SAS/SATA Mix In VD : No
|
||||
Allow SSD SAS/SATA Mix In VD : No
|
||||
Allow HDD/SAS Mix In VD : No
|
||||
Allow SATA In Cluster : No
|
||||
Max Chained Enclosures : 1
|
||||
Disable Ctrl-R : No
|
||||
Enable Web BIOS : No
|
||||
Direct PD Mapping : Yes
|
||||
BIOS Enumerate VDs : Yes
|
||||
Restore Hot Spare on Insertion : No
|
||||
Expose Enclosure Devices : No
|
||||
Maintain PD Fail History : No
|
||||
Disable Puncturing : No
|
||||
Zero Based Enclosure Enumeration : Yes
|
||||
PreBoot CLI Enabled : No
|
||||
LED Show Drive Activity : No
|
||||
Cluster Disable : Yes
|
||||
SAS Disable : No
|
||||
Auto Detect BackPlane Enable : SGPIO/i2c SEP
|
||||
Delay during POST : 0
|
||||
|
||||
Exit Code: 0x00
|
||||
EOF
|
||||
parse_lsi_megaraid_adapter_info $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
26
t/pt-summary/netstat-summary-02 → t/pt-summary/parse_netstat.sh
Executable file → Normal file
26
t/pt-summary/netstat-summary-02 → t/pt-summary/parse_netstat.sh
Executable file → Normal file
@@ -1,7 +1,25 @@
|
||||
#!/bin/bash
|
||||
#parse_netstat
|
||||
|
||||
cat <<EOF > $1
|
||||
TESTS=2
|
||||
|
||||
TEST_NAME="netstat-001.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Connections from remote IP addresses
|
||||
192.168.243.72 1
|
||||
192.168.243.81 2
|
||||
Connections to local IP addresses
|
||||
192.168.243.71 3
|
||||
Connections to top 10 local ports
|
||||
3306 3
|
||||
States of connections
|
||||
ESTABLISHED 4
|
||||
LISTEN 15
|
||||
EOF
|
||||
parse_netstat samples/netstat-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="netstat-003.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Connections from remote IP addresses
|
||||
10.8.0.12 6
|
||||
10.8.0.14 2
|
||||
@@ -26,5 +44,5 @@ cat <<EOF > $1
|
||||
LISTEN 3
|
||||
TIME_WAIT 3
|
||||
EOF
|
||||
|
||||
cat samples/netstat-003.txt > $2
|
||||
parse_netstat samples/netstat-003.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
7
t/pt-summary/parse-proc-cpuinfo → t/pt-summary/parse_proc_cpuinfo.sh
Executable file → Normal file
7
t/pt-summary/parse-proc-cpuinfo → t/pt-summary/parse_proc_cpuinfo.sh
Executable file → Normal file
@@ -1,14 +1,13 @@
|
||||
#!/bin/bash
|
||||
#parse_proc_cpuinfo
|
||||
|
||||
cat <<EOF > $1
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Processors | physical = 1, cores = 2, virtual = 2, hyperthreading = no
|
||||
Speeds | 2x1300.000
|
||||
Models | 2xGenuine Intel(R) CPU U7300 @ 1.30GHz
|
||||
Caches | 2x3072 KB
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
cat <<EOF > $TMPDIR/in
|
||||
processor : 0
|
||||
vendor_id : GenuineIntel
|
||||
cpu family : 6
|
||||
@@ -68,3 +67,5 @@ address sizes : 36 bits physical, 48 bits virtual
|
||||
power management:
|
||||
|
||||
EOF
|
||||
parse_proc_cpuinfo $TMPDIR/in > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
31
t/pt-summary/parse_raid_controller_dmesg.sh
Normal file
31
t/pt-summary/parse_raid_controller_dmesg.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
TESTS=4
|
||||
|
||||
TEST_NAME="dmesg-001.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Fusion-MPT SAS
|
||||
EOF
|
||||
parse_raid_controller_dmesg samples/dmesg-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmesg-002.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
AACRAID
|
||||
EOF
|
||||
parse_raid_controller_dmesg samples/dmesg-002.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmesg-003.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
LSI Logic MegaRAID SAS
|
||||
EOF
|
||||
parse_raid_controller_dmesg samples/dmesg-003.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="dmesg-004.txt"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
AACRAID
|
||||
EOF
|
||||
parse_raid_controller_dmesg samples/dmesg-004.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
38
t/pt-summary/parse_raid_controller_lspci.sh
Normal file
38
t/pt-summary/parse_raid_controller_lspci.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
TEST=5
|
||||
|
||||
TEST_NAME="lspci-001.txt"
|
||||
<<EOF > $TMPDIR/expected
|
||||
Fusion-MPT SAS
|
||||
EOF
|
||||
parse_raid_controller_lspci samples/lspci-001.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="lspci-002.txt"
|
||||
<<EOF > $TMPDIR/expected
|
||||
LSI Logic Unknown
|
||||
EOF
|
||||
parse_raid_controller_lspci samples/lspci-002.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="lspci-003.txt"
|
||||
<<EOF > $TMPDIR/expected
|
||||
AACRAID
|
||||
EOF
|
||||
parse_raid_controller_lspci samples/lspci-003.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="lspci-004.txt"
|
||||
<<EOF > $TMPDIR/expected
|
||||
LSI Logic MegaRAID SAS
|
||||
EOF
|
||||
parse_raid_controller_lspci samples/lspci-004.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="lspci-006.txt"
|
||||
<<EOF > $TMPDIR/expected
|
||||
HP Smart Array
|
||||
EOF
|
||||
parse_raid_controller_lspci samples/lspci-006.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
7
t/pt-summary/parse_virtualization_dmesg.sh
Normal file
7
t/pt-summary/parse_virtualization_dmesg.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
Xen
|
||||
EOF
|
||||
parse_virtualization_dmesg samples/dmesg-006.txt > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
13
t/pt-summary/parse-dmidecode-mem-devices-01 → t/pt-summary/samples/dmidecode-001.txt
Executable file → Normal file
13
t/pt-summary/parse-dmidecode-mem-devices-01 → t/pt-summary/samples/dmidecode-001.txt
Executable file → Normal file
@@ -1,14 +1,3 @@
|
||||
#!/bin/bash
|
||||
#parse_dmidecode_mem_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
SODIMM0 2048 MB 800 MHz SODIMM Other Synchronous
|
||||
SODIMM1 2048 MB 800 MHz SODIMM Other Synchronous
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
# dmidecode 2.10
|
||||
SMBIOS 2.5 present.
|
||||
41 structures occupying 1867 bytes.
|
||||
@@ -461,5 +450,3 @@ OEM-specific Type
|
||||
|
||||
Handle 0x0028, DMI type 127, 4 bytes
|
||||
End Of Table
|
||||
|
||||
EOF
|
18
t/pt-summary/parse-dmidecode-mem-devices-02 → t/pt-summary/samples/dmidecode-002.txt
Executable file → Normal file
18
t/pt-summary/parse-dmidecode-mem-devices-02 → t/pt-summary/samples/dmidecode-002.txt
Executable file → Normal file
@@ -1,20 +1,3 @@
|
||||
#!/bin/bash
|
||||
#parse_dmidecode_mem_devices
|
||||
|
||||
cat <<EOF > $1
|
||||
Locator Size Speed Form Factor Type Type Detail
|
||||
========= ======== ================= ============= ============= ===========
|
||||
DIMM1 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM2 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM3 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM4 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM5 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM6 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM7 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
DIMM8 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
|
||||
EOF
|
||||
|
||||
cat <<EOF > $2
|
||||
# dmidecode 2.7
|
||||
SMBIOS 2.4 present.
|
||||
64 structures occupying 3240 bytes.
|
||||
@@ -747,4 +730,3 @@ OEM-specific Type
|
||||
|
||||
Handle 0x7F00, DMI type 127, 4 bytes.
|
||||
End Of Table
|
||||
EOF
|
Reference in New Issue
Block a user