®
IBM Software Group
© IBM Corporation
IBMIBM InformInformixix Dynamic Server Dynamic Server 监控
Software Group, IBM ShangHai 陆川2009/11/05
IBM Software Group
监控的重要性:1. 了解系统运行状况2. 报警3. 协助诊断问题 处理运行故障 调整性能
IBM Software Group
影响系统性能的 5 大要素磁盘CPU内存网络应用
IBM Software Group
IBM Software Group
监控工具介绍onstat
SMI
oncheck
OpenAdminTool ( 仅限于 11 版本使用 )
复制的监控
IBM Software Group
onstat –d 监控 chunk 的剩余空间address chunk/dbs offset size free bpages flags pathname
c0000001ce473028 1 1 0 200000 168435 PO-B /dev/dbs/rootdbs
c0000001ce473df0 2 2 64 200000 99947 PO-B /dev/dbs/phylogdbs
c0000001d0028028 3 3 64 1000000 49947 PO-B /dev/dbs/logdbs
c0000001d00281c0 4 4 64 500000 494397 PO-B /dev/dbs/tmpdbs1
c0000001d0028358 5 5 64 500000 493597 PO-B /dev/dbs/tmpdbs2
c0000001d00284f0 6 6 64 500000 496397 PO-B /dev/dbs/tmpdbs3
c0000001d0028688 7 7 64 4000000 641 PO-B /dev/dbs/userdbs-1
c0000001d0028820 8 7 64 4000000 380 PO-B /dev/dbs/userdbs-2
第 7 个 dbspace 由两个 chunk 组成
IBM Software Group
onstat –r 2 每隔 2 描重复执行当前的 onstat命令
onstat –d –r 2
address chunk/dbs offset size free bpages flags pathname
c0000001ce473028 1 1 0 200000 168435 PO-B /dev/dbs/rootdbs
c0000001ce473df0 2 2 64 200000 99947 PO-B /dev/dbs/phylogdbs
c0000001d0028028 3 3 64 1000000 49947 PO-B /dev/dbs/logdbs
c0000001d00281c0 4 4 64 500000 494397 PO-B /dev/dbs/tmpdbs1
c0000001d0028358 5 5 64 500000 493597 PO-B /dev/dbs/tmpdbs2
c0000001d00284f0 6 6 64 500000 496397 PO-B /dev/dbs/tmpdbs3
c0000001d0028688 7 7 64 4000000 641 PO-B /dev/dbs/userdbs-1
c0000001d0028820 8 7 64 4000000 380 PO-B /dev/dbs/userdbs-2
IBM Software Group
onstat –D 监控 IO 读写是否倾斜以及数据库恢复的进度INFORMIX-OnLine Version 11.50.UC2 -- On-Line -- Up 122 days 20:48:40 -- 72616 s
Dbspaces
address number flags fchunk nchunks flags owner name
c3fa80e8 1 1 1 1 N informix rootdbs
c3fa84b0 2 2001 2 1 N T informix tempdbs
c3fa8518 3 1 3 1 N informix db1
c3fa8580 4 1 4 1 N informix db2
4 active, 2047 maximum
Chunks
address chk/dbs offset page Rd page Wr pathname
c3fa8150 1 1 0 1259 289 /home/informix/ROOTDBS
c3fa8228 2 2 0 11 11 /home/informix/TEMPDBS
c3fa8300 3 3 0 6740492 3758910 /home/informix/db1
c3fa83d8 4 4 0 6 0 /home/informix/db2
4 active, 2047 maximum
IBM Software Group
onstat –F 获得清页线索的信息INFORMIX-OnLine Version 11.50.UC2 -- On-Line -- Up 122 days 20:51:45 -- 72616 s
Fg Writes LRU Writes Chunk Writes
0 103854321 31153092
address flusher state data
c0000001cef5d860 0 I 0 = 0X0
c0000001cef5e098 1 I 0 = 0X0
c0000001cef5e8d0 2 I 0 = 0X0
c0000001cef5f108 3 I 0 = 0X0
states: Exit Idle Chunk Lru
state: I 空闲 C 正在执行 checkpoint
L 正在执行 LRU Writes
data : 显示正在写的 chunk 编号
共有 4 个清页线索
IBM Software Group
INFORMIX-OnLine Version 11.50.UC2 -- On-Line -- Up 122 days 20:56:26 -- 72616 s
Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-2 0 16 274 22 12.45
phybegin physize phypos phyused %used
10003f 500 433 0 0.74
Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-2 0 16 2437 113 31 21.6 3.6
address number flags uniqid begin size used %used
c3ecc55c 1 U-B---- 7 100233 250 250 100.00
c3ecc578 2 U---C-L 8 10032d 250 106 42.40
c3ecc594 3 F------ 0 100427 250 0 0.00
c3ecc5b0 4 F------ 0 100521 250 0 0.00
c3ecc5cc 5 U-B---- 5 10061b 250 250 100.00
c3ecc5e8 6 U-B---- 6 100715 250 250 100.00
onstat –l 监控物理日志和逻辑日志
已备份
当前日志
使用百分比
以页面为单位物理日志当前使用的百分比
IBM Software Group
onstat –m 察看数据库日志的最后 20 行, checkpoint 时间和间隔
Mon Nov 4 11:23:51 1996
11:23:51 Logical Log 7 Complete.
11:27:10 Checkpoint Completed: duration was 0 seconds.
Tue Dec 31 11:16:01 1996
11:16:01 Checkpoint Completed: duration was 1 seconds.
11:21:00 Checkpoint Completed: duration was 0 seconds.
11:26:01 Checkpoint Completed: duration was 0 seconds.
11:36:01 Checkpoint Completed: duration was 0 seconds.
两个时间相减,可以得到 checkpoint 间隔
从 Informix 1 版本开始, checkpoint 不在阻塞交易。
IBM Software Group
onstat –p 监控数据库实例的轮廓信息INFORMIX-OnLine Version 11.50.UC2 -- On-Line -- Up 122 days 20:58:17 -- 72616 s
Profile
dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
1535 1548 13734 88.82 484 818 3280 85.24
isamtot open start read write rewrite delete commit rollbk
10135 1520 1284 3057 875 6 7 20 0
ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
0 0 0 39.04 28.34 10 70772
bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress seqscans
241 1 11196 0 0 0 174 101
ixda-RA idx-RA da-RA RA-pgsused lchwaits
31 0 329 360 40read writerewritedelete
selectinsertupdatedelete
IBM Software Group
onstat –R 监控每个 lrus 队列的写的情况 8 buffer LRU queue pairs priority levels
# f/m pair total % of length LOW HIGH
0 f 1250 100.0% 1250 1250 0
1 m 3.0% 0 0 0
2 f 1250 100.0% 1250 1250 0
3 m 3.0% 0 0 0
4 F 1250 99.9% 1249 1249 0
5 m 3.1% 1 1 0
6 f 1250 100.0% 1250 1250 0
7 m 3.0% 0 0 0
8 f 1250 100.0% 1250 1250 0
9 m 3.0% 0 0 0
10 f 1250 100.0% 1250 1250 0
11 m 3.0% 0 0 0
12 f 1250 100.0% 1250 1250 0
13 m 3.0% 0 0 0
14 f 1250 100.0% 1250 1250 0
15 m 3.0% 0 0 0
1 dirty, 10000 queued, 10000 total, 16384 hash buckets, 4096 buffer size
start clean at 60.000% (of pair total) dirty, or 750 buffs dirty, stop at 50.000%
在 Informix 11 版本之前,可以协助你配置 lru_max_dirty 和 lru_min_dirty 的值
IBM Software Group
onstat –g ppf 察看全表扫描的次数较多的表的 partnumPartition profiles
partnum lkrqs lkwts dlks touts isrd iswrt isrwt isdel bfrd bfwrt seqsc12 0 0 0 0 733836 0 0 0 538183 0 0
15 0 0 0 0 253950 0 0 0 605030 0 0
20 0 0 0 0 1039 0 0 0 122354 0 0
22 0 0 0 0 852962 0 0 0 0 0 0
23 0 0 0 0 172 0 0 0 0 0 0
24 0 0 0 0 6 0 0 0 0 0 0
25 0 0 0 0 36 0 0 0 0 0 0
26 0 0 0 0 115627 0 0 0 24 24 0
28 0 0 0 0 18 0 0 0 0 0 0
40 0 0 0 0 136669 0 0 0 40 24 0
700098 0 0 0 0 1035 0 0 0 0 0 348
IBM Software Group
Segment Summary:
id key addr size ovhd class blkused blkfree
1382041601 1382041601 c000000 9568256 215632 R 2299 37
1382041602 1382041602 c920000 8388608 896 V 1433 615
1382041603 1382041603 d120000 8388608 896 V 3 2045
1382041604 1382041604 d920000 8192000 896 V 1 1999
1382041605 1382041605 e0f0000 8192000 896 V 1 1999
1382041606 1382041606 e8c0000 8192000 896 V 1 1999
Total: - - 50921472 - - 3738 8694
onstat –g seg 监控 virtual segment 的个数 SHMVIRTSIZE
SHMADD
IBM Software Group
onstat –g rea 监控哪种类型 vp 个数不够
IBM Informix Dynamic Server Version 9.40.FC4 -- On-Line -- Up 03:29:23 -- 49728 Kbytes
Ready threads:
tid tcb rstcb prty status vp-class name
36 c0000001cfe7c1f0 0 4 sleeping forever 1cpu sqlexec
45 c0000001cff39330 0 4 sleeping forever 3cpu sqlexec
IBM Software Group
onstat –g sql 监控数据库当前执行的 SQL Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers Explain 91463230 SELECT userdb DR Wait 10 0 0 9.03 Off 91463220 SELECT userdb CR Wait 10 0 0 9.03 Off 91463169 SELECT userdb DR Wait 10 0 0 9.03 Off 91463156 SELECT userdb DR Wait 10 0 0 9.03 Off 91463153 SELECT userdb DR Wait 10 0 0 9.03 Off 91463152 SELECT userdb DR Wait 10 0 0 9.03 Off 91463125 SELECT userdb DR Wait 10 0 0 9.03 Off 91463108 SELECT userdb DR Wait 10 0 0 9.03 Off 91463078 SELECT userdb DR Wait 10 0 0 9.03 Off 91463071 SELECT userdb DR Wait 10 0 0 9.03 Off 91463070 SELECT userdb DR Wait 10 0 0 9.03 Off 91463069 SELECT userdb DR Wait 10 0 0 9.03 Off 91463065 SELECT userdb DR Wait 10 0 0 9.03 Off 91463064 SELECT userdb DR Wait 10 0 0 9.03 Off 91462455 SELECT userdb DR Wait 10 0 0 9.03 Off
IBM Software Group
onstat –g ses 监控用户连接和每个用户申请的内存
session #RSAM total used dynamic
id user tty pid hostname threads memory memory explain
91463257 informix - 0 - 0 12288 11360 off
91463230 vbs4 3 25744 rp7420_3 1 200704 196080 off
91463220 vbs4 tf 2600 rp7420_3 1 126976 118696 off
91463169 vbs4 3 25742 rp7420_3 1 196608 195728 off
91463156 vbs4 3 25738 rp7420_3 1 196608 195728 off
6241034 cics - 27187 rp7420_3 1 8306688 6902968 off
2452249 webuser - -1 38.19.8. 1 102400 73288 off
2451594 webuser - -1 38.19.8. 1 102400 70984 off
175 filesvr - 8236 rp7420_3 1 69632 52688 off
IBM Software Group
onstat –g sql #session_id# /onstat –g ses #session_id#
监控某个用户连接执行的 SQL
IBM Informix Dynamic Server Version 9.40.FC3 -- On-Line -- Up 20:25:10 -- 65600 Kbytes
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers Explain
211 SELECT stores7 CR Not Wait 0 0 9.03 Off
Current statement name : slctcur
Current SQL statement :
select * from orders
Last parsed SQL statement :
select * from orders
IBM Software Group
onstat –g ath 监控数据库线索Threads:
tid tcb rstcb prty status vp-class name
3 c0000001cfa83630 0 2 sleeping forever 33pio pio vp 0
4 c0000001cfaa4630 0 2 sleeping forever 34aio aio vp 0
5 c0000001cfac5630 0 2 sleeping forever 35msc msc vp 0
6 c0000001cfaf6630 0 2 sleeping forever 36aio aio vp 1
7 c0000001cfb17630 0 2 sleeping forever 37aio aio vp 2
8 c0000001cfb38630 0 2 sleeping forever 38aio aio vp 3
9 c0000001cfb59630 0 2 sleeping forever 39aio aio vp 4
10 c0000001cfb7a630 0 2 sleeping forever 40aio aio vp 5
11 c0000001cfb9b890 c0000001cef5d028 4 sleeping secs: 1 5cpu main_loop()
12 c0000001cfac5ce0 0 2 sleeping forever 1cpu sm_poll
13 c0000001cf9a0760 0 2 running 3cpu sm_poll
14 c0000001cf9c46c8 0 2 sleeping forever 4cpu sm_poll
15 c0000001cf9e9630 0 2 running 5cpu sm_poll
16 c0000001cfa06dc8 0 2 sleeping forever 6cpu sm_poll
17 c0000001cfa31c98 0 2 IO idle 7cpu sqlexec
18 c0000001cfa55c10 0 2 IO waiting 41soc sqlexec
IBM Software Group
onstat –g sch 监控 informix 进程信息MT global info:
sessions threads vps lngspins
64 97 15 6642
sched calls thread switches yield 0 yield n yield forever
total: 1142174954 421309247 1112260992 52108 4260081
per sec: 686165 184933 681261 6 2545
Virtual processor summary:
class vps usercpu syscpu total
cpu 7 8794.93 162.63 8957.56
aio 4 0.01 0.05 0.06
lio 1 0.00 0.01 0.01
pio 1 0.00 0.01 0.01
adm 1 0.08 0.07 0.15
msc 1 0.32 0.36 0.68
total 15 8795.34 163.13 8958.47
IBM Software Group
Individual virtual processors:
vp pid class usercpu syscpu total
1 340366 cpu 1781.23 32.50 1813.73
2 188608 adm 0.08 0.07 0.15
3 397352 cpu 1250.20 42.36 1292.56
4 192554 cpu 1357.92 20.49 1378.41
5 413984 cpu 1103.27 16.95 1120.22
6 352738 cpu 1109.89 17.19 1127.08
7 438398 cpu 1083.12 16.49 1099.61
8 434616 cpu 1109.30 16.65 1125.95
9 479720 lio 0.00 0.01 0.01
10 446548 pio 0.00 0.01 0.01
11 315866 aio 0.01 0.02 0.03
12 282730 msc 0.32 0.36 0.68
13 151896 aio 0.00 0.01 0.01
14 192836 aio 0.00 0.01 0.01
15 434408 aio 0.00 0.01 0.01
tot 8795.34 163.13 8958.47
onstat –g sch (continue)
IBM Software Group
onstat –u 监控用户线索Userthreads
address flags sessid user tty wait tout locks nreads nwrites
c0000001cef632c8 Y--P--D 41 informix - c000000000669138 0 0 0 0
c0000001cef63b00 ---P--D 38 informix - 0 0 0 0 0
c0000001cef64338 Y--P--- 171 cics - c0000001d094d7b0 0 1 338361014 16983197
c0000001cef64b70 Y--P--- 80311498 cics - c0000001dd75f688 0 1 34928980 1134299
c0000001cef653a8 Y--P--- 175 filesvr - c0000001d0cffe48 0 1 557 0
c0000001cef65be0 Y--P--- 136 cics - c0000001d09a3f58 0 1 0 0
c0000001cef66c50 Y--P--- 163 cics - c0000001d0af9028 0 1 329562872 16960921
93 active, 256 total, 201 maximum concurrent
IBM Software Group
onstat –k 监控锁的使用情况address wtlist owner lklist type tblsnum rowid key#/bsiz
c000000001671840 0 c0000001cef75270 0 S 100002 204 0
c000000002d4c7b8 0 c0000001e4c7abf8 c000000009b3f298 IX 700030 0 0
c000000003283470 0 c0000001e4c5f028 0 S 100002 204 0
c0000000037beef8 0 c0000001cef85970 0 S 100002 204 0
c000000004952688 0 c0000001e4c70798 0 S 100002 204 0
c000000004fa9ec8 0 c0000001cef653a8 0 S 100002 204 0
c000000004fa9fb8 0 c0000001cef75aa8 0 S 100002 204 0
c000000005073c00 0 c0000001cef8d4b8 c00000001cb0fb70 IX 700030 0 0
c000000006ac1c88 0 c0000001cef970e0 c0000000300ceb98 IX 700030 0 0
c0000000079dde88 0 c0000001e4c74120 c0000000297e0190 IX 700030 0 0
c000000008151c78 0 c0000001e4c759c8 0 S 100002 204 0
c0000000088e25c8 0 c0000001cef65be0 0 S 100002 204 0
c000000009b3f298 0 c0000001e4c7abf8 0 S 100002 204 0
c000000009bb9368 0 c0000001e4c75190 0 S 100002 204 0
96 active, 8000000 total, 524288 hash buckets, 0 lock table overflows
表的 partition number
锁类型非零,说明有锁等待
IBM Software Group
onstat –b 监控修改的内存页信息 address userthread flgs pagenum memaddr nslots pgflgs xflgs owner waitlist c000
000045521d58 0 80 31:3909144 c0000000695bf800 3 2801 80 ffffffffffffffff 0 c000000045973bb0 0 80 31:3909112 c00000006cff4000 3 2801 80 ffffffffffffffff 0 c000000045a57068 0 80 31:3909162 c00000006dbea800 3 2801 80 ffffffffffffffff 0 c000000045c9d458 0 80 17:2025672 c00000006fa8f800 3 2801 80 ffffffffffffffff 0 c0000000466ac838 0 80 17:2025666 c000000078219800 3 2801 80 ffffffffffffffff 0 c000000046bef2d0 0 80 25:1878844 c00000007c8fa000 3 801 80 ffffffffffffffff 0 c000000047e21418 0 82 23:597119 c00000008be23800 4 2801 80 ffffffffffffffff c0000001cef98988
c000000047f66390 0 80 25:1874864 c00000008cf3e000 3 801 80 ffffffffffffffff 0 c0000000480dd790 0 80 25:1878795 c00000008e2fe000 3 801 80 ffffffffffffffff 0 c0000000484977b0 0 80 31:3909173 c000000091534000 3 2801 80 ffffffffffffffff 0
222 modified, 3000000 total, 4194304 hash buckets, 2048 buffer size
IBM Software Group
onstat –t 监控 tblspace 的信息 n address flgs ucnt tblnum physaddr npages nused npdata nrows nextns
20 c0000001d002daa8 0 1 100001 1:14 400 364 0 0 4
181 c0000001d0119028 0 1 200001 2:4 50 2 0 0 1
182 c0000001d01195a0 0 1 300001 3:4 50 2 0 0 1
183 c0000001d0119b58 0 1 400001 4:4 6800 6800 0 0 51
184 c0000001d011a028 0 1 500001 5:4 6800 6800 0 0 51
185 c0000001d011a5e0 0 1 600001 6:4 6800 6800 0 0 51
186 c0000001d01207d0 0 1 700001 7:4 2800 2800 0 0 34
187 c0000001d007b028 0 80 700002 7:5 112 107 56 855 14
234 c0000001d176c7d8 0 8 700031 7:52 16 16 15 143 2
239 c0000001d1770c20 0 8 700036 7:761 8 8 0 0 2
IBM Software Group
onstat –x 监控事务,可以用于监控事务回滚address flags userthread locks beginlg curlog logposit isol retrys coord
c0000001e808b4a0 A---- c0000001e4c81f08 1 0 0 0x0 COMMIT 0
c0000001e808b970 A-B-- c0000001e4c738e8 2 47212 47212 0x14ee8048 DIRTY 0
c0000001e808bbd8 A---- c0000001e4c7c4a0 1 0 0 0x0 COMMIT 0
c0000001e808c578 A--c0000001cef73190 1 0 0 0x0 COMMIT 0
c0000001e808c7e0 A---- c0000001cef68d30 2 0 0 0x0 DIRTY 0
c0000001e808ca48 A-B-- c0000001e4c62178 2 47212 47212 0x14e8c048 DIRTY 0
129 active, 384 total, 369 maximum concurrent
IBM Software Group
onstat –C 监控 Btree scan 线索的信息 Btree Cleaner Info
BT scanner profile Information
==============================
Active Threads 1
Global Commands 20000 Building hot list
Number of partition scans 153184
Main Block 0xc0000001cfdfd128
BTC Admin 0xc0000001cef62258
BTS info id Prio Partnum Key Cmd
0xc0000001cfdffed8 0 Low 0x00000000 0 40 Yield N
Number of leaves pages scanned -209876806
Number of leaves with deleted items 82481260
Time spent cleaning (sec) 2837591
Number of index compresses 5376280
Number of deleted items 718862270
Number of index range scans 0
Number of index leaf scans 150021
IBM Software Group
onstat –g dic 监控数据字典的信息 Dictionary Cache: Number of lists: 31, Maximum list size: 10
list# size refcnt dirty? heapptr table name
-----------------------------------------------------------------------------------------------------------------------------------
0 10 0 no c0000001e5765038 sysmaster@hcbserver:informix.sysptprof
0 no c0000001e26f9838 sysmaster@hcbserver:informix.sysdbstab
22 no c0000001d25ce838 userdb@hcbserver:vbs4.glscycltotal
31 no c0000001da538838 userdb@hcbserver:vbs4.putout_message
1 yes c0000001ddbaf038 userdb@hcbserver:vbs4.putout_message
1 yes c0000001d2306838 userdb@hcbserver:vbs4.cmsholdm
1 yes c0000001eae68838 userdb@hcbserver:vbs4.putout_message
2 yes c0000001e8f00838 userdb@hcbserver:vbs4.cmsholdm
1 yes c0000001ea1ec838 userdb@hcbserver:vbs4.cmsholdm
1 yes c0000001dbe79038 userdb@hcbserver:vbs4.putout_message
IBM Software Group
onstat –g dsc 监控表中列的数据分布的信息 Distribution Cache:
Number of lists : 31
DS_POOLSIZE : 127
Distribution Cache Entries:
list# id ref_cnt dropped? heap_ptr distribution name
----------------------------------------------------------------------------------------------------------------------------------
3 0 0 0 c0000001d5a28038 userdb@hcbserver:vbs4.pubcycdealcall.calldate
4 0 0 0 c0000001d3250838 userdb@hcbserver:vbs4.pubcycbrccallreg.brc
6 0 0 0 c0000001d37f8c38 userdb@hcbserver:vbs4.pubcycbrccallreg.callstat
7 0 0 0 c0000001d3250438 userdb@hcbserver:vbs4.pubcycbrccallreg.batchno
IBM Software Group
onstat –g prc 监控用户定义 routine 的信息 UDR Cache:
Number of lists : 31
PC_POOLSIZE : 127
UDR Cache Entries:
list# id ref_cnt dropped? heap_ptr udr name
--------------------------------------------------------------
0 1467 0 0 c0000001d2ecd438 userdb@hcbserver:.inssubtranslog
0 1257 0 0 c0000001d2241838 userdb@hcbserver:.dpsbigamttrans_insert
0 1519 0 0 c0000001d343e438 userdb@hcbserver:.lnsacctdyninfo_update
1 1252 0 0 c0000001d4706838 userdb@hcbserver:.dpsacclnkreg_delete
IBM Software Group
onstat –g pos 监控 informix 相关的环境信息1 7 0 infos ver/size 2 272
2 1 0 snum 0 52564801 0 hcbserver
3 4 0 onconfig path /informix/etc/onconfig.hcb
4 5 0 host sdome-1
5 6 0 oninit ver IBM Informix Dynamic Server Version 11.50.FC5
6 6 8 0 sqlhosts path /informix/etc/sqlhosts
IBM Software Group
onstat –g ioa 监控 IO 对列和 chunk 的读写情况
AIO global info:
6 aio classes
55 open files
64 max global files
AIO I/O queues:
q name/id len maxlen totalops dskread dskwrite dskcopy
kio 0 0 236 1293043824 1214749492 78294332 0
kio 1 0 481 2380980578 2276414912 104565666 0
kio 2 0 609 2045476140 1965648808 79827332 0
kio 3 0 481 1991822503 1895287615 96534888 0
kio 4 0 480 1679929856 1588936761 90993095 0
kio 5 0 147 1452406514 1365478601 86927913 0
kio 6 0 474 906868572 863069638 43798934 0
IBM Software Group
onstat –g ioa (continue)
AIO I/O vps:
class/vp s io/s totalops dskread dskwrite dskcopy wakeups io/wup errors
kio 0 s 81.4 470968790 398738691 72230099 0 716722633 0.7 0
kio 1 i 267.1 1544737196 1449517115 95220081 0 2784672407 0.6 0
kio 2 s 183.1 1059085669 983459368 75626301 0 1783627036 0.6 0 kio 3 s 198.1 1145478835 1056564463 88914372 0 1998799317 0.6 0 kio 4 i 142.3 823275247 739055143 84220104 0 1373892196 0.6 0 kio 5 i 105.8 611934071 531708739 80225332 0 975037600 0.6 0
kio 6 s 51.5 297584863 257965729 39619134 0 438395613 0.7 0
IBM Software Group
onstat –g ioa (continue)AIO global files:
gfd pathname totalops dskread dskwrite io/s
3 /dev/dbs/rootdbs 1334981 814062 520919 0.2
4 phylogdbs 9387514 1500 9386014 1.6
5 /dev/dbs/logdbs 13167118 3431695 9735423 2.3
6 /dev/dbs/tmpdbs1 36653365 11795428 24857937 6.3
7 /dev/dbs/tmpdbs2 37799245 12638544 25160701 6.5
8 /dev/dbs/tmpdbs3 34376857 9445985 24930872 5.9
9 userdbs-1 284466220 256566488 27899732 49.2
10 userdbs-2 363701648 353593295 10108353 62.9
IBM Software Group
onstat –g nta 监控数据库的连接信息Individual thread network information (basic):
netscb type thread name sid
c0000001dff148a8 soctcp sqlexec 91463230
c0000001d0473c88 soctcp sqlexec 91463220
c0000001d6816cb8 soctcp sqlexec 91463169
c0000001d6910a70 soctcp sqlexec 91463156
c0000001cfdc74f0 soctcp sqlexec 91463153
c0000001dff10428 soctcp sqlexec 91463152
c0000001d83eccb0 soctcp sqlexec 91463125
c0000001d0b6f028 soctcp sqlexec 91463108
c0000001cfc2ab50 ipcshm sm_poll 7
c0000001cfc13b50 ipcshm sm_poll 6
c0000001cfbfcae8 ipcshm sm_poll 5
IBM Software Group
onstat –g nta 监控数据库的连接时间Individual thread network information (times):
netscb thread name sid open read write address c0000001dff148a8 sqlexec 91463230 02:47:35 02:47:35
02:47:35 c0000001d0473c88 sqlexec 91463220 02:47:34 02:47:38 02:47:38 c0000001d6816cb8 sqlexec 91463169 02:47:28 02:47:28 02:47:28 c0000001d6910a70 sqlexec 91463156 02:47:27 02:47:27 02:47:27 c0000001cfdc74f0 sqlexec 91463153 02:47:27 02:47:27 02:47:27 c0000001dff10428 sqlexec 91463152 02:47:26 02:47:26 02:47:26 c0000001d83eccb0 sqlexec 91463125 02:47:24 02:47:24 02:47:24 c0000001d0b6f028 sqlexec 91463108 02:47:22 02:47:22 02:47:22
IBM Software Group
onstat –g nta 监控连接成功和失败的信息Client Type Calls Accepted Rejected Read Write
sqlexec yes 91459710 15 -721091574 -607189481
srvinfx yes 0 0 0 0
onspace yes 0 0 0 0
onlog yes 0 0 0 0
onparam yes 0 0 0 0
oncheck yes 10 0 71744 264616
onload yes 0 0 0 0
onunload yes 0 0 0 0
onmonitor yes 1 0 60 61
dr_accept yes 0 0 0 0
cdraccept no 0 0 0 0
ontape yes 3444 0 282315963 282319410
srvstat yes 0 0 0 0
asfecho es 0 0 0 0
listener yes 0 0 91463180 15
crsamexec yes 0 0 0 0
safe yes 0 0 0 0
onutil yes 0 0 0 0客户端类型 接受和拒绝的次数
IBM Software Group
onstat –g opn 监控被打开的 partition 的信息 tid rstcb isfd op_mode op_flags partnum ucount ocount lockmode
218 0xcef64338 0 0x00000400 0x00000397 0x00700002 2 2 0
218 0xcef64338 1 0x00000002 0x00000003 0x00700002 2 2 0
218 0xcef64338 4 0x00000400 0x00000407 0x007002ca 1 0 0
218 0xcef64338 5 0x00000440 0x00000713 0x00700138 1 0 0
218 0xcef64338 6 0x00000400 0x00000407 0x00700135 1 0 0
218 0xcef64338 7 0x00000408 0x00000413 0x008018c2 1 0 0
IBM Software Group
onstat –g dri 监控 HDR 的状态Data Replication:
Type State Paired server Last DR CKPT (id/pg)
primary off amit_secondary -1 / -1
DRINTERVAL 2
DRTIMEOUT 30
DRAUTO 0
DRLOSTFOUND /vobs/tristarm/sqldist/etc/dr.lostfound
DRIDXAUTO 0
IBM Software Group
onstat –g tpf 监控 thread 的轮廓信息 tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus lsmx seq
0 10 0 0 0 95564 3 0 0 0 0 0 0 3124077 2592376 1353340088 0 0
IBM Software Group
onstat –g arc 最近的备份信息Dbspaces - Archive Status
name number level date log log-position
rootdbs 1 0 02/17/2009.03:46 47179 0x87dc018
phylogdbs 2 0 02/17/2009.03:48 47179 0x8824018
logdbs 3 0 02/17/2009.03:48 47179 0x8825018
userdbs 7 0 02/17/2009.03:48 47179 0x8825018
IBM Software Group
onstat –g dis 监控机器上有几个实例以及启动状态
There are 2 servers found
Server : hcbserver
Server Number : 0
Server Type : IDS
Server Status : Up
Server Version : IBM Informix Dynamic Server Version 9.40.FC5
Shared Memory : 0
INFORMIXDIR : /informix
ONCONFIG : /informix/etc/onconfig.hcb
SQLHOSTS : /informix/etc/sqlhosts
Host : sdome-1Server
Server : frntserver
Server Number : 1
IBM Software Group
SQL Query Drill Down – onstat –g his
Database: db3 Statement text: insert into t1 select 0, tabname from systables,sysindexes where systables.tabid < 100
INSERT using table [ t1 ]
Iterator/Explain ================ ID Left Right Est Cost Est Rows Num Rows Type 3 0 0 5 15 55 Disk Scan 4 0 0 18 92 92 Disk Scan 2 3 4 287 1380 5060 Nested Join 1 2 0 1 1 5060 Insert
Statement information: Sess_id User_id Stmt Type Completion Time Run Time 16 200 INSERT 09:15:23 13.0619
Statement Statistics: Page Buffer Read Buffer Page Buffer Write Read Read % Cache IDX Read Write Write % Cache 1212 21340 94.32 0 1312 16448 92.02
Lock Lock Lock Log Num Disk Sort Requests Waits Time (S) Records Sort Sort Time (S) 5061 0 0 1265 0 0 0
Total Total Avg Max LK Wait I/O Wait Avg Rows Executions Time (S) Time (S) Time (S) Time (S) Time (S) Per Sec 1 13.0619 13.0619 13.0619 0.0000 3.8790 387.3854
Estimated Estimated Actual SQL ISAM Isolation SQL Cost Rows Rows Error Error Level Memory 288 1381 5060 0 0 NL 127696
需要配置: SQLTRACE level=LOW,ntraces=2000,size=2,mode=global
IBM Software Group
onstat –g ckp
Auto Checkpoins=On RTO_SERVER_RESTART=60 seconds Estimated recovery time 7 seconds Critical Sections Physical Log Logical L
og Clock Total Flush Block # Ckpt Wait Long # Dirty Dskflu Total Avg Total
AvgInterval Time Trigger LSN Time Time Time Waits Time Time Time Buffers /Sec pages /Sec Pages /
Sec1 18:41:36 Startup 1:f8 0.0 0.0 0.0 0 0.0 0.0 0.0 4 4 3 0 1
0 2 18:41:49 Admin 1:11c12cc 0.3 0.2 0.0 1 0,0 0.0 0.0 2884 2884 1966 162 4549
379 3 18:42:21 Llog 8:188 2.3 2.0 2.0 1 0.0 2.0 2.0 14438 7388 318 10 65442
21814 18:42:44 *User 10:19c018 0.0 0.0 0.0 1 0.0 0.0 0.0 39 39 536 21 20412
8165 18:46:21 RTO 12:188 54.8 54.2 0.0 30 0.6 0.4 0.6 68232 1259 210757 1033 150118
735
Max Plog Max Llog Max Dskflush Avg Dskflush Avg Dirty Blockedpages/sec pages/sec Time pages/sec pages/sec Time8796 6581 54 43975 2314 0
IBM Software Group
onstat –g ckp
AUTO_CKPTS On/Off Displays if automatic checkpoints feature is on or off
RTO_SERVER_RESTART Seconds Displays the RTO policy. 0=RTO policy is off.
Estimated recovery time Seconds This is the estimated time it would take the IDS server to perform fast recovery.
Interval Number Checkpoint interval id
Clock Time Wall clock time This is the wall clock time that the checkpoint occurred
Trigger Text There are several events that can trigger a checkpoint. The most common are RTO, Plog or Llog (running out of logical log resources).
LSN Log position Log position of checkpoint
Total Time Seconds Total checkpoint duration from request time to checkpoint completion
Flush Time Seconds Time to flush bufferpools
Block Time Seconds Transaction blocking time
# Waits Number Number of transactions that blocked waiting for checkpoint
Ckpt Time Seconds amount of time it takes for all transactions to recognize a checkpoint has been requested
Wait Time Seconds Average time thread waited for checkpoint
Long Time Seconds Longest amount of time a transaction waited for checkpoint
# Dirty Buffers Number Number of buffers flushed to disk during checkpoint processing
Dskflu/Sec Number Number of buffers flushed to disk per sec during checkpoint processing
Plog Total Pages Number Total number of pages physically logged during the checkpoint interval
Plog Avg/Sec Number Average rate of physical log activity during the checkpoint interval
Llog Total Pages Number Total number of pages logically logged during the checkpoint interval
Llog Avg/Sec Number Average rate of logical log activity during the checkpoint interval
IBM Software Group
onstat –g alice
Partnum Mode BM_Sz Used_Pg Examined Dirty_Pg # I/O Found Eff0x00900003 10 17536 4486540 266997444 71606 2086125 17200 0.8 %
Heading Description
partnum Partition number containing the index
Mode Current alice mode, used for assign resources (see table)
kp_size Size of the alice map in bits
Used Pages Number of index pages used
Examined Number of pages examined to see if dirty items or compression is required
Dirty Pages How many pages where found which need to be cleaned or compressed
# I/O The number of I/O done on this index fragment
Found The number of I/O which found one or more dirty pages
Eff The efficiency of the index
IBM Software Group
View what has been Cleaned onstat –C clean
Btree Cleaner Info
Index Cleaned Statistics========================= Partnum Key Dirty Hits Clean Time Pg Examined Items Del Pages/Sec0x00100002 1 0 0 2 2 2.000x00100003 1 0 0 6 0 6.000x00100003 2 0 0 2 0 2.000x00100004 1 0 0 22 955 22.000x00100004 2 0 0 9 439 9.000x00100005 1 0 0 1 0 1.000x00200003 1 6 91 8096 14501 88.970x00300003 1 C 61 130 12108 11829 93.140x00300004 1 28787 0 0 0 0.00
Index currently being cleaned
Index items removed from this index
Total time spent cleaning this index
IBM Software Group
Operation by Index onstat –C part
Btree Cleaner Info
Index Statistics================ Partnum Key Positions Compress Split0x00100002 1 2429 0 00x00100003 1 4 0 00x00100114 1 36 0 00x00100114 2 22 0 00x00100114 3 22 0 00x00100118 1 14353 1 9220x00100119 1 C 0 2198 177500x0010011a 1 310 2 13670x0010011b 1 0 1 12240x0010011b 1 0 1 1224
# of times an index has been used for reading
# of splits on the index
IBM Software Group
onstat –g cpu
IBM Informix Dynamic Server Version 11.10.F -- On-Line -- Up 7 days 20:09:14 -- 54744 Kbytes
Thread CPU Info: tid name vp Last Run CPU Time #scheds status *2 lio vp 0 3lio 06/27 13:26:39 28.6397 3749 IO Idle *3 pio vp 0 4pio 06/27 13:25:09 5.0609 517 IO Idle *4 aio vp 0 5aio 06/27 13:29:23 31.1610 112645 IO Idle *5 msc vp 0 6msc 06/27 13:27:57 0.1137 50 IO Idle *6 aio vp 1 7aio 06/27 13:29:23 19.1152 5524 IO Idle 7 main_loop() 1cpu 06/27 13:31:55 7.1407 678090 sleeping secs: 1 *8 sm_poll 1cpu 06/27 13:31:55 677245.0333 940398 running 9 sm_listen 1cpu 06/27 13:27:57 0.0057 32 sleeping forever 10 sm_discon 1cpu 06/27 13:31:55 2.5516 676641 sleeping secs: 1 11 flush_sub(0) 1cpu 06/27 13:31:55 1.7716 677707 sleeping secs: 1 *12 aio vp 2 8aio 06/27 13:29:23 21.7697 727 IO Idle *13 aio vp 3 9aio 06/27 13:25:09 23.7650 677 IO Idle *14 aio vp 4 10aio 06/27 13:25:09 18.0777 1118 IO Idle *15 aio vp 5 11aio 06/27 13:25:09 17.0063 350 IO Idle 16 aslogflush 1cpu 06/27 13:31:55 2.0833 676638 sleeping secs: 1 17 btscanner_0 1cpu 06/27 13:31:35 1.7299 22352 sleeping secs: 31 *18 onmode_mon 1cpu 06/27 13:31:55 2.9390 676641 sleeping secs: 1 *40 dbScheduler 1cpu 06/27 13:29:23 1.5202 3444 sleeping secs: 148 *41 dbWorker1 1cpu 06/27 13:24:22 0.9907 2655 sleeping forever *42 dbWorker2 1cpu 06/27 13:24:22 1.0513 2908 sleeping forever 43 bf_priosweep() 1cpu 06/27 13:30:10 0.4217 2255 cond wait bp_cond 45 sqlexec 1cpu 06/20 14:46:53 0.0561 322 cond wait sm_read 46 sqlexec 1cpu 06/20 01:45:59 6.9784 32301 cond wait sm_read
IBM Software Group
RSS: onstat –g rss <secondary_node> (Primary)显示某个 RSS Server 的信息
$ onstat -g rss war
IBM Informix Dynamic Server Version 11.10.FC1 -- On-Line (Prim) -- Up 1 days 06:49:10 -- 196608 Kbytes
RSS Server control block: 0xf202f68
RSS server name: war
RSS server status: Active
RSS connection status: Connected
Log transmission status: Active
Next log page to send(log id,page): 4,48
Sequence number of next buffer to send: 1279
Sequence number of last buffer acked: 1265
Log Pages Snooped:
RSS Srv From From Tossed
name Cache Disk (LBC full)
war 3448 1053 0
IBM Software Group
$ onstat -g rss verbose
IBM Informix Dynamic Server Version 11.10.FC1 -- On-Line (Prim) -- Up 1 days 06:51:01 -- 196608 Kbytes
Local server type: HDR Primary
Index page logging status: Enabled
Index page logging was enabled at: 2007/05/15 08:50:18
Number of RSS servers: 2
RSS Server information:
RSS Server control block: 0xf202f68
RSS server name: war
RSS server status: Active
RSS connection status: Connected
Log transmission status: Active
Next log page to send(log id,page): 4,48
Sequence number of next buffer to send: 1279
Sequence number of last buffer acked: 1265
RSS Server control block: 0xf202e20
RSS server name: uabrs
RSS server status: Active
RSS connection status: Connected
Log transmission status: Active
Next log page to send(log id,page): 4,48
Sequence number of next buffer to send: 313
Sequence number of last buffer acked: 299
RSS: onstat –g rss verbose (Primary) ( 所有 RSS 的信息 )
IBM Software Group
RSS: onstat –g rss log (Primary)$ onstat -g rss log
IBM Informix Dynamic Server Version 11.10.FC1 -- On-Line (Prim) -- Up 1 days 06:52:24 -- 196608 Kbytes
Log Pages Snooped:
RSS Srv From From Tossed
name Cache Disk (LBC full)
war 3448 1053 0
uabrs 47 4454 0
IBM Software Group
RSS: onstat –g rss (Secondary)
$ onstat -g rss
IBM Informix Dynamic Server Version 11.10.FC1 -- Read-Only (RSS) -- Up 1 days 05:46:19 -- 196608 Kbytes
Local server type: RSS
Server Status : Active
Source server name: boy
Connection status: Connected
Last log page received(log id,page): 4,47
IBM Software Group
SDS: onstat 监控 : onstat –g sds
primary Local server type: PrimaryNumber of SDS servers:1
SDS server information
SDS srv SDS srv Connection Last LPG sentname status status (log id,page)sec Active Connected 2,2939
SecondaryLocal server type: SDSServer Status : ActiveSource server name: primConnection status: ConnectedLast log page received(log id,page): 2,2939
IBM Software Group
SDS: onstat 监控 : onstat -g sds verbose
primary Number of SDS servers:1Updater node alias name :prim
SDS server control block: 0x151eba7b0server name: secserver type: SDSserver status: Activeconnection status: ConnectedLast log page sent(log id,page):2,2939Last log page flushed(log id,page):2,2939Last LSN acked (log id,pos):2,12038536Sequence number of next buffer to send: 14Sequence number of last buffer acked: 0Time of lask ack:2007/04/24 11:07:15Total LSNs posted:0Total LSNs sent:0Total page flushes posted:0Total page flushes sent:0
IBM Software Group
SDS: onstat 监控 : onstat –g sds <servername>
Primary only$onstat -g sds sec
SDS server control block: 0x151eba7b0server name: secserver type: SDSserver status: Activeconnection status: ConnectedLast log page sent(log id,page):2,2939Last log page flushed(log id,page):2,2939Last LSN acked (log id,pos):2,12038536Sequence number of next buffer to send: 14Sequence number of last buffer acked: 0Time of lask ack:2007/04/24 11:07:15Total LSNs posted:0Total LSNs sent:0Total page flushes posted:0Total page flushes sent:0
IBM Software Group
SDS: onstat 监控 : onstat –g sds verbose
secondarySDS server control block: 0x151552860Local server type: SDSServer Status : ActiveSource server name: primConnection status: ConnectedLast log page received(log id,page): 2,2939Next log page to read(log id,page):2,2940Last LSN acked (log id,pos):2,12038536Sequence number of last buffer received: 0Sequence number of last buffer acked: 0Current paging file:ers=500000Current paging file size:2048Old paging file:/tmp/chunk1Old paging file size:12288
IBM Software Group
Smart blob 的监控
onstat –g smb s 监控 smartblob space
onstat –g smb c 监控 smartblob chunk
onstat –g smb fdd LO file descriptor table
onstat –g smb lod LO header table
IBM Software Group
监控工具介绍onstat
SMI
oncheck
OpenAdminTool ( 仅限于 11 版本使用 )
复制的监控
IBM Software Group
什么是 SMI
System Monitoring interface(SMI) 提供了和 onstat输出相同的信息,但它给用户提供了其他的一些便利之处:
通过 SQL 语句访问共享内存结构提供特定用户的 profile 信息系统表的描述保存在 $INFORMIXDIR/etc/sysmaster.sql
中,所有 SMI 的监控信息都是通过 这些系统表获得
IBM Software Group
通过 SMI 监控全表扫描select p.dbsname,
p.tabname,
t.nrows,
sum(p.seqscans) tot_seqscans
from sysmaster:sysptprof p, <userdb>:systables t
where p.dbsname not like "sys%"
and p.dbsname = “<userdb>"
and p.tabname = t.tabname
and t.tabid > 99
and t.nrows >20000
group by 1,2,3
having sum(p.seqscans) > 3
order by 3 desc,4 desc;
IBM Software Group
通过 SMI 监控锁等待select p.dbsname,
p.tabname,
t.nrows,
t.locklevel,
sum(p.lockwts) lockwts
from sysmaster:sysptprof p, <userdb>:systables t
where p.dbsname not like "sys%"
and p.dbsname = “<userdb>"
and p.tabname = t.tabname
and t.tabid > 99
group by 1,2,3,4
order by 5 desc;
IBM Software Group
通过 SMI 监控 dbspace 上的空间使用情况
select name dbspace,
sum(chksize)*pagesize allocated,
sum(nfree)*pagesize free,
round(((sum(chksize) - sum(nfree))/sum(chksize))*100) pcused
from sysmaster:sysdbspaces d, sysmaster:syschunks c
where d.dbsnum = c.dbsnum
group by 1
order by 4 desc;
IBM Software Group
通过 SMI 监控每个表的空间的使用情况select t.tabname table_name,
p.nptotal*4 allocated_space,
p.npused*4 used_space,
p.npdata*4 data_space,
(p.nptotal - p.npused)*4 free_space
from sysmaster:systabnames t, <userdb>:systables a,
sysmaster:sysptnhdr p
where t.partnum = p.partnum
and a.tabname = t.tabname
and tabid > 99
group by 1,2,3,4,5
order by 2 desc;
IBM Software Group
监控工具介绍onstat
SMI
oncheck
OpenAdminTool ( 仅限于 11 版本使用 )
复制的监控
IBM Software Group
oncheck 能做什么?
IBM Software Group
oncheck usage选项 用途
-cc 检查某个数据库的系统表
-cd 检查某个表除大对象以外的所有页面
-ce 检查 chunk-free-list 以及相应的剩余空间,每个表的 extent信息, smart-large-object 的 extent 信息和元数据信息
-ci 检查某个表的索引的顺序和一致性信息
-cr 检查 root dbspace 的保留页信息
-cR 检查 root dbspace 的保留页信息、物理日志、逻辑日志
-pe 显示 chunk 和表的 extent 的信息,表的 extent 的剩余空间等
IBM Software Group
oncheck usage(continue)
选项 用途
-pt 显示表或者某个 fragment 的信息
-pT 和 -pt 的输出类似,但还包括索引信息和按页面类型分类的页申请信息
-ps 显示 sbspace 中大对象和元数据的信息
-pS 和 -ps 相同,另外包括了 sbspace 上 extent 的信息
-pp 显示某个逻辑页面的信息
-pd 以二进制的格式显示记录行的信息
IBM Software Group
oncheck –pT stores_demo:items 输出TBLspace Report for stores_demo:luchuan.items
Physical Address 1:32733
Creation date 03/16/2009 09:46:19
TBLspace Flags 801 Page Locking
TBLspace use 4 bit bit-maps
Maximum row size 18
Number of special columns 0
Number of keys 0
Number of extents 1
Current serial value 1
Current SERIAL8 value 1
Current BIGSERIAL value 1
Current REFID value 1
Pagesize (k) 4
First extent size 8
Next extent size 8
Number of pages allocated 8
Number of pages used 2
Number of data pages 1
Number of rows 67
IBM Software GroupPartition partnum 1048963
Partition lockid 1048963
Extents
Logical Page Physical Page Size Physical Pages
0 1:33278 8 8
TBLspace Usage Report for stores_demo:luchuan.items
Type Pages Empty Semi-Full Full Very-Full
---------------- ---------- ---------- ---------- ---------- ----------
Free 6
Bit-Map 1
Index 0
Data (Home) 1
----------
Total Pages 8
Unused Space Summary
Unused data slots 117
Unused bytes per data page 20
Total unused bytes in data pages 20
Home Data Page Version Summary
Version Count
0 (current) 1
IBM Software Group
Index 104_10 fragment partition rootdbs in DBspace rootdbs
Physical Address 1:32734
Creation date 03/16/2009 09:46:19
TBLspace Flags 801 Page Locking
TBLspace use 4 bit bit-maps
Maximum row size 18
Number of special columns 0
Number of keys 1
Number of extents 1
Current serial value 1
Current SERIAL8 value 1
Current BIGSERIAL value 1
Current REFID value 1
Pagesize (k) 4
First extent size 6
Next extent size 6
Number of pages allocated 6
Number of pages used 2
Number of data pages 0
Number of rows 0
Partition partnum 1048964
Partition lockid 1048963
Extents
Logical Page Physical Page Size Physical Pages
0 1:33286 6 6
IBM Software Group
监控工具介绍onstat
SMI
oncheck
OpenAdminTool ( 仅限于 11 版本使用 )
复制的监控
IBM Software Group
功能强大的开放管理工具 Open Admin Tool (OAT)
在一个地点管理很多实例
可进一步显示所有的细节
可方便的通过扩展进行配置
• 基于 PHP 的开源的基于浏览器的 图形界面工具• 定义和管理自动化的任务 (task) • 创建和显示性能直方图以用于 分析和调优
IBM Software Group
OAT – The Open Admin Tool
IBM Software Group
OAT – Space Administration – Dbspaces (1) This view provides a graphical summary of instance wide dbspace storage, and a text summary by d
bspace at the bottom. Clicking on a dbspace highlighted in blue generates the next screen ……
IBM Software Group
OAT – Space Administration – Recovery Logs – Checkpoints
IBM Software Group
OAT – Server Administration – MACH - Clusters
IBM Software Group
OAT – Server Administration - MACH – Add an SDS Server (1)
IBM Software Group
OAT – Server Administration - MACH – Add an SDS Server (2)
IBM Software Group
OAT – Server Administration – MACH – Modify Status
IBM Software Group
OAT – Server Admin - System Validation – Check Extents
This is a dbspace level extent check and integrity operation.
IBM Software Group
OAT – Virtual Processors (VP) – Adding or Dropping a VP At the bottom of the VP screen, OAT allows the DBA to add or drop a Virtual Processor
by VP type. A post execution status message is printed at the top of the screen.
IBM Software Group
OAT – Enterprise Replication – Domain (2) An ER Screen Showing a Server cluster not so well….
IBM Software Group
OAT – ER – Server Status (1) A warning that the server is getting near threshold limits for DDRBLOCK. Click
the server image to see the ER server state.
IBM Software Group
OAT – ER – Server Status (2) Normally, to solve a DDRBLOCK issue, you add more logical logs, until we have
log space availability of 25% free. Using OAT exclusively to solve a problem…easily.
IBM Software Group
OAT – Enterprise Replication – Node Details (1)
For each node in an ER Cluster, OAT provides: Node Status Summary Screen
Capture and Apply state summaries.
Send and Receive queue summaries.
Network Connectivity Summary and Transmission rates.
Node Graphical and Text Capture Details.
Target/Replicate Send Queue Stats.
Graphical Network Message Send/Receive Stats.
Node ER Disk Utilization.
IBM Software Group
OAT – Enterprise Replication – Node Details (2)
For each node in an ER Cluster, OAT provides (con’td): Node Apply Stats with Network Latency & Transactions.
Node Aborted Transaction & Row Information Spooling Stats.
Node ER Error Details when found.
ER Node Configuration details only.
To see the ER domain in OAT, you must first configure the cluster using the CDR command line utility and elements of the cluster must be on-line.
OAT can now bring an existing non ER server into an ER domain for the first time.
IBM Software Group
OAT – Node Details – ER Disk Space Usage
IBM Software Group
OAT - Performance Analysis – SQL Explorer The SQL Explorer allows the DBA to drill down on a specific SQL Statement by clicking on
the zoom picture next to the statement type.
IBM Software Group
OAT - Performance Analysis – SQL Explorer (1)
IBM Software Group
OAT - Performance Analysis – SQL Explorer - Zoom This is the statement chosen from the previous screen shot. To drill yet further here, to see a
ll data associated with this particular statement iteration, click on the zoom pic on the left.
IBM Software Group
OAT - Performance Analysis – System Reports Currently, there are 24 predefined reports.
IBM Software Group
OAT - Performance Analysis – System Reports – Sample 1
The data is generated on demand and may also be shown text only. Shown is Virtual Processors.
IBM Software Group
OAT - Performance Analysis – System Reports – Sample 2
Shown here is part of Operating System Resources…..
IBM Software Group
OAT – SQL ToolBox – Databases – Table View Click on the browse button next to the table name …..
IBM Software Group
OAT - Performance Analysis – Session Explorer – Locks
Session Explorer shows session related resources. You can see the locks, threads, memory, network or environment, as well as an overall session profile.
IBM Software Group
OAT - Performance Analysis – Session Explorer – Threads
The current threads in use on a single session ….
IBM Software Group
OAT - Performance Analysis – Session Explorer – Environment
The environment variables related to a single user session.
IBM Software Group
OAT - Performance Analysis – Session Explorer – Profile
Cumulative session related data for a single session….
IBM Software Group
OAT – Server Administration - Auto Update Statistics - General
Table statistics administration for OAT occurs here. The graphic shows statistics status by table need; the text shows the need by database. See the Appendix for more on Auto Update Statistics.
IBM Software Group
监控工具介绍onstat
SMI
oncheck
OpenAdminTool ( 仅限于 11 版本使用 )
复制的监控
IBM Software Group
通过 SMI 监控察看 SERVER 的状态 select servername, servstate from syscdrserver;
察看复制定义的状态 select replname, replstate from syscdrrepl;
或者通过 cdr list repl 察看察看组的状态 select g.grpname, r.replstate
from syscdrgrp g, syscdrrepl r
where g.grpname = r.grpname
group by 1,2
IBM Software Group
onstat –g ddr: 监控日志阅读器的状态
DDR -- Running --
# Events Snoopy Snoopy Replay Replay Current Current
Buffers ID Position ID Position ID Position
512 25 4f18c 24 18 25 51000
IBM Software Group
onstat –g rqm/onstat –g rqm BRIEF 监控发送队列
Queue trg_send (all totals approximate)
# Txns in memory: 48
Server grp_east (222) # txns in queue: 48
Server grp_west (333) # txns in queue: 48
IBM Software Group
onstat –g nif: 监控网络接口信息
NIF anchor Block : a572090
nifGstate RUN
nifRetryTimeout 300
CDR connections:
ID Name State Send Received
333 grp_west RUN 5980 173
111 grp_corp RUN 18429 25108
IBM Software Group
onstat –g dss : 监控事务和记录行的处理情况---- Datasync Statistics for grp_east as of 99/06/01 14:19:42----
Source Tx Tx Tx Rows Rows last Tx
Server Process Commit Aborted Aborted Commit Proccestime
------- ---------- --------- ---------- --------- --------- ----------------
11112386 12386 0 0 12386 99/06/01 13:56:03
333 1 1 0 0 1 99/05/28 15:13:47
DS thread statistics
cmtTime Tx Tx Tx Last Tx
Name < local Committed Aborted Processed Processed Time
--------- -------- ---------------- ----------- ------------------ ----------------------
CDRD_0 0 482 0 482 99/05/28 15:23:11
Tables (99.6%)
Database : stores
CDRD_1 0 1 0 1 99/05/28 15:13:47
Tables (0.0%)
Databases: stores
IBM Software Group
HP 上的监控工具 top 监控每个 cpu 的使用情况 glance 可以监控多个指标,如 disk busy , memory ,cpu
等 iostat 监控每个 disk 繁忙的程度 ulimit -a 检查用户限定值, nofiles 值和数据库用户连接数有
关系
IBM Software Group
AIX 监控工具监控内存的使用 nmon 可以免费下载的工具 , 监控剩 余
内 存等多项指标监控每个 cpu 的利用率 sar –P ALL 1 100
ulimit –a 中的 nofiles 值和数据库用户连接数有关系
IBM Software Group
Sun 上 ulimit 的设置/etc/system :
set rlim_fd_cur=1024 #nofiles 的设置set rlim_fd_max=1024
IBM Software Group
第三方的监控产品
: Server Studio
:DBSonar
http://www.cobrasonic.com/
http://www.serverstudio.com/
AGS
IBM Software Group