Oscar,
Let me try to make the example a little clearer.
Facts:
Introscope shows CPU % for a process for
all CPUs.
Top shows CPU % for a process for a
single CPU.
Scenario:
The
top command shows the below. We are watching the [font=Courier New]java[font] command for the [font=Courier New]javauser[font] user name, in [color=#ff0000]red[color] (this is faked data, so don't worry about the load averages and such):
load averages: 2.84, 2.47, 2.65; up 32+09:57:26 08:54:56
778 processes: 744 sleeping, 32 zombie, 2 on cpu
CPU states: 86.4% idle, 8.9% user, 4.6% kernel, 0.0% iowait, 0.0% swap
Memory: 128G phys mem, 65G free mem, 32G total swap, 32G free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
[color=#ff0000][font=Courier New]22796 javauser 393 0 0 1383M 1304M cpu/1 27.2H 100.00% java[/font][/color]
14037 db2inst1 535 59 0 11G 10G sleep 345.8H 3.72% db2sysc
5119 MGR 1 50 0 297M 230M cpu/2 0:42 1.62% TPDRVR
715 legacy 1 53 0 308M 181M sleep 0:28 0.36% CFIT
14425 db2inst7 404 59 0 5304M 3888M sleep 57.5H 0.35% db2sysc
162 root 96 59 0 23M 10M sleep 171:09 0.26% nscd
16196 db2inst7 1 52 0 96M 45M sleep 0:00 0.22% db2
16219 db2inst7 1 54 0 97M 46M sleep 0:00 0.22% db2bp
16191 javauser 1 48 0 4216K 2728K sleep 0:00 0.22% top
24240 legacy 1 59 0 311M 191M sleep 0:08 0.21% CFIT
16226 db2inst4 1 52 0 96M 45M sleep 0:00 0.20% db2
16235 db2inst4 1 54 0 97M 46M sleep 0:00 0.19% db2bp
28946 expomon 1 59 0 3160K 1856K sleep 0:00 0.00% top
1401 root 9 58 0 330M 295M sleep 147:21 0.00% cvd
23636 root 1 100 -20 2564K 1356K sleep 29:06 0.00% xntpd
The
prtdiag command shows the below for the CPU details:
==== Processor Sockets ====================================
Version Location Tag
-------------------------------- --------------------------
Intel(R) Xeon(R) CPU X5570 @ 2.93GHz CPU 1
Intel(R) Xeon(R) CPU X5570 @ 2.93GHz CPU 2
So, according to top, the java process we are monitoring is taking up 100% of one of the CPUs (CPU 1), and according to prtdiag, there are only 2 CPUs. So how much CPU of the whole system is the java process taking? The quick formula I mentioned before could be written as [font=Courier New]a / b = x[font], where [font=Courier New]a[font] is the CPU percentage according to top,[font=Courier New]b[font] is the number of CPUs according to prtdiag, and [font=Courier New]x[font] is the percentage of CPU utlization for the entire server. Based on the above scenario, this becomes:
[font=Courier New]100.00 / 2 = 50.00[font]
Conclusion:
Based on what we know about the [font=Courier New]CPU:Utiliation % (process)[font] metric in Introscope (according to the documentation I referenced earlier), we should expect that it should also be displaying 50%.