Diagnosing Oracle memory on HP using GLANCE

 大家在监控主机的时候,发现内存剩余很少,就担心,特别使用了网管软件,发现报警就担心,其实各种操作系统在使用内存的时候是都不一样的,下面我把aix下怎么监控内存使用给大家转载一篇文章,是oracle知识库里比较经典的一篇介绍hp下监控内存的。


   Monitoring Oracle Memory usage on HP
-----------------------------
 
Hp's "glance" utility can be found in /opt/perf/bin
This is a add on so it may need to be installed


To launch glance do the following:


/opt/perf/bin> ./glance


For this example we are looking at the PMON process for Oracle pid=3691*


when glance is launched we see the PROCESS LIST screen:


                                  PROCESS LIST                      Users=    3
                              User      CPU Util     Cum     Disk         Block
  Process Name   PID   PPID Pri Name    ( 200% max)    CPU   IO Rate    RSS    On
  --------------------------------------------------------------------------------
  ora_pmon_L8  24346      1 156 lsupport  0.0/ 0.0     0.0  0.0/ 0.0  41.8mb OTHER
  ora_pmon_R8   3691 *    1 156 rsupport  0.0/ 0.0     0.0  0.0/ 0.0   5.4mb   SEM
  ora_pmon_T8  22471      1 156 tsupport  0.0/ 0.0     0.0  0.0/ 0.0   5.6mb   SEM
  ora_pmon_V8  15321      1 156 usupport  0.0/ 0.0     0.1  0.0/ 0.0   5.8mb   SEM
  ora_pmon_X7  11970      1 156 xsupport  0.0/ 0.0     0.0  0.0/ 0.0   5.4mb   SEM
  ora_pmon_X8   5666      1 156 xsupport  0.0/ 0.0     0.0  0.0/ 0.0   5.6mb   SEM
  ora_pmon_X8  26978      1 156 xsupport  0.0/ 0.0     0.0  0.0/ 0.0   4.8mb   SEM
  ora_qmn0_V8  15343      1 156 usupport  0.0/ 0.0     0.0  0.0/ 0.0   3.1mb   SEM
  ora_reco_L7  21296      1 156 lsupport  0.0/ 0.0     0.0  0.0/ 0.0   9.4mb OTHER
  ora_reco_L8  24356      1 156 lsupport  0.0/ 0.0     0.0  0.0/ 0.0  32.1mb OTHER
  ora_reco_R7   5501      1 156 rsupport  0.0/ 0.0     0.0  0.0/ 0.0  12.7mb OTHER
                                                                    Page 3 of 7


1)We can see that this process has a RSS(resident set size) of 5.4m 
  actual memory used. 


   To focus in on the 3691 PMON process type in "s" then supply the process id


  Resources PID:  3691, ora_pmon_R817   PPID:     1 euid:1040 User: rsupport    
  --------------------------------------------------------------------------------
  CPU Usage (sec) :     0.00 Log Reads :      0 Rem Log Rds/Wts:      0/      0  
  User/Nice/RT CPU:     0.00 Log Writes:      0 Rem Phy Rds/Wts:      0/      0   
  System CPU      :     0.00 Phy Reads :      0
  Interrupt CPU   :     0.00 Phy Writes:      0 Total RSS/VSS  :  5.4mb/ 25.9mb
  Cont Switch CPU :     0.00 FS Reads  :      0 Traps / Vfaults:      0/      0   
  Scheduler       :     HPUX FS Writes :      0 Faults Mem/Disk:      0/      0   
  Priority        :      156 VM Reads  :      0 Deactivations  :      0
  Nice Value      :       20 VM Writes :      0 Forks & Vforks :      0
  Dispatches      :        2 Sys Reads :      0 Signals Recd   :      2
  Forced CSwitch  :        0 Sys Writes:      0 Mesg Sent/Recd :      0/      0   
  VoluntaryCSwitch:        2 Raw Reads :      0 Other Log Rd/Wt:      0/      0   
  Running CPU     :        0 Raw Writes:      0 Other Phy Rd/Wt:      0/      0   
  CPU Switches    :        0 Bytes Xfer:    0kb Proc Start Time
      C - cum/interval toggle   % - pct/absolute togglev 13 10:25:19Page 1 of 1




To see the memory mapping of process 3691 (PMON)


type in "M" then enter 3691 for the id

  Memory Regions PID:  3691, ora_pmon_R817   PPID:     1 euid:1040 User: rsupport
                              
  Type     RefCt   RSS    VSS  Locked  Virtual Address      File Name   
  --------------------------------------------------------------------------------
  TEXT  /S    9 10.0mb 16.0mb    0kb 0x0dd7d400.0x00001000 <reg,ufs,/u04,/dev/vg01
  DATA  /P    1  1.8mb  2.1mb    0kb 0x08188000.0x40001000 <reg,ufs,/u04,/dev/vg01
  MEMMAP/P    1    4kb    4kb    0kb 0x08188000.0x7aff6000 <reg,ufs,/u04,/dev/vg01
  MEMMAP/P    1    4kb   20kb    0kb 0x08188000.0x7aff7000 <reg,vxfs,/usr,/dev/vg0
  MEMMAP/P    1    8kb    8kb    0kb 0x08188000.0x7affc000 <reg,vxfs,/usr,/dev/vg0
  MEMMAP/P    1   12kb   12kb    0kb 0x08188000.0x7affe000 <mmap>
  MEMMAP/P    1   12kb   16kb    0kb 0x08188000.0x7b001000 <mmap>
  MEMMAP/P    1    4kb    4kb    0kb 0x08188000.0x7b005000 <reg,vxfs,/usr,/dev/vg0
  MEMMAP/P    1   12kb   16kb    0kb 0x08188000.0x7b006000 <mmap>
  MEMMAP/P    1   40kb   44kb    0kb 0x08188000.0x7b00a000 <reg,vxfs,/usr,/dev/vg0
  MEMMAP/P    1   60kb  136kb    0kb 0x08188000.0x7b015000 <mmap>
  MEMMAP/P    1   12kb   12kb    0kb 0x08188000.0x7b037000 <reg,vxfs,/usr,/dev/vg0
  STACK /P    1   20kb   20kb    0kb 0x08188000.0x7b03a000 <stack>
  UAREA /P    1   16kb   16kb    0kb 0x09489800.0x7ffe6000 <uarea>
  LIBTXT/S  150   56kb   60kb    0kb 0x00000000.0xc0003000 <reg,vxfs,/usr,/dev/vg0
  LIBTXT/S   95  1.2mb  1.4mb    0kb 0x00000000.0xc0012000 <reg,vxfs,/usr,/dev/vg
  LIBTXT/S  150    4kb    4kb    0kb 0x00000000.0xc0177000 <reg,vxfs,/usr,/dev/vg0
  LIBTXT/S  115  440kb  440kb    0kb 0x00000000.0xc054a000 <reg,vxfs,/usr,/dev/vg0
  LIBTXT/S   55   72kb   76kb    0kb 0x00000000.0xc06d4000 <reg,vxfs,/usr,/dev/vg0
  LIBTXT/S    9    4kb    8kb    0kb 0x00000000.0xc2b8e000 <reg,ufs,/u04,/dev/vg01
  SHMEM /S    9  2.6mb  5.5mb    0kb 0x00000000.0xc9de8000 <shmem>
  0/lvol9,inode:20151>    
  Text  RSS/VSS: 10mb/ 16mb  Data  RSS/VSS:1.8mb/2.1mb  Stack RSS/VSS: 20kb/ 20kb 
  Shmem RSS/VSS:2.6mb/5.5mb  Other RSS/VSS:2.0mb/2.2mb 


We can see that for this process, it did allocate:


a. 16MB for TEXT or code area. Code area is shared on HP.
b. 2.1MB for DATA or PGA area. This area is private to the process
c. 5.5MB for SHMEM or Shared Memory). This area is shared by all Oracle processes.
d. 20KB for Stack. This area is private to the process
e. 2.2MB for Other. This area is mostly reflect swap space (MEMMAP)


Further, the total RSS(real memory) used by this process is 16.42Mb, and
it did allocate use a total of 25.80MB VSS(virtual memory).


To see open files used by the PMON process
type "F"


  Open Files PID:  3691, ora_pmon_R817   PPID:     1 euid:1040 User: rsupport   
                                                          Open  Open      
  FD  File Name                                      Type   Mode  Count     Offset
  --------------------------------------------------------------------------------
  0 /dev/null                                      chr    read    3            0
  1 /dev/null                                      chr    read    3            0
  2 /dev/null                                      chr    read    3            0
  3 /dev/null                                      chr    read   16            0
  4 /dev/null                                      chr    read   16            0
  5 /dev/null                                      chr    read    2            0
  6 /dev/null                                      chr    read    8            0
  7 <reg,ufs,/u04,/dev/vg01/lvol2,inode:448002>    reg    write   6         6916
  8 /dev/null                                      chr    read    2            0
  9 <reg,ufs,/u04,/dev/vg01/lvol2,inode:436861>    reg    rd/wr   8         1254
 10 inet,tcp,*:3389 -> (any:0)                     socket rd/wr   8
 11 /dev/null                                      chr    read    1            0
 12 <reg,ufs,/u04,/dev/vg01/lvol2,inode:448002>    reg    write   1         6940
 13 inet,tcp,*:3390 -> (any:0)                     socket rd/wr   1            0
 14 <reg,ufs,/u04,/dev/vg01/lvol2,inode:332814>    reg    read    1         2078


UNIX files are attached to a inode number and you can find the file name via the inode:


 ncheck -i <i-node_number> <volume_name> 
     find <file_system_associated_with_lv_name> -xdev -inum <inode_number> -print


Determining memory usage for shadow processes is more
complicated since the amount of memory used can change greatly
from one moment to the next depending on what the user is doing.


To get a good estimate of memory used for shadow processes, 
run the "ps -flp <pid>"
command repeatedly at regular intervals while the process is under
peak load to get an average value. Take this value and
multiply it by the number of expected users to estimate how
much memory will be needed on the system.


                         GlancePlus Commands Menu
? - Commands Menu    b - Page Backward (or -)       < - Display Previous Screen
! - Invoke Shell     f - Page Forward (or +,space)  > - Display Next Logical Scr
h - Online Help      q - exit (or e )               z - Reset Statistics to Zero
p - Print Toggle     r - Refresh Screen (or ^L)   <cr>- Update Current Screen
j - Adjust Interval  o - Process Threshold Options    A - Application List
g - Process List     d - Disk Report                  P - PRM Group List
a - CPU By Processor i - IO By File System            Y - Global System Calls
c - CPU Report       u - IO By Disk                   F - Process Open Files
m - Memory Report    v - IO By Logical Volume         M - Process Memory Regions
t - System Tables    N - NFS Global Activity          R - Process Resources
w - Swap Space       n - NFS By System                W - Process Wait States
B - Global Waits     l - Network By Interface         L - Process System Calls
D - DCE Global       K - DCE Process List             E - Process DCE
T - Trans Tracking   s - Select Process               O - Process DCE Ops
H - Alarm History    S - Select Disk/NFS/Appl/Trans   y - Renice Process

Stkcd [股票代码] ShortName [股票简称] Accper [统计截止日期] Typrep [报表类型编码] Indcd [行业代码] Indnme [行业名称] Source [公告来源] F060101B [净利润现金净含量] F060101C [净利润现金净含量TTM] F060201B [营业收入现金含量] F060201C [营业收入现金含量TTM] F060301B [营业收入现金净含量] F060301C [营业收入现金净含量TTM] F060401B [营业利润现金净含量] F060401C [营业利润现金净含量TTM] F060901B [筹资活动债权人现金净流量] F060901C [筹资活动债权人现金净流量TTM] F061001B [筹资活动股东现金净流量] F061001C [筹资活动股东现金净流量TTM] F061201B [折旧摊销] F061201C [折旧摊销TTM] F061301B [公司现金流1] F061302B [公司现金流2] F061301C [公司现金流TTM1] F061302C [公司现金流TTM2] F061401B [股权现金流1] F061402B [股权现金流2] F061401C [股权现金流TTM1] F061402C [股权现金流TTM2] F061501B [公司自由现金流(原有)] F061601B [股权自由现金流(原有)] F061701B [全部现金回收率] F061801B [营运指数] F061901B [资本支出与折旧摊销比] F062001B [现金适合比率] F062101B [现金再投资比率] F062201B [现金满足投资比率] F062301B [股权自由现金流] F062401B [企业自由现金流] Indcd1 [行业代码1] Indnme1 [行业名称1] 季度数据,所有沪深北上市公司的 分别包含excel、dta数据文件格式及其说明,便于不同软件工具对数据的分析应用 数据来源:基于上市公司年报及公告数据整理,或相关证券交易所、各部委、省、市数据 数据范围:基于沪深北证上市公司 A股(主板、中小企业板、创业板、科创板等)数据整理计算
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值