Combine and update all pt-summary tests to new format.

This commit is contained in:
Daniel Nichter
2011-08-19 10:46:55 -06:00
parent d50c1699cd
commit 94e6b7a5e8
49 changed files with 1163 additions and 1162 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_dmesg
cat <<EOF > $1
Fusion-MPT SAS
EOF
cat samples/dmesg-001.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_dmesg
cat <<EOF > $1
AACRAID
EOF
cat samples/dmesg-002.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_dmesg
cat <<EOF > $1
LSI Logic MegaRAID SAS
EOF
cat samples/dmesg-003.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_dmesg
cat <<EOF > $1
AACRAID
EOF
cat samples/dmesg-004.txt > $2

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_lspci
cat <<EOF > $1
Fusion-MPT SAS
EOF
cat samples/lspci-001.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_lspci
cat <<EOF > $1
LSI Logic Unknown
EOF
cat samples/lspci-002.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_lspci
cat <<EOF > $1
AACRAID
EOF
cat samples/lspci-003.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_lspci
cat <<EOF > $1
LSI Logic MegaRAID SAS
EOF
cat samples/lspci-004.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_raid_controller_lspci
cat <<EOF > $1
HP Smart Array
EOF
cat samples/lspci-006.txt > $2

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#parse_virtualization_dmesg
cat <<EOF > $1
Xen
EOF
cat samples/dmesg-006.txt > $2

View 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

View 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

View 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

View 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

View File

@@ -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
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
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
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
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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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