Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to check cpu load on Linux via command line (in Red Hat & CentOS)?

user-image
Question added by Sajjad Haider Abbasi , Sr. Manager NOC & Support , Global Connect Synergy
Date Posted: 2014/01/14
Hazem Hemaid
by Hazem Hemaid , Linux System Engineer , Training and Development Institute

best for me is "htop"

Muhammad Anzar
by Muhammad Anzar , DevOps/DevSecOps Architect , Confidential

Top command will give cpu load information.

Mahmoud Mamdouh
by Mahmoud Mamdouh , Linux System Administrator (Remote position) , 2X4.ru

cat /proc/loadavg

or

top c

or

sar INTERVAL COUNTOFTIME

alireza hoseini
by alireza hoseini , PHP & Python back-end developer , Fax.ir

Another tool that is more customized, colorful and gives you much more options is HTOP. As you get used to it you'll love it. It's not installed by default.

 

To install htop on ubuntu, type the following command in terminal:

  • sudo apt-get install htop

Screenshot of the app:

 

Anil Mathew Kadakethu
by Anil Mathew Kadakethu , Technical Support Manager , M H Alshaya

top

Deleted user
by Deleted user

try to use other commands as well or enhance the capacity of top command with different switches. TOP command it good but if you are running out of CPU or Memory then top command wont be helping you at that moment. 

 

use 

 

sar210

it will give you output after2 seconds and it will go for10 times. 

 

or use top -c -d2 command and then press SHIFT+O to setup output of top with different way. 

 

or execute top command and then press1 and see the value of CPU, it will display you all CPU load or CPU by CPU. 

Mohamed Zohny
by Mohamed Zohny , Red hat Architect/Trainer , ValueSYS for Information Technology

# uptime

OR

# top

More Questions Like This