Your favorite commands/packages for collecting system information?

uname

$ uname -a
Linux server 5.12.7-300.fc34.x86_64 #1 SMP Wed May 26 12:58:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

CPU-X: A Linux remake of CPU-Z


lshw

$ sudo lshw -json
# Ulfnic: Showing a small clip of output below...
        {
          "id" : "cpu",
          "class" : "processor",
          "claimed" : true,
          "handle" : "DMI:0033",
          "description" : "CPU",
          "product" : "AMD Ryzen 3 2200G with Radeon Vega Graphics",
          "vendor" : "Advanced Micro Devices [AMD]",
          "physid" : "33",
          "businfo" : "cpu@0"
$ sudo lshw -html > lshw_out.htm && YOUR_BROWSER_HERE lshw_out.htm

lshw

11 Likes

I use hardinfo. It’s in my repo:

  • sudo apt-cache search hardinfo
  • sudo apt-get install hardinfo
6 Likes

At work when I am asked for this type of information, it’s usually across many, many servers. I usually use Ansible to pull the info with various parameters, depending what I am looking for.

3 Likes

I’m also a fan of CPU-X, and good old fashioned neofetch

7 Likes

Hadn’t heard of CPU-X before, Looks really good though, Big fan of CPU-Z on Windows so going to give that one a look and see.

One of my favorites is the inxi command, Lots of useful information in a fairly easy to read format:

5 Likes

My GOTO is inxi or neofetch as well. I like that inxi is easy to filter results with a single flag, no grepping required.

I always thought it would be amazing if Linux had a cpu-z equivalent but literally never searched for such a thing lol, good to know it’s there.

I use ifconfig a lot, although it’s deprecated now. The newer ip command is good too and has some nice ARP features I would usually have to install another package for.

4 Likes

I’ve used inxi, lshw, and of course neofetch (and screenfetch)…but never heard of cpu-x until today. TIL! I think i prefer cpu-x for interactive getting of the info, but inxi and lshw for outputting the info to a text file…regardless, all of these tools are so great!

2 Likes

Conky of course, the only one who gives the info in real time.

4 Likes

I use neofetch for system information and bpytop for system status.

2 Likes

I love inxi. It has a lot of options to display hardware info. I mentioned it on the Terminal Tuesday thread.

4 Likes

This is a good refreshment on these tools. You get so used to using the same one all of the time that you forget that you had forgotten about the others.

2 Likes

Hardware for Linux offers something called a Probe. It snapshots your computer’s hardware state and uploads it to their public database with a unique identifier allowing you to share it with a link and contribute to helping FOSS creators spots trends among many other things like the HDD/SSD Desktop-Class Reliability Test study.

Probes are available in AppImage/Docker/Snap/Flatpak format - how to guide.

They also use the database to create cool charts like these!

A few example screenshots:

Step aside distrowatch! Here’s the market share among probes last year…
(20.10/20.04/18.04 Ubuntu combines to 38.31%)
image

Display server market share among probes last year…
image

Desktop market share among probes last year…
image

2 Likes

Ok, I might be at risk of revealing my age by saying this, but here goes…Back in the day, I used to work for a small company that supported small to medium sized business’s. I was a Novell Field Engineer and I often used a tool named ConfigReader to pull the config of a Netware server for each of my clients. It detailed some of the same information being listed here.

This post was a trip down memory lane for me.

2 Likes

Conky is that tool that instantly transforms a desktop into a hacker’s awesome computer! The classics are often the bst! :+1:

3 Likes

Haven’t used Conky in a long time, but love that little app and how it can transform your desktop.

1 Like

For me the newcool thing for me is eBPF. In short this is a facility now built into recent kernels. To install this toolset just install

bpfcc-tools

This will bring in example programs and documentation about how they were written. Useful commands are

biotop-bpfcc a kernel level I/O top

21:52:54 loadavg: 1.82 1.68 1.55 1/2941 370980

PID    COMM             D MAJ MIN DISK       I/O  Kbytes  AVGms
0                       R 259 0   nvme0n1      5     0.0   0.60
466    dmcrypt_write/2  W 259 0   nvme0n1     33     0.0   0.30

biolatency-bpfcc Summarize block device I/O latency as a histogram every second:

 usecs               : count     distribution
     0 -> 1          : 0        |                                        |
     2 -> 3          : 0        |                                        |
     4 -> 7          : 0        |                                        |
     8 -> 15         : 4        |                                        |
    16 -> 31         : 158      |**************************************  |
    32 -> 63         : 163      |****************************************|
    64 -> 127        : 137      |*********************************       |
   128 -> 255        : 25       |******                                  |
   256 -> 511        : 7        |*                                       |
   512 -> 1023       : 82       |********************                    |
  1024 -> 2047       : 6        |*                                       |
  2048 -> 4095       : 136      |*********************************       |
  4096 -> 8191       : 3        |                                        |
  8192 -> 16383      : 3        |                                        |

tcpconnect-bpfcc Trace TCP active connections

Tracing connect ... Hit Ctrl-C to end
PID    COMM         IP SADDR            DADDR            DPORT 
3547   iwatch       4  127.0.0.1        127.0.0.1        25     

and gethostlatency-bpfcc Show latency for getaddrinfo/gethostbyname. useful for trying to figure out why your webpages are lloading slowly when your network speed seems fine.

TIME      PID    COMM                  LATms HOST
22:04:21  3547   iwatch                 0.05 localhost
22:04:21  376439 exim4                114.13 bathosphere
22:04:21  376444 pool-geoclue           2.03 location.services.mozilla.com
22:04:28  3547   iwatch                 0.03 localhost
22:04:29  376499 exim4                  5.89 bathosphere 

For more info please read Brendan Gregg’s Blog post on eBPF

Have fun.

2 Likes

inxi

Highly customizable, wide coverage, descriptive yet concise.

As articled by Red Hat
As seen on the Linux Mint forums under How to Get Help!

“inxi strives to support the widest range of operating systems and hardware, from the most simple consumer desktops, to the most advanced professional hardware and servers.”

GitHub - smxi/inxi: inxi is a full featured CLI system information tool. It is available in most Linux distribution repositories, and does its best to support the BSDs.

http://manpages.org/inxi

Example:

inxi -Fxxxrz

F for full, xxx for max info on each catgeoty, r for repos and z for hiding security info like IPs.

System:
  Kernel: 5.8.0-55-generic x86_64 bits: 64 compiler: gcc v: 10.2.0 
  Desktop: KDE Plasma 5.19.5 tk: Qt 5.14.2 wm: kwin_x11 dm: SDDM 
  Distro: Ubuntu 20.10 (Groovy Gorilla) 
Machine:
  Type: Kvm System: QEMU product: Standard PC (Q35 + ICH9, 2009) 
  v: pc-q35-5.1 serial: <filter> Chassis: type: 1 v: pc-q35-5.1 
  serial: <filter> 
  Mobo: N/A model: N/A serial: N/A BIOS: SeaBIOS v: 1.14.0-1.fc33 
  date: 04/01/2014 
CPU:
  Info: 3x Single Core (4-Die) model: AMD EPYC (with IBPB) bits: 64 
  type: MCM SMP arch: Zen rev: 2 L2 cache: 1536 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 
  bogomips: 20978 
  Speed: 3496 MHz min/max: N/A Core speeds (MHz): 1: 3496 2: 3496 
  3: 3496 
Graphics:
  Device-1: Red Hat QXL paravirtual graphic card driver: qxl v: kernel 
  bus ID: 00:01.0 chip ID: 1b36:0100 
  Display: x11 server: X.Org 1.20.9 compositor: kwin_x11 driver: qxl 
  note: display driver n/a unloaded: fbdev,modesetting,vesa 
  resolution: 1024x768~60Hz s-dpi: 96 
  OpenGL: renderer: llvmpipe (LLVM 11.0.0 256 bits) v: 4.5 Mesa 20.2.1 
  compat-v: 3.1 direct render: Yes 
Audio:
  Device-1: Intel 82801I HD Audio vendor: Red Hat QEMU Virtual Machine 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:293e 
  Sound Server: ALSA v: k5.8.0-55-generic 
Network:
  Device-1: Red Hat Virtio network driver: virtio-pci v: 1 port: 0700 
  bus ID: 01:00.0 chip ID: 1af4:1041 
  IF-ID-1: enp1s0 state: up speed: -1 duplex: unknown mac: <filter> 
Drives:
  Local Storage: total: 20.00 GiB used: 7.87 GiB (39.3%) 
  ID-1: /dev/vda model: N/A size: 20.00 GiB speed: <unknown> serial: N/A 
  scheme: GPT 
Partition:
  ID-1: / size: 17.36 GiB used: 7.64 GiB (44.0%) fs: ext4 dev: /dev/dm-1 
  ID-2: /boot size: 704.5 MiB used: 222.2 MiB (31.5%) fs: ext4 
  dev: /dev/vda3 
Swap:
  ID-1: swap-1 type: partition size: 976.0 MiB used: 0 KiB (0.0%) 
  priority: -2 dev: /dev/dm-2 
Sensors:
  Message: No sensors data was found. Is sensors configured? 
Repos:
  Packages: 1816 apt: 1805 flatpak: 5 snap: 6 
  Active apt repos in: /etc/apt/sources.list 
  1: deb http://gb.archive.ubuntu.com/ubuntu/ groovy main restricted
  2: deb http://gb.archive.ubuntu.com/ubuntu/ groovy-updates main restricted
  3: deb http://gb.archive.ubuntu.com/ubuntu/ groovy universe
  4: deb http://gb.archive.ubuntu.com/ubuntu/ groovy-updates universe
  5: deb http://gb.archive.ubuntu.com/ubuntu/ groovy multiverse
  6: deb http://gb.archive.ubuntu.com/ubuntu/ groovy-updates multiverse
  7: deb http://gb.archive.ubuntu.com/ubuntu/ groovy-backports main restricted universe multiverse
  8: deb http://security.ubuntu.com/ubuntu groovy-security main restricted
  9: deb http://security.ubuntu.com/ubuntu groovy-security universe
  10: deb http://security.ubuntu.com/ubuntu groovy-security multiverse
Info:
  Processes: 205 Uptime: 1m Memory: 3.84 GiB used: 648.2 MiB (16.5%) 
  Init: systemd v: 246 runlevel: 5 Compilers: gcc: N/A Shell: Bash 
  v: 5.0.17 running in: konsole inxi: 3.1.07
5 Likes

On the subject of inxi, I found out that you can determine the real capacity for memory on your motherboard. HP lists 4gb as the maximum for the 505b.

inxi -Mmxxxz told me 8gb. inxi was correct. :grinning:

` ~$ sudo inxi -Mmxxxz

Machine: Type: Desktop System: Hewlett-Packard product: HP 505B Microtower PC v: N/A
serial: Chassis: type: 3 serial: N/A
Mobo: PEGATRON model: 2A99 v: 6.01 serial: BIOS: American Megatrends v: 6.16
date: 03/18/2011
Memory: RAM: total: 7.77 GiB used: 3.33 GiB (42.8%)
Array-1: capacity: 8 GiB slots: 2 EC: None max module size: 4 GiB note: est.
Device-1: DIMM0 size: 4 GiB speed: 1333 MT/s type: DDR3 detail: synchronous
bus width: 64 bits total: 64 bits manufacturer: 2C80000000000000
part-no: 16JTF51264AZ-1G4D1 serial: N/A
Device-2: DIMM1 size: 4 GiB speed: 1333 MT/s type: DDR3 detail: synchronous
bus width: 64 bits total: 64 bits manufacturer: 6207000000000000 part-no: N/A
serial: N/A
`

1 Like

Thank you, i’ll save that for next time.

I wish I owned something called PEGATRON.