Comment identifier du matériel > Le modèle de l'ordinateur
Imaginez que vous voulez identifier le modèle d'un ordinateur et qu'il n'y a plus d'autocollant avec la marque dessus ;)
La plupart des gens utilisent simplement dmidecode en tant que superutilisateur pour chercher le modèle de l'ordinateur, mais lshal peut être exécuté par un utilisateur ordinaire. Si aucun de ces utilitaires n'est disponible sur votre ordinateur, vous pouvez regarder dans votre système de fichier /sys.
dmidecode
dmidecode peut être utilisé pour rechercher dans la zone de DMI de la carte mère des informations sur le modèle de l'ordinateur :
# dmidecode -t 1
# dmidecode 2.9
SMBIOS 2.4 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: LENOVO
Product Name: 1952W5R
Version: ThinkPad T60
Serial Number: 01234566
UUID: 01234567-1234-1234-1234-123456789ABC
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: ThinkPad T60ou sous une forme plus condensée
# dmidecode -s system-manufacturer LENOVO # dmidecode -s system-version ThinkPad T60 # dmidecode -s system-product-name 1952W5R
HAL
On peut aussi utiliser hal pour connaitre le modèle de l'ordinateur :
# lshal -u computer -l
udi = '/org/freedesktop/Hal/devices/computer'
info.addons = {'hald-addon-cpufreq', 'hald-addon-acpi'} (string list)
info.bus = 'unknown' (string)
info.callouts.add = {'hal-storage-cleanup-all-mountpoints'} (string list)
info.capabilities = {'cpufreq_control'} (string list)
info.interfaces = {'org.freedesktop.Hal.Device.SystemPowerManagement', 'org.freedesktop.Hal.Device.CPUFreq'} (string list)
info.product = 'Computer' (string)
info.subsystem = 'unknown' (string)
info.udi = '/org/freedesktop/Hal/devices/computer' (string)
org.freedesktop.Hal.Device.SystemPowerManagement.method_argnames = {'num_seconds_to_sleep', 'num_seconds_to_sleep', '', '', '', 'enable_power_save'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths = {'hal-system-power-suspend', 'hal-system-power-suspend-hybrid', 'hal-system-power-hibernate', 'hal-system-power-shutdown', 'hal-system-power-reboot', 'hal-system-power-set-power-save'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_names = {'Suspend', 'SuspendHybrid', 'Hibernate', 'Shutdown', 'Reboot', 'SetPowerSave'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_signatures = {'i', 'i', '', '', '', 'i'} (string list)
power_management.acpi.linux.version = '20070126' (string)
power_management.can_hibernate = true (bool)
power_management.can_suspend = true (bool)
power_management.can_suspend_hybrid = false (bool)
power_management.can_suspend_to_disk = true (bool)
power_management.can_suspend_to_ram = true (bool)
power_management.is_powersave_set = false (bool)
power_management.quirk.s3_bios = true (bool)
power_management.quirk.s3_mode = true (bool)
power_management.type = 'acpi' (string)
smbios.bios.release_date = '04/12/2007' (string)
smbios.bios.vendor = 'LENOVO' (string)
smbios.bios.version = '79ETD2WW (2.12 )' (string)
smbios.chassis.manufacturer = 'LENOVO' (string)
smbios.chassis.type = 'Notebook' (string)
smbios.system.manufacturer = 'LENOVO' (string)
smbios.system.product = '1952W5R' (string)
smbios.system.serial = '1234567' (string)
smbios.system.uuid = '01234567-1234-1234-1234-123456789ABC' (string)
smbios.system.version = 'ThinkPad T60' (string)
system.chassis.manufacturer = 'LENOVO' (string)
system.chassis.type = 'Notebook' (string)
system.firmware.release_date = '04/12/2007' (string)
system.firmware.vendor = 'LENOVO' (string)
system.firmware.version = '79ETD2WW (2.12 )' (string)
system.formfactor = 'laptop' (string)
system.hardware.product = '1952W5R' (string)
system.hardware.serial = '1234567' (string)
system.hardware.uuid = '01234567-1234-1234-1234-123456789ABC' (string)
system.hardware.vendor = 'LENOVO' (string)
system.hardware.version = 'ThinkPad T60' (string)
system.kernel.machine = 'i686' (string)
system.kernel.name = 'Linux' (string)
system.kernel.version = '2.6.21-2-686' (string)
system.product = '1952W5R ThinkPad T60' (string)
system.vendor = 'LENOVO' (string)
/sys
Depuis Lenny, le noyau fournit dans le système de fichier virtuel /sys quelques informations de la zone DMI.
$grep "" /sys/class/dmi/id/[bpc]* /sys/class/dmi/id/bios_date:02/13/2009 /sys/class/dmi/id/bios_vendor:LENOVO /sys/class/dmi/id/bios_version:6FET61WW (2.07 ) /sys/class/dmi/id/board_asset_tag: /sys/class/dmi/id/board_name:2241WR5 grep: /sys/class/dmi/id/board_serial: Permission denied /sys/class/dmi/id/board_vendor:LENOVO /sys/class/dmi/id/board_version:Not Available /sys/class/dmi/id/chassis_asset_tag:No Asset Information grep: /sys/class/dmi/id/chassis_serial: Permission denied /sys/class/dmi/id/chassis_type:10 /sys/class/dmi/id/chassis_vendor:LENOVO /sys/class/dmi/id/chassis_version:Not Available /sys/class/dmi/id/product_name:2241WR5 grep: /sys/class/dmi/id/product_serial: Permission denied grep: /sys/class/dmi/id/product_uuid: Permission denied /sys/class/dmi/id/product_version:ThinkPad T500
BIOS
On peut aussi entrer dans le BIOS de l'ordinateur pour accéder à la carte mère de l'ordinateur (sur les ordinateurs professionnels, il donne souvent aussi le modèle de l'ordinateur).
