Gathering information about Linux systems is an essential sysadmin task. There are many tools that can help in this regard. However, one command that can gather a lot of information with only a few options and parameters is inxi.
inxi tool is a full-featured CLI utility that displays all kinds of system information in your console/terminal/shell or in your IRC client. It gathers this information from a variety of sources about your system, so you can see what you want in an easy-to-use format.
[ You might also like: Linux tools: Getting the message out with dmesg ]
Red Hat Enterprise Linux (RHEL) systems do not have inxi installed by default. It is available through the epel-release repository. To install
inxi, execute the following commands on your system
On RHEL 7, install
inxi using the
# yum install -y epel-release # yum install -y inxi
On RHEL 8, the
dnf command looks like this:
# dnf install -y epel-release # dnf install -y inxi
Below is a synopsis of all the
inxi command options:
inxi is run without any options, it displays one line of system data and the
# inxi CPU: Single Core Intel Core i5-7360U (-MCP-) speed: 2304 MHz Kernel: 4.18.0-240.22.1.el8_3.x86_64 x86_64 Up: 19h 39m Mem: 371.9/810.7 MiB (45.9%) Storage: 14.01 GiB (36.3% used) Procs: 118 Shell: Bash inxi: 3.3.03
inxi can be run with normal user privileges, but if possible, use a privileged account as some of the options require additional access.
To show basic system information, run the command with this option:
# inxi -b
Here is sample output from a virtual machine (output truncated for brevity):
System: Host: server1 Kernel: 4.18.0-240.22.1.el8_3.x86_64 x86_64 bits: 64 Console: tty pts/0 Distro: Red Hat Enterprise Linux release 8.4 (Ootpa) Machine: Type: Virtualbox System: innotek product: VirtualBox v: 1.2 serial: N/A Mobo: Oracle model: VirtualBox v: 1.2 serial: N/A BIOS: innotek v: VirtualBox date: 12/01/2006 Battery: ID-1: BAT0 charge: 50.0 Wh (100.0%) condition: 50.0/50.0 Wh (100.0%) volts: 10.0 min: 10.0 CPU: Info: Single Core Intel Core i5-7360U [MCP] speed: 2304 MHz Network: Device-1: Intel 82540EM Gigabit Ethernet driver: e1000 Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus Drives: Local Storage: total: 14.01 GiB used: 5.07 GiB (36.2%) Info: Processes: 121 Uptime: 18h 34m Memory: 810.7 MiB used: 369.6 MiB (45.6%) Init: systemd runlevel: 3 Shell: Bash inxi: 3.3.03
To show the full system output, use:
# inxi -F <Long list - omitted>
To show just CPU information:
# inxi -C CPU: Info: Single Core model: Intel Core i5-7360U bits: 64 type: MCP cache: L2: 4 MiB Speed: 2304 MHz min/max: N/A Core speed (MHz): 1: 2304
To show the network device(s) and driver:
# inxi -N Network: Device-1: Intel 82540EM Gigabit Ethernet driver: e1000 Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus
To display advanced network device info, such as interface, speed, MAC ID, state, etc., run:
# inxi -n Network: Device-1: Intel 82540EM Gigabit Ethernet driver: e1000 IF: enp0s3 state: up speed: 1000 Mbps duplex: full mac: 08:00:27:e6:6a:a9 Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus
To see hard disk information:
# inxi -D Drives: Local Storage: total: 14.01 GiB used: 5.12 GiB (36.6%) ID-1: /dev/sda vendor: VirtualBox model: VBOX HARDDISK size: 14.01 GiB
To show repositories configured on the system:
# inxi -r Repos: No active yum repos in: /etc/yum.conf Active yum repos in: /etc/yum.repos.d/epel-modular.repo 1: epel-modular ~ https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=$basearch&infra=$infra&content=$contentdir No active yum repos in: /etc/yum.repos.d/epel-playground.repo No active yum repos in: /etc/yum.repos.d/epel-testing-modular.repo No active yum repos in: /etc/yum.repos.d/epel-testing.repo Active yum repos in: /etc/yum.repos.d/epel.repo 1: epel ~ https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir Active yum repos in: /etc/yum.repos.d/redhat.repo 1: satellite-tools-6.9-for-rhel-8-x86_64-eus-debug-rpms ~ https://cdn.redhat.com/content/eus/rhel8/$releasever/x86_64/sat-tools/6.9/debug 2: satellite-tools-6.9-for-rhel-8-x86_64-eus-source-rpms ~ https://cdn.redhat.com/content/eus/rhel8/$releasever/x86_64/sat-tools/6.9/source/SRPMS 3: rhel-atomic-7-cdk-3.0-beta-source-rpms ~ https://cdn.redhat.com/content/beta/rhel/atomic/7/$basearch/cdk/3.0/source/SRPMS
To show partitions on the server or system:
# inxi -p Partition: ID-1: / size: 12.2 GiB used: 4.75 GiB (38.9%) fs: xfs dev: /dev/dm-0 ID-2: /boot size: 1014 MiB used: 307.5 MiB (30.3%) fs: xfs dev: /dev/sda1 ID-3: [SWAP] raw-size: 820 MiB size: N/A (hidden?) used: N/A (hidden?) fs: swap dev: /dev/rhel-swap ID-4: swap-1 size: 820 MiB used: 75.8 MiB (9.2%) fs: swap dev: /dev/dm-1
To display memory data with all available slots:
# inxi -m Memory: RAM: total: 810.7 MiB used: 373 MiB (46.0%) RAM Report: message: No RAM data was found.
To show a short report of memory data:
# inxi --memory-short Memory: RAM: total: 810.7 MiB used: 373 MiB (46.0%) RAM Report: message: No RAM data was found.
To show processes including CPU and RAM usage:
# inxi -t Processes: CPU top: 5 of 118 1: cpu: 0.2% command: pmdaproc pid: 27122 2: cpu: 0.2% command: pmdalinux pid: 27125 3: cpu: 0.1% command: pmdaopenmetrics.python started by: python3 pid: 27132 4: cpu: 0.0% command: systemd pid: 1 5: cpu: 0.0% command: [kthreadd] pid: 2 System RAM: total: 810.7 MiB used: 373 MiB (46.0%) Memory top: 5 of 118 1: mem: 27.2 MiB (3.3%) command: platform-python pid: 35915 2: mem: 18.5 MiB (2.2%) command: pmdaopenmetrics.python started by: python3 pid: 27132 3: mem: 10.5 MiB (1.2%) command: sssd_nss pid: 78029 4: mem: 10.1 MiB (1.2%) command: pmlogger pid: 124136 5: mem: 10.1 MiB (1.2%) command: sssd_be pid: 7802
If you want to show the top 10 processes consuming CPU and RAM, run:
# inxi -t cm10 < Lengthy output omitted >
inxi command also supports various verbosity levels (0-8), which can also be used to query data. For example:
# inxi -v 4 - will show Partition(-P) and Disk info(-D). # inxi -v 3 - will show Advanced CPU (-C), battery (-B), and network (-n)
Now, let's look at a situation when a specific resource is not available and
inxi is run against it. For example, I have no USB device connected to my server. Let's query for USB devices on the system by using the
# inxi -J USB: Message: No USB data was found. Server?
This means no USB is connected. On a server where USB is available, the output looks like this:
# inxi -J USB: Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 1.1
Hopefully, these examples are helpful. For more details and the available options, try:
# inxi -h
[ Free online course: Red Hat Enterprise Linux technical overview. ]
And, here's a bonus, non-system information command:
# inxi -w Weather: Report: temperature: 27.8 C (82 F) conditions: Heavy rain Locale: current time: Thu 10 Jun 2021 01:50:15 PM EDT (America/New_York) Source: WeatherBit.io
It can be a challenge for sysadmins to gather information about their servers, but the
inxi utility helps to simplify that process. Install it on your RHEL server and explore all the great information it provides. Now you can gather CPU, memory, storage, networking, and even weather data with one simple command.