Introduction
Knowledge of your CPUinformation is important when you are trying to debug a performance-related issue, when you are upgrading your hardware, or when you are just trying to understand how your Linux-based system works. Linux has several built-in tools that enable you to obtain information about CPU architecture, usage statistics, and temperature values among others.
In the previous guide we have talked about how to monitor systems with the aid of top and htop, and this guide refer to the most useful commands to get the information about the CPU in Linux.
Before checking the system info, OS understanding is the essential. Start with our guide What is Linux? An Introduction to Linux and Its Popular Distributions.
1. lscpu - Quick Summary of the CPU Architecture
One of the most convenient tool to check CPU information is the lscpu. It gets information for /proc/cpuinfo and sysfs, then prints it in a clean and the readable format.
#lscpu
What You Can Learn
- CPU Architecture and op-mode
- Address size
- Vendor ID
- Model name
- CPU family and sockets
- Number of cores and threads
- Virtualization Features, etc.
One can get a quick summary of the CPU information without having to read the configuration files with lscpu.
Many info commands of the system run from the terminal. Learn essential commands in 10 Linux Basic Commands Every Beginner Should Know.
2. cat /proc/cpuinfo – Per Core Detail
The information provided by the /proc/cpuinfo is the raw CPU information that is obtained directly from the kernel. Unlike lscpu, this file displays per core information and is useful for the advanced analysis.
What You Can Learn
- Vendor_id and CPU family
- Model and model name
- Stepping
- CPU MHz
- Cache size
- Core id and CPU cores, etc.
- Real-time CPU load
- Processes that consuming the highest CPU
- Per-core usage
- System uptime and load
averages
After retrieving the system info, monitoring the running processes helps to maintain system health. Check out: Linux Process Management for Beginners and Monitor System Performance with top and htop.
- CPU usage per core
- Idle time
- iowait
- Soft IRQs
- User/system time distribution
- CPU socket type
- Maximum supported speed
- Current speed
- Manufacturer
- Version and status
- Voltage information
- CPU temperature
- Voltage readings
- Fan speeds
System info commands are useful for the troubleshooting security issues. Secure your servers by reading How to Secure SSH Access on Linux.
- Model name
- Cores count
- Speed
- CPU min/max frequencies
- lscpu – Best quick overview
- /proc/cpuinfo – Raw detail data
- htop – Real-time monitoring
- mpstat – Per-core usage stats
- sensors – Temperature monitoring









Post a Comment