5
. "$LIB_DIR/alt_cmds.sh"
6
. "$LIB_DIR/log_warn_die.sh"
7
. "$LIB_DIR/parse_options.sh"
8
. "$LIB_DIR/summary_common.sh"
9
. "$LIB_DIR/report_formatting.sh"
10
. "$LIB_DIR/report_system_info.sh"
13
PATH="$PATH:$PERCONA_TOOLKIT_SANDBOX/bin"
16
samples="$PERCONA_TOOLKIT_BRANCH/t/pt-summary/samples"
21
cat <<EOF > "$TMPDIR/expected"
22
Processors | physical = 1, cores = 2, virtual = 2, hyperthreading = no
24
Models | 2xGenuine Intel(R) CPU U7300 @ 1.30GHz
28
parse_proc_cpuinfo "$samples/proc_cpuinfo001.txt" > "$TMPDIR/got"
29
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_proc_cpuinfo, proc_cpuinfo001.txt"
31
cat <<EOF > "$TMPDIR/expected"
32
Processors | physical = 1, cores = 1, virtual = 2, hyperthreading = yes
34
Models | 2xIntel(R) Atom(TM) CPU N455 @ 1.66GHz
38
parse_proc_cpuinfo "$samples/proc_cpuinfo002.txt" > "$TMPDIR/got"
39
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_proc_cpuinfo, proc_cpuinfo002.txt"
42
cat <<EOF > "$TMPDIR/in"
44
Supported ports: [ TP MII ]
45
Supported link modes: 10baseT/Half 10baseT/Full
46
100baseT/Half 100baseT/Full
47
Supports auto-negotiation: Yes
48
Advertised link modes: 10baseT/Half 10baseT/Full
49
100baseT/Half 100baseT/Full
50
Advertised pause frame use: Symmetric Receive-only
51
Advertised auto-negotiation: Yes
58
Supports Wake-on: pumbg
60
Current message level: 0x00000033 (51)
65
cat <<EOF > "$TMPDIR/expected"
67
========= ========= =========
71
parse_ethtool "$TMPDIR/in" > "$TMPDIR/got"
77
cat <<EOF > "$TMPDIR/in"
79
Supported ports: [ TP MII ]
80
Supported link modes: 10baseT/Half 10baseT/Full
81
100baseT/Half 100baseT/Full
82
Supports auto-negotiation: Yes
83
Advertised link modes: 10baseT/Half 10baseT/Full
84
100baseT/Half 100baseT/Full
85
Advertised pause frame use: Symmetric Receive-only
86
Advertised auto-negotiation: Yes
93
Supports Wake-on: pumbg
95
Current message level: 0x00000033 (51)
99
Supported ports: [ TP MII ]
100
Supported link modes: 10baseT/Half 10baseT/Full
101
100baseT/Half 100baseT/Full
102
Supports auto-negotiation: Yes
103
Advertised link modes: 10baseT/Half 10baseT/Full
104
100baseT/Half 100baseT/Full
105
Advertised pause frame use: Symmetric Receive-only
106
Advertised auto-negotiation: Yes
111
Transceiver: internal
113
Supports Wake-on: pumbg
115
Current message level: 0x00000033 (51)
116
drv probe ifdown ifup
120
cat <<EOF > "$TMPDIR/expected"
122
========= ========= =========
127
parse_ethtool "$TMPDIR/in" > "$TMPDIR/got"
131
"parse_ethtool works if there are multiple devices"
135
cat <<EOF > $TMPDIR/expected
136
Connections from remote IP addresses
139
Connections to local IP addresses
141
Connections to top 10 local ports
143
States of connections
147
parse_netstat "$samples/netstat-001.txt" > "$TMPDIR/got"
148
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_netstat, netstat-001.txt"
150
cat <<EOF > "$TMPDIR/expected"
151
Connections from remote IP addresses
166
Connections to local IP addresses
169
Connections to top 10 local ports
179
States of connections
184
parse_netstat "$samples/netstat-002.txt" > "$TMPDIR/got"
185
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_netstat, netstat-002.txt"
187
cat <<EOF > "$TMPDIR/expected"
188
Connections from remote IP addresses
195
Connections to local IP addresses
197
Connections to top 10 local ports
207
States of connections
213
parse_netstat "$samples/netstat-003.txt" > "$TMPDIR/got"
214
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_netstat, netstat-003.txt"
218
cat <<EOF > "$TMPDIR/expected"
219
BBU | 100% Charged, Temperature 18C, isSOHGood=Yes
222
cat <<EOF > "$TMPDIR/in"
223
BBU status for Adapter: 0
229
Firmware Status: 00000000
234
Fully Discharged : No
238
Remaining Time Alarm : No
239
Remaining Capacity Alarm: No
240
Discharge Terminated : No
241
Over Temperature : No
242
Charging Terminated : No
245
Relative State of Charge: 100 %
246
Charger Status: Complete
247
Remaining Capacity: 867 mAh
248
Full Charge Capacity: 867 mAh
253
parse_lsi_megaraid_bbu_status "$TMPDIR/in" > "$TMPDIR/got"
254
no_diff "$TMPDIR/got" "$TMPDIR/expected"
256
# ############################################################################
257
cat <<EOF > "$TMPDIR/expected"
259
PhysiclDev Type State Errors Vendor Model Size
260
========== ==== ======= ====== ======= ============ ===========
261
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
262
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
263
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
264
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
267
cat <<EOF > "$TMPDIR/in"
271
Enclosure Device ID: 32
277
Predictive Failure Count: 0
278
Last Predictive Failure Event Seq Number: 0
280
Raw Size: 70007MB [0x88bb93a Sectors]
281
Non Coerced Size: 69495MB [0x87bb93a Sectors]
282
Coerced Size: 69376MB [0x8780000 Sectors]
283
Firmware state: Online
284
SAS Address(0): 0x5000c500079f8cf9
286
Connected Port Number: 0(path0)
287
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
289
Media Type: Hard Disk Device
291
Enclosure Device ID: 32
297
Predictive Failure Count: 0
298
Last Predictive Failure Event Seq Number: 0
300
Raw Size: 70007MB [0x88bb93a Sectors]
301
Non Coerced Size: 69495MB [0x87bb93a Sectors]
302
Coerced Size: 69376MB [0x8780000 Sectors]
303
Firmware state: Online
304
SAS Address(0): 0x5000c500079f5c35
306
Connected Port Number: 1(path0)
307
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
309
Media Type: Hard Disk Device
311
Enclosure Device ID: 32
317
Predictive Failure Count: 0
318
Last Predictive Failure Event Seq Number: 0
320
Raw Size: 70007MB [0x88bb93a Sectors]
321
Non Coerced Size: 69495MB [0x87bb93a Sectors]
322
Coerced Size: 69376MB [0x8780000 Sectors]
323
Firmware state: Online
324
SAS Address(0): 0x5000c500079fc0c9
326
Connected Port Number: 2(path0)
327
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
329
Media Type: Hard Disk Device
331
Enclosure Device ID: 32
337
Predictive Failure Count: 0
338
Last Predictive Failure Event Seq Number: 0
340
Raw Size: 70007MB [0x88bb93a Sectors]
341
Non Coerced Size: 69495MB [0x87bb93a Sectors]
342
Coerced Size: 69376MB [0x8780000 Sectors]
343
Firmware state: Online
344
SAS Address(0): 0x5000c500079dc339
346
Connected Port Number: 3(path0)
347
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
349
Media Type: Hard Disk Device
354
parse_lsi_megaraid_devices "$TMPDIR/in" > "$TMPDIR/got"
355
no_diff "$TMPDIR/got" "$TMPDIR/expected"
358
# ############################################################################
359
cat <<EOF > "$TMPDIR/expected"
361
PhysiclDev Type State Errors Vendor Model Size
362
========== ==== ======= ====== ======= ============ ===========
363
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
364
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
365
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
366
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
369
cat <<EOF > "$TMPDIR/in"
370
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
374
Number of Virtual Disks: 2
375
Virtual Disk: 0 (Target Id: 0)
377
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
383
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
384
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
385
Access Policy: Read/Write
386
Disk Cache Policy: Disk's Default
388
Span: 0 - Number of PDs: 2
390
Enclosure Device ID: 32
396
Predictive Failure Count: 0
397
Last Predictive Failure Event Seq Number: 0
399
Raw Size: 70007MB [0x88bb93a Sectors]
400
Non Coerced Size: 69495MB [0x87bb93a Sectors]
401
Coerced Size: 69376MB [0x8780000 Sectors]
402
Firmware state: Online
403
SAS Address(0): 0x5000c500079f8cf9
405
Connected Port Number: 0(path0)
406
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
408
Media Type: Hard Disk Device
411
Enclosure Device ID: 32
417
Predictive Failure Count: 0
418
Last Predictive Failure Event Seq Number: 0
420
Raw Size: 70007MB [0x88bb93a Sectors]
421
Non Coerced Size: 69495MB [0x87bb93a Sectors]
422
Coerced Size: 69376MB [0x8780000 Sectors]
423
Firmware state: Online
424
SAS Address(0): 0x5000c500079f5c35
426
Connected Port Number: 1(path0)
427
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
429
Media Type: Hard Disk Device
431
Virtual Disk: 1 (Target Id: 1)
433
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
439
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
440
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
441
Access Policy: Read/Write
442
Disk Cache Policy: Disk's Default
444
Span: 0 - Number of PDs: 2
446
Enclosure Device ID: 32
452
Predictive Failure Count: 0
453
Last Predictive Failure Event Seq Number: 0
455
Raw Size: 70007MB [0x88bb93a Sectors]
456
Non Coerced Size: 69495MB [0x87bb93a Sectors]
457
Coerced Size: 69376MB [0x8780000 Sectors]
458
Firmware state: Online
459
SAS Address(0): 0x5000c500079fc0c9
461
Connected Port Number: 2(path0)
462
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
464
Media Type: Hard Disk Device
467
Enclosure Device ID: 32
473
Predictive Failure Count: 0
474
Last Predictive Failure Event Seq Number: 0
476
Raw Size: 70007MB [0x88bb93a Sectors]
477
Non Coerced Size: 69495MB [0x87bb93a Sectors]
478
Coerced Size: 69376MB [0x8780000 Sectors]
479
Firmware state: Online
480
SAS Address(0): 0x5000c500079dc339
482
Connected Port Number: 3(path0)
483
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
485
Media Type: Hard Disk Device
490
parse_lsi_megaraid_devices "$TMPDIR/in" > "$TMPDIR/got"
491
no_diff "$TMPDIR/got" "$TMPDIR/expected"
493
# ############################################################################
494
cat <<EOF > "$TMPDIR/expected"
496
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
497
========== ========= ========== ===== ======= ====== ======= =========
498
0(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
499
1(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
502
cat <<EOF > "$TMPDIR/in"
503
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
507
Number of Virtual Disks: 2
508
Virtual Disk: 0 (Target Id: 0)
510
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
516
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
517
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
518
Access Policy: Read/Write
519
Disk Cache Policy: Disk's Default
521
Span: 0 - Number of PDs: 2
523
Enclosure Device ID: 32
529
Predictive Failure Count: 0
530
Last Predictive Failure Event Seq Number: 0
532
Raw Size: 70007MB [0x88bb93a Sectors]
533
Non Coerced Size: 69495MB [0x87bb93a Sectors]
534
Coerced Size: 69376MB [0x8780000 Sectors]
535
Firmware state: Online
536
SAS Address(0): 0x5000c500079f8cf9
538
Connected Port Number: 0(path0)
539
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
541
Media Type: Hard Disk Device
544
Enclosure Device ID: 32
550
Predictive Failure Count: 0
551
Last Predictive Failure Event Seq Number: 0
553
Raw Size: 70007MB [0x88bb93a Sectors]
554
Non Coerced Size: 69495MB [0x87bb93a Sectors]
555
Coerced Size: 69376MB [0x8780000 Sectors]
556
Firmware state: Online
557
SAS Address(0): 0x5000c500079f5c35
559
Connected Port Number: 1(path0)
560
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
562
Media Type: Hard Disk Device
564
Virtual Disk: 1 (Target Id: 1)
566
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
572
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
573
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
574
Access Policy: Read/Write
575
Disk Cache Policy: Disk's Default
577
Span: 0 - Number of PDs: 2
579
Enclosure Device ID: 32
585
Predictive Failure Count: 0
586
Last Predictive Failure Event Seq Number: 0
588
Raw Size: 70007MB [0x88bb93a Sectors]
589
Non Coerced Size: 69495MB [0x87bb93a Sectors]
590
Coerced Size: 69376MB [0x8780000 Sectors]
591
Firmware state: Online
592
SAS Address(0): 0x5000c500079fc0c9
594
Connected Port Number: 2(path0)
595
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
597
Media Type: Hard Disk Device
600
Enclosure Device ID: 32
606
Predictive Failure Count: 0
607
Last Predictive Failure Event Seq Number: 0
609
Raw Size: 70007MB [0x88bb93a Sectors]
610
Non Coerced Size: 69495MB [0x87bb93a Sectors]
611
Coerced Size: 69376MB [0x8780000 Sectors]
612
Firmware state: Online
613
SAS Address(0): 0x5000c500079dc339
615
Connected Port Number: 3(path0)
616
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
618
Media Type: Hard Disk Device
623
parse_lsi_megaraid_virtual_devices "$TMPDIR/in" > "$TMPDIR/got"
624
no_diff "$TMPDIR/got" "$TMPDIR/expected"
626
# ############################################################################
627
cat <<EOF > "$TMPDIR/expected"
629
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
630
========== ========= ========== ===== ======= ====== ======= =========
631
0(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
632
1(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
635
cat <<EOF > "$TMPDIR/in"
636
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll
639
Adapter 0 -- Virtual Drive Information:
640
Virtual Disk: 0 (Target Id: 0)
642
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
648
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
649
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
650
Access Policy: Read/Write
651
Disk Cache Policy: Disk's Default
652
Virtual Disk: 1 (Target Id: 1)
654
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
660
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
661
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
662
Access Policy: Read/Write
663
Disk Cache Policy: Disk's Default
667
parse_lsi_megaraid_virtual_devices "$TMPDIR/in" > "$TMPDIR/got"
668
no_diff "$TMPDIR/got" "$TMPDIR/expected"
671
# ############################################################################
672
cat <<EOF > "$TMPDIR/expected"
673
Model | PERC 6/i Integrated, PCIE interface, 8 ports
674
Cache | 256MB Memory, BBU Present
677
parse_lsi_megaraid_adapter_info "$samples/MegaCli64_AdpAllInfo_aALL001.txt" > "$TMPDIR/got"
678
no_diff "$TMPDIR/got" "$TMPDIR/expected"
681
cat <<EOF > "$TMPDIR/expected"
683
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
684
========== ========= ========== ===== ======= ====== ======= =========
685
0(no name) 135.5 GB 0 (:-1-0) 2 Depth-2 64 KB Optimal WB, no RA
687
parse_lsi_megaraid_virtual_devices "$PERCONA_TOOLKIT_BRANCH/t/pt-summary/samples/MegaCli64_LdPdInfo_aALL_886223" > "$TMPDIR/got"
688
no_diff "$TMPDIR/got" "$TMPDIR/expected" "Bug 886223"
692
cat <<EOF > "$TMPDIR/expected"
693
logicaldrive 1 (136.7 GB, RAID 1, OK)
694
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
695
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
698
cat <<EOF > "$TMPDIR/in"
700
Smart Array P400i in Slot 0 (Embedded) (sn: PH73MU7325 )
702
array A (SAS, Unused Space: 0 MB)
705
logicaldrive 1 (136.7 GB, RAID 1, OK)
707
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
708
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
711
parse_hpacucli "$TMPDIR/in" > "$TMPDIR/got"
712
no_diff "$TMPDIR/got" "$TMPDIR/expected"
714
parse_hpacucli "$samples/hpaculi-003.txt" > "$TMPDIR/got"
716
"$(cat "$TMPDIR/got")" \
718
"parse_hpacucli, hpaculi-003.txt"
720
# parse_fusionmpt_lsiutil
722
cat <<EOF > "$TMPDIR/expected"
724
/proc/mpt/ioc0 LSI Logic SAS1068E B3 MPT 105 Firmware 00192f00 IOC 0
725
B___T___L Type Vendor Product Rev SASAddress PhyNum
726
0 0 0 Disk Dell VIRTUAL DISK 1028
727
0 2 0 Disk Dell VIRTUAL DISK 1028
728
0 8 0 EnclServ DP BACKPLANE 1.05 510240805f4feb00 8
730
B___T Device Vendor Product Rev SASAddress PhyNum
731
0 1 PhysDisk 0 SEAGATE ST373455SS S52A 5000c50012a8ac61 1
732
0 9 PhysDisk 1 SEAGATE ST373455SS S52A 5000c50012a8a24d 0
733
0 3 PhysDisk 2 SEAGATE ST3146855SS S52A 5000c500130fcaed 3
734
0 10 PhysDisk 3 SEAGATE ST3146855SS S52A 5000c500131093f5 2
736
parse_fusionmpt_lsiutil "$samples/lsiutil-001.txt" > "$TMPDIR/got"
737
no_diff "$TMPDIR/got" "$TMPDIR/expected" "lsiutil-001.txt"
739
cat <<EOF > "$TMPDIR/expected"
741
/proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0
742
B___T___L Type Vendor Product Rev SASAddress PhyNum
743
0 1 0 Disk LSILOGIC Logical Volume 3000
745
B___T Device Vendor Product Rev SASAddress PhyNum
746
0 2 PhysDisk 0 IBM-ESXS ST9300603SS F B536 5000c5001d784329 1
747
0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17152 0
749
parse_fusionmpt_lsiutil "$samples/lsiutil-002.txt" > "$TMPDIR/got"
750
no_diff "$TMPDIR/got" "$TMPDIR/expected" "lsiutil-002.txt"
752
cat <<EOF > "$TMPDIR/expected"
754
/proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0
755
B___T___L Type Vendor Product Rev SASAddress PhyNum
756
0 1 0 Disk LSILOGIC Logical Volume 3000
758
B___T Device Vendor Product Rev SASAddress PhyNum
759
0 2 PhysDisk 0 IBM-ESXS MBD2300RC SB17 500000e113c00ed2 1
760
0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17ee2 0
762
parse_fusionmpt_lsiutil "$samples/lsiutil-003.txt" > "$TMPDIR/got"
763
no_diff "$TMPDIR/got" "$TMPDIR/expected" "lsiutil-003.txt"
767
cat <<EOF > "$TMPDIR/expected"
770
Used | physical = 2.5G, swap allocated = 4.9G, swap used = 0.0, virtual = 2.5G
776
cat <<EOF > "$TMPDIR/in"
777
total used free shared buffers cached
778
Mem: 4182048768 2653696000 1528352768 0 138240000 2060787712
779
-/+ buffers/cache: 454668288 3727380480
780
Swap: 5284814848 0 5284814848
788
Active(anon): 244720 kB
789
Inactive(anon): 40572 kB
790
Active(file): 334992 kB
791
Inactive(file): 900864 kB
794
HighTotal: 3251848 kB
798
SwapTotal: 5144572 kB
806
SReclaimable: 107672 kB
813
CommitLimit: 7186592 kB
814
Committed_AS: 1192140 kB
815
VmallocTotal: 122880 kB
816
VmallocUsed: 32276 kB
817
VmallocChunk: 65120 kB
818
HardwareCorrupted: 0 kB
823
Hugepagesize: 2048 kB
824
DirectMap4k: 10232 kB
825
DirectMap2M: 897024 kB
827
parse_free_minus_b "$TMPDIR/in" > "$TMPDIR/got"
828
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_free_minus_b"
832
cat <<EOF > $TMPDIR/expected
833
Filesystem Size Used Type Opts Mountpoint
834
/dev/sda1 99M 13% ext3 rw /boot
835
/dev/sda2 540G 89% ext3 rw /
836
tmpfs 48G 0% tmpfs rw /dev/shm
838
parse_filesystems "$samples/df-mount-003.txt" "Linux" > "$TMPDIR/got"
839
no_diff "$TMPDIR/got" "$TMPDIR/expected" "df-mount-003.txt Linux"
841
cat <<EOF > $TMPDIR/expected
842
Filesystem Size Used Type Opts Mountpoint
843
/dev/sda1 9.9G 34% ext3 rw /
844
/dev/sdb 414G 1% ext3 rw /mnt
845
none 7.6G 0% devpts rw,gid=5,mode=620 /dev/shm
846
none 7.6G 0% tmpfs rw /dev/shm
847
none 7.6G 0% binfmt_misc rw /dev/shm
848
none 7.6G 0% proc rw /dev/shm
849
none 7.6G 0% sysfs rw /dev/shm
851
parse_filesystems "$samples/df-mount-004.txt" "Linux" > "$TMPDIR/got"
852
no_diff "$TMPDIR/got" "$TMPDIR/expected" "df-mount-004.txt Linux"
854
cat <<EOF > $TMPDIR/expected
855
Filesystem Size Used Type Opts Mountpoint
856
/dev/cciss/c0d0p1 99M 24% ext3 rw /boot
857
/dev/mapper/VolGroup00-LogVol00 194G 58% ext3 rw /
858
/dev/mapper/VolGroup00-mysql_log 191G 4% ext3 rw /data/mysql-log
859
/dev/mapper/VolGroup01-mysql_data 1008G 44% ext3 rw,noatime /data/mysql-data
860
tmpfs 48G 0% tmpfs rw /dev/shm
862
parse_filesystems "$samples/df-mount-005.txt" "Linux" > "$TMPDIR/got"
863
no_diff "$TMPDIR/got" "$TMPDIR/expected" "df-mount-005.txt Linux"
865
cat <<EOF > $TMPDIR/expected
866
Filesystem Size Used Type Opts Mountpoint
867
/dev/ad0s1a 496M 32% ufs local /
868
/dev/ad0s1d 1.1G 1% ufs local, soft-updates /var
869
/dev/ad0s1e 496M 0% ufs local, soft-updates /tmp
870
/dev/ad0s1f 17G 9% ufs local, soft-updates /usr
871
devfs 1.0K 100% devfs local /dev
873
parse_filesystems "$samples/df-mount-006.txt" "FreeBSD" > "$TMPDIR/got"
874
no_diff "$TMPDIR/got" "$TMPDIR/expected" "df-mount-006.txt FreeBSD"
878
cat <<EOF > "$TMPDIR/expected"
879
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
880
========= ========= ========== ========== ========== ========== ==========
881
lo 3000000 25000 0 3000000 25000 0
882
eth0 175000000 30000000 0 125000000 900000 0
883
wlan0 50000000 80000 0 20000000 90000 0
886
parse_ip_s_link "$samples/ip-s-link-001.txt" > $TMPDIR/got
887
no_diff "$TMPDIR/got" "$TMPDIR/expected" "ip-s-link-001.txt"
889
cat <<EOF > "$TMPDIR/expected"
890
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
891
========= ========= ========== ========== ========== ========== ==========
892
lo 3500000000 350000000 0 3500000000 350000000 0
893
eth0 1750000000 1250000000 0 3500000000 700000000 0
894
eth1 1250000000 60000000 0 900000000 50000000 0
897
parse_ip_s_link "$samples/ip-s-link-002.txt" > "$TMPDIR/got"
898
no_diff "$TMPDIR/got" "$TMPDIR/expected" "ip-s-link-002.txt"
900
cat <<EOF > "$TMPDIR/expected"
901
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
902
========= ========= ========== ========== ========== ========== ==========
903
lo 25000000 300000 0 25000000 300000 0
908
parse_ip_s_link "$samples/ip-s-link-003.txt" > "$TMPDIR/got"
909
no_diff "$TMPDIR/got" "$TMPDIR/expected" "ip-s-link-003.txt"
913
cat <<EOF > "$TMPDIR/expected"
914
Device Type Start End Size
915
============ ==== ========== ========== ==================
916
/dev/dm-0 Disk 494609104896
917
/dev/dm-1 Disk 5284823040
918
/dev/sda Disk 500107862016
919
/dev/sda1 Part 1 26 205632000
920
/dev/sda2 Part 26 60801 499891392000
922
parse_fdisk "$samples/fdisk-01.txt" > "$TMPDIR/got"
923
no_diff "$TMPDIR/got" "$TMPDIR/expected" "parse_fdisk"
925
# parse_ethernet_controller_lspci
927
cat <<EOF > $TMPDIR/expected
928
Controller | Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
929
Controller | Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
931
parse_ethernet_controller_lspci "$samples/lspci-001.txt" > "$TMPDIR/got"
932
no_diff "$TMPDIR/got" "$TMPDIR/expected"
934
# parse_dmidecode_mem_devices
936
cat <<EOF > $TMPDIR/expected
937
Locator Size Speed Form Factor Type Type Detail
938
========= ======== ================= ============= ============= ===========
939
SODIMM0 2048 MB 800 MHz SODIMM Other Synchronous
940
SODIMM1 2048 MB 800 MHz SODIMM Other Synchronous
942
parse_dmidecode_mem_devices "$samples/dmidecode-001.txt" > $TMPDIR/got
943
no_diff "$TMPDIR/got" "$TMPDIR/expected" "dmidecode-001.tx"
945
cat <<EOF > "$TMPDIR/expected"
946
Locator Size Speed Form Factor Type Type Detail
947
========= ======== ================= ============= ============= ===========
948
DIMM1 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
949
DIMM2 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
950
DIMM3 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
951
DIMM4 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
952
DIMM5 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
953
DIMM6 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
954
DIMM7 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
955
DIMM8 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous
957
parse_dmidecode_mem_devices "$samples/dmidecode-002.txt" > "$TMPDIR/got"
958
no_diff "$TMPDIR/got" "$TMPDIR/expected" "dmidecode-002.tx"
960
cat <<EOF > "$TMPDIR/expected"
961
Locator Size Speed Form Factor Type Type Detail
962
========= ======== ================= ============= ============= ===========
963
1024 kB 33 MHz Other Flash Non-Volatile
964
D5 4096 MB 1066 MHz DIMM Other Other
965
D8 4096 MB 1066 MHz DIMM Other Other
966
D0 {EMPTY} 1333 MHz DIMM Other Other
967
D0 {EMPTY} 1333 MHz DIMM Other Other
968
D1 {EMPTY} 1333 MHz DIMM Other Other
969
D1 {EMPTY} 1333 MHz DIMM Other Other
970
D2 {EMPTY} 1333 MHz DIMM Other Other
971
D2 {EMPTY} 1333 MHz DIMM Other Other
972
D3 {EMPTY} 1333 MHz DIMM Other Other
973
D3 {EMPTY} 1333 MHz DIMM Other Other
974
D4 {EMPTY} 1333 MHz DIMM Other Other
975
D4 {EMPTY} 1333 MHz DIMM Other Other
976
D5 {EMPTY} 1333 MHz DIMM Other Other
977
D6 {EMPTY} 1333 MHz DIMM Other Other
978
D6 {EMPTY} 1333 MHz DIMM Other Other
979
D7 {EMPTY} 1333 MHz DIMM Other Other
980
D7 {EMPTY} 1333 MHz DIMM Other Other
981
D8 {EMPTY} 1333 MHz DIMM Other Other
983
parse_dmidecode_mem_devices "$samples/dmidecode-003.txt" > "$TMPDIR/got"
984
no_diff "$TMPDIR/got" "$TMPDIR/expected" "dmidecode-003.txt"
986
cat <<EOF > "$TMPDIR/expected"
987
Locator Size Speed Form Factor Type Type Detail
988
========= ======== ================= ============= ============= ===========
989
DIMM_A2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
990
DIMM_A3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
991
DIMM_A5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
992
DIMM_A6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
993
DIMM_B2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
994
DIMM_B3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
995
DIMM_B5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
996
DIMM_B6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
997
DIMM_A1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
998
DIMM_A4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
999
DIMM_B1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
1000
DIMM_B4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
1002
parse_dmidecode_mem_devices "$samples/dmidecode-004.txt" > "$TMPDIR/got"
1003
no_diff "$TMPDIR/got" "$TMPDIR/expected" "dmidecode-004.txt"
1005
cat <<EOF > "$TMPDIR/expected"
1006
Locator Size Speed Form Factor Type Type Detail
1007
========= ======== ================= ============= ============= ===========
1008
P1-DIMM1A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
1009
P1-DIMM2A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
1010
P1-DIMM3A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
1011
P2-DIMM1A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
1012
P2-DIMM2A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
1013
P2-DIMM3A 16384 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Other
1014
4096 kB 33 MHz (30.3 ns) Other Flash Non-Volatile
1015
P1-DIMM1B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1016
P1-DIMM1C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1017
P1-DIMM2B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1018
P1-DIMM2C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1019
P1-DIMM3B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1020
P1-DIMM3C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1021
P2-DIMM1B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1022
P2-DIMM1C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1023
P2-DIMM2B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1024
P2-DIMM2C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1025
P2-DIMM3B {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1026
P2-DIMM3C {EMPTY} Unknown DIMM {OUT OF SPEC} Other
1028
parse_dmidecode_mem_devices "$samples/dmidecode-005.txt" > "$TMPDIR/got"
1029
no_diff "$TMPDIR/got" "$TMPDIR/expected" "dmidecode-005.txt"
1033
cat <<EOF > "$TMPDIR/expected"
1034
Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal
1035
Battery | 99%, 3d1h11m remaining, Optimal
1037
LogicalDev Size RAID Disks Stripe Status Cache
1038
========== ========= ==== ===== ====== ======= =======
1039
raid10 279800 MB 10 4 256 KB Optimal On (WB)
1041
PhysiclDev State Speed Vendor Model Size Cache
1042
========== ======= ============= ======= ============ =========== =======
1043
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146855SS 140014 MB On (WB)
1044
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146356SS 140014 MB On (WB)
1045
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146356SS 140014 MB On (WB)
1046
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146855SS 140014 MB On (WB)
1049
cat <<EOF > "$TMPDIR/in"
1050
# /usr/StorMan/arcconf getconfig 1
1051
Controllers found: 1
1052
----------------------------------------------------------------------
1053
Controller information
1054
----------------------------------------------------------------------
1055
Controller Status : Optimal
1056
Channel description : SAS/SATA
1057
Controller Model : Adaptec 3405
1058
Controller Serial Number : 8C16103E017
1060
Temperature : 35 C/ 95 F (Normal)
1061
Installed memory : 128 MB
1063
Background consistency check : Disabled
1064
Automatic Failover : Enabled
1065
Global task priority : High
1066
Stayawake period : Disabled
1067
Spinup limit internal drives : 0
1068
Spinup limit external drives : 0
1069
Defunct disk drive count : 0
1070
Logical devices/Failed/Degraded : 1/0/0
1071
--------------------------------------------------------
1072
Controller Version Information
1073
--------------------------------------------------------
1074
BIOS : 5.2-0 (17304)
1075
Firmware : 5.2-0 (17304)
1076
Driver : 1.1-5 (2461)
1077
Boot Flash : 5.2-0 (17304)
1078
--------------------------------------------------------
1079
Controller Battery Information
1080
--------------------------------------------------------
1082
Over temperature : No
1083
Capacity remaining : 99 percent
1084
Time remaining (at current draw) : 3 days, 1 hours, 11 minutes
1086
----------------------------------------------------------------------
1087
Logical device information
1088
----------------------------------------------------------------------
1089
Logical device number 0
1090
Logical device name : raid10
1092
Status of logical device : Optimal
1094
Stripe-unit size : 256 KB
1095
Read-cache mode : Enabled
1096
Write-cache mode : Enabled (write-back)
1097
Write-cache setting : Enabled (write-back) when protected by battery
1098
Partitioned : Unknown
1099
Protected by Hot-Spare : No
1102
Power settings : Disabled
1103
--------------------------------------------------------
1104
Logical device segment information
1105
--------------------------------------------------------
1106
Group 0, Segment 0 : Present (0,0) 3LN6552C00009903T8E4
1107
Group 0, Segment 1 : Present (0,1) 3QN26HL400009009KZ0Q
1108
Group 1, Segment 0 : Present (0,2) 3QN1S2AN00009001XVFZ
1109
Group 1, Segment 1 : Present (0,3) 3LN648WZ00009903T916
1112
----------------------------------------------------------------------
1113
Physical Device information
1114
----------------------------------------------------------------------
1116
Device is a Hard drive
1119
Transfer Speed : SAS 3.0 Gb/s
1120
Reported Channel,Device(T:L) : 0,0(0:0)
1121
Reported Location : Connector 0, Device 0
1125
Serial number : 3LN6552C00009903T8E4
1126
World-wide name : 5000C5000C4DDBB8
1128
Write Cache : Enabled (write-back)
1132
Device is a Hard drive
1135
Transfer Speed : SAS 3.0 Gb/s
1136
Reported Channel,Device(T:L) : 0,1(1:0)
1137
Reported Location : Connector 0, Device 1
1141
Serial number : 3QN26HL400009009KZ0Q
1142
World-wide name : 5000C50016F5E66C
1144
Write Cache : Enabled (write-back)
1148
Device is a Hard drive
1151
Transfer Speed : SAS 3.0 Gb/s
1152
Reported Channel,Device(T:L) : 0,2(2:0)
1153
Reported Location : Connector 0, Device 2
1157
Serial number : 3QN1S2AN00009001XVFZ
1158
World-wide name : 5000C50016F5EF4C
1160
Write Cache : Enabled (write-back)
1164
Device is a Hard drive
1167
Transfer Speed : SAS 3.0 Gb/s
1168
Reported Channel,Device(T:L) : 0,3(3:0)
1169
Reported Location : Connector 0, Device 3
1173
Serial number : 3LN648WZ00009903T916
1174
World-wide name : 5000C5000C4DEA60
1176
Write Cache : Enabled (write-back)
1181
Command completed successfully.
1184
parse_arcconf "$TMPDIR/in" > "$TMPDIR/got"
1185
no_diff "$TMPDIR/got" "$TMPDIR/expected"
1187
cat <<EOF > "$TMPDIR/expected"
1188
Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal
1189
Battery | 99%, 3d1h11m remaining, Optimal
1191
LogicalDev Size RAID Disks Stripe Status Cache
1192
========== ========= ==== ===== ====== ======= =======
1193
Raid10-A 571392 MB 10 4 256 KB Optimal On (WB)
1195
PhysiclDev State Speed Vendor Model Size Cache
1196
========== ======= ============= ======= ============ =========== =======
1197
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
1198
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
1199
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
1200
Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB)
1202
parse_arcconf "$samples/arcconf-002.txt" > "$TMPDIR/got"
1203
no_diff "$TMPDIR/got" "$TMPDIR/expected" "arcconf-002.txt"
1205
# Launchpad 917781, parse_arcconf doesn't work with ZMM
1206
# https://bugs.launchpad.net/percona-toolkit/+bug/917781
1207
cat <<EOF > "$TMPDIR/expected"
1208
Specs | Adaptec 5405Z, SAS/SATA, 512 MB cache, Optimal
1209
Battery | ZMM Optimal
1211
LogicalDev Size RAID Disks Stripe Status Cache
1212
========== ========= ==== ===== ====== ======= =======
1213
RAID10-A 571382 MB 10 4 256 KB Optimal On (WB)
1215
PhysiclDev State Speed Vendor Model Size Cache
1216
========== ======= ============= ======= ============ =========== =======
1217
Hard drive Full rpm,Powered off SATA 3.0 Gb/s WDC WD3000HLFS-0 286168 MB On (WB)
1218
Hard drive Full rpm,Powered off SATA 3.0 Gb/s WDC WD3000HLFS-0 286168 MB On (WB)
1219
Hard drive Full rpm,Powered off SATA 3.0 Gb/s WDC WD3000HLFS-0 286168 MB On (WB)
1220
Hard drive Full rpm,Powered off SATA 3.0 Gb/s WDC WD3000HLFS-0 286168 MB On (WB)
1223
parse_arcconf "$samples/arcconf-004_917781.txt" > "$TMPDIR/got"
1224
no_diff "$TMPDIR/got" "$TMPDIR/expected" "Bug 917781"
1226
# Launchpad 900285, ${var/ /} doesn't work in sh
1227
# https://bugs.launchpad.net/percona-toolkit/+bug/900285
1228
cat <<EOF > "$TMPDIR/expected"
1229
Specs | Adaptec 5805Z, SAS/SATA, 512 MB cache, Optimal
1230
Battery | ZMM Optimal
1232
LogicalDev Size RAID Disks Stripe Status Cache
1233
========== ========= ==== ===== ====== ======= =======
1234
RAID10-A 121790 MB 10 4 256 KB Optimal On (WB)
1235
RAID1-A 285686 MB 1 0 Optimal On (WB)
1237
PhysiclDev State Speed Vendor Model Size Cache
1238
========== ======= ============= ======= ============ =========== =======
1239
Hard drive Full rpm,Powered off SATA 3.0 Gb/s INTEL SSDSA2SH064G1GC 61057 MB On (WB)
1240
Hard drive Full rpm,Powered off SATA 3.0 Gb/s INTEL SSDSA2SH064G1GC 61057 MB On (WB)
1241
Hard drive Full rpm,Powered off SATA 3.0 Gb/s INTEL SSDSA2SH064G1GC 61057 MB On (WB)
1242
Hard drive Full rpm,Powered off SATA 3.0 Gb/s INTEL SSDSA2SH064G1GC 61057 MB On (WB)
1243
Hard drive Full rpm,Powered off SAS 3.0 Gb/s SEAGATE ST3300657SS 286102 MB On (WB)
1244
Hard drive Full rpm,Powered off SAS 3.0 Gb/s SEAGATE ST3300657SS 286102 MB On (WB)
1246
parse_arcconf "$samples/arcconf-003_900285.txt" > "$TMPDIR/got"
1247
no_diff "$TMPDIR/got" "$TMPDIR/expected" "Bug 900285"
1251
cat <<EOF > "$TMPDIR/in"
1252
15:10:14 up 1 day, 15:08, 11 users, load average: 0.18, 0.09, 0.08
1255
"$( parse_uptime "$TMPDIR/in" )" \
1256
"1 day, 15:08, 11 users, load average: 0.18, 0.09, 0.08" \
1257
"parse_uptime works with Ubuntu's uptime"
1259
cat <<EOF > "$TMPDIR/in"
1260
some weird format etc 1 day, 15:08, 11 users, load average: 0.18, 0.09, 0.08
1263
"$( parse_uptime "$TMPDIR/in" )" \
1264
" some weird format etc 1 day, 15:08, 11 users, load average: 0.18, 0.09, 0.08" \
1265
"parse_uptime returns uptime as-if if it doesn't contain an 'up'"
1270
"$(format_lvs "" "")" \
1271
"Unable to collect information" \
1272
"format_lvs has a meaningful error message if all goes wrong"
1275
echo "Pretending to be an lvs dump" > "$TMPDIR/in"
1277
"$(format_lvs "$TMPDIR/in" "")" \
1278
"Pretending to be an lvs dump" \
1279
"format_lvs dumps the file passed in"
1281
# report_system_summary
1282
parse_options "$BIN_DIR/pt-summary"
1284
cat <<EOF > "$TMPDIR/expected"
1286
Uptime | 57 mins, 1 user, load averages: 0.16, 0.03, 0.07
1288
Release | 8.2-RELEASE
1290
Architecture | CPU = 32-bit, OS = 32-bit
1291
Virtualized | No virtualization detected
1292
# Processor ##################################################
1293
Processors | virtual = 1
1295
Models | AMD Athlon(tm) 64 X2 Dual Core Processor 4000+
1296
# Memory #####################################################
1301
# Mounted Filesystems ########################################
1302
Filesystem Size Used Type Opts Mountpoint
1303
/dev/ad0s1a 620M 30% ufs local /
1304
/dev/ad0s1d 1.3G 0% ufs local, soft-updates /var
1305
/dev/ad0s1e 341M 0% ufs local, soft-updates /tmp
1306
/dev/ad0s1f 3.3G 32% ufs local, soft-updates /usr
1307
/dev/da0s1 3.8G 0% msdosfs local /mnt/usb
1308
devfs 1.0K 100% devfs local, multilabel /dev
1309
procfs 4.0K 100% procfs local /proc
1310
# RAID Controller ############################################
1311
Controller | No RAID controller detected
1312
# Top Processes ##############################################
1313
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
1314
23318 root 1 76 0 3632K 1744K wait 0:00 0.98% sh
1315
447 root 1 44 0 1888K 584K select 0:00 0.00% devd
1316
945 root 1 44 0 4672K 2336K pause 0:00 0.00% csh
1317
556 root 1 44 0 3352K 1264K select 0:00 0.00% syslogd
1318
848 root 1 44 0 6092K 3164K select 0:00 0.00% sendmail
1319
859 root 1 44 0 3380K 1308K nanslp 0:00 0.00% cron
1320
931 root 1 44 0 3816K 1724K wait 0:00 0.00% login
1321
937 root 1 76 0 3352K 1096K ttyin 0:00 0.00% getty
1322
934 root 1 76 0 3352K 1096K ttyin 0:00 0.00% getty
1323
# Notable Processes ##########################################
1325
? ? sshd doesn't appear to be running
1326
# Simplified and fuzzy rounded vmstat (wait please) ##########
1327
procs memory page disks faults cpu
1328
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id
1329
1 0 0 63720 339504 1158 0 0 0 1022 0 0 0 246 1201 336 22 15 63
1330
0 0 0 58164 339792 7924 0 0 0 6663 0 4 3 242 5829 744 15 71 14
1331
0 0 0 58164 339792 0 0 0 0 0 0 0 0 230 107 231 0 9 91
1332
0 0 0 58164 339792 0 0 0 0 0 0 0 0 230 107 229 0 3 97
1333
0 0 0 58164 339792 0 0 0 0 0 0 0 0 231 115 229 0 5 95
1334
# The End ####################################################
1336
report_system_summary "$samples/BSD/freebsd_001" | tail -n +3 > "$TMPDIR/got"
1337
no_diff "$TMPDIR/got" "$TMPDIR/expected" "report_system_summary works with samples from a FreeBSD box"
1339
cat <<EOF > "$TMPDIR/expected"
1341
Uptime | 43 mins, 2 users, load averages: 0.00, 0.00, 0.00
1345
Architecture | CPU = 32-bit, OS = 32-bit
1346
Virtualized | No virtualization detected
1347
# Processor ##################################################
1348
Processors | physical = 1, cores = 0, virtual = 1, hyperthreading = no
1350
Models | 1xAMD Athlon(tm) 64 X2 Dual Core Processor 4000+
1352
# Memory #####################################################
1357
# Mounted Filesystems ########################################
1358
Filesystem Size Used Type Opts Mountpoint
1359
/dev/sd0e 3.8G 0% yp dev/sd0e 3.8G 17M 3.7G 0% /mnt/usb on /mnt/usb type msdos (local /mnt/usb
1360
/dev/wd0a 1.8G 30% yp dev/wd0a 1.8G 545M 1.2G 30% / on / type ffs (local /
1361
kernfs 1.0K 100% yp ernfs 1.0K 1.0K 0B 100% /kern on /kern type kernfs (local /kern
1362
procfs 4.0K 100% yp rocfs 4.0K 4.0K 0B 100% /proc on /proc type procfs (local /proc
1363
ptyfs 1.0K 100% yp tyfs 1.0K 1.0K 0B 100% /dev/pts on /dev/pts type ptyfs (local /dev/pts
1364
# RAID Controller ############################################
1365
Controller | No RAID controller detected
1366
# Top Processes ##############################################
1367
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
1368
0 root 124 0 0K 20M syncer 0:01 0.00% 0.00% [system]
1369
3922 root 43 0 2976K 984K CPU 0:00 0.00% 0.00% top
1370
277 root 85 0 5592K 2232K wait 0:00 0.00% 0.00% login
1371
279 root 85 0 5592K 2164K wait 0:00 0.00% 0.00% login
1372
3501 root 85 0 2836K 1396K pause 0:00 0.00% 0.00% ksh
1373
284 root 85 0 2960K 1192K wait 0:00 0.00% 0.00% sh
1374
1957 root 85 0 2960K 1164K ttyraw 0:00 0.00% 0.00% sh
1375
116 root 85 0 2940K 1016K kqueue 0:00 0.00% 0.00% syslogd
1376
272 root 85 0 2920K 940K ttyraw 0:00 0.00% 0.00% getty
1377
# Notable Processes ##########################################
1379
? ? sshd doesn't appear to be running
1380
# Simplified and fuzzy rounded vmstat (wait please) ##########
1381
procs memory page disks faults cpu
1382
r b w avm fre flt re pi po fr sr w0 c0 in sy cs us sy id
1383
2 0 0 78624 21544 103 0 0 0 0 0 6 0 113 154 33 0 2 98
1384
2 0 0 78652 21260 12425 0 0 0 0 0 0 0 92 6208 355 12 84 4
1385
0 0 0 78564 21364 1208 0 0 0 0 0 0 0 98 806 43 2 9 89
1386
0 0 0 78564 21364 0 0 0 0 0 0 0 0 101 11 9 0 0 100
1387
0 0 0 78564 21364 0 0 0 0 0 0 0 0 101 11 10 0 0 100
1388
# The End ####################################################
1390
report_system_summary "$samples/BSD/netbsd_001" | tail -n +3 > "$TMPDIR/got"
1391
no_diff "$TMPDIR/got" "$TMPDIR/expected" "report_system_summary works with samples from a NetBSD box"
1393
cat <<EOF > "$TMPDIR/expected"
1394
Hostname | openbsd.my.domain
1395
Uptime | 1:14, 1 user, load averages: 0.44, 0.20, 0.16
1399
Architecture | CPU = 32-bit, OS = 32-bit
1400
Virtualized | No virtualization detected
1401
# Processor ##################################################
1405
# Memory #####################################################
1410
# Mounted Filesystems ########################################
1411
Filesystem Size Used Type Opts Mountpoint
1412
/dev/sd0i 3.8G 0% yp long /mnt/usb
1413
/dev/wd0a 788M 6% yp dev/wd0a 788M 42.5M 706M 6% / on / type ffs (local /
1414
/dev/wd0d 893M 48% yp nodev /usr
1415
/dev/wd0e 252M 37% yp nodev, nosuid /home
1416
# RAID Controller ############################################
1417
Controller | No RAID controller detected
1418
# Top Processes ##############################################
1419
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
1420
22422 root 18 0 888K 1012K sleep pause 0:00 0.93% sh
1421
20216 _pflogd 4 0 528K 312K sleep bpf 0:01 0.00% pflogd
1422
22982 root 2 0 1372K 1956K sleep select 0:00 0.00% sendmail
1423
26829 root 18 0 544K 532K sleep pause 0:00 0.00% ksh
1424
17299 _syslogd 2 0 524K 752K sleep poll 0:00 0.00% syslogd
1425
7254 root 2 0 508K 872K idle select 0:00 0.00% cron
1426
1 root 10 0 544K 324K idle wait 0:00 0.00% init
1427
28237 root 2 0 500K 696K idle netio 0:00 0.00% syslogd
1428
30259 root 3 0 408K 812K idle ttyin 0:00 0.00% getty
1429
# Notable Processes ##########################################
1431
? ? sshd doesn't appear to be running
1432
# Simplified and fuzzy rounded vmstat (wait please) ##########
1433
procs memory page disks traps cpu
1434
r b w avm fre flt re pi po fr sr wd0 cd0 int sys cs us sy id
1435
2 1 0 7608 191356 66 0 0 0 0 0 2 0 231 108 14 0 1 99
1436
1 1 0 7804 191192 9916 0 0 0 0 0 0 0 234 14726 315 9 90 1
1437
1 0 0 7600 191360 9461 0 0 0 0 0 0 0 256 14435 285 6 94 0
1438
0 0 0 7496 191456 1272 0 0 0 0 0 0 0 256 1973 50 2 12 85
1439
0 0 0 7496 191456 11 0 0 0 0 0 0 0 230 23 12 0 0 100
1440
# The End ####################################################
1442
report_system_summary "$samples/BSD/openbsd_001" | tail -n +3 > "$TMPDIR/got"
1443
no_diff "$TMPDIR/got" "$TMPDIR/expected" "report_system_summary works with samples from a OpenBSD box"
1445
cat <<EOF > "$TMPDIR/expected"
1447
Uptime | 1 day, 15:14, 5 users, load average: 0.00, 0.06, 0.07
1448
System | Quanta; UW3; vTBD (Other)
1449
Service Tag | 123456789
1451
Release | Ubuntu 11.10 (oneiric)
1452
Kernel | 3.0.0-16-generic
1453
Architecture | CPU = 32-bit, OS = 32-bit
1454
Threading | NPTL 2.13
1455
SELinux | No SELinux detected
1456
Virtualized | No virtualization detected
1457
# Processor ##################################################
1458
Processors | physical = 1, cores = 1, virtual = 2, hyperthreading = yes
1459
Speeds | 1x1000.000, 1x1666.000
1460
Models | 2xIntel(R) Atom(TM) CPU N455 @ 1.66GHz
1462
# Memory #####################################################
1465
Used | physical = 1.5G, swap allocated = 2.0G, swap used = 0.0, virtual = 1.5G
1471
DirtyPolicy | 20, 10
1472
Locator Size Speed Form Factor Type Type Detail
1473
========= ======== ================= ============= ============= ===========
1474
DIMM0 2048 MB 667 MHz (1.5 ns) SODIMM DDR2 Synchronous
1475
# Mounted Filesystems ########################################
1476
Filesystem Size Used Type Opts Mountpoint
1477
/dev/sda7 333G 12% ext4 rw,errors=remount-ro,commit=0 /
1478
/dev/sdb1 3.8G 1% vfat rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks /media/PENDRIVE
1479
none 1002M 1% tmpfs rw,noexec,nosuid,nodev,size=5242880 /run/shm
1480
none 1002M 1% tmpfs rw,nosuid,nodev /run/shm
1481
none 1002M 1% debugfs rw /run/shm
1482
none 1002M 1% securityfs rw /run/shm
1483
none 5.0M 0% tmpfs rw,noexec,nosuid,nodev,size=5242880 /run/lock
1484
none 5.0M 0% tmpfs rw,nosuid,nodev /run/lock
1485
none 5.0M 0% debugfs rw /run/lock
1486
none 5.0M 0% securityfs rw /run/lock
1487
tmpfs 401M 1% tmpfs rw,noexec,nosuid,size=10%,mode=0755 /run
1488
udev 995M 1% devtmpfs rw,mode=0755 /dev
1489
# Disk Schedulers And Queue Size #############################
1492
# Disk Partioning ############################################
1493
Device Type Start End Size
1494
============ ==== ========== ========== ==================
1495
/dev/sda Disk 500107862016
1496
/dev/sda1 Part 2048 206847 104857088
1497
/dev/sda2 Part 206848 12494847 6291455488
1498
/dev/sda3 Part 12494848 207808587 100000634368
1499
/dev/sda4 Part 207810558 976771071 393707782656
1500
/dev/sda5 Part 207810560 259807667 26622518784
1501
/dev/sda6 Part 972603392 976771071 2133851648
1502
/dev/sda7 Part 259809280 968421375 362809392640
1503
/dev/sda8 Part 968423424 972591103 2133851648
1504
/dev/sdb Disk 4041211904
1505
/dev/sdb1 Part 63 7892991 4041179136
1506
# Kernel Inode State #########################################
1507
dentry-state | 78471 67588 45 0 0 0
1508
file-nr | 9248 0 203574
1509
inode-nr | 70996 10387
1510
# LVM Volumes ################################################
1511
No volume groups found
1512
# LVM Volume Groups ##########################################
1513
Unable to collect information
1514
# RAID Controller ############################################
1515
Controller | No RAID controller detected
1516
# Network Config #############################################
1517
Controller | Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
1520
# Interface Statistics #######################################
1521
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
1522
========= ========= ========== ========== ========== ========== ==========
1523
lo 25000000 350000 0 25000000 350000 0
1527
# Network Connections ########################################
1528
Connections from remote IP addresses
1529
Connections to local IP addresses
1530
Connections to top 10 local ports
1531
States of connections
1533
# Top Processes ##############################################
1534
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1535
1548 hugmeir 20 0 122m 14m 10m S 2 0.7 1:44.97 gnome-settings-
1536
1567 hugmeir 20 0 257m 88m 22m S 2 4.4 83:35.58 compiz
1537
4455 hugmeir 20 0 283m 30m 21m S 2 1.5 30:42.87 knotify4
1538
17394 hugmeir 20 0 118m 37m 26m S 2 1.9 0:29.35 kwrite
1539
30819 root 20 0 2824 1144 844 R 2 0.1 0:00.03 top
1540
1 root 20 0 3328 1912 1248 S 0 0.1 0:01.55 init
1541
2 root 20 0 0 0 0 S 0 0.0 0:00.07 kthreadd
1542
3 root 20 0 0 0 0 S 0 0.0 0:05.54 ksoftirqd/0
1543
6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
1544
# Notable Processes ##########################################
1546
? ? sshd doesn't appear to be running
1550
# Simplified and fuzzy rounded vmstat (wait please) ##########
1551
procs ---swap-- -----io---- ---system---- --------cpu--------
1552
r b si so bi bo ir cs us sy il wa st
1553
2 0 0 0 2 1 150 50 4 1 95 0
1554
0 0 0 0 0 8 900 2250 28 26 46 0
1555
0 0 0 0 0 0 200 200 1 0 99 0
1556
1 0 0 0 0 150 225 225 1 1 95 3
1557
0 0 0 0 0 150 250 250 1 0 99 0
1558
# The End ####################################################
1561
report_system_summary "$samples/Linux/001" | tail -n +3 > "$TMPDIR/got"
1562
cp "$TMPDIR/got" yadda.txt
1563
no_diff "$TMPDIR/got" "$TMPDIR/expected" "report_system_summary works with samples from Linux (Ubuntu)"
1565
report_system_summary "$samples/Linux/002" | tail -n +3 > "$TMPDIR/got"
1566
no_diff "$TMPDIR/got" "$samples/Linux/output_002.txt" "report_system_summary works with samples from Linux (CentOS 5.7, as root)"
1568
report_system_summary "$samples/Linux/003" | tail -n +3 > "$TMPDIR/got"
1569
no_diff "$TMPDIR/got" "$samples/Linux/output_003.txt" "report_system_summary works with samples from Linux (CentOS 5.7, as non-root)"