Operating System - Linux
1752815 Members
6193 Online
108789 Solutions
New Discussion

Query about the top ouptu on Linux Server

 
jaivinder
Frequent Advisor

Query about the top ouptu on Linux Server

Hi!

I have dual CPU linux server on which a user application had run for 7 days. There is a script that takes the top results after 5 minutes during this run. Please refer to the top result , below 571 is the process id for teh application that i am monitoring for CPU usuage. From the top result, i have concluded that :

CPU% for Application ( PID : 571 ) is 107
Ideal CPU id is 98.3%

QUERY:
------

(1) Why the application's CPU% is more than 100.

(2) From the top results that i have generated for 7 days, it has been found that sometimes the CPU% is even more than 200%

Throughout the span there was no crashing of the apllication because of this increase in CPU and it ran perfectly fine for 7 days. Is this correct ???

If yes, then how is :

Total CPU = CPU used + CPU Ideal.


----------------------------
Please find the top result :
-----------------------------
top - 00:57:24 up 16 days, 6:22, 2 users, load average: 0.36, 0.33, 0.29
Tasks: 81 total, 1 running, 80 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.6% us, 0.1% sy, 0.0% ni, 98.3% id, 0.1% wa, 0.0% hi, 0.0% si
Mem: 8310676k total, 2920448k used, 5390228k free, 158708k buffers
Swap: 2031608k total, 0k used, 2031608k free, 1456932k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
571 oas 15 0 3011m 1.1g 15m S 107 13.7 47:59.98 java
1 root 16 0 1992 548 472 S 0 0.0 0:02.42 init
2 root RT 0 0 0 0 S 0 0.0 0:00.21 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.32 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.02 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:00.11 migration/2
7 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:00.10 migration/3
9 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/3
10 root 5 -10 0 0 0 S 0 0.0 0:00.07 events/0
1 REPLY 1
Sreedharamurthy K
Respected Contributor

Re: Query about the top ouptu on Linux Server

If the program is threaded and you have more than one CPUs, then the program can utilize more than one CPU. Here top is not showing more than one CPU. So from that it cannot show utilizations more than 100.

And even considering dual CPU, at anytime, the utilization canot go beyond 200%. IF it is showing more than this, there is something wrong with the calculations.. You may want to check with top tool if there is already a known issue around the version you are using.