Translation(s): English - Français - Italiano - Русский

(!) ?Discussion

Определение устройств > Система (модель компьютера)


Представьте что вы хотите определить модель компьютера, но на нём нет наклейки ;)

Чтобы определить модель компьютера, многие люди используют dmidecode от root, однако lshal может работать от обычного пользователя.

dmidecode

dmidecode может быть использован для запроса модели компьютера из области DMI:

# 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 T60

или более короткая форма:

# dmidecode -s system-manufacturer
LENOVO
# dmidecode -s system-version
ThinkPad T60
# dmidecode -s system-product-name
1952W5R

HAL

Также, для получения модели компьютера можно использовать hal:

# 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)

BIOS

В BIOS компьютера, можно получить информацию о материнской плате (на enterprise компьютерах часто указана модели).