onstat -C 命令:打印 B–tree 扫描程序信息

使用 -C 命令显示有关 B-tree 扫描程序子系统和每个 B-tree 扫描程序线程的信息。

语法:
以下选项可用于 onstat -C 命令并且可以合并:
prof
打印系统和每个 B-tree 扫描程序线程的概要文件信息。这是缺省选项。
hot
以要清除的顺序打印 hot 列表索引键
part
打印具有索引统计信息的所有分区
clean
打印已清除或需要清除的所有分区的信息
range
打印通过使用索引范围扫描所节约的页进程数
map
为 alice 清除方法的每个索引显示了当前的 bitmap
alice
显示了 alice 清除方法选项的效率
all
打印所有 onstat -C 选项

使用 prof 选项示例输出

图: 带 prof 选项的 onstat -C 命令输出

            Btree Cleaner Info
            BT scanner profile Information
            ==============================
            Active Threads                               1
            Global Commands                        2000000   Building hot list
            Number of partition scans                11003
            Main Block                          0xc000000003c9dc68
            BTC Admin                           0xc0000000024bc208
            
            
            BTS info             id   Prio    Partnum      Key     Cmd
            0xc000000003c9dee8    0   High   0x00000000     0       40  Yield N
            Number of leaves pages scanned                         77
            Number of leaves with deleted items                     6
            Time spent cleaning (sec)                               0
            Number of index compresses                              0
            Number of deleted items                               113
            Number of index range scans                             0
            Number of index leaf scans                              0
            Number of index alice scans                             2 

使用 prof 选项输出描述

Id
BTSCANNER ID
Prio
BTSCANNER 当前的优先级
Partnum
当前正在工作线程的索引分区号
Cmd
此线程当前正在处理的命令

使用 hot 选项示例输出

图: 带有 hot 选项的 onstat -C 命令输出

            Btree Cleaner Info
            
            Index Hot List
            ==============
            Current Item           5     List Created          15:29:47
            List Size              4     List expires in              0 sec
            Hit Threshold        500     Range Scan Threshold        -1
            
            
            Partnum        Key            Hits
            0x00100191       1              14 *
            0x00A00022       1              13 *
            0x00100191       2               8 *
            0x00100150       2               7 * 

使用 hot 选项输出的描述

Partnum
索引的分区号
Key
索引键
Hits
Hit 计数器的当前值
*
指示在 hot 列表持续时,该分区被清除

使用 part 选项示例输出

图: onstat -C part 命令输出

            Btree Cleaner Info
            
            
            Index Statistics
            ================
            Partnum  Key     Positions   Compress      Split
            0x00100002  1           146          0          0
            0x00100004  1             4          0          0
            0x00100004  2            13          0          0
            0x00100005  1             1          0          0
            0x00100005  2             0          0          0
            0x00100006  1             1          0          0
            0x00100006  2             0          0          0
            0x00100007  2             1          0          0
            0x00100008  2             1          0          0
            0x0010000a  1             0          0          0
            0x0010000e  3             1          0          0
            0x00100011  1             1          0          0
            0x00100013  2             2          0          0 

使用 part 选项输出描述

Partnum
索引的分区号
Key
索引键
Positions
索引的读取数
Compress
页压缩数
Split
已发生分割的数量
C
指示分区正忙于被清除
N
索引分区不再具有清除资格

使用 clean 选项示例输出

图: 带有 clean 选项的 onstat -C 命令输出

            Btree Cleaner Info
            
            Index Cleaned Statistics
            =========================
            Partnum  Key      Dirty Hits  Clean Time  Pg Examined  Items Del  Pages/Sec
            0x00100013  2               2           0           0           0       0.00
            0x0010008b  3               1           0           0           0       0.00
            0x001000c7  1               2           0           0           0       0.00
            0x00100150  2               7           0           0           0       0.00
            0x0010016f  2               2           0           0           0       0.00
            0x00100191  1              14           0           0           0       0.00
            0x00100191  2               8           0           0           0       0.00
            0x00a00011  2               6           0           0           0       0.00
            0x00a00013  1               0           0          24           0      24.00
            0x00a00019  1               0           0         470         225     470.00
            0x00a00022  1              13           0           0           0       0.00
            0x00a00022  2               5           0           0           0       0.00 

使用 clean 选项输出描述

Partnum
索引的分区号
Key
索引键
Dirty Hits
Dirty 页被扫描的次数
Clean Time
总耗时,以秒为单位
Pg Examined
被 btscanner 线程审查的页数
Items Del
从该索引移除的项的数量
Pages/Sec
每秒审查的页数
C
指示分区正在忙于被清除
N
索引分区不再具有清除的资格

示例输出

图: onstat -C range

            Btree Cleaner Info
            
            Cleaning Range Statistics
            =========================
            Partnum  Key             Low          High          Size        Saving
            0x001001bc  2               36             69             96      65.6 %
            0x001001be  1               16             20             48      91.7 %
            0x001001cd  1                8             21             32      59.4 %
            0x001001cd  2               24             25             32      96.9 %
          

输出描述

Partnum
分区号
Key
索引键
Low
范围扫描的下限
High
索引扫描的上限
Size
索引的页大小
Saving
保存相对完整扫描的时间的百分比
C
指示分区正在忙于被清除
N
索引分区不再有清除资格

输出示例

图: onstat -C map

            Btree Cleaner Info
            
            ALICE Bitmap of Deleted Index Items
            ===================================
            Partnum   Key        Map
            0x00100013  2 0000: 80000000 00000000
            0x0010008b  3 0000: 80000000 00000000
            0x001000c7  1 0000: 80000000 00000000
            0x00100150  2 0000: 80000000 00000000
            0x0010016f  2 0000: 80000000 00000000
            0x00100191  1 0000: 80000000 00000000
            0x00100191  2 0000: 80000000 00000000
            0x00a00011  2 0000: 80000000 00000000
            0x00a00013  1 0000: 00000000 00000000
            0x00a00019  1 0000: 00000000 00000000
            0x00a00022  1 0000: 80000000 00000000
            0x00a00022  2 0000: 80000000 00000000
          

输出描述

Partnum
分区号
Key
索引键
Map
Alice bitmap

输出示例

图: onstat -C alice

            Btree Cleaner Info
            
            ALICE Cleaning Statistics
            =========================
            
            System ALICE Info: Mode =    6, Eff =    30 %, Adj =     5
            
            Partnum    Mode BM_Sz  Used_Pg  Examined  Dirty_Pg  # I/O  Found    Eff   Adj
            0x00100013    6    64       97         0         0      0      0   0.0 %    0
            0x0010008b    6    64        5         0         0      0      0   0.0 %    0
            0x001000c7    6    64        2         0         0      0      0   0.0 %    0
            0x00100150    6    64       91         0         0      0      0   0.0 %    0
            0x0010016f    6    64       91         0         0      0      0   0.0 %    0
            0x00100191    6    64       26         0         0      0      0   0.0 %    0
            0x00100191    6    64       26         0         0      0      0   0.0 %    0
            0x001001bc    0     0       91         0         0      0      0   0.0 %    0
            0x001001cd    0     0       26         0         0      0      0   0.0 %    0
            0x001001cd    0     0       26         0         0      0      0   0.0 %    0
            0x00a00011    6    64       91         0         0      0      0   0.0 %    0
            0x00a00013    6    64       25        24         3      3      1  33.3 %    1
            0x00a00019    6    64      470       470         3      3      2  66.7 %    1
            0x00a00022    6    64       26         0         0      0      0   0.0 %    0
            0x00a00022    6    64       26         0         0      0      0   0.0 %    0
            
          

输出描述

Partnum
索引的分区号
Mode
当前分区的 alice 模式
BM_Sz
向 bitmap 分配的大小
Used_Pg
索引的页大小(已使用)
Dirty_Pg
Dirty 页的数量
# I/O
读取的页数
Found
在读取中查找到的 dirty 页数量
Eff
Bitmap 的效率
Adj
Alice 效率水平分区不充分并被调节的次数