Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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

user-image
Question ajoutée par Sajjad Haider Abbasi , Manager – IP Core Networks , Satcomm (Pvt) Ltd.
Date de publication: 2014/01/14
Hazem Hemaid
par Hazem Hemaid , Linux System Engineer , Training and Development Institute

best for me is "htop"

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

Top command will give cpu load information.

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

cat /proc/loadavg

or

top c

or

sar INTERVAL COUNTOFTIME

alireza hoseini
par 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
par Anil Mathew Kadakethu , Technical Support Manager , M H Alshaya

top

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
par Mohamed Zohny , Red hat Architect/Trainer , ValueSYS for Information Technology

# uptime

OR

# top

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?