Linux System information and Hardware Information

How to getting System Information about CPU, Memory, Network, and Disk I/O on Linux operating system. Linux the essential for DevOps Roles.

CPU

You can use the mpstat command to get processors related statistics.

[huupv@huupv devopsroles]$ mpstat 2 10

The screen output terminal:

Linux System Information

Using the lscpu command to get CPU information

[huupv@huupv devopsroles]$ lscpu

The screen output terminal:

Linux System Information 02

Find CPU model/speed information

[huupv@huupv devopsroles]$ cat /proc/cpuinfo

Count processor

[huupv@huupv devopsroles]$ grep -c processor /proc/cpuinfo

DISK

To get information about your disk in real time with the iostat command

[huupv@huupv devopsroles]$ iostat -kx 2

NETWORK

To see your network services with the netstat command

The command as below

[huupv@huupv devopsroles]$ netstat -ntlp # Open TCP sockets
[huupv@huupv devopsroles]$ netstat -nulp # Open UDP sockets
[huupv@huupv devopsroles]$ netstat -nxlp # Open Unix sockets

LIST HARDWARE

You can report exact memory configuration, Mainboard configuration, Firmware version, CPU version, and speed cache.

Using lshw command

[huupv@huupv devopsroles]$ sudo lshw

To show PCI info

[huupv@huupv devopsroles]$ lspci -tv

Getting USB info

[huupv@huupv devopsroles]$ lsusb -tv

Display BIOS Infomation

[huupv@huupv devopsroles]$ sudo dmidecode -q | less

How to read speed test on disk sda

[huupv@huupv devopsroles]$ sudo hdparm -tT /dev/sda

The screen output terminal:

[sudo] password for huupv:

/dev/sda:
Timing cached reads: 5668 MB in 2.00 seconds = 2837.23 MB/sec
Timing buffered disk reads: 110 MB in 3.08 seconds = 35.73 MB/sec

Using badblocks command test for an unreadable block on disk sda

[huupv@huupv devopsroles]$ badblocks -s /dev/sda

Process monitoring

List processes in a hierarchy

[huupv@huupv devopsroles]$ ps -e -o pid,args --forest

How to list processes “% CPU” usage

[huupv@huupv devopsroles]$ ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'

List processes mem (KB) usage

[huupv@huupv devopsroles]$ ps -e -orss=,args= | sort -b -k1,1n

Interactive monitoring

You can use the tool for dynamic monitoring

[huupv@huupv devopsroles]$ top
[huupv@huupv devopsroles]$ htop
[huupv@huupv devopsroles]$ atop
[huupv@huupv devopsroles]$ sudo iotop

Conclusion

Thought the article, you can use Linux system information and hardware Information as above. I hope will this your helpful.

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.