Prepoznavanje sklopovlja: podaci iz BIOS-a
Otkrivajući informacije o komponentama računala, sistemca će zanimati i one koje su upisane u BIOS. Pri tome će mu pomoći naredba dmidecode, koja je napisana kako bi pružila "informacije o hardveru upisane u BIOS prema SMBIOS/DMI standardu". Radi se o proširenju BIOS-a koji bi trebao olakšati posao upravljačkim programima i smanjiti potrebu za rutinama čija je funkcija prepoznavnje hardvera.
Tu su obično podaci o proizvođaču računala, ime i serijski broj modela, verzija BIOS-a i slično. Ponekad ćete tu naći podatke o statusu CPU socketa, utora za proširenja (AGP, PCI..), popunjenosti memorijskih utora i listu ulazno/izlaznih portova (serijskih, paralelnih, USB...). No ispravnost tih informacija ovisi o proizvođaču računala. Nažalost, nisu svi proizvođači računala ozbiljno shvatili svoje obaveze, pa točnost podataka varira od proizvođača do proizvođača, čak i od modela do modela. BIOS bi trebao sadržavati informacije koje omogućuju operacijskim sustavima pokretanje i inicijalizaciju hardvera, no nažalost ponekad Linuxov kernel mora zanemariti te informacije ili ih sam provjeravati. No čak i sumnjajući u te informacije, ipak ćemo ih pogledati nadajući se da ćemo naći nešto korisno.
DMI standard grupira informacije prema zadanim tipovima:
Type Information
────────────────────────────────────────────
0 BIOS
1 System
2 Baseboard
3 Chassis
4 Processor
5 Memory Controller
6 Memory Modul
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply
40 Additional Information
41 Onboard Devices Extended Information
42 Management Controller Host Interface
Ako napišete naredbu dmidecode bez parametara, dobit ćete sve podatke upisane u SMBIOS. Informacije o samom BIOS-u su na početku, type 0:
$ dmidecode -t 0
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: 1102
Release Date: 01/30/2007
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 1024 kB
Characteristics:
ISA is supported
PCI is supported
PNP is supported
APM is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
LS-120 boot is supported
ATAPI Zip drive boot is supported
BIOS boot specification is supported
Targeted content distribution is supported
BIOS Revision: 8.12
Informacije o matičnoj ploči, type 2:
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ASUSTeK Computer INC.
Product Name: P5B
Version: Rev 1.xx
Serial Number: MB-1234567890
Asset Tag: To Be Filled By O.E.M.
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: To Be Filled By O.E.M.
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Ako vas zanima samo procesor, upit će izgledati ovako:
$ dmidecode -t 4
Evo i upitao ugrađenoj RAM memoriji:
$ sudo dmidecode -t 17
# dmidecode 2.11
SMBIOS 2.6 present.
Handle 0x0005, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0004
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: SODIMM
Set: None
Locator: Bottom-Slot 1(left)
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Ramaxel
Serial Number: 431E6C04
Asset Tag: Unknown
Part Number: RMT3010EC58E8F1333
Handle 0x0007, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0004
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: SODIMM
Set: None
Locator: Bottom-Slot 2(right)
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Ramaxel
Serial Number: 433E6C04
Asset Tag: Unknown
Part Number: RMT3010EC58E8F1333
Popunjena su dva utora s "keksima" od po 2 GB 64 bitne DDR3 memorije koja radi na 1333 MHz.
Ponešto o bateriji notebooka saznat ćete ovako:
$ sudo dmidecode -t 22
# dmidecode 2.11
SMBIOS 2.6 present.
Handle 0x0014, DMI type 22, 26 bytes
Portable Battery
Location: Primary
Manufacturer: 32STL-SD20S
Name: OT06039
Design Capacity: 3600 mWh
Design Voltage: 10800 mV
SBDS Version: 1.1
Maximum Error: Unknown
SBDS Serial Number: 0A41
SBDS Manufacture Date: 2011-03-02
SBDS Chemistry: LION
OEM-specific Information: 0x00000000
Na kraju, evo i malo egzotike. IBM i Lenovo upisuju takozvane "vitalne podatke o proizvodu" (Vital product data), koje možete pronaći naredbom vpddecode. Trebalo bi tek provjeriti da li to radi na svim modelima spomenutog proizvođača.
$ vpddecode
Compaqov BIOS dozvoljava da se upišu podaci o vlasniku, koje možete pogledati naredbom:
$ ownership
Nije zgorega provjeriti kome je računalo pripadalo, zar ne? :)
Ukratko, MSBIOS/DMI stanadard je uveden kako bi proizvođači računala tu upisivali podatke o svom sklopovlju. No oni nisu uvijek dosljedni u tome, pa ćemo se ponekad razočarati. U svakom slučaju, naredba dmidecode sistemcu može biti izuzetna pomoć, pod uvjetom da je nauči koristiti "sa zrnom soli".
Vezani članci:
- Logirajte se za dodavanje komentara
- Inačica za ispis
- PDF version