Getting useful hardware information is very important on a Linux system.
With Arch Linux, this is quite simple.
Install dmidecode.
[root@darkstar Downloads]# pacman -Sy dmidecode |
This will query sysfs to return hardware information.
This command will print the model name of the computer`s motherboard.
[root@darkstar Downloads]# dmidecode -t 2 | cut -d" " -f2,3,4 | sed -n 8p |
Print full Motherboard information like this.
[root@darkstar Downloads]# dmidecode -t 2 # dmidecode 3.3 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0002, DMI type 2, 15 bytes Base Board Information Manufacturer: ASRock Product Name: B85M Pro4 Version: Serial Number: M80-41006403023 Asset Tag: Features: Board is a hosting board Board is replaceable Location In Chassis: Chassis Handle: 0x0003 Type: Motherboard Contained Object Handles: 0 |
This is how to print information about installed RAM.
[root@darkstar Downloads]# dmidecode -t 17 | grep 'Bank\|Size\|Locator' | awk '{print $2,$3,$4}' No Module Installed ChannelA-DIMM0 Locator: BANK 0 8 GB ChannelA-DIMM1 Locator: BANK 1 8 GB ChannelB-DIMM0 Locator: BANK 2 8 GB ChannelB-DIMM1 Locator: BANK 3 |
And to get information about the currently installed CPU.
[root@darkstar Downloads]# dmidecode -t 4 | grep Version | awk '{print $2,$3,$4,$5,$6,$7}' Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz |
This dmidecode type will print the BIOS information.
[root@darkstar Downloads]# dmidecode -t 0 # dmidecode 3.3 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: P1.90 Release Date: 12/06/2013 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 8 MB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed 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) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 4.6 |
To get the bootup time of your Arch Linux installation, use this command.
[root@darkstar Downloads]# systemd-analyze Startup finished in 3.072s (kernel) + 7.422s (userspace) = 10.495s graphical.target reached after 7.378s in userspace |
This is yet another way to gather information about your computer system.
┌──[jason@11000000.10101000.00000001.00000011]─[~/Downloads] └──╼ ╼ $ hwloc-gather-topology ./$(uname -n) I/O files won't be saved (--io not given). DMI files won't be saved (--dmi not given). *** Note that this tool may be slow on large nodes or when I/O is enabled. *** Gathering main files and directories... file /proc/cmdline file /proc/cpuinfo file /proc/meminfo file /proc/mounts file /proc/stat file /proc/version file /proc/self/cpuset file /proc/self/cgroup file /proc/driver/nvidia directory /sys/devices/system/cpu/ directory /sys/bus/cpu/devices/ directory /sys/devices/system/node/ directory /sys/bus/node/devices/ directory /sys/class/dmi/id/ directory /sys/devices/virtual/dmi/id/ directory /sys/kernel/mm/hugepages/ directory /sys/fs/cgroup/ Exporting /proc/hwloc-nofile-info Exporting x86 CPUID using hwloc-gather-cpuid Topology files gathered in ./darkstar.tar.bz2 Expected topology output stored in ./darkstar.output XML topology stored in ./darkstar.xml WARNING: Do not post these files on a public list or website unless you WARNING: are sure that no information about this platform is sensitive. |
hwloc-gather-topology is a Linux-specific tool that saves the relevant topology files of the current machine into a tarball (and the corresponding lstopo outputs). These files may be used later (possibly offline) for simulating or debugging a machine without actually running on it.
The lstopo command may also generate a nice topology of the hardware in your system.
┌──[jason@11000000.10101000.00000001.00000011]─[~/Downloads] └──╼ ╼ $ lstopo Keyboard shortcuts: Zooming, scrolling and closing: Zoom-in or out ...................... + - Reset scale to default .............. 1 Try to fit scale to window .......... F Resize window to the drawing ........ r Toggle auto-resizing of the window .. R Scroll vertically ................... Up Down PageUp PageDown Scroll horizontally ................. Left Right Ctrl+PageUp/Down Scroll to the top-left corner ....... Home Scroll to the bottom-right corner ... End Refresh the topology ................ F5 Show this help ...................... h H ? Exit ................................ q Q Esc Configuration tweaks: Toggle factorizing or collapsing .... f Switch display mode for indexes ..... i Toggle displaying of object text .... t Toggle displaying of obj attributes . a Toggle displaying of CPU kinds ...... k Toggle color for disallowed objects . d Toggle color for binding objects .... b Toggle displaying of legend lines ... l Export to file with current config .. E Command-line options for the current configuration tweaks: To export to PDF: lstopo <your options> topology.pdf |
This is how to create a nice PDF topology to view with Firefox.
┌──[jason@11000000.10101000.00000001.00000011]─[~/Downloads] └──╼ ╼ $ lstopo topology.pdf |
Also, it may be run in a text-only mode, this is useful in the terminal.
┌──[jason@11000000.10101000.00000001.00000011]─[~/Downloads] └──╼ ╼ $ lstopo-no-graphics Machine (23GB total) Package L#0 NUMANode L#0 (P#0 23GB) L3 L#0 (6144KB) L2 L#0 (256KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0) L2 L#1 (256KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1) L2 L#2 (256KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#2) L2 L#3 (256KB) + L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#3) HostBridge PCI 00:19.0 (Ethernet) Net "enp0s25" PCIBridge PCIBridge PCI 03:00.0 (Ethernet) Net "enp3s0" PCIBridge PCI 04:00.0 (VGA) PCI 00:1f.2 (SATA) Block(Disk) "sdd" Block(Disk) "sdb" Block(Disk) "sdc" Block(Disk) "sda" |
So, very useful ways to get information about a computer system.