高cpu,内存sql 获取
[backcolor=inherit]--占用内存最多的会话
[backcolor=inherit]select * from(
[backcolor=inherit] select s.sid, s.serial#, s.username, s.program, s.module, s.machine, s.sql_id, s.prev_sql_id, p.spid, p.pga_alloc_mem
[backcolor=inherit]from v$session s, v$process p
[backcolor=inherit]where p.addr=s.paddr
[backcolor=inherit]order by p.pga_alloc_Mem desc
[backcolor=inherit])where rownum<11;
[backcolor=inherit]ps -ef|awk '$10 > 16000 {print}'|sort -rnk 10
[backcolor=inherit]select s.sid, s.serial#, s.username, s.machine, s.program, s.sql_id, p.pga_alloc_mem/1048576 size_m, p.spid
[backcolor=inherit] from v$session s, v$process p where s.paddr=p.addr
[backcolor=inherit] and p.pga_alloc_mem>104857600 order by 7 desc;\
[backcolor=inherit]高CPU消耗进程
[backcolor=inherit]ps aux|head -1;ps aux|sort -rn +2|head -10
[backcolor=inherit]高内存消耗进程
[backcolor=inherit]ps vx|head -1;ps vx|grep -v PID|sort -rn +6|head -10
[backcolor=inherit]高换页消耗进程
[backcolor=inherit]ps vx|head -1;ps vx|grep -v PID|sort -rn +4|head -10
[backcolor=inherit]高磁盘消耗进程
[backcolor=inherit]ps aux|head -1;ps aux|sort -rn +3|head -10