Сбор информации о апаратной конфигурации

Версия для печатиОтправить другуPDF version

Развивая тему сбора информации о хардварной части серверов, не стоит забывать о возможностях самой операционной системы. FreeBSD предоставляет набор утилит, которые уже входят в базовую поставку.

Понадобилось узнать, на каких чипсетах работают сетевые карты сервера. Информацию о этом можно почерпнуть из следующего вывода:

# pciconf -lv

hostb0@pci0:0:0:0:      class=0x060000 card=0x00008086 chip=0x35928086 rev=0x0c hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'E7320 Memory Controller Hub'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:2:0:       class=0x060400 card=0x00000000 chip=0x35958086 rev=0x0c hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'E7525/E7520/E7320 PCI Express Port A'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:3:0:       class=0x060400 card=0x00000000 chip=0x35968086 rev=0x0c hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'E7525/E7520/E7320 PCI Express Port A1'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:28:0:      class=0x060400 card=0x00000000 chip=0x25ae8086 rev=0x02 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6300ESB 64-bit PCI-X Bridge'
    class      = bridge
    subclass   = PCI-PCI
none0@pci0:0:29:0:      class=0x0c0300 card=0x24d08086 chip=0x25a98086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:29:1:      class=0x0c0300 card=0x24d08086 chip=0x25aa8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
none2@pci0:0:29:4:      class=0x088000 card=0x698015d9 chip=0x25ab8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB Watchdog Timer'
    class      = base peripheral
ioapic0@pci0:0:29:5:    class=0x080020 card=0x00000000 chip=0x25ac8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB I/O Advanced Programmable Interrupt Controller'
    class      = base peripheral
    subclass   = interrupt controller
none3@pci0:0:29:7:      class=0x0c0320 card=0x24d08086 chip=0x25ad8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB USB2 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
pcib6@pci0:0:30:0:      class=0x060400 card=0x00000000 chip=0x244e8086 rev=0x0a hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:      class=0x060100 card=0x00000000 chip=0x25a18086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB LPC Interface Controller'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:2:    class=0x01018a card=0x698015d9 chip=0x25a38086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB SATA Storage Controller'
    class      = mass storage
    subclass   = ATA
none4@pci0:0:31:3:      class=0x0c0500 card=0x24d08086 chip=0x25a48086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6300ESB SMBus Controller'
    class      = serial bus
    subclass   = SMBus
pcib2@pci0:1:0:0:       class=0x060400 card=0x00000000 chip=0x03298086 rev=0x09 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6700PXH PCI Express-to-PCI Bridge A'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:1:0:2:       class=0x060400 card=0x00000000 chip=0x032a8086 rev=0x09 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6700PXH PCI Express-to-PCI Bridge B'
    class      = bridge
    subclass   = PCI-PCI
em0@pci0:5:1:0: class=0x020000 card=0x107615d9 chip=0x10768086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82541GI Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
em1@pci0:5:2:0: class=0x020000 card=0x107615d9 chip=0x10768086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82541GI Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
vgapci0@pci0:6:2:0:     class=0x030000 card=0x698015d9 chip=0x47521002 rev=0x27 hdr=0x00
    vendor     = 'ATI Technologies Inc'
    device     = 'Rage XL'
    class      = display
    subclass   = VGA

Тоесть имеем в своем распоряжении вывод детальной информции о устройствах на шине PCI (а это не только сетевые адаптеры).

Чтобы конкретизировать информацию о дисковой подсистеме стоит воспользоваться возможностями утилит atacontrol и camcontrol. Утилиту atacontrol используем в случае использования

IDE/SATA. А для вывода информации о SCSI-устройствах необходимо использовать camcontrol. Примеры использования:

# atacontrol list

ATA channel 0:
    Master:      no device present
    Slave:       no device present
ATA channel 1:
    Master:      no device present
    Slave:       no device present
ATA channel 2:
    Master:  ad4 <SAMSUNG HD501LJ/CR100-10> SATA revision 2.x
    Slave:       no device present
ATA channel 3:
    Master:  ad6 <SAMSUNG HD501LJ/CR100-11> SATA revision 2.x
    Slave:       no device present
ATA channel 4:
    Master:  ad8 <SAMSUNG HD501LJ/CR100-10> SATA revision 2.x
    Slave:       no device present
ATA channel 5:
    Master:      no device present
    Slave:       no device present

# camcontrol devlist -v

scbus0 on ata0 bus 0:
<COMPAQ CD-ROM SN-124 N104>        at scbus0 target 0 lun 0 (pass0)
<>                                 at scbus0 target -1 lun -1 ()
scbus1 on ata1 bus 0:
<>                                 at scbus1 target -1 lun -1 ()
scbus2 on ciss0 bus 0:
<COMPAQ RAID 1(1VOLUME OK>         at scbus2 target 0 lun 0 (pass1,da0)
scbus3 on ciss0 bus 32:
scbus-1 on xpt0 bus 0:
<>                                 at scbus-1 target -1 lun -1 (xpt0)

Также довольно много полезной информации можно узнать из вывода dmesg. Информация записывается в файл /var/run/dmesg.boot, где и можно много чего почерпнуть о железе:

# cat /var/run/dmesg.boot

Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-STABLE #0: Tue Jan 17 11:41:01 EET 2012
    muff [at] tmp [dot] muff [dot] kiev [dot] ua:/usr/obj/usr/src/sys/tmp i386
CPU: Intel(R) Xeon(TM) MP CPU 2.50GHz (2493.93-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf25  Family = f  Model = 2  Stepping = 5
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNXT-ID,xTPR>
real memory  = 4294967296 (4096 MB)
avail memory = 4007141376 (3821 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <COMPAQ 00000083>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 4 package(s) x 1 core(s) x 2 HTT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP/HT): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP/HT): APIC ID:  3
 cpu4 (AP): APIC ID:  4
 cpu5 (AP/HT): APIC ID:  5
 cpu6 (AP): APIC ID:  6
 cpu7 (AP/HT): APIC ID:  7
ACPI Warning: Invalid length for Pm1aControlBlock: 32, using default 16 (20110527/tbfadt-638)
ACPI Warning: Invalid length for Pm1bControlBlock: 32, using default 16 (20110527/tbfadt-638)
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 <Version 1.1> irqs 0-15 on motherboard
ioapic1 <Version 1.1> irqs 16-31 on motherboard
ioapic2 <Version 1.1> irqs 32-47 on motherboard
ioapic3 <Version 1.1> irqs 48-63 on motherboard
kbd1 at kbdmux0
acpi0: <COMPAQ P30> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x920-0x923 on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
cpu4: <ACPI CPU> on acpi0
cpu5: <ACPI CPU> on acpi0
cpu6: <ACPI CPU> on acpi0
cpu7: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> on acpi0
pcib0: Length mismatch for 4 range: 2900 vs 28ff
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x2400-0x24ff mem 0xf6000000-0xf6ffffff,0xf5ff0000-0xf5ff0fff at device 3.0 on pci0
pci0: <base peripheral> at device 4.0 (no driver attached)
pci0: <base peripheral> at device 4.2 (no driver attached)
isab0: <PCI-ISA bridge> at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <ServerWorks CSB5 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x2000-0x200f at device 15.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <serial bus, USB> at device 15.2 (no driver attached)
pcib1: <ACPI Host-PCI bridge> on acpi0
pcib1: Length mismatch for 4 range: 100 vs ff
pci1: <ACPI PCI bus> on pcib1
ciss0: <Compaq Smart Array 5i> port 0x3000-0x30ff mem 0xf7ec0000-0xf7efffff,0xf7df0000-0xf7df3fff irq 30 at device 3.0 on pci1
ciss0: PERFORMANT Transport
pcib2: <ACPI Host-PCI bridge> on acpi0
pci2: <ACPI PCI bus> on pcib2
bge0: <Compaq NC7781 Gigabit Server Adapter, ASIC rev. 0x001002> mem 0xf7ff0000-0xf7ffffff irq 31 at device 1.0 on pci2
bge0: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI-X
miibus0: <MII bus> on bge0
brgphy0: <BCM5703 1000BASE-T media interface> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
bge0: Ethernet address: 00:0b:cd:68:78:cc
bge1: <Compaq NC7781 Gigabit Server Adapter, ASIC rev. 0x001002> mem 0xf7fe0000-0xf7feffff irq 23 at device 2.0 on pci2
bge1: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI-X
miibus1: <MII bus> on bge1
brgphy1: <BCM5703 1000BASE-T media interface> PHY 1 on miibus1
brgphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
bge1: Ethernet address: 00:0b:cd:68:78:cd
pcib3: <ACPI Host-PCI bridge> on acpi0
pci3: <ACPI PCI bus> on pcib3
pcib4: <ACPI Host-PCI bridge> on acpi0
pci6: <ACPI PCI bus> on pcib4
acpi_tz0: <Thermal Zone> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xcbfff,0xcc000-0xcd7ff,0xee000-0xeffff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atrtc0: <AT realtime clock> at port 0x70 irq 8 on isa0
atrtc0: Warning: Couldn't map I/O.
Event timer "RTC" frequency 32768 Hz quality 0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
p4tcc1: <CPU Frequency Thermal Control> on cpu1
p4tcc2: <CPU Frequency Thermal Control> on cpu2
p4tcc3: <CPU Frequency Thermal Control> on cpu3
p4tcc4: <CPU Frequency Thermal Control> on cpu4
p4tcc5: <CPU Frequency Thermal Control> on cpu5
p4tcc6: <CPU Frequency Thermal Control> on cpu6
p4tcc7: <CPU Frequency Thermal Control> on cpu7
Timecounters tick every 1.000 msec
ipfw2 initialized, divert loadable, nat loadable, rule-based forwarding enabled, default to accept, logging disabled
DUMMYNET 0 with IPv6 initialized (100409)
load_dn_sched dn_sched PRIO loaded
load_dn_sched dn_sched QFQ loaded
load_dn_sched dn_sched RR loaded
load_dn_sched dn_sched WF2Q+ loaded
load_dn_sched dn_sched FIFO loaded
da0 at ciss0 bus 0 scbus2 target 0 lun 0
da0: <COMPAQ RAID 1(1VOLUME OK> Fixed Direct Access SCSI-0 device
da0: 135.168MB/s transfers
da0: Command Queueing enabled
da0: 69459MB (142253280 512 byte sectors: 255H 32S/T 17433C)
pass0 at ata0 bus 0 scbus0 target 0 lun 0
pass0: <COMPAQ CD-ROM SN-124 N104> Removable CD-ROM SCSI-0 device
pass0: 16.700MB/s transfers (PIO4, ATAPI 12bytes, PIO 65534bytes)
SMP: AP CPU #1 Launched!
SMP: AP CPU #2 Launched!
SMP: AP CPU #4 Launched!
SMP: AP CPU #7 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #5 Launched!
SMP: AP CPU #6 Launched!
Trying to mount root from ufs:/dev/da0p2 [rw]...

Вот так... Используя штатные утилиты тоже можно почерпнуть довольно много полезной информации о апаратной части сервера. И все это - не отходя от консоли сервера.

 

Ваша оценка: Нет Средняя: 2 (1 голос)

Вставай, Україно!

Литература