为了方便自己测试和监控,写了三个监控的脚本. 分别监控: 主机[cpu,mem,disk,fs,net] oracle mysql 脚本如下: hmon.py: monitor Linux os system including cpu,memory,disk,net,file system at a regular interval. mmon.py: monitor MySQL DataBase with innodb engine on Linux platform at a regula…
1. 监控事例的等待 select event,sum(decode(wait_Time,0,0,1)) "Prev", sum(decode(wait_Time,0,1,0)) "Curr",count(*) "Tot" from v$session_Wait group by event order by 4; 2. 回滚段的争用情况 select name, waits, gets, waits/gets "Ratio"…