cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
jeesshnasree Flight Engineer
Flight Engineer

How to check high CPU usage on Linux Os

hi team,

 

could you please provide commands for high cpu utilzation on Linux OS.

 

how to resolve high CPU usage alerts on Linux OS .

 

could you please share your valuable information.

Labels (1)
0 Kudos
6 Replies
Flight Engineer NunoMartins Flight Engineer
Flight Engineer

Re: How to check high CPU usage on Linux Os

There are many many tools for this - most basic is just running top - I personally prefer to use nmon. Once in nmon you can select cpu and it will tell you whats what. If you looking to see more what processes are hamming the CPU then you wanna use ps - example if you wanna see the top 10 processes hitting the cpu: ps -eo pid,comm,%cpu,%mem --sort=-%cpu | head -n 10

but  like i said there are many many tools for this. 

If you want to have something in place to trigger a notification on some kind of threshold again there are many tools but i like running zabbix with a email notification. 

0 Kudos
Reply
Loading...
jeesshnasree Flight Engineer
Flight Engineer

Re: How to check high CPU usage on Linux Os

Hi @NunoMartins , thanks for your your valuable information but actually I don’t have install tools. Actually I am getting alerts through nagios but when login and check with top , w  commands doesn’t shows like 100% thread usage. 

 

I thought its flase alarms but someone told that’s genuine alerts. But didn’t get which process ID usage . Still I didn’t fine any process ID for 100% thread CPU usage . I don’t have access for install tools . 

 

Could please provide commands for capture that 100% thread cpu usage .

 

 

0 Kudos
Reply
Loading...
Crycore Cadet
Cadet

Re: How to check high CPU usage on Linux Os

Hi @jeesshnasree ,

Using top with the -H option should list all of the threads currently running in your Linux environment. From the listed threads, you can determine how much of your processing is being consumed. I hope this helps.

0 Kudos
Reply
Loading...
Moderator
Moderator

Re: How to check high CPU usage on Linux Os

You can also do a

top -o cpu

To sort by CPU usage.

0 Kudos
Reply
Loading...
Flight Engineer littlebigfab Flight Engineer
Flight Engineer

Re: How to check high CPU usage on Linux Os

Hi,

@Razique, it probably depend on top version. On my RHEL7, it's :

top -o %CPU

 

@jeesshnasree: what you describe seems to be a poorly configured Nagios monitor. It's totally normal that your CPU is used 100% when it has a non-blocking operation to make. Why wouldn't it? A more efficient monitor would watch for an extended duration of high CPU usage, that duration having to be determined based on the theoretically expected CPU usage for that server.

In a perfect world, CPU usage should always be close to 100%. If not, you're wasting your available computing power.

Reply
Loading...
Moderator
Moderator

Re: How to check high CPU usage on Linux Os

Thanks for correction @littlebigfab 

0 Kudos
Reply
Loading...
Join the conversation
You must log in to join this conversation.