Difference between revisions of "Hdt (Hardware Detection Tool)"
(→[ http://git.zytor.com/?p=users/erwan/hdt.git;a=commit;h=485b4c07c607e2860b4ad96d94627a4394c48721 0.3.2 ]) |
(Fixing roadmap) |
||
Line 508: | Line 508: | ||
=== 0.3.3 === | === 0.3.3 === | ||
+ | * Adding more memory information (mostly integrating memdump.c32) | ||
+ | * Fixing Backspace behavior [http://git.zytor.com/?p=users/erwan/hdt.git;a=commit;h=3e5b7b7a03bc8264c2b68b2a3a174ec548b65f37 commit] | ||
+ | * Cursor is blinking [http://git.zytor.com/?p=users/erwan/hdt.git;a=commit;h=16da4bf8a346e3fc7abf75d0ad903a088301dccc commit] | ||
+ | * Prevent cursor from disappearing [http://git.zytor.com/?p=users/erwan/hdt.git;a=commit;h=b7817ae596d1f9b79d027210f0e7958da3516cb6 commit] | ||
+ | |||
+ | === 0.3.4 === | ||
* Improving menu's layout to maximize display usage | * Improving menu's layout to maximize display usage | ||
* Adding more external benchmark/diagnose tools (cpu/disks/...) | * Adding more external benchmark/diagnose tools (cpu/disks/...) | ||
− | |||
* Adding more Fn keys (F1-F12) | * Adding more Fn keys (F1-F12) | ||
* Memory detection fall-back to dmi type 6 when type 17 isn't available | * Memory detection fall-back to dmi type 6 when type 17 isn't available | ||
* Adding filesystem detection | * Adding filesystem detection | ||
* Adding mbr detection (info can be grav at http://sourceforge.net/projects/bootinfoscript/) | * Adding mbr detection (info can be grav at http://sourceforge.net/projects/bootinfoscript/) | ||
− | |||
− | |||
=== 0.4.0 === | === 0.4.0 === |
Revision as of 18:45, 3 May 2009
Contents
What is HDT ?
HDT (for "Hardware Detection Tool") is a Syslinux com32 module designed to display low-level information for any x86 compatible system.
HDT can inspect multiple subsystems:
- CPU (via cpuid)
- PCI
- DMI
- Memory modules
- BIOS
- Motherboard
- IPMI base board
- Chassis
- Batteries
- CPU
- Disks (work in progress)
- Syslinux
- Linux Kernel modules needed by this host
- PXE environment
- VESA
- ...
Release
Current stable release is 0.3.2
Current development version is 0.3.3
Download
HDT 0.3.2 for Syslinux 3.75
HDT 0.3.1 for Syslinux 3.75
History
Syslinux 3.74 is featuring HDT 0.2.7
Syslinux 3.75 is featuring HDT 0.2.7 with a fix to prevent hard lock during pci detection
Projects known to use HDT
- Mandriva Linux since 2009.1
- Ultimate boot CD since version 5.0
- Parted Magic since 0.4.0
- Rescue Is Possible since 8.0
- Any other ? Please tell us.
How can I try HDT ?
Since Syslinux 3.74, HDT is available in the Syslinux archive under the "com32/hdt" directory.
HDT is a com32 module that requires syslinux 3.74 or later. As every com32 module it can be booted as a kernel like :
label hdt KERNEL hdt.c32
How do I configure HDT ?
pci stuff
HDT requires very few configuration. To improve the PCI reporting, please copy the pci.ids & modules.pcimap in a directory. By default, hdt will search this files in the root dir of the bootable device. If you want to override the directory you can use the following parameters.
- modules=your_path/modules.pcimap
- pciids=your_path/pci.ids
- memtest=label_name
This can be configured like this :
label hdt KERNEL hdt.c32 APPEND modules=images/modules.pcimap pciids=images/pci.ids memtest=mymemtest
The pci.ids can usally be found in the /usr/share/ directory of a Linux System or just here.
The modules.pcimap is available in the /lib/modules/`uname -r`/ directory of your Linux system. If you don't have have one, you can try with this one taken on Mandriva Linux 2009 for a 2.6.27.7-server-1mnb Linux Kernel.
Warning ! When hdt is used with isolinux, remember the file must be in a 8.3 format. So if your file is named modules.pcimap, the parameter given to hdt __must__ be : "modules=images/modules.pci"
If this files aren't available, HDT will generate some information messages to warn the user.
The memtest=<label> option allow users to override the default entry name in the current config file of syslinux. Default value is set to "memtest".
HDT support two modes : a menu system and a cli (command line interface). The menu system is enabled by default. To enable the cli mode, just append "nomenu" at startup time like in :
label hdt KERNEL hdt.c32 APPEND nomenu
Menu mode
Nothing much to say as it will try to do some best effort to manage the few space we have to display so much information.
As anyone expect, here come some screenshots taken on the 0.2.6 version.
A screenshot featuring the main menu:
A screenshot featuring the cpu mode :
Starting memtest
Under the memory menu, it is possible to start memtest. To make it successful, you have to :
- Download memtest here -> [1]
- gunzip it
- Setup in your current syslinux configuration file an entry like
Label memtest linux memtest86+-2.11.bin
Make sure to use the keyword "linux", not "kernel"!
Then, when you'll select the memory test from the memory submenu, memtest will be launched.
The label name could be changed using the "memtest=<label>" boot option. Default value is set to "memtest".
Syntax of the CLI
This syntax may change in the future as its currently under development.
The main menu display a "hdt> " prompt to indicate the user that he reach the top menu.
Today, other submenu exists : pci, dmi, cpu, kernel, pxe, syslinux. This topics will be discussed later.
The help command shows the available commands :
- clear : obviously, clear the screen
- help : this help ;o)
- show : the command to display items
- pci : to enter the PCI mode
- dmi : to enter the DMI mode
- cpu : to enter the CPU mode
- kernel : to enter the kernel mode
- syslinux : to enter the syslinux mode
- vesa : to enter the vesa mode
- exit : to return to the top menu
Note its possible to use the show command for having a summary of given mode, like in :
hdt> show pci PCI: 17 devices detected PCI: Resolving names PCI: Resolving class names PCI Resolving module names PCI NB Devices : 17 hdt>
or
hdt> show dmi DMI Table version 2.3 found Available DMI modules: base_board bios chassis memory bank<bank_number> cpu system hdt>
The show dmi command will display the version of the DMI table and the available modules.
or
hdt> show cpu CPU Manufacturer : Intel Product : Intel(R) Pentium(R) D CPU 3.00GHz Features : 3000 MhZ : x86_64 64bits SMP hdt>
or
hdt> show pxe PXE PCI device no: 15 Manufacturer : Broadcom Corporation Product : NetXtreme BCM5721 Gigabit Ethernet PCI Express Addresses : 192.168.3.8 @ 00:13:72:3b:ce:85 hdt>
or
hdt> show syslinux SYSLINUX Bootloader : PXElinux Version : PXELINUX 3.74 pre1-110-g37bfb1c Version : 842 Max API : 35 Copyright : Copyright (C) 1994-2009 H. Peter Anvin hdt>
or
hdt> show kernel Kernel modules (intel-rng | iTCO_wdt) # (piix | ata_piix) # i2c-i801 # tg3 # sisfb # hdt>
or
hdt> show vesa VESA Vesa version : 3.0 Vendor : XGI Technology, Inc. Product : Volari Z7 Product rev. : 1.02.04 Software rev.: Y Memory (KB) : 16384 Modes : 32 hdt>
Summary
The "show summary" command reports a global summary of the current host :
hdt>show summary CPU Manufacturer : Intel Product : Intel(R) Pentium(R) D CPU 3.00GHz Features : 3000 MhZ : x86_64 64bits SMP System Manufacturer : Dell Computer Corporation Product Name : PowerEdge 850 Serial : XXXXX Bios Version : A02 Release : 10/12/2005 Memory Banks bank 00 : 512 MB DDR2@533 MHz bank 01 : 512 MB DDR2@533 MHz PCI NB Devices : 17 PXE PCI device no: 15 Manufacturer : Broadcom Corporation Product : NetXtreme BCM5721 Gigabit Ethernet PCI Express Addresses : 192.168.3.8 @ 00:13:72:3b:ce:85 Kernel modules (intel-rng | iTCO_wdt) # (piix | ata_piix) # i2c-i801 # tg3 # sisfb # hdt>
PCI mode
From the main menu, type "pci". The prompt changes to "pci> ". Today the available commands are :
show list
The show list commands reports the available pci devices like in :
pci> show list 21 PCI devices detected 01: Intel Corporation E7230/3000/3010 Memory Controller Hub # Host bridge # Kmod: unknown 02: Intel Corporation E7230/3000/3010 PCI Express Root Port # PCI bridge # Kmod: unknown [....] 12: Intel Corporation 82801G (ICH7 Family) IDE Controller # IDE interface # Kmod: piix | ata_piix [....]
The first numerical field (01, 02 or 12 in this example) represents the PCI device number followed by the vendor name & product name.
The second line display the device class and the associated kernel module. If no module match this pci device, the kernel module (Kmod) is reported as unknown. If the module match one or more kernel module, the Kmod field show their name piix or ata_piix in this example.
show device <number>
The show device <number> command reports more detailed information on the selected pci device. Let's see what report the PCI device number 12 reported in the previous example.
pci> show device 12 PCI Device 12 Vendor Name : Intel Corporation Product Name : 82801G (ICH7 Family) IDE Controller Class Name : IDE interface Kernel module : piix | ata_piix Vendor ID : 8086 Product ID : 27df SubVendor ID : 1028 SubProduct ID : 01b6 Class ID : 01.01.8a Revision : 01 PCI Bus : 00 PCI Slot : 31 PCI Func : 01 pci>
The output is pretty obvious, no need to say more about it except about the pxe stuff. If the current device have a running pxe rom, this pxe information the following information will be displayed :
Mac Address : 00:13:72:3b:ce:85 PXE : Current boot device
If the device have a valid IRQ, an "IRQ: <irq>" line is displayed.
show irq
HDT can show IRQs set to some PCI devices. Most of PCI devices doesn't really have a legacy IRQ. Only valid IRQs (>0 & <255) are shown.
pci>show irq 17 PCI devices detected IRQ : product ------------- 11 : Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 05 : Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express 03 : Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express pci>
DMI mode
Inside the dmi mode, you can use the show list to display the available modules.
dmi> show list Available DMI modules: base_board bios chassis memory bank<bank_number> cpu system
Note that only available modules will be displayed by this command. If your system doesn't have a battery, the battery module will not be reported.
To display the content of each module, you just have to use the show <module> command like in :
dmi> show system System Manufacturer : Dell Computer Corporation Product Name : PowerEdge 850 Version : Not Specified Serial : XXXX UUID : XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX Wakeup Type : Power Switch SKU Number : Family : dmi>
Nothing more to say except about the memory module.
memory display
The show memory command will display the status of each memory bank reported by the DMI table.
dmi> show memory Memory Banks bank 00 : 512 MB DDR2@533 MHz bank 01 : 512 MB DDR2@533 MHz bank 02 : Free DDR2@533 MHz bank 03 : Free DDR2@533 MHz dmi>
As reported by the command, to have more details of a given memory bank, you can use the show bank<bank number> command.
dmi> show bank1 Memory Bank 1 Form Factor : DIMM Type : DDR2 Type Detail : Synchronous Speed : 533 MHz Size : 512 MB Device Set : 1 Device Loc. : DIMM1_B Bank Locator : Not Specified Total Width : 72 bits Data Width : 64 bits Error : Not Provided Vendor : C100000000000000 Serial : XXXXXXX Asset Tag : XXXXXXXXX Part Number : XXXXXXXX dmi>
IPMI base board display
Since 0.2.6, hdt can detect if an IPMI BMC is present. If yes, it displays the interface type, the version and its address.
dmi> show ipmi IPMI Interface Type : KCS (Keyboard Control Style) Specification Ver. : 1.5 I2C Slave Address : 0x10 Nv Storage Address : 0 Base Address : 0000000000000CA8 IRQ : 0 dmi>
CPU mode
Inside the CPU mode, you can use the show cpu command to display the cpu information :
cpu> show cpu CPU Vendor : Intel Model : Intel(R) Pentium(R) D CPU 3.00GHz Vendor ID : 0 Family ID : 15 Model ID : 4 Stepping : 7 FSB : 800 MHz Cur. Speed: 3000 MHz Max Speed : 3800 MHz Upgrade : ZIF Socket SMP : yes x86_64 : yes Flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca Flags : cmov pat pse_36 clflsh dts acpi mmx sse sse2 ss Flags : ht acc nx lm cpu>
Kernel mode
The kernel mode feature the "show list" command that display for each hardware category the needed kernel modules.
kernel> show list Mass storage controller : piix ata_piix Network controller : tg3 Display controller : sisfb Bridge : intel-rng iTCO_wdt Serial bus controller : i2c-i801 kernel>
PXE mode
The PXE mode display information about the pxe environment
pxe> show list PXE
PCI device no: 15 Manufacturer : Broadcom Corporation Product : NetXtreme BCM5721 Gigabit Ethernet PCI Express Addresses : 192.168.3.8 @ 00:13:72:3b:ce:85
pxe>
Syslinux mode
The Syslinux mode display the current syslinux versions :
syslinux> show list SYSLINUX
Bootloader : PXElinux Version : PXELINUX 3.72 3.72 Version : 840 Max API : 30 Copyright : Copyright (C) 1994-2008 H. Peter Anvin
syslinux>
VESA mode
The syslinux mode can display a synthesis of the vesa configuration :
vesa> show list VESA Vesa version : 3.0 Vendor : XGI Technology, Inc. Product : Volari Z7 Product rev. : 1.02.04 Software rev.: Y Memory (KB) : 16384 Modes : 32 vesa>
In this example, the vga card supports 32 video modes. To display them, use the show modes command.
Note that "Kernel mode" is the value requested by the "vga=" command line for a linux kernel.
vesa> show modes ResX x ResY x Bits : Kernel Mode : Vesa Mode --------------------------------------------- 800 600 4 770 0x0102 640 480 8 769 0x0101 640 400 8 768 0x0100 800 600 8 771 0x0103 1024 768 4 772 0x0104 1024 768 8 773 0x0105 1280 1024 8 775 0x0107 1600 1200 8 816 0x0130 1600 1200 16 817 0x0131 320 200 15 781 0x010d 320 200 16 782 0x010e 640 480 15 784 0x0110 640 480 16 785 0x0111 800 600 15 787 0x0113 800 600 16 788 0x0114 1024 768 15 790 0x0116 1024 768 16 791 0x0117 1280 1024 15 793 0x0119 1280 1024 16 794 0x011a 320 240 8 818 0x0132 400 300 8 819 0x0133 512 384 8 820 0x0134 320 240 16 821 0x0135 400 300 16 822 0x0136 512 384 16 823 0x0137 320 200 8 824 0x0138 640 400 16 825 0x0139 640 480 32 826 0x013a 800 600 32 827 0x013b 1024 768 32 828 0x013c 1280 1024 32 829 0x013d 1600 1200 32 830 0x013e vesa>
Roadmap
0.3.0
- Merging Pam's branch to feature the new CLI commit
0.3.1
- Adding more coherence in the more_printf() usage -> commit
- Adding more coherence about screen clearing -> commit
- Adding VPD support -> commit commit commit
- Adding missing dmi chassis in the CLI : done by merging pam's branch in 0.3.0
- When using ISOLINUX default kernel modules file must be modules.pci instead of modules.pcimap: this will solve a common problem reported by users -> commit
- Removing multiple spaces (some tools reports strings features multiple space) -> commit
- Using NULL to end CLI's structures -> commit
0.3.2
- Adding hotkey for VPD (menu) commit
- Menu: Don't display non populated VPD' items commit
- Adding hdt> show vpd commit
- Adding disk's partition detection commit
- Adding a cli mode for detecting disks commit
- Using modules.alias to manage kernel modules commit
- Menu must use 25 lines instead of 24 commit
- Removing dmi> show memory clear screen commit
0.3.3
- Adding more memory information (mostly integrating memdump.c32)
- Fixing Backspace behavior commit
- Cursor is blinking commit
- Prevent cursor from disappearing commit
0.3.4
- Improving menu's layout to maximize display usage
- Adding more external benchmark/diagnose tools (cpu/disks/...)
- Adding more Fn keys (F1-F12)
- Memory detection fall-back to dmi type 6 when type 17 isn't available
- Adding filesystem detection
- Adding mbr detection (info can be grav at http://sourceforge.net/projects/bootinfoscript/)
0.4.0
- Adding a saving inventory feature
- Adding IPMI
Development
hdt is currently under development here: http://git.zytor.com/?p=users/erwan/hdt.git
Mailing List
You can subscribe to the mailing list here
HDT's archives can be reach here
Ideas
The following ideas represents possible new features for hdt. If users reports which ideas they really needs, priorities to develop items could change ;o)
Lua Scripting
HDT currently detects hardware and generate an output using a menu or via a cli. It could be interesting to add a lua support to manage scripting. It could be possible to load a file that describes items that user want to detect.
Saving reports
Current versions can't save a report as we can't reach a writable storage. When using PXELINUX, we can imagine using a tftp put method. Using GPXELINUX, we can imagine using some http/ftp put methods.
Improving disks detection
Implementing a simple IDE stack would help in detecting PATA & ATAPI devices. Detecting SATA devices would require implementing specific drivers. The Coreboot project features some, why not doing some teaming on that.
Implementing SMART
Once the previous items would be complete, it could be possible to add a smartmontools like feature to display smart status of devices.
Adding IPMI
IPMI could give hdt more information about the current hardware like sensors, etc... While using the "open" interface we can reach the local BMC but sounds it needs a lot of code.
Adding VPD
Virtual Product Data displays the following : BIOS Build ID, Product Name, Box Serial Number, Motherboard Serial Number, Machine Type/Model,
Detecting Disk's Partitions
Title is pretty obvious ;o)
Adding more benchmark/diagnose tools
For every kind of component, it could be possible to launch a benchmark/diagnose tool. UBCD have many of them, why not trying to load some from both menu & cli mode.