博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
获取指定pid的session的pga/uga使用情况
阅读量:2495 次
发布时间:2019-05-11

本文共 1029 字,大约阅读时间需要 3 分钟。

unix平台下使用top

windows平台下可以通过实用工具pstat.exe

获取相应进程/线程的pid.

column name format a25

column total format 999 heading 'Cnt'
column bytes format 9999,999,999 heading 'Total Bytes'
column avg format 99,999,999 heading 'Avg Bytes'
column min format 99,999,999 heading 'Min Bytes'
column max format 9999,999,999 heading 'Max Bytes'
ttitle 'PGA = dedicated server processes - UGA = Client machine process'

compute sum of minmem on report
compute sum of maxmem on report
break on report

 select s.username,se.sid,n.name,

 max(se.value) maxmem
 from v$sesstat se,
 v$statname n,
 v$session s
 where n.statistic# = se.statistic#
 and n.name in ('session pga memory','session pga memory max',
 'session uga memory','session uga memory max')
 and s.sid = se.sid
 and s.username is not null
 and s.paddr = (SELECT addr
                               FROM v$process c
                               WHERE c.spid = TO_NUMBER ('&pid', 'xxxx'))
 group by s.username,n.name,se.sid
 order by 3
/

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/6906/viewspace-21789/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/6906/viewspace-21789/

你可能感兴趣的文章
Sql Server 生成数据透视表 (行列转换等经典SQL语句)
查看>>
理解sizeof()
查看>>
Vue学习笔记之vue-cli脚手架安装和webpack-simple模板项目生成
查看>>
SqlServer 扩展属性
查看>>
优先队列
查看>>
String的Intern方法
查看>>
KRPANO资源分析工具下载720YUN全景图
查看>>
一些程序和工具
查看>>
java8 运算语法集
查看>>
IDEA关于重命名
查看>>
Es6 中let var和 const 了解
查看>>
巧用队列之”Voting“
查看>>
Oracle数据类型number(m,n)
查看>>
ACC 001 C - Shorten Diameter 图论
查看>>
开通博客了...
查看>>
[转]复制虚拟机后linux中的eth0变成eth1问题
查看>>
TableViewCell中自定义XIB的使用
查看>>
ubuntu 显示隐藏文件
查看>>
Linux 定时任务crontab
查看>>
mongoose联表查询与一般查询合并
查看>>