The Wayback Machine - https://web.archive.org/web/20240531082127/https://www.geeksforgeeks.org/7-ways-to-check-cpu-clock-speed-in-linux/
Open In App

7 Ways to Check CPU Clock Speed in Linux

Last Updated : 20 Apr, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

In general, a higher clock speed means a faster CPU. However, many other factors come into play. Your CPU processes many instructions (low-level calculations like arithmetic) from different programs every second. The clock speed measures the number of cycles your CPU executes per second, measured in GHz (gigahertz). A “cycle” is technically a pulse synchronized by an internal oscillator, but for our purposes, they’re a basic unit that helps understand a CPU’s speed. During each cycle, billions of transistors within the processor open and close.

On Linux, there are a number of commands that can be used to obtain the CPU speed of the processor. In this article, we’ll look at some of the most widely used commands for obtaining CPU speed about the CPU.

Method 1: Using hardinfo

Hardinfo is a graphical user interface (GUI) tool that produces reports on various hardware components. It is written in Gtk. However, if there is no GUI display available, it can also be run from the command line.

$ hardinfo | less
Ways to Check CPU Clock Speed on Linux

Using hardinfo

Method 2: From /proc/cpuinfo

The /proc/cpuinfo system file lists each CPU Core. System’s individual speed.

$ cat /proc/cpuinfo | grep MHz
Ways to Check CPU Clock Speed on Linux

From /proc/cpuinfo

Method 3: Using Inxi script

Inxi is a Linux script that allows you to print the system’s hardware details. To print processor-related details, use the inxi command with the ‘-C’ option:

$ sudo  inxi -C
Ways to Check CPU Clock Speed on Linux

Using Inxi script

Method 4: Using hwinfo

In Linux, the hwinfo command prints detailed details about each hardware unit.

$ sudo hwinfo --cpu
Ways to Check CPU Clock Speed on Linux

Using hwinfo

Method 5: Using lscpu

Lscpu is a Linux command that displays CPU architecture details. The util-linux package contains this instruction.

$ sudo lscpu
Ways to Check CPU Clock Speed on Linux

Using lscpu

Method 6: Using Dmesg

Dmesg displays messages from the kernel ring buffer and dumps them to /var/log/messages in Linux.

$ sudo dmesg | grep MHz
Ways to Check CPU Clock Speed on Linux

Using Dmesg

Method 7: Using i7z

The i7z is a dedicated tool for displaying processor states on Intel i3, i5, and i7 based CPUs.

$ sudo i7z
Ways to Check CPU Clock Speed on Linux

Using i7z

On Linux-based systems such as Ubuntu, Fedora, Debian, CentOS, and others, those were some commands to check CPU speed.


Similar Reads

Difference Between User-CPU-Time and System-CPU-Time in UNIX
Unix systems have a time utility that allows a user to see where their application took significant time to process. The syntax of this utility is as follows: time <command-to-be-timed>Its result generally has three categories as follows: real <time> user <time> sys <time>User CPU time and system CPU time are both measures o
3 min read
How to Check and Patch Meltdown CPU Vulnerability in Linux?
Here we will check and Patch Meltdown CPU Vulnerability in Linux. CPU hardware implementations are found vulnerable to side-channel attacks, They are known as: MeltdownSpectre Meltdown: It is a security vulnerability found in hardware that is affecting Intel x86 microprocessors, IBM POWER processors, and some ARM-based microprocessors too. Security
3 min read
Monitor Linux Daemon, Filesystem, CPU, Network and Files Using Monit
Monit is a utility tool for monitoring & managing processes, files, directories, and filesystems on a Unix System. A superpower or a super ability to start a process if it's not running, restart a process if it isn't responding, and stop a process if it uses high resources, that's what Monit(or) does in layman's terms. Monitoring is basically t
3 min read
How to Monitor CPU and GPU temperature in Linux
This article will discuss How to Monitor CPU and GPU temperature in Linux. There are several ways to do this here in this article we will discuss a few of them. The utilization of currently running programs or applications has no bearing on the CPU or GPU temperature. Operating sensitive computer parts, such as CPUs, at temperatures over a predeter
4 min read
How to Impose High CPU Load and Stress Test on Linux Using ‘Stress-ng’ Tool
The system must have the capacity to handle a high workload regarding systems administration activities including performance testing. One such method used in testing the robustness of a system at its limit points is known as stress testing. Stress-ng is also a great versatile and strong tool for stress testing. This article is aimed at providing i
6 min read
Iperf Command to Test Speed, Performance and Bandwidth of Network in Linux
There is a great degree of flex in how the packets are delivered and overall bit rate and packet payload size can be controlled. iperf is a tool that is used to perform network performance measurement and tuning. iperf is an open-source software which is written in C language. Jperf is a GUI version for doing the same job. The core concept work beh
2 min read
Testing Website Loading Speed in Linux Terminal
We will see How to test a website loading speed in a Linux terminal. Here a website response time (which is getting back the result) will have a great impact on user experience. Because the loading or response is very slow we will be so frustrated. Even if our site has a slow response time the user may get a bad experience. So in this article, we w
3 min read
How to Boost Linux Server Internet Speed with TCP BBR?
BBR is a modern TCP congestion control algorithm. It was put to the test in Google's data center networks and on some of their public-facing Web servers, such as Google.com and YouTube. By estimating the bottleneck bandwidth and RTT to calculate a pacing rate, it aims to optimize both throughput and latency/RTT. One target, which distinguishes it f
2 min read
Fast - Test Internet Speed from Linux Terminal
In this article, we are going to see how to check your system's internet speed from Linux terminal using Fast.com, it is a web-based application and used to check internet speed. Netflix owned these tools as speed testing services. It is free, fast, and easy to use. Installation:Installing into the current directory Step 1: Download the file from G
1 min read
Shell Script to Check Hard Disk Revolutions Per Minute (RPM) Speed
RPM is an acronym for Revolution Per Minute. RPM is the number of revolutions a hard disk makes in a single minute. Normally, the higher the RPM of a disk the better it is, however with higher RPM comes higher cost. Below is a shell script to check the RPM of a hard disk. Using hdparm command: hdparm is an acronym for hard disk parameter. hdparm is
3 min read
Article Tags :