Getting System Specifications

  • Posted on: 28 May 2018
  • By: charm

Overview

Xubuntu Linux has several software packages that can give a range of information about the hardware inside a computer. I'm going to cover quite a few packages here so refurbishers can decide what they want to use. Not all the packages are included in the default installation of Xubuntu, some may have to be installed through the software centre.

Graphical Tools

System Profiler and Benchmark (aka hardinfo)

Hardinfo, known in the software centre as System Profiler and Benchmark, is a great graphical tool that's both comprehensive and end-user friendly. If you have a lot of volunteers without Linux experience this is one of the best visually appealing tools. Hardinfo also has limited benchmarking (CPU and FPU-related) and can export all the information to either an HTML or text file.

Hardinfo can be installed through the software centre (search for hardinfo or system profiler) or through the command line. The commands I'm giving below also install a few other programs to help hardinfo probe for more information:

sudo apt install hardinfo lm-sensors hddtemp
sudo dpkg-reconfigure hddtemp
sudo modprobe eeprom

The first command installs 3 software packages: hardinfo for general hardware information, lm-sensors for hardware sensor information, and hddtemp for information about hard drive temperature. The second command sets up the hard drive temperature program: hddtemp installs with the first command but doesn't get configured unless you tell it to. The last command is to enable more information about RAM modules. For systems that use DDR4 you may have to type:

sudo modprobe ee1004

Hardinfo generates a lot of information, but it's laid out in a way that it looks a lot like system information software on other operating systems. Beyond the basic CPU, Motherboard, RAM, and Hard Drive information, hardinfo can tell you interesting things like what Linux kernel modules are currently loaded, what user accounts exist on the system, what IP connections the system is making (interesting if you want to know all the connections the system is making to other systems), all the environment variables loaded into memory, and the ARP table just to name a few extras. All this might seem like gobbledy-gook right now, but it can be quite helpful for future troubleshooting.

System Info (different from Sysinfo below)

System Info is another software package that shows up in the software centre if you search for system information. I recommend against installing System Info because it installs a lot of extra software (over 25 software dependencies) on the system it's being installed to and it doesn't provide much information compared to other tools. System Info is a tool developed by the folks who brought the Cinnamon desktop to Linux Mint. If you're running Linux Mint Cinnamon edition System Info might already be installed. System Info displays some very basic information about a system including: OS, Linux Kernel, Memory, Hard Drives, and Graphics Card. It's missing information such as the motherboard, optical hardware, and any PCI/PCIe device information. System Info is a good tool if you're running Linux Mint Cinnamon and only need very basic information, but at our project we like to provide our end users with a bit more detail about what's inside.

Sysinfo (mono-based)

Sysinfo is a different tool from the Cinnamon desktop-based tool mentioned above. Like System Info, sysinfo provides a limited amount of information (though it does display a bit more information than System Info) and is dependent on a bunch of extra library files - meaning more software packages get installed to the system. Most of sysinfo's dependencies are mono-based (.NET framework) library files. Although sysinfo can display motherboard chipset information (click the Hardware tab then the Motherboard drop down) it doesn't actually display the model of the motherboard. Clicking on the graphics card tab doesn't necessarily display the model of graphics card, but you can get this in sysinfo by clicking the hardware tab and selecting Graphic card from the drop down menu near the top right side. The one nice thing about sysinfo is that it displays the amount of VRAM (video RAM) if you click on the graphics card tab (in the above shot the NVidia tab).

Semi-Graphical Tools

The following tools are not really graphical tools, but can be used to generate system (and other) information that can be opened in a web browser.

Phoronix Test Suite

Phoronix Test Suite (PTS), phoronix-test-suite in the software repositories, is a comprehensive benchmarking and system information tool. PTS is the tool we use at our refurbishing project because of it's simplicity and because it can run a variety of over 180 hardware tests/benchmarks. You can install phoronix-test-suite either through the software centre or through the command line by typing:

sudo apt install phoronix-test-suite

Clicking on the whisker start menu mouse, System, and the Phoronix Test Suite icon brings up a non-graphical display of system hardware information and lets you run a test, a suite of tests, system sensor information (temperature), or run tests repetitively.

We normally run PTS from the command line to get system information by typing (PTS needs to be installed first):

phoronix-test-suite system-info

What's nice about PTS is that it displays the right amount of information in a concise manner (CPU, motherboard, RAM, disk, graphics card). PTS also displays chipset, audio, network and software information using this command, but it's easy to only pick what you need from the information (we generally write down CPU, motherboard, RAM, disk and graphics card information).

Phoronix Test Suite can also display some of this information semi-graphically if you type:

phoronix-test-suite gui

The command above launches a web browser and displays CPU, motherboard, RAM, disk, graphics card and some software information as well as graphs of current CPU frequency, temperature, usage, GPU frequency and temperature, memory usage, drive write speed, system iowait states, and system temperature. The web page also displays the most popular PTS tests, recently updated tests, and any benchmarks you might have recently saved (you may have to hit your browser's refresh button to see newly saved test results).

It's worth mentioning here that the version of Phoronix Test Suite in the *buntu software repositories is quite old (even the latest *buntu 18.04 is still several versions behind). You can download the latest Phoronix Test Suite files (stable or development) from the Phoronix Test Suite web site. Later versions display information a bit more cleanly, but don't display quite as much by default.

In addition to displaying system information PTS can run almost 200 different benchmarks and can be used to compare benchmarks between systems. Benchmarks can be uploaded to a local phoromatic server or the openbenchmarking.org web site. Setting up a local phoromatic web server is beyond the scope of this post and we don't do it in our project, but advanced refurbishing projects might want to consider it to provide precise benchmarks for clients.

To see all the tests available in the phoronix-test-suite type:

phoronix-test-suite list-available-tests

Not all tests are runnable on all systems. You can see a list of tests recommended to run on a particular system by typing:

phoronix-test-suite list-recommended-tests

To run a test type:

phoronix-test-suite run <test name>

Where <test name> is the name of the test. If the test isn't installed yet phoronix-test-suite will ask if you want to install the test. You may have to provide the password for the user with adminstrative priviledges in order to install dependencies a test might have (the perl programming language for example). To install a test, but not run it, type:

phoronix-test-suite install <test name>

To install and benchmark a particular test type:

phoronix-test-suite benchmark <test name>

As hinted earlier PTS can also do entire suites of benchmarks. Simply typing phoronix-test-suite on the command line will give you lots of information about the host of different options PTS can do. More information about Phoronix Test Suite can be found on the PTS homepage.

Lshw-gtk and Lshw

Lshw-gtk is a semi-graphical hardware listing tool. Like sysinfo, lshw-gtk only displays a limited amount of information and you have to "drill down" (by clicking) to get particular bits of information. Lshw-gtk prompts you to enter the password of a user with administrative priviledges. You also have to click on the refresh button in order for lshw-gtk to display any information. Sadly lshw-gtk misses a lot of important information.

The non-graphical version of lshw is a lot more comprehensive and can display information on the command line or in a HTML, XML, or JSON file. There are a number of different ways to run lshw but the method we use is:

sudo lshw -html > myspecs.html
firefox myspecs.html

The first command runs lshw with administrative priviledges and redirects the output to a file called myspecs.html. The second command launches the Firefox web browser and opens the myspecs.html file, displaying the system information in Firefox. Running lshw without sudo still works, but displays less information. You can also use the switch -sanitize to "sanitize" the output of lshw so that it doesn't display important details like Serial Numbers.

Command Line Tools

The /proc filesystem

The /proc filesystem contains information about system hardware. Use the (concatinate) cat command to redirect /proc info to the screen or to another file. This might seem a bit complicated for beginners, but when combined with other commands can be quite powerful.  For example:

cat /proc/cpuinfo | grep -m 1 "model name"

The first part of the command concatenates /proc/cpuinfo to the screen. The pipe symbol | lets the next command (grep) act on the output of cat /proc/cpunifo. Grep searches the output of cat /proc/cpuinfo for the string inside the quotes, in this case "model name." Normally this command would display more than once on a system with more than 1 core. The -m 1 switch after the grep command limits the output to 1 instance.

Without the -m1 the output is:

model name    : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
model name    : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
model name    : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
model name    : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz

With the -m 1 switch the output is a single:

model name    : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz

To list memory information you can use:

cat /proc/meminfo | grep MemTotal

There are over 200 devices under the /proc file system, most of which are not all that helpful for displaying system information. Other commands are useful for displaying specific information about hardware.

Dmidecode

Dmidecode is another command line tool that's useful for displaying particular information about a system. One great use for dmidecode is for getting the serial number of an O.E.M. (Original Equipment Manufacturer) computer. OEM systems are pre-built systems from the likes of Dell, Lenovo, HP, etc. For example:

sudo dmidecode -s system-serial-number

The output of which is simply the serial number. Dmidecode can take several other switches and display a lot of different information. We haven't used dmidecode in the past at our project, but it may become a part of our process as we look to automate our inventory system.