Showing posts with label inxi. Show all posts
Showing posts with label inxi. Show all posts

Tuesday, March 7, 2017

How to find complete system and hardware details on linux using inxi?

Inxi is a command line tool that can be used to find the complete system and hardware details such as;
     Hardware,
     CPU,
     Drivers,
     Xorg,
     Desktop,
     Kernel,
     GCC version,
     Processes,
     RAM usage,
     and other useful information.
  
      Installation
Inxi is available in the default repositories of most modern GNU/Linux operating systems. So, we can simply install it by running the following commands.
On Debian based system:
sudo apt-get install inxi
On Fedora:
sudo yum install inxi
On RHEL based systems:
Install EPEL repository:
sudo yum install epel-release
Then, install inxi using command:
sudo yum install inxi


Before we start using it, we can run the command that follows to check all application dependencies plus recommends, and various directories, and display what package(s) we need to install to add support for a given feature.

inxi --recommends
Example :
root@linuxforfreshers.com:~$ inxi --recommends
inxi will now begin checking for the programs it needs to operate. First a check of
the main languages and tools inxi uses. Python is only for debugging data collection.
-----------------------------------------------------------------------------------------
Bash version: 4.3.11(1)-release
Gawk version: 4.0.1
Sed version:
Sudo version: 1.8.9p5
Python version: 2.7.6
-----------------------------------------------------------------------------------------
Test One: Required System Directories.
If one of these system directories is missing, inxi cannot operate:

Required file system: /proc................................................. Present
Required file system: /sys.................................................. Present

All the required directories are present.
-----------------------------------------------------------------------------------------
Test Two: Required Core Applications.
If one of these applications is missing, inxi cannot operate:

Required application: df (info: partition data)............................. /bin/df
Required application: gawk (info: core tool)................................ /usr/bin/gawk
Required application: grep (info: string search)............................ /bin/grep
Required application: lspci (info: hardware data)........................... /usr/bin/lspci
Required application: ps (info: process data)............................... /bin/ps
Required application: readlink.............................................. /bin/readlink
Required application: sed (info: string replace)............................ /bin/sed
Required application: tr (info: character replace).......................... /usr/bin/tr
Required application: uname (info: kernel data)............................. /bin/uname
Required application: uptime................................................ /usr/bin/uptime
Required application: wc (info: word character count)....................... /usr/bin/wc

All the required applications are present.
-----------------------------------------------------------------------------------------
Test Three: Script Recommends for Graphics Features. If you do not use X these do not matter.
If one of these applications is missing, inxi will have incomplete output:

Recommended X application: glxinfo (info: -G glx info)...................... /usr/bin/glxinfo
Recommended X application: xdpyinfo (info: -G multi screen resolution)...... /usr/bin/xdpyinfo
Recommended X application: xprop (info: -S desktop data).................... /usr/bin/xprop
Recommended X application: xrandr (info: -G single screen resolution)....... /usr/bin/xrandr

All the recommended applications are present.
-----------------------------------------------------------------------------------------
Test Four: Script Recommends for Remaining Features.
If one of these applications is missing, inxi will have incomplete output:

Recommended application: dmidecode (info: -M if no sys machine data)........ /usr/sbin/dmidecode
Recommended application: file (info: -o unmounted file system).............. /usr/bin/file
Recommended application: hddtemp (info: -Dx show hdd temp).................. /usr/sbin/hddtemp
Recommended application: ifconfig (info: -i ip lan-deprecated).............. /sbin/ifconfig
Recommended application: ip (info: -i ip lan)............................... /sbin/ip
Recommended application: sensors (info: -s sensors output).................. /usr/bin/sensors
Recommended application: lsusb (info: -A usb audio;-N usb networking)....... /usr/bin/lsusb
Recommended application: modinfo (info: -Ax,-Nx module version)............. /sbin/modinfo
Recommended application: runlevel (info: -I runlevel)....................... /sbin/runlevel
Recommended application: sudo (info: -Dx hddtemp-user;-o file-user)......... /usr/bin/sudo

All the recommended applications are present.
-----------------------------------------------------------------------------------------
Test Five: System Directories for Various Information.
If one of these directories is missing, inxi will have incomplete output:

System directory: /sys/class/dmi/id (info: -M system, motherboard, bios).... Present
System directory: /dev (info: -l,-u,-o,-p,-P,-D disk partition data)........ Present
System directory: /dev/disk/by-label (info: -l,-o,-p,-P partition labels)... Present
System directory: /dev/disk/by-uuid (info: -u,-o,-p,-P partition uuid)...... Present
System directory: /var/run/dmesg.boot (info: -C,-f (BSD only)).............. Missing

The following directories are missing from your system:
Directory: /var/run/dmesg.boot
These directories are created by the kernel, so don't worry if they are not present.
-----------------------------------------------------------------------------------------
All tests completed.

Basic Usage of inix
Show Linux System Information

To find the quick view of the system information, run the following command from Terminal.
Inxi
Example:
root@linuxforfreshers.com:~$ inxi
CPU~Dual core Intel Core2 CPU 6400 (-MCP-) clocked at 2133.000 Mhz Kernel~3.16.0-76-generic x86_64 Up~4 days Mem~2591.5/3888.8MB HDD~515.8GB(47.0% used) Procs~292 Client~Shell inxi~1.9.17 

Show Linux Kernel and Distribution Info
The below command will gives hostname, kernel version and Distro information usinf flag -S ( s is capital letter)

Inxi -S

Example:
root@linuxforfreshers.com:~$ inxi -S
System:    Host: LINUXFORFRESHERS.COM Kernel: 4.4.0-59-generic x86_64 (64 bit) Desktop: Gnome Distro: Ubuntu 14.04 trusty

Find Audio/Sound hardware details


we can retrieve a particular hardware details. For example to retrieve the Audio/Sound hardware details, run the following command using -A flag:
inxi –A

Example:
root@linuxforfreshers.com:~$ inxi -A
Audio:     Card: NVIDIA High Definition Audio Controller driver: snd_hda_intel Sound: ALSA ver: k3.16.0-76-generic

Find Graphic card details

Using flag -G get the Graphic card information.

root@linuxforfreshers.com:~$ inxi -G
Graphics:  Card: NVIDIA GT218 [GeForce 210]
           X.Org: 1.16.0 drivers: nouveau (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz, 1920x1080@60.0hz
           GLX Renderer: Gallium 0.4 on NVA8 GLX Version: 3.0 Mesa 10.3.2

Find Linux Hard Disk Information
To view the full hard disk information, run the following command.
inxi -D
root@linuxforfreshers.com:~$ inxi -D
Drives:    HDD Total Size: 515.8GB (47.0% used) 1: id: /dev/sda model: TOSHIBA_MQ01ACF0 size: 500.1GB
           2: USB id: /dev/sdb model: Cruzer_Blade size: 15.7GB

Find Linux system or PC Model Information

To display the Bios and Motherboard details using -M flag.
inxi -M
root@linuxforfreshers.com:~$ inxi -M
Machine:   System: Hewlett-Packard product: HP Compaq dc7700 Small Form Factor
           Mobo: Hewlett-Packard model: 0A54h Bios: Hewlett-Packard version: 786E1 v01.10 date: 04/13/2007

Find list of repositories

list of available repositories in our system using flag -r.
inxi -r
root@linuxforfreshers.com:~$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
           deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
           deb http://in.archive.ubuntu.com/ubuntu/ trusty universe
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty universe
           deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe
           deb http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
           deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
           deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
           deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu trusty-security main restricted
           deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
           deb http://security.ubuntu.com/ubuntu trusty-security universe
           deb-src http://security.ubuntu.com/ubuntu trusty-security universe
           deb http://security.ubuntu.com/ubuntu trusty-security multiverse
           deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

Find Linux Hard Disk Partition Details
To print the number of partitions use the flag -p

 inxi -p

Example:
root@linuxforfreshers.com:~$ inxi -p
Partition: ID: / size: 451G used: 225G (53%) fs: ext4 ID: /boot size: 361M used: 219M (65%) fs: ext4
           ID: swap-1 size: 8.00GB used: 0.08GB (1%) fs: swap

Find the Network Card information

To print the NIC details use the flag -N

Inxi -N

Example:
root@linuxforfreshers.com:~$ inxi -N
Network:   Card: Intel 82566DM Gigabit Network Connection driver: e1000e

Finding linux Memory process usage

Using flag -I u will get number of processes , uptime and memory usage.

Inxi –I
Example:
root@linuxforfreshers.com:~$ inxi -I
Info:      Processes: 271 Uptime: 7:19 Memory: 2258.1/3887.7MB Client: Shell (bash) inxi: 1.9.17

Monitor Linux CPU Temperature and Fan Speed
Using flag -s u ge the cpu sensors information
Inxi -s

Example:

root@linuxforfreshers.com:~$ inxi -s
Sensors:   System Temperatures: cpu: 51.0C mobo: 61.0C gpu: 61.0
           Fan Speeds (in rpm): cpu: 2132 fan-2: 0 fan-3: 1430 fan-4: 1173


Find the top 5 active process running on linux

Using following command to get top 5 active process and cpu utilization.
Inxi -t c

Example:
root@linuxforfreshers.com:~$ inxi -t c
Processes: CPU - % used - top  5 active
           1: cpu: 41.5% command: chrome pid: 21733
           2: cpu: 13.6% command: chrome pid: 3949
           3: cpu: 4.5% command: chrome pid: 3792
           4: cpu: 3.9% command: compiz pid: 3497
           5: cpu: 3.2% command: chrome pid: 4989

Find weather report

Inxi will also display the Weather details of your location.

inxi -w

root@linuxforfreshers.com:~$ inxi -W vijayawada,andhrapradesh
Weather:   Conditions: 86 F (30 C) - haze Time: December 16, 4:55 PM IST


Finding total complete Hardware details
Viewing Complete Hardware details using -F flag.
inxi -F
root@linuxforfreshers.com:~$ inxi -F
System:    Host: LINUXFORFRESHERS.COM Kernel: 3.16.0-76-generic x86_64 (64 bit) Desktop: Gnome Distro: Ubuntu 14.04 trusty
Machine:   System: Hewlett-Packard product: HP Compaq dc2200 Small Form Factor
           Mobo: Hewlett-Packard model: 0A54h Bios: Hewlett-Packard version: 678E1 v01.10 date: 04/13/2006
CPU:       Dual core Intel Core2 CPU 6400 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 ssse3 vmx)
           Clock Speeds: 1: 1596.00 MHz 2: 1596.00 MHz
Graphics:  Card: NVIDIA GT218 [GeForce 210]
           X.Org: 1.16.0 drivers: nouveau (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz, 1920x1080@60.0hz
           GLX Renderer: Gallium 0.4 on NVA8 GLX Version: 3.0 Mesa 10.3.2
Audio:     Card: NVIDIA High Definition Audio Controller driver: snd_hda_intel Sound: ALSA ver: k3.16.0-76-generic
Network:   Card: Intel 82566DM Gigabit Network Connection driver: e1000e
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: 00:1b:78:8b:33:c4
Drives:    HDD Total Size: 515.8GB (47.0% used) 1: id: /dev/sda model: TOSHIBA_MQ01ACF0 size: 500.1GB
           2: USB id: /dev/sdb model: Cruzer_Blade size: 15.7GB
Partition: ID: / size: 451G used: 226G (53%) fs: ext4 ID: /boot size: 361M used: 273M (81%) fs: ext4
           ID: swap-1 size: 8.00GB used: 0.37GB (5%) fs: swap
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   System Temperatures: cpu: 48.0C mobo: N/A gpu: 62.0
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 276 Uptime: 4 days Memory: 2555.3/3888.8MB Client: Shell (bash) inxi: 1.9.17