如何查看各个session或thread占用的系统资源,如CPU,I/O等
如题如何查看各个session或thread占用的系统资源,如CPU,I/O等
onstat系列命令。如io
onstat -g iof
cpu
onstat -g glo
结合OS的
vmstat
top
iostat
如何查看各个session或thread占用的系统资源,如CPU,I/O等
原帖由 "蓝色键盘" 发表:onstat系列命令。
如io
onstat -g iof
cpu
onstat -g glo
结合OS的
vmstat
top
iostat
谢谢,我的意思是想找到占用资源最多的访问IDS的session或者thread
如何查看各个session或thread占用的系统资源,如CPU,I/O等
偶给你个脚本你区执行一下,显示的是准确的统计信息。
dbaccess- -<<! 1>;chkiosum.out
database sysmaster;
select
name dbspace,
chknum,
"Primary" chktype,
reads,
writes,
pagesread,
pageswritten
from syschktab c, sysdbstab d
where c.dbsnum = d.dbsnum
union all
select
name dbspace,
chknum,
"Mirror" chktype,
reads,
writes,
pagesread,
pageswritten
from syschktab c,sysdbstab d
where c.dbsnum = d.dbsnum
into temp A;
select
sum(reads) total_reads,
sum(writes) total_writes,
sum(pagesread) total_pgreads,
sum(pageswritten)total_pgwrites
from A
into temp B;
select
dbspace,
chknum,
chktype,
reads,
writes,
pagesread,
pageswritten,
round((reads/total_reads)*100,2 )percent_reads,
round((writes/total_writes)*100,2 )percent_writes,
round((pagesread/total_pgreads)*100,2 )percent_pgreads,
round((pageswritten/total_pgwrites)*100,2 )percent_pgwrites
from A,B
order by 11;
!
页:
[1]