个人网站: www.7dtest.com 7点测试群:(61369656)------(77273408)------(35710365)------(9410090)

监控informix数据库的命令之一 -Zee(未完)

上一篇 / 下一篇  2008-01-18 15:26:36 / 个人分类:Zee的生活

这里把命令写出来,如果有兴趣可以深入去看看informix的相关内容。

这里是在solaris上执行的结果。

 

onperf查看informix性能的程序,在windows上有相应程序。

 

onstat命令:

-r设置时间

-o设置输出文件

informix数据库性能监控命令如下:

$ onstat -- //查看onstat的参数

usage: onstat [ -abcdfghklmpstuxzBCDFRX ] [ -i ] [ -r [<seconds>] ]

             [ -o [<outfile>] ] [ <infile> ]

   -a   Print all info

   -b   Print buffers

   -c   Print configuration file

   -d   Print spaces and chunks

   -f   Print dataskip status

   -g   MT subcommand (default: all)

   -i   Interactive mode

   -h   Print buffer hash chain info

   -k   Print locks

   -l   Print logging

   -m   Print message log

   -p   Print profile

   -s   Print latches

   -t   Print TBLspaces

   -u   Print user threads

   -x   Print transactions

   -z   Zero profile counts

   -B   Print all buffers

   -C   Print btree cleaner requests

-D   Print spaces and detailed chunk stats

   -F   Print page flushers

   -G    Print global transaction ids.

   -P   Print partition buffer summary

   -R   Print LRU queues

   -X   Print entire list of sharers and waiters for buffers

   -r   Repeat options every <seconds> seconds (default: 5)

   -o   Put shared memory into specified file (default: onstat.out)

   <infile>

         Read shared memory information from specified dump file

 MT COMMANDS:

   all  Print all MT information

   ath  Print all threads

   wai  Print waiting threads

   act  Print active threads

   rea  Print ready threads

   sle  Print all sleeping threads

   spi  Print spin locks with long spins

   sch  Print VP scheduler statistics

   lmx  Print all locked mutexes

   wmx  Print all mutexes with waiters

   con  Print conditions with waiters

   stk <tid>

         Dump the stack of a specified thread

   glo  Print MT global information

   mem [<pool name>|<session id>]

         Print pool statistics.

   seg  Print memory segment statistics

   rbm  Print block map for resident segment

   nbm  Print block map for non-resident segments

   afr <pool name|session id>

         Print allocated pool fragments

   ffr <pool name|session id>

         Print free pool fragments

   ufr <pool name|session id>

         Print pool usage breakdown

   iov  Print disk IO statistics by vp

   iof  Print disk IO statistics by chunk/file

   iog  Print AIO global information

   iob  Print big buffer usage by IO VP class

   ppf [<partition number> | 0]

         Print partition profiles

   tpf [<tid> | 0]

         Print thread profiles

   ntu  Print net user thread profile information

   ntt  Print net user thread access times

   ntm  Print net message information

   ntd  Print net dispatch information

   nss [<session id>]

         Print net shared memory status

nsc [<client id>]

         Print net shared memory status

   nsd  Print net shared memory data

   sts  Print max and current stack sizes

   dic  Print dictionary cache information

   opn [<tid>]

         Print open tables

   qst  Print queue statistics

   wst  Print thread wait statistics

   ses [<session id>]

         Print session information

   sql [<session id>]

         Print SQL information

   stq [<session id>]

         Print stream queue information

   dri  Print data replication information

   pos  Print /INFORMIXDIR/etc/.infos.DBSERVERNAME file

   mgm  Print Memory Grant Manager information

   lap  Print light append information

   ddr  Print DDR log post processing information

   dmp <address> <length>

         Dump <length> bytes of shared memory starting at <address>

   src <pattern> <mask>

         Search memory for <pattern>, where <pattern>==(memory&<mask>)

$

$ onstat –u  //查看当前连接数

-r设置时间

-o设置输出文件

 

Informix Dynamic Server Version 7.31.UC5   -- On-Line -- Up 01:32:36 -- 393216

Kbytes

 

Userthreads

address flags  sessid  user    tty     wait    tout locks nreads  nwrites

26056014 ---P--D 1       informix -       0       0   0    64      271

260564fc ---P--F 0       informix -       0       0   0    0       16433

260569e4 ---P--- 16      informix -       0       0   0    0       0

26056ecc ---P--B 17      informix -       0       0   0    1       34

260573b4 Y--P--- 1429    amiszz  -       27373074 0   1    0       3

2605789c Y--P--- 1439    amisyk  -       26d4777c 0   1    0       20

26057d84 ---P--D 29      informix -       0       0   0    0       0

2605826c Y--P--- 1402    amisyk  -       26489390 0   1    2       3

26058754 Y--P--- 13      amisyk  ttyp2   26519560 0   1    7       0

26069a14 --BPR-- 1407    amisyk  -       0       0   15   106     4217

26069efc Y--P--- 1184    amisyk  -       26251c00 0   1    118     61

2606a3e4 Y--P--- 1334    amisyk  -       26361408 0   1    0       0

2606adb4 Y--P--- 1449    amisyk  -       26173a94 0   1    0       0

2606b29c Y--P--- 1425    amisyk  -       261ee2c4 0   1    0       21

2606b784 Y--P--- 1279    amisyk  -       2644d184 0   1    0       0

2606bc6c Y--P--- 1328    amisyk  -       261eecbc 0   1    0       0

2606c63c Y--P--- 1297    amiszlp ttyp26  26f83150 0   1    0       0

2606cb24 Y--P--- 1331    amisyk  -       261effd0 0   1    0       0

2606d00c Y--P--- 1381    amisyk  -       26519d50 0   1    0       0

2606d4f4 Y--P--- 1423    amisyk  -       26fed43c 0   1    2       3

2606d9dc Y--P--- 1448    amisyk  -       26595518 0   1    0       0

2606dec4 Y--P--- 1326    amisyk  -       264e3ce8 0   1    0       0

2606e3ac Y--P--- 1441    amisyk  -       2795df50 0   1    0       0

2606e894 Y--P--- 1392    amisyk  -       264f7520 0   1    0       2

2606ed7c Y--P--- 1443    amisyk  -       26f6f804 0   1    0       0

2606f264 Y--P--- 1426    amisyk  -       261cff54 0   1    0       0

2606f74c Y--P--- 1438    amisyk  -       26d470b8 0   1    0       0

2607011c Y--P--- 1445    amisyk  -       263358d0 0   1    0       4

26070604 Y--P--- 1394    amisyk  -       263c4a24 0   1    0       3

 78 active, 128 total, 87 maximum concurrent

 

$ onstat -g sql  //查看当前的sql语句

 

Informix Dynamic Server Version 7.31.UC5   -- On-Line -- Up 01:34:15 -- 393216

Kbytes

 

Sess SQL           Current           Iso Lock      SQL ISAM F.E.

Id   Stmt type     Database          Lvl Mode      ERR ERR Vers

1469 -             newgzsz           CR Not Wait  0   0   9.20

1468 -             newgzsz           CR Not Wait  0   0   9.20

1467 -             szstand1106       CR Not Wait  0   0   9.20

1466 -             szgb              CR Not Wait  0   0   9.20

1465 -             szstand1106       CR Not Wait  0   0   9.20

1464 -             sxtest            CR Not Wait  0   0   9.20

1463 -             sxtest0928        CR Not Wait  0   0   9.20

1462 -             sxtest0928        CR Not Wait  0   0   9.20

1461 -             sxtest            CR Not Wait  0   0   9.20

1460 -             newgzsz           CR Not Wait  0   0   9.20

1459 -             newgzsz           CR Not Wait  0   0   9.20

1458 -             newgzsz           CR Not Wait  0   0   9.20

1457 -             newgzsz           CR Not Wait  0   0   9.20

1456 -             plan_zhu          CR Not Wait  0   0   9.20

1455 -             plan_zhu          CR Not Wait  0   0   9.20

 

 

$ onstat -g sql 487 //查看SQL语句的detail

 

Informix Dynamic Server Version 7.31.UC5   -- On-Line -- Up 01:52:59 -- 393216

Kbytes

 

Sess SQL           Current           Iso Lock      SQL ISAM F.E.

Id   Stmt type     Database          Lvl Mode      ERR ERR Vers

487  SELECT        amis06_2          NL Not Wait  0   0   9.20

 

Current statement name : _ifxc00000000000ci

 

Current SQL statement :

 select a.serno,(a.relation-3) relation,a.salesno pid,a.name

   name,a.rankid,d.t_rankname rank, a.flag , AssResult.ChgRankTypeNo

   resultid ,code.t_codevalue result, c.t01probationdate signtime ,

   '2005-03-01' querydate ,'0801020100Q01' submit,'3' funcid,'0' system,

   Round(sum(case Assess.indexno when 'KZT801' then Assess.indexvalue end),0)

    unpassnumber , Round(case a.flag when '0'  then -1.00 else sum(case

   Assess.indexno when 'KZT207' then Assess.indexvalue end) end ,0) KZT207,

   Round(case a.flag when '0'  then -1.00 else sum(case Assess.indexno when

    ………………………………………………………………

省略若干行具体数

TAG: Zee的生活

 

评分:0

我来说两句

我的栏目

日历

« 2024-05-03  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 158644
  • 日志数: 146
  • 图片数: 1
  • 建立时间: 2006-12-05
  • 更新时间: 2012-11-16

RSS订阅