Operating System - HP-UX
1753257 Members
5977 Online
108792 Solutions
New Discussion юеВ

Re: need explanation on TOP cmd.

 
SOLVED
Go to solution
fizan
Super Advisor

need explanation on TOP cmd.

Load averages: 0.88, 0.80, 0.85
245 processes: 204 sleeping, 41 running
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.78 5.9% 0.0% 2.0% 92.1% 0.0% 0.0% 0.0% 0.0%
1 0.65 10.9% 0.0% 23.8% 65.3% 0.0% 0.0% 0.0% 0.0%
2 1.09 89.1% 0.0% 3.0% 7.9% 0.0% 0.0% 0.0% 0.0%
3 0.78 64.4% 0.0% 12.9% 22.8% 0.0% 0.0% 0.0% 0.0%
4 0.91 5.9% 0.0% 5.9% 88.1% 0.0% 0.0% 0.0% 0.0%
5 1.06 84.2% 0.0% 15.8% 0.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.88 43.6% 0.0% 10.9% 45.5% 0.0% 0.0% 0.0% 0.0%

Memory: 1337268K (741416K) real, 633952K (172940K) virtual, 1010752K free Page# 1/6

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
5 ? 5765 root 241 20 35392K 13356K run 3764:17 71.18 71.05 perl
1 ? 5704 root 152 20 27716K 7520K run 5923:49 67.51 67.39 opcactm
2 ? 4622 root 241 20 12048K 5680K run 0:09 77.00 34.74 perl
5 ? 5712 oracle 154 20 102M 1552K sleep 1644:51 20.99 20.95 oracleopenview
4 ? 2511 root 152 20 797M 614M run 625:03 10.91 10.89 java
5 ? 5207 root 152 20 226M 27752K run 996:35 5.40 5.39 native_t
4

How to calculate the cpu usuage and memory usuage from top cmd?

thanks
4 REPLIES 4
madhuchakkaravarthy
Trusted Contributor

Re: need explanation on TOP cmd.

hi


process with high utilization will be given first priority.

its better to use glance

glance ---c ---> cpu utilization

m------> memory utilization

regards

MC
fizan
Super Advisor

Re: need explanation on TOP cmd.

in this server no sar and glance installed so only top.
Dennis Handly
Acclaimed Contributor
Solution

Re: need explanation on TOP cmd.

>How to calculate the CPU usage and memory usage?

5 ? 5765 root 241 20 35392K 13356K run 3764:17 71.18 71.05 perl

It's using 71.05% of a CPU.
A rough value of memory is 35392K, or 35.3 Mb, only 13.35 Mb is resident.

Per CPU:
CPU LOAD USER NICE SYS IDLE
0 0.78 5.9% 0.0% 2.0% 92.1%

CPU 0 is 92.1% idle.
Pramod Kumar M
Advisor

Re: need explanation on TOP cmd.

Hi,

CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.78 5.9% 0.0% 2.0% 92.1% 0.0% 0.0% 0.0% 0.0%
1 0.65 10.9% 0.0% 23.8% 65.3% 0.0% 0.0% 0.0% 0.0%
2 1.09 89.1% 0.0% 3.0% 7.9% 0.0% 0.0% 0.0% 0.0%
3 0.78 64.4% 0.0% 12.9% 22.8% 0.0% 0.0% 0.0% 0.0%
4 0.91 5.9% 0.0% 5.9% 88.1% 0.0% 0.0% 0.0% 0.0%
5 1.06 84.2% 0.0% 15.8% 0.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.88 43.6% 0.0% 10.9% 45.5% 0.0% 0.0% 0.0% 0.0%

Each line against the CPU is giving how much CPU used for each column. And at the bottom avg gives the avg CPU utilization for each column including all the 6 CPU's.

For example CPU 2,3 and 5 spends considerable time in user mode.

Avg CPU in user mode is calculated as below.
(5.9 + 10.9 + 89.1 + 64.4 + 5.9 + 84.2)/6 = 43.4

It implies on an average 43.4 % CPU is utilized for user mode (Avg 100% is when all the 6 CPU are utilized 100% )

-Pramod.