AIX 系统CPU消耗过高诊断过程

通过系统的topas 查询消耗过高的进程:


CPU  User%  Kern%  Wait%  Idle%                 Reads      4221  Rawin         0
ALL   73.3    4.0    0.0   22.7                 Writes     1286  Ttyout     1693
                                                Forks         5  Igets         0
Network  KBPS   I-Pack  O-Pack   KB-In  KB-Out  Execs         5  Namei       593
Total   26.2K    15.0K   14.1K   13.3K   12.9K  Runqueue   41.5  Dirblk        0
                                                Waitqueue   0.0
Disk    Busy%     KBPS     TPS KB-Read KB-Writ                   MEMORY
Total     0.3    15.1K  1640.0  2744.7   12.4K  PAGING           Real,MB  163840
                                                Faults      756  % Comp     32
FileSystem        KBPS     TPS KB-Read KB-Writ  Steals        0  % Noncomp   4
Total              1.4K    2.8K   1.3K   0.7    PgspIn        0  % Client    4
                                                PgspOut       0
Name            PID  CPU%  PgSp Owner           PageIn        0  PAGING SPACE
oracle     11534438  54.2  11.3 opcore          PageOut       0  Size,MB   32768
oracle      2163230   1.3   9.1 opcore          Sios          0  % Used      0
oracle      4653672   0.7   9.1 opcore                           % Free    100

查询v$process 查看addr和消耗的pga:

SQL> select SPID,pid,addr,PGA_USED_MEM,PGA_ALLOC_MEM,PGA_FREEABLE_MEM,PGA_MAX_MEM from gv$process where  spid in (11534438);

SPID              PID ADDR             PGA_USED_MEM PGA_ALLOC_MEM PGA_FREEABLE_MEM PGA_MAX_MEM
---------- ---------- ---------------- ------------ ------------- ---------------- -----------
11534438          133 07000008E33BF110      4511361       5920049          1048576     6247729

通过 spid 查询sid,

select s.sid,p.spid from v$session s,v$process p where s.paddr=p.addr and p.spid=11534438;

       SID SPID
---------- ----------
      2059 11534438

通过sid查询sql_text

SQL> select sql_text from v$session s,v$sqltext  q where  s.sql_hash_value =q.hash_value and s.sql_address=q.address and s.sid=2059;

SQL_TEXT
------------------------------------------------------------------------------------------------------------------------
call cbsd_coordinator.startexecute( :1  , :2  )

最后可见, cbsd_coordinator.startexecute( :1 , :2 )存在大量消耗CPU的问题。

猜你喜欢

转载自blog.csdn.net/a743044559/article/details/80781696
AIX
今日推荐