GBase 8s administrator common commands

oninit

commandexplain
oninit -iInitialize the disk space of the root dbspace
oninitStart in online database mode
oninit -jStart the database to single user mode
oninit -sStart the database to static mode

Start database to online mode

Start GBase 8s. After starting with this command, GBase 8s enters the online service status and can provide external online services.

oninit -vy

parameter
v: During startup, output details.
y: Non interactive mode is used, that is, if there is a need to select, all are processed as y.

[gbasedbt@devsvr ~]$ onstat -
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:23:56 -- 597864 Kbytes

[gbasedbt@devsvr ~]$ 

Start database to single user mode

When the administrator wants only himself or other administrators to connect to the database for some maintenance work, you can use the following command to start the database to single user mode.

oninit -j
[gbasedbt@devsvr ~]$ onstat -
Your evaluation license will expire on 2022-06-18 00:00:00
Single-User -- Up 2 days 16:21:38 -- 597864 Kbytes

[gbasedbt@devsvr ~]$ 

Start database to static mode

When the administrator wants to do some non SQL maintenance operations, the database can be started to static mode. In this mode, only one command line operation and maintenance operation is allowed, and SQL operation is not allowed.

After the database recovery operation, the database usually enters the static mode after the recovery is completed. Administrators can run the onmode -m command to switch the database to online mode.

oninit -s
[gbasedbt@devsvr ~]$ onstat -
Your evaluation license will expire on 2022-06-18 00:00:00
Quiescent -- Up 2 days 16:19:42 -- 597864 Kbytes

[gbasedbt@devsvr ~]$ 

onmode

commandexplain
onmode -mSwitch the database server from static mode or single user mode to online mode
onmode -kLeave the database server in offline mode and clear the shared memory
onmode -sShut down the database server gracefully and switch to static mode
onmode -uImmediately shut down the database server and switch to static mode
onmode -jBring the database server into single user mode
onmode -lSwitch logical log files
onmode -cEnforce checkpoints
onmode -rStart the forced dwell of the resident portion of shared memory
onmode -nEnds the forced dwell of the resident portion of shared memory
onmode -pAdd or remove virtual Manager
onmode -PDynamically start, stop, or restart listening threads
onmode -wfUpdate the value of the specified configuration parameter in the onconfig file
onmode -wmDynamically sets the value of the specified configuration parameter in memory
onmode -zTerminate database server session

Switch database to online mode

When the database is in single user mode or static mode, you can use this command to switch the database to online mode and provide external database services.

onmode -m

Switch database to offline mode

Use the following command to close the database. When the database is unexpectedly deleted (for example, rootdbs is accidentally deleted) and cold recovery is required, the database needs to be closed first.

onmode -k

Switch database to static mode

When the administrator is maintaining, he does not want any SQL connection. He can operate the database and switch the database to static mode.

onmode -s
onmode -u

parameter
s: Switch gracefully to static mode. When a user is connected to the database, the mode will be switched after the user disconnects.
u: Switch to static mode immediately. When a user connects to the database, it will directly kill the user connection and switch the mode.

Switch database to single user mode

Switch to single user mode, only administrators are allowed to operate, and ordinary users are not allowed to connect to the database.

onmode -j

Switch logical log files

Force the database to make a logical log switch. After switching, the new logical log will be written to the next logical log file.

onmode -l

The current logical log is marked as C. after switching the logical log to the next one, the current logical log changes from 11 to 12.

[gbasedbt@devsvr ~]$ onstat -l
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 00:31:26 -- 597864 Kbytes

Physical Logging
......
4843bb78         10       U-B----  1033     2:30053              5000     5000   100.00
4843bbe0         11       U---C-L  1034     2:35053              5000      176     3.52
4843bc48         12       U-B----  1015     2:40053              5000     5000   100.00
......
46febf30         23       U-B----  1026     2:95053              5000     5000   100.00
 20 active, 20 total

[gbasedbt@devsvr ~]$ onmode -l
Your evaluation license will expire on 2022-06-18 00:00:00
[gbasedbt@devsvr ~]$ onstat -l
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 00:31:38 -- 597864 Kbytes

Physical Logging
......
4843bbe0         11       U-----L  1034     2:35053              5000      177     3.54
4843bc48         12       U---C--  1035     2:40053              5000        0     0.00
4843bcb0         13       U-B----  1016     2:45053              5000     5000   100.00
......
46febf30         23       U-B----  1026     2:95053              5000     5000   100.00
 20 active, 20 total

[gbasedbt@devsvr ~]$ 

Enforce checkpoints

When a checkpoint is executed, the "dirty" block in the buffer is written to the data file.

onmode -c
onmode -c unblock
onmode -c block <seconds>

When a checkpoint operation is enforced, you can choose to block or not block transactions.

Sets the forced residence of the resident portion of shared memory

Start the forced dwell of the resident portion of shared memory

[gbasedbt@devsvr ~]$ onmode -r
Your evaluation license will expire on 2022-06-18 00:00:00

This will set the shared memory buffer cache to RESIDENT -
Do you wish to continue (y/n)? y
Note that this command will be phased out in a future release. Please use
the OpenAdmin Tool (OAT) or onmode -w[mf] for dynamic configuration tuning.
[gbasedbt@devsvr ~]$ 

Cancels the forced dwell of the resident portion of shared memory

[gbasedbt@devsvr ~]$ onmode -n
Your evaluation license will expire on 2022-06-18 00:00:00

This will set the shared memory buffer cache to NON-RESIDENT -
Do you wish to continue (y/n)? y
Note that this command will be phased out in a future release. Please use
the OpenAdmin Tool (OAT) or onmode -w[mf] for dynamic configuration tuning.
[gbasedbt@devsvr ~]$ 

Add or remove virtual Manager

GBase 8s can dynamically increase and decrease the number of virtual processors according to business operation to adapt to business changes and make the database run more efficiently.

onmode -p +num <vp_class>
onmode -p -num <vp_class>

View the current VP information. There are 2 CPU VP S in total.

[gbasedbt@devsvr ~]$ onstat -g glo
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 00:52:37 -- 597864 Kbytes

MT global info:
sessions threads  vps      lngspins time    
0        55       13       0        3156    

          sched calls     thread switches yield 0   yield n   yield forever
total:    136622          125911          223       116478    710      
per sec:  43              33              0         30        0        

Virtual processor summary:
 class       vps       usercpu   syscpu    total   
 cpu         2         0.77      2.63      3.40    
 aio         6         0.06      0.19      0.25    
 lio         1         0.00      0.05      0.05    
 pio         1         0.00      0.04      0.04    
 adm         1         0.01      0.32      0.33    
 msc         1         0.00      0.00      0.00    
 fifo        1         0.00      0.04      0.04    
 total       13        0.84      3.27      4.11    

Individual virtual processors:
 vp    pid       class       usercpu   syscpu    total     Thread    Eff  
 1     26606     cpu         0.55      2.28      2.83      3.32      85%
 2     26631     adm         0.01      0.32      0.33      0.00       0%
 3     26632     lio         0.00      0.05      0.05      0.05     100%
 4     26637     pio         0.00      0.04      0.04      0.04     100%
 5     26643     aio         0.00      0.05      0.05      0.05     100%
 6     26644     msc         0.00      0.00      0.00      0.00       0%
 7     26650     fifo        0.00      0.04      0.04      0.04     100%
 8     26656     cpu         0.22      0.35      0.57      0.57     100%
 9     26667     aio         0.01      0.03      0.04      0.04     100%
 10    26672     aio         0.00      0.04      0.04      0.04     100%
 11    26673     aio         0.02      0.02      0.04      0.04     100%
 12    26674     aio         0.01      0.03      0.04      0.04     100%
 13    26675     aio         0.02      0.02      0.04      0.04     100%
                 tot         0.84      3.27      4.11    

Dynamically add 5 CPU VP S.

[gbasedbt@devsvr ~]$ onmode -p +5 cpu
Your evaluation license will expire on 2022-06-18 00:00:00

Check the VP information again. There are 7 current CPU VP S.

[gbasedbt@devsvr ~]$ onstat -g glo
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 00:52:47 -- 597864 Kbytes

MT global info:
sessions threads  vps      lngspins time    
0        55       18       0        3166    

          sched calls     thread switches yield 0   yield n   yield forever
total:    137080          126335          228       116874    710      
per sec:  0               0               0         0         0        

Virtual processor summary:
 class       vps       usercpu   syscpu    total   
 cpu         7         0.78      2.63      3.41    
 aio         6         0.06      0.19      0.25    
 lio         1         0.00      0.05      0.05    
 pio         1         0.00      0.04      0.04    
 adm         1         0.01      0.32      0.33    
 msc         1         0.00      0.00      0.00    
 fifo        1         0.00      0.04      0.04    
 total       18        0.85      3.27      4.12    

Individual virtual processors:
 vp    pid       class       usercpu   syscpu    total     Thread    Eff  
 1     26606     cpu         0.55      2.28      2.83      3.82      74%
 2     26631     adm         0.01      0.32      0.33      0.00       0%
 3     26632     lio         0.00      0.05      0.05      0.05     100%
 4     26637     pio         0.00      0.04      0.04      0.04     100%
 5     26643     aio         0.00      0.05      0.05      0.05     100%
 6     26644     msc         0.00      0.00      0.00      0.00       0%
 7     26650     fifo        0.00      0.04      0.04      0.04     100%
 8     26656     cpu         0.23      0.35      0.58      0.58     100%
 9     26667     aio         0.01      0.03      0.04      0.04     100%
 10    26672     aio         0.00      0.04      0.04      0.04     100%
 11    26673     aio         0.02      0.02      0.04      0.04     100%
 12    26674     aio         0.01      0.03      0.04      0.04     100%
 13    26675     aio         0.02      0.02      0.04      0.04     100%
 14    39853     cpu         0.00      0.00      0.00      0.00       0%
 15    39854     cpu         0.00      0.00      0.00      0.00       0%
 16    39855     cpu         0.00      0.00      0.00      0.00       0%
 17    39856     cpu         0.00      0.00      0.00      0.00       0%
 18    39857     cpu         0.00      0.00      0.00      0.00       0%
                 tot         0.85      3.27      4.12    

Dynamically reduce 3 CPU VP S.

[gbasedbt@devsvr ~]$ onmode -p -3 cpu
Your evaluation license will expire on 2022-06-18 00:00:00

View VP information. CPU VP becomes 4.

[gbasedbt@devsvr ~]$ onstat -g glo
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 00:53:35 -- 597864 Kbytes

MT global info:
sessions threads  vps      lngspins time    
0        55       15       0        3214    

          sched calls     thread switches yield 0   yield n   yield forever
total:    139105          128195          230       118615    710      
per sec:  0               0               0         0         0        

Virtual processor summary:
 class       vps       usercpu   syscpu    total   
 cpu         4         0.78      2.64      3.42    
 aio         6         0.06      0.19      0.25    
 lio         1         0.00      0.05      0.05    
 pio         1         0.00      0.04      0.04    
 adm         1         0.01      0.33      0.34    
 msc         1         0.00      0.00      0.00    
 fifo        1         0.00      0.04      0.04    
 total       15        0.85      3.29      4.14    

Individual virtual processors:
 vp    pid       class       usercpu   syscpu    total     Thread    Eff  
 1     26606     cpu         0.55      2.29      2.84      3.84      74%
 2     26631     adm         0.01      0.33      0.34      0.00       0%
 3     26632     lio         0.00      0.05      0.05      0.05     100%
 4     26637     pio         0.00      0.04      0.04      0.04     100%
 5     26643     aio         0.00      0.05      0.05      0.05     100%
 6     26644     msc         0.00      0.00      0.00      0.00       0%
 7     26650     fifo        0.00      0.04      0.04      0.04     100%
 8     26656     cpu         0.23      0.35      0.58      0.58     100%
 9     26667     aio         0.01      0.03      0.04      0.04     100%
 10    26672     aio         0.00      0.04      0.04      0.04     100%
 11    26673     aio         0.02      0.02      0.04      0.04     100%
 12    26674     aio         0.01      0.03      0.04      0.04     100%
 13    26675     aio         0.02      0.02      0.04      0.04     100%
 14    39853     cpu         0.00      0.00      0.00      0.00       0%
 15    39854     cpu         0.00      0.00      0.00      0.00       0%
                 tot         0.85      3.29      4.14    

[gbasedbt@devsvr ~]$ 

Dynamically start, stop, or restart listening threads

onmode -P <start|stop|restart> <instance_name>

Stop service listening.

[gbasedbt@devsvr ~]$ onmode -P stop gbaseserver
Your evaluation license will expire on 2022-06-18 00:00:00

Use dbaccess to connect to the database. Because listening has stopped, dbaccess will report an error after selecting the database for execution for a period of time.

[gbasedbt@devsvr ~]$ dbaccess - -
Your evaluation license will expire on 2022-06-18 00:00:00
> database mydb;

  908: Attempt to connect to database server (gbaseserver) failed.
Error in line 1
Near character position 1
> 

Start listening. Using dbaccess again to connect to the database will succeed immediately.

[gbasedbt@devsvr ~]$ onmode -P start gbaseserver
Your evaluation license will expire on 2022-06-18 00:00:00
[gbasedbt@devsvr ~]$ dbaccess - -
Your evaluation license will expire on 2022-06-18 00:00:00
> database mydb;

Database selected.

> 

Update the value of the specified configuration parameter in the onconfig file

onmode -wm <key=value>
onmode -wf <key=value>

Note: only some parameters support dynamic change.

Only the parameter values in memory are updated, but the parameter values in the configuration file are not updated.

[gbasedbt@devsvr gbaseserver_dbs]$ onmode -wm LISTEN_TIMEOUT=50
Your evaluation license will expire on 2022-06-18 00:00:00
Value of LISTEN_TIMEOUT has been changed to 50 seconds.
[gbasedbt@devsvr gbaseserver_dbs]$ onstat -g cfg LISTEN_TIMEOUT
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 01:33:54 -- 597864 Kbytes

name                      current value
LISTEN_TIMEOUT            50

[gbasedbt@devsvr gbaseserver_dbs]$ onstat -c | grep LISTEN_TIMEOUT
Your evaluation license will expire on 2022-06-18 00:00:00
# LISTEN_TIMEOUT             - The number of seconds that GBase
LISTEN_TIMEOUT 60
[gbasedbt@devsvr gbaseserver_dbs]$ 

Update parameter values in memory and configuration files.

[gbasedbt@devsvr gbaseserver_dbs]$ onstat -c | grep TAPEDEV
Your evaluation license will expire on 2022-06-18 00:00:00
# TAPEDEV      - The tape device path for backups. To use standard
TAPEDEV         /dev/null       
# LTAPEDEV     - The tape device path for logical logs
LTAPEDEV        /dev/null       
[gbasedbt@devsvr gbaseserver_dbs]$ onmode -wf TAPEDEV=/home/gbasedbt/backup
Your evaluation license will expire on 2022-06-18 00:00:00
Value of TAPEDEV has been changed to /home/gbasedbt/backup.
[gbasedbt@devsvr gbaseserver_dbs]$ onstat -c | grep TAPEDEV
Your evaluation license will expire on 2022-06-18 00:00:00
# TAPEDEV      - The tape device path for backups. To use standard
TAPEDEV         /home/gbasedbt/backup 
# LTAPEDEV     - The tape device path for logical logs
LTAPEDEV        /dev/null       
[gbasedbt@devsvr gbaseserver_dbs]$ 

Terminate database server session

onmode -z <session_id>
[gbasedbt@devsvr ~]$ onstat -g ses
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 02:46:43 -- 597864 Kbytes

session                                      #RSAM    total      used       dynamic 
id       user     tty      pid      hostname threads  memory     memory     explain 
29       gbasedbt -        0        -        0        16384      13712      off 
26       gbasedbt 11       27021    devsvr   1        237568     150144     off 
24       gbasedbt -        0        -        0        20480      15328      off 
2        gbasedbt -        0        -        0        16384      13712      off 

[gbasedbt@devsvr ~]$ onmode -z 26
Your evaluation license will expire on 2022-06-18 00:00:00
[gbasedbt@devsvr ~]$ onstat -g ses
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 02:47:17 -- 597864 Kbytes

session                                      #RSAM    total      used       dynamic 
id       user     tty      pid      hostname threads  memory     memory     explain 
29       gbasedbt -        0        -        0        16384      13712      off 
24       gbasedbt -        0        -        0        20480      15328      off 
2        gbasedbt -        0        -        0        16384      13712      off 

[gbasedbt@devsvr ~]$ 

When executing SQL in dbaccess, an error is reported because the Session is killed.

> info tables;


Table name



25582: Network connection is broken.
Error in line 1
Near character position 97
> 

onstat

commandexplain
onstat -Print the current running mode of the database
onstat -cPrint onconfig file contents
onstat -mPrint the latest information of the system online log
onstat -lPrint physical and logical log usage status
onstat -dPrint database space and Chunk file usage information
onstat -DPrint database space and Chunk file read and write information
onstat -tPrint tablespace information
onstat -TPrint tablespace information
onstat -kPrint lock information
onstat -pPrint system operation status statistics
onstat -rRepeat command
onstat -uPrint user thread
onstat -xPrint transaction

Print the current running mode of the database

onstat -
[gbasedbt@train ~]$ onstat -
On-Line -- Up 3 days 06:20:54 -- 1135464 Kbytes

[gbasedbt@train ~]$ 

Print onconfig file contents

Displays the contents of the profile. The path of the configuration file is included in the output. You can quickly find the configuration file through this command.

onstat -c
[gbasedbt@devsvr ~]$ onstat -c | grep -v '#' 
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 21:06:38 -- 1135464 Kbytes

Configuration File: /opt/gbase/etc/onconfig.gbaseserver


ROOTNAME rootdbs
ROOTPATH /opt/gbase/gbaseserver_dbs/rootdbs 
ROOTOFFSET 0
ROOTSIZE 204800 
MIRROR 0
MIRRORPATH $GBASEDBTDIR/tmp/demo_on.root_mirror
MIRROROFFSET 0
......
BUFFERPOOL default,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
BUFFERPOOL size=2k,buffers=35000,lrus=32,lru_min_dirty=50,lru_max_dirty=60 
BUFFERPOOL size=16k,buffers=25000,lrus=64,lru_min_dirty=25,lru_max_dirty=30 
AUTO_CKPTS 0

[gbasedbt@devsvr ~]$ 

Print the latest information of the system online log

View the latest information in the online log. The output information also contains the path information of the online log. You can view the complete contents of the online log according to the log path.

onstat -m
[gbasedbt@devsvr ~]$ onstat -m
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:32:41 -- 597864 Kbytes

Message Log File: /opt/gbase/etc/online_gbaseserver.log
08:38:39  Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 7, Llog used 2

08:44:39  Checkpoint Completed:  duration was 0 seconds.
08:44:39  Mon Jun 21 - loguniq 8, logpos 0x674018, timestamp: 0x68da0 Interval: 318

08:44:39  Maximum server connections 6 
08:44:39  Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 0, Llog used 2

08:54:39  Checkpoint Completed:  duration was 0 seconds.
08:54:39  Mon Jun 21 - loguniq 8, logpos 0x676018, timestamp: 0x68dfb Interval: 319

08:54:39  Maximum server connections 6 
08:54:39  Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 7, Llog used 2

09:08:39  Checkpoint Completed:  duration was 0 seconds.
09:08:39  Mon Jun 21 - loguniq 8, logpos 0x678018, timestamp: 0x68e07 Interval: 320

09:08:39  Maximum server connections 6 
09:08:39  Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 7, Llog used 2


[gbasedbt@devsvr ~]$ 

Print physical and logical log usage status

Display physical log buffer, logical log buffer, logical log usage, etc.

onstat -l
[gbasedbt@devsvr ~]$ onstat -l
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:30:42 -- 597864 Kbytes

Physical Logging
Buffer bufused  bufsize  numpages   numwrits   pages/io
  P-1  7        1024     2007       268        7.49
      phybegin         physize    phypos     phyused    %used   
      3:53             99400      2292       7          0.01    

Logical Logging
Buffer bufused  bufsize  numrecs    numpages   numwrits   recs/pages pages/io
  L-1  0        512      81336      6643       624        12.2       10.6    
	Subsystem    numrecs    Log Space used
	OLDRSAM      80962      12209444      
	HA           269        11836         
	DDL          105        36540         

address          number   flags    uniqid   begin                size     used    %used
4713df88         4        U-B----  7        2:53                 5000     5000   100.00
4830e970         5        U---C-L  8        2:5053               5000     1656    33.12
4830e9d8         6        A------  0        2:10053              5000        0     0.00
4830ea40         7        A------  0        2:15053              5000        0     0.00
4830eaa8         8        A------  0        2:20053              5000        0     0.00
4830eb10         9        A------  0        2:25053              5000        0     0.00
4830eb78         10       A------  0        2:30053              5000        0     0.00
4830ebe0         11       A------  0        2:35053              5000        0     0.00
4830ec48         12       A------  0        2:40053              5000        0     0.00
4830ecb0         13       A------  0        2:45053              5000        0     0.00
4830ed18         14       A------  0        2:50053              5000        0     0.00
4830ed80         15       A------  0        2:55053              5000        0     0.00
4830ede8         16       A------  0        2:60053              5000        0     0.00
4830ee50         17       A------  0        2:65053              5000        0     0.00
4830eeb8         18       A------  0        2:70053              5000        0     0.00
4830ef20         19       A------  0        2:75053              5000        0     0.00
4830ef88         20       A------  0        2:80053              5000        0     0.00
46f1cf30         21       A------  0        2:85053              5000        0     0.00
46f1cf98         22       A------  0        2:90053              5000        0     0.00
46febf30         23       A------  0        2:95053              5000        0     0.00
 20 active, 20 total

[gbasedbt@devsvr ~]$

Physical log title

titleexplain
BufferIs the current physical log buffer name
bufusedIs the number of physical log buffer pages used
bufsizeIs the size of each physical log buffer in pages
numpagesIs the number of pages written to the physical log
numwritsIs the number of writes to the disk
pages/ioThe calculation method is numpages / numwrites, which indicates the efficiency of the physical log writes being cached
phybeginIs the physical page number at the beginning of the log
physizeIs the size of the physical log in pages
phyposIs the current number of next log record writes in the log
phyusedIs the number of used pages in the log
%usedIs the percentage of pages used

Logical log title

titleexplain
BufferNumber of logical log buffers
bufusedThe number of pages used in the logical log buffer
bufsizeSize of each logical log buffer in pages
numrecsIs the number of records written
numpagesIs the number of pages written
numwritsIs the number of writes to the logical log
recs/pagesThe calculation method is numrecs/numpages
pages/ioThe calculation method is numpages / numwrites
SubsystemSubsystem
numrecsNumber of records
Log Space usedLogical log space used
addressIs the address of the log file descriptor
numberIs the log identification number of the logical log file
flagsProvide the status of each log
uniqidIs the unique ID number of the log
beginIs the start page of the log file
sizeIs the size of the log in pages
usedIs the number of pages used
%usedIs the percentage of pages used

flags

signexplain
ANewly added (available)
BBacked up
CCurrent logical log file
DMark as deleted. To delete log files and free up their space for reuse, you must perform a level 0 backup of all storage space
FAvailable, can use
LLatest checkpoint record
UUsed

Print database space and Chunk file usage information

Query the database space created in the database, and the file number, file quantity, file path, file size, page size and other information of each database space.

onstat -d
[gbasedbt@devsvr ~]$ onstat -d
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:22:42 -- 597864 Kbytes

Dbspaces
address          number   flags      fchunk   nchunks  pgsize   flags    owner    name
46feb028         1        0x70001    1        1        2048     N  BA    gbasedbt rootdbs
484c8110         2        0x60001    2        1        2048     N  BA    gbasedbt llogdbs
484c8340         3        0x70001    3        1        2048     N  BA    gbasedbt plogdbs
484c8570         4        0x68001    4        1        2048     N SBA    gbasedbt sbspace1
484c87a0         5        0x42001    5        1        16384    N TBA    gbasedbt tmpdbs1
484c89d0         6        0x42001    6        1        16384    N TBA    gbasedbt tmpdbs2
484c8c00         7        0x42001    7        1        16384    N TBA    gbasedbt tmpdbs3
484ca028         8        0x60001    8        1        16384    N  BA    gbasedbt datadbs1
484ca258         9        0x60001    9        1        16384    N  BA    gbasedbt datadbs2
484ca488         10       0x60001    10       1        16384    N  BA    gbasedbt datadbs3
484ca6b8         11       0x60001    11       1        16384    N  BA    gbasedbt datadbs4
484ca8e8         12       0x60001    12       1        16384    N  BA    gbasedbt datadbs5
 12 active, 2047 maximum

Chunks
address          chunk/dbs     offset     size       free       bpages     flags pathname
46feb258         1      1      0          102400     87514                 PO-B-D /opt/gbase/gbaseserver_dbs/rootdbs
484cb028         2      2      0          102400     2347                  PO-B-D /opt/gbase/gbaseserver_dbs/llogdbs
484cc028         3      3      0          102400     2947                  PO-B-D /opt/gbase/gbaseserver_dbs/plogdbs
484cd028         4      4      0          51200      47678      47678      POSB-D /opt/gbase/gbaseserver_dbs/sbspace1
                                 Metadata 3469       2581       3469    
484ce028         5      5      0          6400       6347                  PO-B-- /opt/gbase/gbaseserver_dbs/tmpdbs1
484d4028         6      6      0          6400       6347                  PO-B-- /opt/gbase/gbaseserver_dbs/tmpdbs2
484d5028         7      7      0          6400       6347                  PO-B-- /opt/gbase/gbaseserver_dbs/tmpdbs3
484d6028         8      8      0          6400       5817                  PO-BED /opt/gbase/gbaseserver_dbs/datadbs1_1
484d7028         9      9      0          6400       6347                  PO-BED /opt/gbase/gbaseserver_dbs/datadbs2_1
484d8028         10     10     0          6400       6347                  PO-BED /opt/gbase/gbaseserver_dbs/datadbs3_1
484d9028         11     11     0          6400       6347                  PO-BED /opt/gbase/gbaseserver_dbs/datadbs4_1
484da028         12     12     0          6400       6347                  PO-BED /opt/gbase/gbaseserver_dbs/datadbs5_1
 12 active, 32766 maximum

NOTE: The values in the "size" and "free" columns for DBspace chunks are
      displayed in terms of "pgsize" of the DBspace to which they belong.


Expanded chunk capacity mode: always

[gbasedbt@devsvr ~]$ 
Field namevalue
addressIs the storage address in the shared memory space table
numberIs the unique ID of the storage space specified at creation
flagsUse hexadecimal values to describe the properties of each storage space
fchunkID of the first chunk
nchunksNumber of chunk s in storage space
pgsizeThe size of the Dbspace page in bytes
flagsUse alphabetic codes to describe each storage space attribute
ownerOwner of storage space
nameName of the storage space
Tag value 1(flags)describe
0x0001Mirroring is allowed and the dbspace is not mirrored
0x0002Mirroring is allowed and the dbspace is mirrored
0x0004Dbspace contains chunk s that disable mirroring
0x0008New mirrored
0x0010Blobspace
0x0200Restoring space
0x0400Space physically recovered
0x0800Recovering logical log
0x2000Temporary dbspace
0x4000Backing up blobspace
0x8000Sbspace
0x10000The physical or logical log has changed
0x20000Dbspace or chunk table changed
0x040000blobspace with large chunk s
0x080000The chunk in this dbspace has been renamed
0x00100000A temporary dbspace used only by the secondary server of the shared disk. It lists the SDS in the SD secondary server_ sbspace of one of tempdbs configuration parameters
0x00200000Temporary dbspace of SD secondary server. The DBSPACETEMP configuration parameters are listed on the shared disk secondary server
0x00400000The dbspace has been backed up externally
0x00800000Dbspace is defragmenting
0x01000000Plogspace

Tag value 2(flags)

Position 1Position 2Position 3Position 4Position 5
M: Mirrored10: New mirroredB:BlobspaceB: Large chunk s larger than 2GBA:Dbspace is automatically extended
N: Not mirroredP: Physical recovery, waiting for logical recoveryP:Plogspace
50: L ogical recovery in progressS:Sbspace
R: Recovery in progressT: Temporary dbspace
D: Shut downU: Temporary sbspace
W: Temporary dbspace on primary server

Chunks field information

Field namevalue
addressChung's address
chunk/dbsChunk number and associated space number
offsetThe offset of the file or raw device in the page
sizeThe size of the chunk in dbspace page size to which the chunk belongs
freeThe number of available pages of a chunk, expressed in dbspace page size to which the chunk belongs
bpagesIs the size of the chunk in the blobpage
flagschunk status information
pathnamePathname of the physical device

chunk status information flag description

Position 1Position 2Position 3Position 4Position 5Position 6
P: MasterN: Renamed-:DbspaceB: There are chunk s larger than 2GB-: chunk is not extensible-: do not enable the direct I/O option or the concurrent I/O option
M: Mirror imageO: OnlineB:BlobspaceE:chunk extensibleC: Enable concurrent I/O option
D: Shut downS:SbspaceD: Enable direct I/O option
10: New mirror
1: I nconsistent

Print database space and Chunk file read and write information

Query the database space created in the database, and the file number, file quantity, file path, page size, IO status of each file and other information of each database space.

onstat -D
[gbasedbt@devsvr ~]$ onstat -D
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:24:44 -- 597864 Kbytes

Dbspaces
address          number   flags      fchunk   nchunks  pgsize   flags    owner    name
46feb028         1        0x70001    1        1        2048     N  BA    gbasedbt rootdbs
484c8110         2        0x60001    2        1        2048     N  BA    gbasedbt llogdbs
484c8340         3        0x70001    3        1        2048     N  BA    gbasedbt plogdbs
484c8570         4        0x68001    4        1        2048     N SBA    gbasedbt sbspace1
484c87a0         5        0x42001    5        1        16384    N TBA    gbasedbt tmpdbs1
484c89d0         6        0x42001    6        1        16384    N TBA    gbasedbt tmpdbs2
484c8c00         7        0x42001    7        1        16384    N TBA    gbasedbt tmpdbs3
484ca028         8        0x60001    8        1        16384    N  BA    gbasedbt datadbs1
484ca258         9        0x60001    9        1        16384    N  BA    gbasedbt datadbs2
484ca488         10       0x60001    10       1        16384    N  BA    gbasedbt datadbs3
484ca6b8         11       0x60001    11       1        16384    N  BA    gbasedbt datadbs4
484ca8e8         12       0x60001    12       1        16384    N  BA    gbasedbt datadbs5
 12 active, 2047 maximum

Chunks
address          chunk/dbs     offset     page Rd  page Wr  pathname
46feb258         1      1      0          1063     3651     /opt/gbase/gbaseserver_dbs/rootdbs
484cb028         2      2      0          515      6644     /opt/gbase/gbaseserver_dbs/llogdbs
484cc028         3      3      0          11       2008     /opt/gbase/gbaseserver_dbs/plogdbs
484cd028         4      4      0          11       1        /opt/gbase/gbaseserver_dbs/sbspace1
484ce028         5      5      0          24       384      /opt/gbase/gbaseserver_dbs/tmpdbs1
484d4028         6      6      0          24       408      /opt/gbase/gbaseserver_dbs/tmpdbs2
484d5028         7      7      0          24       384      /opt/gbase/gbaseserver_dbs/tmpdbs3
484d6028         8      8      0          1144     3344     /opt/gbase/gbaseserver_dbs/datadbs1_1
484d7028         9      9      0          24       8        /opt/gbase/gbaseserver_dbs/datadbs2_1
484d8028         10     10     0          24       8        /opt/gbase/gbaseserver_dbs/datadbs3_1
484d9028         11     11     0          24       8        /opt/gbase/gbaseserver_dbs/datadbs4_1
484da028         12     12     0          24       8        /opt/gbase/gbaseserver_dbs/datadbs5_1
 12 active, 32766 maximum

NOTE: The values in the "page Rd" and "page Wr" columns for DBspace chunks 
      are displayed in terms of system base  page size.


Expanded chunk capacity mode: always

[gbasedbt@devsvr ~]$
fieldexplain
addressChung's address
chunk/dbsChunk number and associated space number
offsetThe offset of the file or raw device in the page
page RdNumber of pages read
page WrNumber of pages written
pathnamePathname of the physical device

Print tablespace information

Displays the tablespace information for the active tablespace.

onstat -t
[gbasedbt@devsvr ~]$ onstat -t
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:44:11 -- 597864 Kbytes

Tblspaces
 n address          flgs ucnt tblnum   physaddr         npages nused  npdata nrows  nextns
11 484cab18         0    1    100001   1:14             600    547    0      544    4     
410 49427570         0    2    100190   1:50601          16     15     8      79     2     
486 49593028         0    1    1001dc   1:50677          8      2      1      11     1     
487 49593650         0    1    1001dd   1:50678          16     13     7      78     2     
556 486aa028         0    1    200001   2:4              50     2      0      0      1     
557 486aa778         0    1    300001   3:4              50     2      0      0      1     
558 486ab028         0    1    400001   4:4              50     6      0      4      1     
563 486b2028         2    1    500001   5:32             50     3      0      0      1     
564 486b2908         2    1    600001   6:32             50     3      0      0      1     
565 486b3028         2    1    700001   7:32             50     3      0      0      1     
566 486b3778         0    1    800001   8:32             100    71     0      69     2     
636 486b4028         0    1    900001   9:32             50     2      0      0      1     
637 486b4778         0    1    a00001   10:32            50     2      0      0      1     
638 486b5028         0    1    b00001   11:32            50     2      0      0      1     
639 486b5778         0    1    c00001   12:32            50     2      0      0      1     
 15 active, 639 total

[gbasedbt@devsvr ~]$ 

fieldexplain
nIs the counter of the open tblspace
addressIs the tblspace address in the shared memory tblspace table
flgsFlag bit
ucntUse count, which indicates the number of user threads currently accessing tblspace
tblnumIs the tblspace number expressed in hexadecimal value, and the equivalent integer value is displayed as the partnum value in the systables system directory table
physaddrIs the physical address of tblspace (on disk)
npagesIs the number of pages allocated to tblspace
nusedIs the number of used pages in the tblspace
npdataIs the number of data pages used
nrowsIs the number of data rows used
nextnsIs the number of non contiguous extent s allocated

Displays tablespace information for all tablespaces.

onstat -T
[gbasedbt@devsvr ~]$ onstat -T
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:45:20 -- 597864 Kbytes

Tblspaces
 n address          flgs ucnt tblnum   physaddr         npages nused  npdata nrows  nextns
 1 49d08ad8         8    0    a        0:0              0      0      0      0      0     
 2 4955c028         8    0    f        0:0              0      0      0      0      0     
 3 49617028         8    0    17       0:0              0      0      0      0      0     
 4 49617a18         8    0    18       0:0              0      0      0      0      0     
 5 4957a028         8    0    19       0:0              0      0      0      0      0     
 6 4957a520         8    0    1a       0:0              0      0      0      0      0     
 7 49617520         8    0    1c       0:0              0      0      0      0      0     
 8 49d08028         8    0    28       0:0              0      0      0      0      0     
 9 49d08520         8    0    3f       0:0              0      0      0      0      0     
10 4951d028         8    0    42       0:0              0      0      0      0      0     
11 484cab18         0    1    100001   1:14             600    547    0      544    4     
12 4a19d050         0    0    100002   1:15             4      3      1      7      1     
13 4957aa18         0    0    100003   1:16             16     16     15     270    1     
14 4a19d848         0    0    100004   1:17             64     50     25     275    4     
15 494fd1e0         0    0    100005   1:18             168    132    78     3086   3     
16 4964f740         0    0    100006   1:19             128    91     55     214    2     
17 49415900         0    0    100007   1:20             64     38     13     298    2     
18 494fe8d8         0    0    100008   1:21             32     17     7      162    3     
19 4951d520         0    0    100009   1:22             32     22     18     120    3     
20 4a2d0028         0    0    10000a   1:23             8      3      1      2      1     
......
637 486b4778         0    1    a00001   10:32            50     2      0      0      1     
638 486b5028         0    1    b00001   11:32            50     2      0      0      1     
639 486b5778         0    1    c00001   12:32            50     2      0      0      1     
 15 active, 639 total

[gbasedbt@devsvr ~]$ 

fieldexplain
nIs the counter of the open tblspace
addressIs the tblspace address in the shared memory tblspace table
flgsFlag bit
ucntUse count, which indicates the number of user threads currently accessing tblspace
tblnumIs the tblspace number expressed in hexadecimal value, and the equivalent integer value is displayed as the partnum value in the systables system directory table
physaddrIs the physical address of tblspace (on disk)
npagesIs the number of pages allocated to tblspace
nusedIs the number of used pages in the tblspace
npdataIs the number of data pages used
nrowsIs the number of data rows used
nextnsIs the number of non contiguous extent s allocated

Print lock information

onstat -k
[gbasedbt@devsvr ~]$ onstat -k
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 21:32:59 -- 597864 Kbytes

Locks
address          wtlist           owner            lklist           type     tblsnum  rowid    key#/bsiz
44377028         0                470f1568           0                HDR+S    100002   206         0       
443770b0         0                470f1568           44377028         HDR+IX   800090   0           0       
44377138         0                470f1568           443770b0         HDR+X    800090   4c9cd8      0    I  
4506f528         0                470f4128           0                HDR+S    100002   205         0       
 4 active, 200000 total, 65536 hash buckets, 0 lock table overflows

[gbasedbt@devsvr ~]$ 
fieldexplain
addressThe address of the lock in the lock table. If the user thread is waiting for the lock, the address of the lock appears in the wait field of onstat -u (user) output.
wtlistThe first item in the list of user threads (if any) waiting for locks
ownerShared memory address of the thread that is holding the lock. This address corresponds to the address in the address field of onstat -u (user) output. When the owner value is shown in parentheses, it represents the shared memory address of the transaction structure. This occurs only when locks are allocated for global transactions. This address corresponds to the address field of the output of onstat -G
lklistIs the next lock in the list of links held by the owner just listed
typeLock type code
tblsnumIs the tblspace number of the locked resource. If the value is less than 10000, it indicates an Enterprise Replication pseudo lock
rowidIs the line identification number
key#/bsizIs the index key number or the number of bytes locked for VARCHAR locks
signexplain
HDRhead
Bbyte
Sshare
Xmutex
Iintention
Uto update
IXIntention mutual exclusion
ISIntention - sharing
SIXShared, intent mutually exclusive

Print system operation status statistics

Displays some important statistics about the database runtime.

onstat -p
[gbasedbt@devsvr ~]$ onstat -p
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:34:46 -- 597864 Kbytes

Profile
dskreads   pagreads   bufreads   %cached dskwrits   pagwrits   bufwrits   %cached
1234       2912       1946606    99.94   5120       16867      90921      94.37  

isamtot    open       start      read       write      rewrite    delete     commit     rollbk
1208363    88057      114244     714826     30696      2073       42         77         2

gp_read    gp_write   gp_rewrt   gp_del     gp_alloc   gp_free    gp_curs   
2          0          0          0          0          0          2         

ovlock     ovuserthread ovbuff     usercpu  syscpu   numckpts   flushes   
0          0            0          21.90    53.06    270        540       

bufwaits   lokwaits   lockreqs   deadlks    dltouts    ckpwaits   compress   seqscans  
0          0          2058739    0          0          0          1380       3213      

ixda-RA    idx-RA     da-RA      logrec-RA  RA-pgsused lchwaits  
0          0          0          2          0          16      

[gbasedbt@devsvr ~]$ 
parameterexplain
dskreadsActual disk reads
pagreadsPage reads
bufreadsNumber of shared memory reads
%cachedThe actual number of physical writes to the disk
pagwritsNumber of pages written
bufwritsNumber of shared memory writes
%cachedPercentage of cached writes in the buffer pool
isamtotTotal number of calls
openIncrease when tblspace is on
startIncrease pointer in index
readIncreases when a read function is called
writeIncrease each write call
rewriteIncrease when updates occur
deleteAdd when deleting rows
commitIncrease each time iscommit() call is executed
rollbkIncrease when the transaction is rolled back
gp_readGeneral page reads
gp_writeGeneral page writes
gp_rewrtGeneral page updates
gp_delNumber of general page deletions
gp_allocGeneral page allocation
gp_freeGeneral number of pages released and returned to tablspace
gp_cursNumber of cursors used for general pages
ovlockThe number of session attempts to exceed the maximum number of locks
ovuserthreadThe number of times the user attempted to exceed the maximum number of user threads
ovbuffThe number of times the database server was unable to find a free shared memory buffer. When no buffer is available, the database server writes the dirty buffer to disk and then tries to find the available buffer
usercpuThe user CPU time (in seconds) used by all user threads, and this entry is updated every 15 seconds
syscpuThe total system CPU time (in seconds) used by all user threads. This entry is updated every 15 seconds
numckptsNumber of checkpoint s since boot time
flushesNumber of times the buffer pool has been purged to disk
bufwaitsIncrement each time a user thread must wait for a buffer
lokwaitsIncrement each time a user thread must wait for a lock
lockreqsIncrease each time a lock is requested
deadlksIncreases each time a potential deadlock is detected and blocked
dltoutsEach time the user thread has exceeded the distributed deadlock waiting for a lock, the timeout increases
ckpwaitsCheckpoint wait count
compressIncrease each time a data page is compressed
seqscansIncrease for each sequential scan
ixda-RAIndex page to data page pre read count
idx-RAPre read count of traversing index pages
da-RACount of data path scans only
logrec-RALog records read in advance by the database server
RA-pgsusedThe number of pages used by the database server to read in advance
lchwaitsThe number of times a storage thread needs to wait for a shared storage latch

Repeat command

You can use the - r parameter to execute the command every specified number of seconds.

onstat -r <seconds>
[gbasedbt@devsvr ~]$ onstat -r 1
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:39:52 -- 597864 Kbytes

On-Line -- Up 2 days 15:39:53 -- 597864 Kbytes

On-Line -- Up 2 days 15:39:54 -- 597864 Kbytes

On-Line -- Up 2 days 15:39:55 -- 597864 Kbytes

On-Line -- Up 2 days 15:39:56 -- 597864 Kbytes

On-Line -- Up 2 days 15:39:57 -- 597864 Kbytes

Print user thread

onstat -u
[gbasedbt@devsvr ~]$ onstat -u
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:50:27 -- 597864 Kbytes

Userthreads
address          flags   sessid   user     tty      wait             tout locks nreads   nwrites
470dc028         ---P--D 1        gbasedbt -        0                0    0     117      2875
470dc8e8         ---P--F 0        gbasedbt -        0                0    0     0        7127
470dd1a8         ---P--F 0        gbasedbt -        0                0    0     0        385
470dda68         ---P--F 0        gbasedbt -        0                0    0     0        345
470de328         ---P--F 0        gbasedbt -        0                0    0     0        9
......
470f0ca8         ---P--D 12       gbasedbt -        0                0    0     0        0
470f1568         Y--P--- 54       gbasedbt 4        498e0ef8         0    1     0        0
470f1e28         ---P--D 13       gbasedbt -        0                0    0     2        0
470f26e8         ---P--D 14       gbasedbt -        0                0    0     0        0
470f4128         Y--P--- 25       gbasedbt 3        496de610         0    1     0        0
470f49e8         Y--P--- 52       gbasedbt 4        49580388         0    1     0        0
 44 active, 256 total, 137 maximum concurrent

[gbasedbt@devsvr ~]$ 

fieldexplain
addressThe shared memory address of the user thread in the user table
flagsProvide session status
sessidSession ID is used to identify each unique session
userUser login (derived from operating system)
ttyThe name of the standard error (stderr) file that the user is using (derived from the operating system)
waitIf the user thread is waiting for a specific latch, lock, mutex, or condition, this field displays the address of the resource
toutThe number of seconds left in the current wait
locksThe number of locks that the user thread is holding
nreadsNumber of threads that have read from the disk
nwritesThe number of write calls executed by the user thread

flags description

Position 1Position 2Position 3Position 4Position 5Position 6Position 7
B: Waiting for buffer*: transactions are active during I/O failuresA:Dbspace backup threadP: Session main threadR: ReadingR: Threads used during recoveryB:B-tree cleaner thread
C: Waiting for checkpoint10: Threads in critical segments-: threads not used during recoveryC: The user thread waiting to be purged was terminated
G: Waiting for write to logical log bufferD: Daemon thread
50: Waiting for lockF: Page cleaner thread
S: Waiting for mutex
T: Waiting for transaction
Y: Waiting for condition
10: Waiting for transaction cleanup (rollback)

Print transaction

onstat -x
[gbasedbt@devsvr ~]$ onstat -x
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 21:34:39 -- 597864 Kbytes

Transactions
                                                                                           est.    
address          flags userthread       locks  begin_logpos      current logpos    isol    rb_time  retrys coord
47123028         A---- 470dc028         0      -                 -                 COMMIT  -        0      
47123378         A---- 470dc8e8         0      -                 -                 COMMIT  -        0      
471236c8         A---- 470dd1a8         0      -                 -                 COMMIT  -        0      
......   
4712aab8         A---- 470f03e8         0      -                 -                 COMMIT  -        0      
4712ae08         A-B-- 470f1568         3      1035:0xaf018      1035:0xaf050      LC      00:00:00 0      
4712b158         A---- 470f0ca8         0      -                 -                 COMMIT  -        0      
4712b4a8         A---- 470f1e28         0      -                 -                 COMMIT  -        0      
4712b7f8         A---- 470f26e8         0      -                 -                 COMMIT  -        0      
4712c1e8         A---- 470f4128         1      -                 -                 LC      -        0      
 43 active, 128 total, 45 maximum concurrent

[gbasedbt@devsvr ~]$ 

fieldexplain
addressShared memory address of the transaction structure
flagsFlag bit
userthreadThread owning the transaction (rstcb address)
locksNumber of locks held by the transaction
begin_logposBEGIN WORK records the logs that have been logged to it
current logposThe current log location where the transaction was recently written to the log
isolIsolation level
est. rb_timeEstimated time for the server to roll back the transaction
retrysThe number of attempts to start the recovery thread of the distributed query
coordThe name of the transaction coordinator when the dependent is executing a transaction

flags flag description

Position 1Position 2Position 3Position 4Position 5
A: User thread connected to transactionT: Tight coupling mode (MTS)B: Start work10: Xa transactionG: Global transaction
S:TP/XA pending transactions50: L oosely coupled mode (default mode)P: Prepare distributed queries for submissionC: Distributed query Coordinator
C:TP/XA is waiting for rollback10: TP / X A ready for submissionS: Distributed query slave
C: Submitting or submittedB: Distributed query coordinator and subordinate
R: Rolling back or rolled backM: Redirected global transactions
H: Attempting to roll back or rolled back
commandexplain
onstat -g osiPrint operating system information
onstat -g envPrint environment variable values
onstat -g cfgPrint the current value of the configuration parameter
onstat -g ckpPrint checkpoint history and configuration suggestions
onstat -g arcPrint archive status
onstat -g athPrint information for all threads
onstat -g actPrint active thread
onstat -g bthPrint blocked and waiting threads
onstat -g bufPrint profile information for buffer pool
onstat -g cpuPrint runtime statistics
onstat -g disPrint database server information
onstat -g driPrint high availability data replication information
onstat -g gloPrint global multithreading information
onstat -g iofPrint asynchronous I/O statistics
onstat -g iogPrint AIO global information
onstat -g iovPrint AIO VP statistics
onstat -g ioqPrint I/O queue information
onstat -g memPrint pool memory statistics
onstat -g ntdPrint network statistics
onstat -g nttNumber of times to print network users
onstat -g opnPrint open sections
onstat -g segPrint statistics for shared memory segments
onstat -g schPrint VP information
onstat -g sqlPrint session information related to SQL
onstat -g sesPrint session related information
onstat -g smbPrint sbspace information
onstat -g tpfPrint thread profile
onstat -g waiPrint wait queue thread queue
onstat -g wstPrint thread wait statistics

Print operating system information

onstat -g osi
[gbasedbt@devsvr ~]$ onstat -g osi
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 21:31:11 -- 597864 Kbytes


Machine Configuration....
OS Name					Linux
OS Release				3.10.0-514.el7.x86_64
OS Node Name				devsvr
OS Version				#1 SMP Tue Nov 22 16:42:41 UTC 2016
OS Machine				x86_64
Number of processors			2
Number of online processors		2
System memory page size			4096 bytes
System memory 				1823 MB
System free memory			1254 MB
Number of open files per process	1024
shmmax                                  9223372036854775807
shmmin                                  1
shmids                                  4096
shmNumSegs                              9223372036854775807
semmap                                  <<  UnSupported  >>
semids                                  128
semnum                                  32000
semundo                                 <<  UnSupported  >>
semNumPerID                             250
semops                                  32
semUndoPerProc                          <<  UnSupported  >>
semUndoSize                             20
semMaxValue                             32767

[gbasedbt@devsvr ~]$ 

Print environment variable values

onstat -g env
[gbasedbt@devsvr ~]$ onstat -g env
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 21:32:19 -- 597864 Kbytes

Server start-up environment:

Variable            Value [values-list]
CLIENT_LOCALE       zh_CN.utf8
DBDELIMITER         |
DBPATH              .
DBPRINT             lp -s
DBTEMP              /tmp
DB_LOCALE           zh_CN.utf8
GBASEDBTDIR         /opt/gbase
                    [/opt/gbase]
                    [/usr/gbasedbt]
GBASEDBTSERVER      gbaseserver
GBASEDBTSQLHOSTS    /opt/gbase/etc/sqlhosts.gbaseserver
GBASEDBTTERM        terminfo
IGNORE_UNDERFLOW    1
LANG                en_US.UTF-8
LC_COLLATE          en_US.UTF-8
LC_CTYPE            en_US.UTF-8
LC_MONETARY         en_US.UTF-8
LC_NUMERIC          en_US.UTF-8
LC_TIME             en_US.UTF-8
LKNOTIFY            yes
LOCKDOWN            no
NODEFDAC            no
ONCONFIG            onconfig.gbaseserver
PATH                /opt/gbase/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr
                     /sbin:/home/gbasedbt/.local/bin:/home/gbasedbt/bin
SERVER_LOCALE       en_US.819
SHELL               /bin/bash
TERM                xterm
                    [xterm]
                    [dumb]
TERMCAP             /etc/termcap


[gbasedbt@devsvr ~]$ 

Prints the current value of the configuration parameter

onstat -g cfg [full | diff | tunable | msg] [param_name]
[gbasedbt@devsvr ~]$ onstat -g cfg
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 21:34:26 -- 597864 Kbytes

Configuration Parameter List

name                      current value
ROOTNAME                  rootdbs
ROOTPATH                  /opt/gbase/gbaseserver_dbs/rootdbs
ROOTOFFSET                0
ROOTSIZE                  204800
......
CDR_AUTO_DISCOVER         0
IFXGUARD                  enable=1,timeout=-1
SYSSYNCCACH               0
ENABLE_NULL_STRCAT        1
ENABLE_NULL_STRING        1
ENABLE_QUERY_LIMIT_ZERO   0
STARTWITH_OPTIMIZE_MODE   1

[gbasedbt@devsvr ~]$ 

Print checkpoint history and configuration suggestions

grammar

onstat -g ckp

Example

[gbasedbt@devsvr ~]$ onstat -g ckp
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 21:39:20 -- 597864 Kbytes

AUTO_CKPTS=Off   RTO_SERVER_RESTART=Off   

                                                                    Critical Sections                          Physical Log    Logical Log    
           Clock                                  Total Flush Block #      Ckpt  Wait  Long  # Dirty   Dskflu  Total    Avg    Total    Avg   
Interval   Time      Trigger    LSN               Time  Time  Time  Waits  Time  Time  Time  Buffers   /Sec    Pages    /Sec   Pages    /Sec  
1880       08:44:28  CKPTINTVL  1036:0x6018       0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1881       09:00:28  CKPTINTVL  1036:0x8018       0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1882       09:14:29  CKPTINTVL  1036:0xa018       0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1883       09:30:30  CKPTINTVL  1036:0xc018       0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1884       09:44:30  CKPTINTVL  1036:0xe018       0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1885       10:00:31  CKPTINTVL  1036:0x10018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1886       10:14:32  CKPTINTVL  1036:0x12018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1887       10:30:33  CKPTINTVL  1036:0x14018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1888       10:44:33  CKPTINTVL  1036:0x16018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1889       11:00:34  CKPTINTVL  1036:0x18018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1890       11:14:35  CKPTINTVL  1036:0x1a018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1891       11:30:35  CKPTINTVL  1036:0x1c018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1892       11:44:36  CKPTINTVL  1036:0x1e018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1893       12:00:37  CKPTINTVL  1036:0x20018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1894       12:14:37  CKPTINTVL  1036:0x22018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1895       12:30:38  CKPTINTVL  1036:0x24018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1896       12:44:39  CKPTINTVL  1036:0x26018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1897       13:00:40  CKPTINTVL  1036:0x28018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1898       13:14:40  CKPTINTVL  1036:0x2a018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     
1899       13:30:41  CKPTINTVL  1036:0x2c018      0.0   0.0   0.0   0      0.0   0.0   0.0   1         1       7        0      2        0     

Max Plog       Max Llog       Max Dskflush   Avg Dskflush   Avg Dirty      Blocked      
pages/sec      pages/sec      Time           pages/sec      pages/sec      Time         
200            200            1              1              0              0            

[gbasedbt@devsvr ~]$ 

fieldexplain
Auto CheckpointsMark Auto_ The ckpts configuration parameter is on or off
RTO_SERVER_RESTARTDisplays the RTO time in seconds. Zero (0) means RTO is off
Estimated recovery time ## secondsIf the data server stops responding, mark the evaluation recovery time. This value is only available in RTO_ SERVER_ Appears when restart is activated.
IntervalCheckpoint interval ID
Clock TimeClock time when Checkpoint occurred
TriggerEvent triggers a checkpoint. An asterisk (*) indicates that the requested checkpoint is a transaction blocked checkpoint.
LSNWhere the Checkpoint is recorded in the logical log
Total TimeThe total duration of the checkpoint in seconds, from the beginning of the request to the end of the checkpoint
Flush TimeThe time in seconds to clear the buffer pool
Block TimeThe time (in seconds) that a transaction was blocked because a checkpoint was triggered by a scarce required resource. For example, run out of physical logs or wrap around logical logs
# WaitsThe number of transactions blocked because they are waiting for a checkpoint
Ckpt TimeThe time in seconds when all transactions recognize the requested checkpoint
Wait TimeThe average time in seconds that the transaction has waited for a checkpoint
Long TimeThe maximum time in seconds for a transaction to wait for a checkpoint
# Dirty BuffersThe number of dirty buffers flushed to disk during checkpoint
Dskflu/secNumber of buffers flushed per second
Physical Log Total PagesThe total number of pages of physical log records in the checkpoint interval
Physical Log Avg/SecThe average rate of physical log activity at the checkpoint interval
Logical Log Total PagesThe total number of pages recorded in the logical log during the checkpoint interval
Logical Log Avg/SecThe average rate of logical log activity at the checkpoint interval
Max Plog pages/secThe maximum rate of physical log activity during the checkpoint interval
Max Llog pages/secThe maximum rate of logical log activity during the checkpoint interval
Max Dskflush TimeThe maximum time in seconds for the buffer pool to flush to disk
Avg Dskflush pages/secThe average rate at which the buffer pool flushes to disk
Avg Dirty pages/secAverage rate of dirty pages between checkpoint s
Blocked TimeThe maximum blocking time in seconds since the database server was last started

Print archive status

grammar

onstat -g arc

Example

[gbasedbt@devsvr ~]$ onstat -g arc
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 23:10:46 -- 597864 Kbytes


num   DBSpace            Q Size Q Len  Buffer partnum    size     scanner 

Dbspaces - Archive Status
name               number level date             log        log-position
rootdbs            1      0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
llogdbs            2      0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
plogdbs            3      0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
sbspace1           4      0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
datadbs1           8      0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
datadbs2           9      0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
datadbs3           10     0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
datadbs4           11     0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  
datadbs5           12     0     07/26/2021.16:29 1034       0xae018   
                          1     07/24/2021.10:17 33         0xbe3018  
                          2     07/24/2021.10:20 33         0xbec018  

[gbasedbt@devsvr ~]$ 

explain

columndescribe
numDbspace number
DBSpaceDbspace name
Q SizeThe size of the front image queue. This information is mainly for GBase support
Q LenThe length of the front image queue. This information is mainly for GBase support
BufferThe number of pages used by the front image buffer
partnumbin partition number of front image
sizeNumber of pages in the front image bin
scanner
columndescribe
nameDbspace name
numberDbspace number
levelArchive level
dateDate and time of last filing
logUnique ID of the checkpoint used to start archiving (UNIQID)
log-positionLog location of the checkpoint used to start archiving (LOGPOS)

Print information for all threads

onstat -g ath
[gbasedbt@devsvr ~]$ onstat -g ath
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 21:54:33 -- 597864 Kbytes

Threads:
 tid     tcb              rstcb            prty status                vp-class       name
 2        47ed0c88         0                1    IO Idle                 3lio*        lio vp 0
 3        47ef1368         0                1    IO Idle                 4pio*        pio vp 0
 4        47f12368         0                1    IO Idle                 5aio*        aio vp 0
 5        47f33368         20e1f00          1    IO Idle                 6msc*        msc vp 0
 6        47f64368         0                1    IO Idle                 7fifo*       fifo vp 0
 7        47f8cd30         470dc028         3    sleeping secs: 1        8cpu         main_loop()
 8        47feb418         0                1    running                 1cpu*        soctcppoll
 10       48173748         470dc8e8         1    sleeping secs: 1        8cpu         flush_sub(0)
 11       48173a88         470dd1a8         1    sleeping secs: 1        8cpu         flush_sub(1)
 ......
 39       4848da38         470ec6a8         1    sleeping secs: 1        8cpu         flush_sub(29)
 40       484fa028         470ecf68         1    sleeping secs: 1        8cpu         flush_sub(30)
 41       484fa3b8         470ed828         1    sleeping secs: 1        8cpu         flush_sub(31)
 42       484fa748         0                3    IO Idle                 1cpu*        kaio
 43       484faad8         0                3    IO Idle                 8cpu*        kaio
 44       48616d48         0                1    IO Idle                 9aio*        aio vp 1
 45       48649368         0                1    IO Idle                10aio*        aio vp 2
 46       4866a368         0                1    IO Idle                11aio*        aio vp 3
 47       4868b368         0                1    IO Idle                12aio*        aio vp 4
 48       486ac368         0                1    IO Idle                13aio*        aio vp 5
 49       486cd758         470ee0e8         2    sleeping secs: 1        8cpu         aslogflush
 51       4868bce0         470ef268         3    cond wait  ReadAhead   14cpu         readahead_0
 52       486316c8         470efb28         3    sleeping secs: 1        8cpu         auto_tune
 155      494bcbc8         470f0ca8         3    sleeping secs: 1        1cpu*        onmode_mon
 156      487fc7f0         470f1e28         3    sleeping secs: 1        8cpu         periodic
 157      487fcc70         470f26e8         3    sleeping forever        1cpu         memory
 166      4a305028         470f03e8         1    cond wait  bp_cond      8cpu         bf_priosweep()
 170      4a21dbe0         0                3    IO Idle                14cpu*        kaio
 171      494c8368         0                2    sleeping forever        8cpu*        soctcplst
 173      4a433860         0                3    IO Idle                15cpu*        kaio
 189      49b32028         470f1568         1    yield time             14cpu         btscanner_0
 191      49d15370         470ee9a8         1    cond wait  netnorm      1cpu         sqlexec


[gbasedbt@devsvr ~]$ 

columndescribe
tidThread ID
tcbThread control block access address
rstcbRSAM access control
prtythread priority
statusThread state
vp-classVirtual processor class
nameThread name. For threads participating in parallel storage optimization operations, it represents the name and thread number of the operation

Print active thread

onstat -g act
[gbasedbt@devsvr ~]$ onstat -g act
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 22:21:11 -- 597864 Kbytes

Running threads:
 tid     tcb              rstcb            prty status                vp-class       name
 8        47feb418         0                1    running                 1cpu*        soctcppoll


[gbasedbt@devsvr ~]$ 

columndescribe
tidThread ID
tcbThread control block access address
rstcbRSAM thread control block access address
prtythread priority
statusThread state
vp-classVirtual processor class
nameThread name. For threads participating in parallel storage optimization operations, it represents the name and thread number of the operation

Print blocked and waiting threads

onstat -g bth
[gbasedbt@devsvr ~]$ onstat -g bth
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 22:20:59 -- 597864 Kbytes

This command attempts to identify any blocking threads.

No blocking thread identified.

Threads waiting on resources
 tid      name                 blocking resource              blocker 
 51       readahead_0          Condition (ReadAhead)           -      
 166      bf_priosweep()       Condition (bp_cond)             -      
 191      sqlexec              Condition (netnorm)             -      

[gbasedbt@devsvr ~]$
columndescribe
tidThread ID
nameThread name
blocking resourceLists the resource types of the waiting threads
blockerThread ID of the blocked thread listed

Print profile information for buffer pool

onstat -g buf
[gbasedbt@devsvr ~]$ onstat -g buf
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 22:55:32 -- 597864 Kbytes

Profile

Buffer pool page size: 2048
dskreads   pagreads   bufreads   %cached dskwrits   pagwrits   bufwrits   %cached
336        859        5072       93.38   1485       3837       298        0.00   
bufwrits_sinceckpt  bufwaits   ovbuff     flushes   
0                   0          0          284       

Fg Writes     LRU Writes    Avg. LRU Time Chunk Writes  Total Mem
0             0             -nan          288           76Mb    

Bufferpool Segments
id segment      size     # buffs  
0  0x4af75000   76Mb     35001    

----------------------------------

Buffer pool page size: 16384
dskreads   pagreads   bufreads   %cached dskwrits   pagwrits   bufwrits   %cached
118        984        1738       93.21   107        856        222        51.80  
bufwrits_sinceckpt  bufwaits   ovbuff     flushes   
0                   2          0          6         

Fg Writes     LRU Writes    Avg. LRU Time Chunk Writes  Total Mem
0             0             -nan          91            395Mb   

Bufferpool Segments
id segment      size     # buffs  
0  0x4fbe9000   395Mb    25000    

----------------------------------

Fast Cache Stats
gets       hits       %hits   puts      
498        367        73.69   1955      

[gbasedbt@devsvr ~]$ 

fieldexplain
Buffer pool page sizeNumber of bytes of pages in the buffer pool
dskreadsThe number of disk read operations performed to bring pages into the buffer pool. Read one or more pages per read operation.
pagreadsThe number of pages read into the buffer pool from disk
bufreadsThe number of page memory images read from the buffer pool
%cachedThe percentage of pages read by this buffer pool to satisfy the cache page image (instead of performing disk reads). Calculated as (bufreads - dskreads) / bufreads x 100. A higher percentage indicates better cache performance.
dskwritsThe number of disk write operations performed to write changed pages back to disk from the buffer pool. Compose one or more pages per write operation.
pagwritsThe number of pages written to disk from the buffer pool
bufwritsThe number of page memory images written to the buffer pool
%cachedThe percentage of pages written by this buffer pool to satisfy the cache page image (instead of performing disk writes). Calculated as (bufwrites - dskwrites) / bufwrites x 100.
bufwrits_sinceckptThe number of times the page memory image has been written to the buffer pool since the last checkpiont
bufwaitsThe number of times a thread must wait for a lock in the buffer in this buffer pool. The larger the number, the more contention between multiple threads of incompatible locks on the same page.
ovbuffThe number of times a changed buffer was written to disk from the buffer pool in order to create a free buffer to read another requested page. If the ovbuff value is large, it may indicate that the buffer pool is not large enough to accommodate the working set required by the application using the buffer pool, which may lead to performance degradation.
flushesThe number of times the server has performed large cleanups for all dirty buffers in the buffer pool. This may be caused by different reasons, such as performing this operation as part of the checkpoint process or the buffer pool running outside the clean buffer (whether LRU cleanup activity is normal or not).
Fg WritesThe number of changed buffers written to disk by non I/O emptier threads accessing buffers in the buffer pool. This number is a superset of the ovbuff field. In addition to the number of times the ovbuff field counts writes to the default value of the service page, this value also includes foreground writes for operations performed to maintain the consistency of database records and reserved pages. The purpose is to ensure correct recovery.
LRU WritesThe number of changed buffers written to disk by the LRU purge thread from the buffer pool. If the buffer pool exceeds the specified value in LRU_ max_ The BUFFERPOOL configuration parameter value in the dirty field or if a foreground write occurs due to a buffer pool overflow, the LRU cleaner will be activated.
Avg. LRU TimeThe average time taken by the LRU scavenger to clear a single LRU chain
Chunk WritesThe number of changed buffers written to disk by the Chunk purge operation. The Chunk scavenger writes all changed buffers in a Chunk in the buffer pool. This operation is performed in various special environments that need to quickly clear a large number of buffers, such as checkpoint process and fast recovery.
Total MemSize of buffer pool
# extendsThe number of times the buffer pool was expanded
max memory (memory setting)The maximum target size of the buffer pool. The size of the buffer pool can exceed this value, but not more than the size of one segment.
max extends (buffers setting)The number of times the buffer pool library has been expanded. (this field is not shown in the sample)
next memory (memory setting)The size of the next expansion of the buffer pool
next buffers (buffers setting)The number of buffers required for the next expansion of the buffer pool (this field is not shown in the sample)
cache hit ratioIt is lower than the hit rate of the read cache that the buffer pool is extended
lastTime of last buffer pool expansion
idID of the buffer pool segment
segmentInternal address of buffer pool segment
sizeSize of buffer pool segment
# buffsNumber of buffers in the buffer pool segment
Fast Cache StatsStatistics for the cache (a cache that reduces the type of time it takes to access the buffer pool)
getsThe number of times the server looked for a buffer in the cache
hitsThe number of times the server found that it was looking for a cache buffer
%hitsPercentage of hits, i.e. hits*100/gets
putsThe number of times the server has inserted a buffer into the cache

Print runtime statistics

onstat -g cpu
[gbasedbt@devsvr ~]$ onstat -g cpu
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 23:31:44 -- 597864 Kbytes

Thread CPU Info:
 tid    name              vp       Last Run           CPU Time     #scheds    status
 2      lio vp 0          3lio*   07/26 15:59:07        0.0000          1    IO Idle              
 3      pio vp 0          4pio*   07/26 15:59:08        0.1006          2    IO Idle              
 4      aio vp 0          5aio*   07/26 17:43:57        0.1407        137    IO Idle              
 5      msc vp 0          6msc*   07/27 13:30:54        0.0138          9    IO Idle              
 6      fifo vp 0         7fifo*  07/26 15:59:11        0.1011          2    IO Idle              
 7      main_loop()       8cpu    07/27 15:30:48        0.4311      85244    sleeping secs: 1     
 8      soctcppoll        1cpu*   07/27 15:30:48    84693.6191     369436    running              
 10     flush_sub(0)      8cpu    07/27 15:30:48        0.0986      84835    sleeping secs: 1     
 11     flush_sub(1)      8cpu    07/27 15:30:48        0.0743      84644    sleeping secs: 1     
 12     flush_sub(2)      8cpu    07/27 15:30:48        0.0778      84644    sleeping secs: 1     
 13     flush_sub(3)      8cpu    07/27 15:30:48        0.0777      84644    sleeping secs: 1     
 14     flush_sub(4)      8cpu    07/27 15:30:48        0.0779      84642    sleeping secs: 1     
 15     flush_sub(5)      8cpu    07/27 15:30:48        0.0834      84642    sleeping secs: 1     
 16     flush_sub(6)      8cpu    07/27 15:30:48        0.0815      84642    sleeping secs: 1     
 17     flush_sub(7)      8cpu    07/27 15:30:48        0.1031      84640    sleeping secs: 1     
 18     flush_sub(8)      8cpu    07/27 15:30:48        0.0823      84639    sleeping secs: 1     
 19     flush_sub(9)      8cpu    07/27 15:30:48        0.0734      84639    sleeping secs: 1     
 20     flush_sub(10)     8cpu    07/27 15:30:48        0.0742      84639    sleeping secs: 1     
 21     flush_sub(11)     8cpu    07/27 15:30:48        0.0832      84639    sleeping secs: 1     
 22     flush_sub(12)     8cpu    07/27 15:30:48        0.0785      84639    sleeping secs: 1     
 23     flush_sub(13)     8cpu    07/27 15:30:48        0.0758      84640    sleeping secs: 1     
 24     flush_sub(14)     8cpu    07/27 15:30:48        0.0781      84640    sleeping secs: 1     
 25     flush_sub(15)     8cpu    07/27 15:30:48        0.0756      84640    sleeping secs: 1     
 26     flush_sub(16)     8cpu    07/27 15:30:48        0.0776      84640    sleeping secs: 1     
 27     flush_sub(17)     8cpu    07/27 15:30:48        0.0715      84640    sleeping secs: 1     
 28     flush_sub(18)     8cpu    07/27 15:30:48        0.0862      84640    sleeping secs: 1     
 29     flush_sub(19)     8cpu    07/27 15:30:48        0.0728      84640    sleeping secs: 1     
 30     flush_sub(20)     8cpu    07/27 15:30:48        0.0783      84639    sleeping secs: 1     
 31     flush_sub(21)     8cpu    07/27 15:30:48        0.0789      84639    sleeping secs: 1     
 32     flush_sub(22)     8cpu    07/27 15:30:48        0.0760      84639    sleeping secs: 1     
 33     flush_sub(23)     8cpu    07/27 15:30:48        0.0774      84639    sleeping secs: 1     
 34     flush_sub(24)     8cpu    07/27 15:30:48        0.0848      84639    sleeping secs: 1     
 35     flush_sub(25)    14cpu    07/27 15:30:48        0.0703      84639    sleeping secs: 1     
 36     flush_sub(26)     8cpu    07/27 15:30:48        0.0767      84639    sleeping secs: 1     
 37     flush_sub(27)     8cpu    07/27 15:30:48        0.0776      84639    sleeping secs: 1     
 38     flush_sub(28)     8cpu    07/27 15:30:48        0.0749      84639    sleeping secs: 1     
 39     flush_sub(29)     8cpu    07/27 15:30:48        0.0865      84639    sleeping secs: 1     
 40     flush_sub(30)     8cpu    07/27 15:30:48        0.0709      84639    sleeping secs: 1     
 41     flush_sub(31)     8cpu    07/27 15:30:48        0.0795      84640    sleeping secs: 1     
 42     kaio              1cpu*   07/27 15:00:41        0.1798        935    IO Idle              
 43     kaio              8cpu*   07/27 15:30:43        0.1981        567    IO Idle              
 44     aio vp 1          9aio*   07/26 15:59:17        0.1159          4    IO Idle              
 45     aio vp 2         10aio*   07/26 15:59:17        0.1014          4    IO Idle              
 46     aio vp 3         11aio*   07/26 15:59:17        0.1022          4    IO Idle              
 47     aio vp 4         12aio*   07/26 15:59:17        0.1017          4    IO Idle              
 48     aio vp 5         13aio*   07/26 15:59:17        0.1008          3    IO Idle              
 49     aslogflush        8cpu    07/27 15:30:48        0.2465      84637    sleeping secs: 1     
 50     btscanner_0      14cpu    07/27 15:28:00        0.5734       1796    sleeping secs: 12    
 51     readahead_0      15cpu    07/27 15:29:17        0.0016        288    cond wait  ReadAhead 
 52     auto_tune         8cpu    07/27 15:30:48        0.1892      84637    sleeping secs: 1     
 155    onmode_mon        1cpu*   07/27 15:30:48        1.0442      84681    sleeping secs: 1     
 156    periodic          8cpu    07/27 15:30:48        0.7170      84651    sleeping secs: 1     
 157    memory            1cpu    07/26 15:59:17        0.0000          0    sleeping forever     
 166    bf_priosweep()    8cpu    07/27 15:30:43        0.5565       4231    cond wait  bp_cond   
 170    kaio             14cpu*   07/27 15:00:41        0.1471        328    IO Idle              
 171    soctcplst         8cpu*   07/27 13:30:54        0.2568         19    sleeping forever     
 173    kaio             15cpu*   07/27 15:14:42        0.0791        147    IO Idle              
 174    sqlexec           1cpu    07/27 13:31:44        0.0681        536    cond wait  netnorm   
 176    sqlexec           1cpu    07/27 13:30:54        0.0012         14    cond wait  netnorm   


[gbasedbt@devsvr ~]$ 

fieldexplain
tidThread ID
nameThread name
vpID of the virtual processor that is running the thread
Last RunTimestamp of the last time the thread ran
CPU TimeUp to now, the time the thread runs
#schedsThe number of times the thread was scheduled to run
statusStatus of the thread.

Print database server information

onstat -g dis
[gbasedbt@devsvr ~]$ onstat -g dis
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 23:06:28 -- 597864 Kbytes
There are 1 servers found
Server        : gbaseserver
Server Number : 120
Server Type   : IDS
Server Status : Up
Server Version: GBase Database Server Version 12.10.FC4G1TL
Shared Memory : 0x44000000
GBASEDBTDIR   : /opt/gbase
ONCONFIG      : /opt/gbase/etc/onconfig.gbaseserver
SQLHOSTS      : /opt/gbase/etc/sqlhosts.gbaseserver
Host          : devsvr


[gbasedbt@devsvr ~]$ 

Print high availability data replication information

onstat -g dri
[gbasedbt@devsvr ~]$ onstat -g dri
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 23:08:03 -- 597864 Kbytes

Data Replication at 0x47fb3028: 
  Type           State        Paired server        Last DR CKPT (id/pg)    Supports Proxy Writes   
  standard       off                                       -1 / -1         NA

  DRINTERVAL   0 
  DRTIMEOUT    30 
  DRAUTO       0 
  DRLOSTFOUND  /opt/gbase/etc/dr.lostfound 
  DRIDXAUTO    0 
  ENCRYPT_HDR  0 
  Backlog      0 

[gbasedbt@devsvr ~]$ 

fieldexplain
TypeThe current type of server: primary, secondary, or standard
Stateon or off
Paired serverThe name of the primary or secondary server that is paired with this server
Last DR CKPTLast checkpoint ID and page
Supports Proxy WritesDisplays whether the server is configured to allow secondary server updates. Y = secondary server update supported, N = secondary server update not supported
DRINTERVALThe value of the configuration parameter in the onconfig file
DRTIMEOUTThe value of the configuration parameter in the onconfig file
DRAUTOThe value of the configuration parameter in the onconfig file
DRLOSTFOUNDThe value of the configuration parameter in the onconfig file
DRIDXAUTOThe value of the configuration parameter in the onconfig file
ENCRYPT_HDRThe value of the configuration parameter in the onconfig file
BacklogThe number of log pages in the HDR data replication buffer that have not been sent to the HRD secondary server
Last SendThe time when the last message was sent to the peer node
Last ReceiveThe time of the last message received from the peer node
Last PingLast ping time
Last log page applied(log id,page)Log ID and page of last applied log

Print global multithreading information

[gbasedbt@devsvr ~]$ onstat -g glo
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:27:57 -- 597864 Kbytes

MT global info:
sessions threads  vps      lngspins time    
3        58       13       0        232077  

          sched calls     thread switches yield 0   yield n   yield forever
total:    10252370        9310184         178846    8588836   16242    
per sec:  25              15              0         12        0        

Virtual processor summary:
 class       vps       usercpu   syscpu    total   
 cpu         2         17.46     32.03     49.49   
 aio         6         2.65      7.84      10.49   
 lio         1         0.58      1.05      1.63    
 pio         1         0.45      1.23      1.68    
 adm         1         0.51      10.35     10.86   
 msc         1         0.00      0.00      0.00    
 fifo        1         0.50      1.19      1.69    
 total       13        22.15     53.69     75.84   

Individual virtual processors:
 vp    pid       class       usercpu   syscpu    total     Thread    Eff  
 1     54621     cpu         13.32     21.61     34.93     34.93    100%
 2     59541     adm         0.51      10.35     10.86     0.00       0%
 3     59571     lio         0.58      1.05      1.63      1.63     100%
 4     62715     pio         0.45      1.23      1.68      1.68     100%
 5     65914     aio         0.27      1.58      1.85      1.85     100%
 6     69103     msc         0.00      0.00      0.00      0.01       0%
 7     72316     fifo        0.50      1.19      1.69      1.69     100%
 8     75520     cpu         4.14      10.42     14.56     14.56    100%
 9     78756     aio         0.39      1.25      1.64      1.64     100%
 10    79077     aio         0.37      1.38      1.75      1.75     100%
 11    79405     aio         0.44      1.30      1.74      1.74     100%
 12    79732     aio         0.68      1.06      1.74      1.74     100%
 13    80058     aio         0.50      1.27      1.77      1.77     100%
                 tot         22.15     53.69     75.84   

[gbasedbt@devsvr ~]$ 

Virtual processor summary

Listingdescribe
sessionsNumber of sessions
threadsTotal threads
vpsTotal number of virtual processors
lngspinsThe number of times a thread has to spin more than 10000 times to get a latch on a resource
timeTime when statistics were generated. Start statistics when the server starts or reset statistics by running the onstat -z command.
sched callsTotal number of scheduled calls
thread switchesThe total number of switches from one thread to another
yieldStatistics on thread yield (occurs when the thread cannot continue its task until another condition occurs)

Virtual Processor Summary

Listingdescribe
classType of virtual processor
vpsThe number of instances of this virtual processor class
usercpuThe total user time (in seconds) spent running this virtual processor class on the CPU
syscpuThe total system time (in seconds) spent running this virtual processor class on the CPU
totalThe total CPU time of the virtual processor class, which is the sum of user time and system time

Individual virtual processors

Listingdescribe
vpVirtual processor number. In Windows ™ On, is the thread ID value.
pidThe process ID of the oninit process
classVirtual processor class
usercpuThe total user time (in seconds) that the virtual processor class runs on the CPU
syscpuThe total system time (in seconds) that the virtual processor class runs on the CPU
totalThe total CPU time of the virtual processor class, which is the sum of user time and system time
ThreadThe total time the thread spent running on the virtual processor
EffEfficiency. The ratio of the total CPU time to the total time the thread runs on the virtual processor

Show asynchronous IO statistics

onstat -g iof
[gbasedbt@devsvr ~]$ onstat -g iof
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 00:14:43 -- 597864 Kbytes

AIO global files:
gfd pathname         bytes read     page reads  bytes write    page writes io/s
3   rootdbs          638976         312         448512         219         2995.7
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  311            0.0003
	kaio_writes 219            0.0004

4   llogdbs          1056768        516         438272         214         2143.3
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  5              0.0009
	kaio_writes 211            0.0005

5   plogdbs          24576          12          2195456        1072        506.0
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  5              0.0003
	kaio_writes 103            0.0021

6   sbspace1         24576          12          6144           3           2454.1
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  12             0.0004
	kaio_writes 3              0.0002

7   tmpdbs1          16384          8           98304          48          10923.9
	op type     count          avg. time
	seeks       0              N/A
	reads       1              0.0002
	writes      5              0.0001
	kaio_reads  0              N/A
	kaio_writes 0              N/A

8   tmpdbs2          16384          8           98304          48          16732.7
	op type     count          avg. time
	seeks       0              N/A
	reads       1              0.0000
	writes      5              0.0001
	kaio_reads  0              N/A
	kaio_writes 0              N/A

9   tmpdbs3          16384          8           98304          48          17746.3
	op type     count          avg. time
	seeks       0              N/A
	reads       1              0.0000
	writes      5              0.0001
	kaio_reads  0              N/A
	kaio_writes 0              N/A

10  datadbs1_1       1638400        800         655360         320         1586.5
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  100            0.0004
	kaio_writes 28             0.0015

11  datadbs2_1       98304          48          98304          48          2959.7
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  6              0.0003
	kaio_writes 5              0.0004

12  datadbs3_1       98304          48          98304          48          2622.1
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  6              0.0003
	kaio_writes 5              0.0005

13  datadbs4_1       65536          32          49152          24          4823.7
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  4              0.0002
	kaio_writes 3              0.0002

14  datadbs5_1       65536          32          49152          24          2755.5
	op type     count          avg. time
	seeks       0              N/A
	reads       0              N/A
	writes      0              N/A
	kaio_reads  4              0.0005
	kaio_writes 3              0.0002


[gbasedbt@devsvr ~]$ 

fieldexplain
gfdThe global file descriptor number of the chunk or file
pathnameThe pathname of the Chunk or file
bytes readThe number of bytes that have been read from the chunk or file
page readsThe number of page reads that have been performed on chunk s or files
bytes writeThe number of bytes that have been written to the chunk or file
page writesThe number of page writes that have been performed on the chunk or file
io/sThe number of I/O operations performed per file, which represents the I/O performance of the chunk or file
op typeOperation type
countThe number of times this operation occurred
avg timeThe average time taken to complete the operation

Print AIO global information

onstat -g iog
[gbasedbt@devsvr ~]$ onstat -g iog
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 3 days 00:05:01 -- 597864 Kbytes

AIO global info:
   9 aio classes
  15 open files
  64 max global files

[gbasedbt@devsvr ~]$ 

Print I/O queue information

onstat -ioq
[gbasedbt@devsvr ~]$ onstat -g ioq
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 00:17:22 -- 597864 Kbytes

AIO I/O queues:
q name/id    len maxlen totalops  dskread dskwrite  dskcopy
 fifo   0      0      0        0        0        0        0 
drda_dbg   0      0      0        0        0        0        0 
sqli_dbg   0      0      0        0        0        0        0 
  kio   0      0      3      475      399       76        0 
  kio   1      0     16      330       49      281        0 
  kio   2      0      3      174        3      171        0 
  kio   3      0      2       73        2       71        0 
  adt   0      0      0        0        0        0        0 
  msc   0      0      1        7        0        0        0 
  aio   0      0      5      128       17        0        0 
  pio   0      0      0        0        0        0        0 
  lio   0      0      0        0        0        0        0 
  gfd   3      0      0        0        0        0        0 
  gfd   4      0      0        0        0        0        0 
  gfd   5      0      0        0        0        0        0 
  gfd   6      0      0        0        0        0        0 
  gfd   7      0      4        7        1        6        0 
  gfd   8      0      4        7        1        6        0 
  gfd   9      0      4        7        1        6        0 
  gfd  10      0      0        0        0        0        0 
  gfd  11      0      0        0        0        0        0 
  gfd  12      0      0        0        0        0        0 
  gfd  13      0      0        0        0        0        0 
  gfd  14      0      0        0        0        0        0 

[gbasedbt@devsvr ~]$ 

fieldexplain
q name/idThe name and number of the I/O queue.
lenThe number of pending I/O requests in the queue
maxlenThe maximum number of simultaneous I/O requests in the queue
totalopsThe total number of completed I/O operations in the queue
dskreadThe total number of read operations completed by the queue
dskwriteThe total number of write operations completed by the queue
dskcopyThe total number of replication operations completed by the queue

q name/id

valueexplain
sqli_dbgHandle the I/O of SQL interface debugging function supported by GBase technology
fifoProcess I/O of FIFO VPs
adtProcess audit I/O
mscHandling miscellaneous I/O
aioHandling GBase 8s asynchronous I/O
kioProcessing kernel AIO
pioProcess physical logging I/O
lioProcess logical logging I/O
gfdGlobal file descriptor - assign a separate global file descriptor to each primary and mirror chunk.

Print AIO VP statistics

onstat -g iov
[gbasedbt@devsvr ~]$ onstat -g iov
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 00:19:07 -- 597864 Kbytes

AIO I/O vps:
class/vp/id s  io/s totalops  dskread dskwrite  dskcopy  wakeups  io/wup  errors tempops 
 fifo  7  0 i   0.0        0        0        0        0        1   0.0       0        0 
  kio -1  0 i   0.0      474      399       75        0      944   0.5       0        0 
  kio -1  1 i   0.0      318       49      269        0      595   0.5       0        0 
  kio -1  2 i   0.0      173        3      170        0      345   0.5       0        0 
  kio -1  3 i   0.0       73        2       71        0      146   0.5       0        0 
  msc  6  0 i   0.0        7        0        0        0        8   0.9       0        7 
  aio  5  0 i   0.0      133       20        6        0      135   1.0       0        0 
  aio  9  1 i   0.0        8        0        7        0        2   4.0       0        0 
  aio 10  2 i   0.0        1        0        0        0        2   0.5       0        0 
  aio 11  3 i   0.0        1        0        0        0        2   0.5       0        0 
  aio 12  4 i   0.0        3        0        2        0        2   1.5       0        0 
  aio 13  5 i   0.0        0        0        0        0        2   0.0       0        0 
  pio  4  0 i   0.0        0        0        0        0        1   0.0       0        0 
  lio  3  0 i   0.0        0        0        0        0        1   0.0       0        0 

[gbasedbt@devsvr ~]$ 

fieldexplain
classVirtual processor class
vpID number of the virtual processor in the class
sCurrent state of AIO virtual processor
io/sThe average I/O speed of the virtual processor (measured in operations per second) since the database server was started or since onstat -z last ran
totalopsThe total number of I/O operations (measured in operations per second) performed by the virtual processor since the database server was started or since onstat -z last ran
dskreadThe total number of read operations (measured in operations per second) performed by the virtual processor since the database server was started or since onstat -z last ran
dskwriteThe total number of writes performed by the virtual processor (measured in operations per second) since the database server was started or since onstat -z last ran
dskcopyThe total number of replication operations performed by the virtual processor (measured in operations per second) since the database server was started or since onstat -z last ran
wakeupsFor AIO VPs, is the number of times the virtual processor has been idle since the database server was started or since onstat -z last ran
io/wupFor AIO VPs, is the average number of I/O operations performed by the virtual processor per wake-up since the database server was started or since onstat -z last ran
errorsKAIO exceeded the total number of resource errors
tempopsFor internal use only. Is the I/O operation count used to determine when to add a new AIO VP. It only works in auto_ Applies when the aiovps configuration parameter is enabled.

Print pool memory statistics

onstat -g mem
[gbasedbt@devsvr ~]$ onstat -g mem
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 3 days 00:27:57 -- 597864 Kbytes

Pool Summary:
name         class addr             totalsize        freesize         #allocfrag #freefrag 
aqtpool      V     47daf040         8192             1168             6          2         
afpool       V     46578040         4096             808              1          1         
tpcpool      V     47d70040         12288            3232             7          3         
seqpool      V     47da3040         4096             736              2          1         
pnlpool      V     47d73040         8192             1680             4          2         
sbtlist      V     46e41040         20480            7200             4          3         
dstpool      V     47d6f040         8192             3728             2          2         
tenprp_cach  V     47fd2040         8192             4008             8          1         
ampool       V     47d9c040         4096             304              7          1         
srvnm_cache  V     47d5e040         8192             3920             9          1         
main_loop()  V     47f95040         679936           22808            112        40        
sb_delundoq  V     46e78040         49152            8752             4          3         
XTF_mem      V     47e13040         724992           5008             4          3         
bf_prioswee  V     487ce040         28672            3056             13         4         
pmpool       V     47d74040         8192             3728             2          2         
memory       V     494e5040         28672            3056             13         4         
GridQuery    V     47257040         4096             736              2          1         
readahead_0  V     4878a040         49152            4312             35         5         
userlbacpoo  V     47d78040         8192             3728             2          2         
ritem        V     46fea040         8192             2608             8          2         
onlinereorg  V     47fa7040         20480            1720             4          3         
onmode_mon   V     487f0040         32768            3576             20         3         
lgflushpool  V     486ce040         4096             504              3          1         
2            V     47fe7040         16384            2672             17         2         
rsam         V     46f1c040         1069056          10808            1170       4         
sqcrypto_na  V     4725c040         4096             464              2          1         
sscpool0     V     47d65040         12288            1584             2          2         
aslogflush   V     486cf040         28672            3056             13         4         
aio          V     47253040         2043904          67808            569        86        
opcinstpool  V     47d72040         8192             2704             3          2         
dbausrpool   V     47daa040         8192             3312             13         2         
smartblob    V     46e40040         16384            6504             7          2         
gls          V     47d61040         1327104          3936             6197       7         
policypool   V     47d77040         8192             3728             2          2         
DefConvWrit  V     47e0f040         16384            2776             102        1         
proxyWrite   V     46e34040         49152            2832             2          2         
sysprocpool  V     47dab040         8192             2512             8          2         
resroutpool  V     47d76040         8192             3728             2          2         
periodic     V     494e3040         28672            3056             13         4         
btscanner_0  V     48172040         49152            3168             36         5         
auto_tune    V     487ac040         49152            6736             29         5         
smx          V     47d44040         8192             3392             11         2         
sb_delq      V     46e46040         49152            8752             4          3         
resident     R     440d8040         37343232         19912            10         9         
dictpool     V     47d66040         110592           1280             34         2         
grgid_cache  V     47d50040         8192             3920             9          1         
mt           V     46579040         10776576         52048            5933       124       
env_vars     V     46558040         61440            2944             341        1         
31           V     4a42b040         73728            9664             78         7         
24           V     487f5040         20480            5152             23         4         
hstad_cache  V     47d55040         16384            136              133        1         
44           V     4a32d040         16384            2672             17         2         
aggpool      V     47d75040         8192             3728             2          2         
procpool     V     47d6c040         20480            2168             25         3         
extdpool     V     47da5040         8192             1992             8          2         
global       V     46557040         16007168         842120           4501       611       
Shard        V     47259040         12288            4768             3          2         
spnam_cache  V     47d4d040         8192             2776             21         1         
compr_cache  V     47255040         8192             4008             8          1         
ctcpool      V     47d71040         12288            3728             6          3         
tmxapool     V     47da9040         4096             680              3          1         
sb_arcspace  V     46f16040         8192             1752             4          2         
pwnam_cache  V     47d47040         12288            2744             41         3         
sb_loheader  V     46eab040         282624           6528             413        57        
RSS          V     47fb6040         188416           3536             507        43        
inhpool      V     47d9e040         8192             1536             37         1         
pwuid_cache  V     47d4b040         8192             2776             21         1         
opcpool      V     47d9d040         8192             3272             18         1         
hstnm_cache  V     47d52040         8192             3568             13         1         

Blkpool Summary:
name         class addr             size             #blks     
mt           V     4657b860         4169728          58        
global       V     46575e00         0                0         

[gbasedbt@devsvr ~]$ 

Pool Summary

fieldexplain
nameName of the pool
addrPool memory address
totalsizePool size in bytes
freesizeAmount of memory available in the pool
#allocfragAllocated shards in pool
#freefragAvailable shards in pool

Blkpool Summary

fieldexplain
nameName of the pool
addrPool memory address
sizePool size in bytes
#blksNumber of block s in the pool

Print network user statistics

onstat -g ntu
[gbasedbt@devsvr ~]$ onstat -g ntu
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:26:22 -- 597864 Kbytes

global network information:
  #netscb connects         read        write    q-free  q-limits  q-exceed alloc/max
   5/   8       33        85258        85270    3/   4  240/  10    0/   0    6/   6

Individual thread network information (basic):
          netscb type   thread name    sid   fd poll    reads   writes q-nrm q-pvt q-exp
        4a1d4c90 soctcp sqlexec         54    2    5        6        6  0/ 1  1/ 1  0/ 0
        47b75290 soctcp sqlexec         52    8    5       19       19  0/ 1  1/ 1  0/ 0
        47b5ba40 soctcp sqlexec         25    3    5       11       11  0/ 1  1/ 1  0/ 0
        47b51b90 soctcp soctcplst        3    1    5       33        0  0/ 0  0/ 0  0/ 0
        47b4dbe0 soctcp soctcppoll       2    0    5    85260        0  0/ 0  0/ 0  0/ 0


[gbasedbt@devsvr ~]$ 

Print network user time

[gbasedbt@devsvr ~]$ onstat -g ntt
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 15:55:48 -- 597864 Kbytes

global network information:
  #netscb connects         read        write    q-free  q-limits  q-exceed alloc/max
   5/   8       33        85258        85270    3/   4  240/  10    0/   0    6/   6

Individual thread network information (times):
          netscb thread name    sid     open     read    write address                  
        4a1d4c90 sqlexec         54 08:26:03 08:26:06 08:26:06                          
        47b75290 sqlexec         52 08:04:07 08:06:36 08:06:36                          
        47b5ba40 sqlexec         25 18:39:14 18:39:21 18:39:21                          
                              06/18/21 06/18/21 06/18/21
        47b51b90 soctcplst        3 17:37:38 08:51:32          192.168.3.8|9088|soctcp  
                              06/18/21                  
        47b4dbe0 soctcppoll       2 18:39:14                                            
                              06/18/21                  


[gbasedbt@devsvr ~]$ 

Show open partitions (tables and indexes)

onstat -g opn
[gbasedbt@devsvr ~]$ onstat -g opn
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 00:43:00 -- 597864 Kbytes
rstcb 0x470ef268 tid 51
isfd  op_mode    op_flags   partnum    ucnt ocnt lk ra   partp          ocnt ucnt
0     0x70000    0x403      0x800090   1    0       0    0x4a38c088     0    1   

rstcb 0x470f1568 tid 174
isfd  op_mode    op_flags   partnum    ucnt ocnt lk ra   partp          ocnt ucnt
0     0x2        0x117      0x800048   2    2    IX 0    0x494e75b0     1    1   
1     0x400      0x313      0x800048   2    2    IX 0    0x494e75b0     1    1   


[gbasedbt@devsvr ~]$ 
fieldexplain
tidID of the thread currently accessing partition resources (tables and indexes)
rstcbThe RSAM thread of this thread controls the memory address of the block
isfdISAM file descriptor associated with the open partition
op_modeThe current state of the partition locking mode using the following combination of hexadecimal values
op_flagsThe current state of the partition uses the following combination of hexadecimal values:
partnumThe number of partitions of open resources (tables and indexes)
ucntThe number of user threads currently accessing the partition
ocntThe number of times the section was opened
lkLock type

Print VP information

onstat -g sch
[gbasedbt@devsvr ~]$ onstat -g sch
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 3 days 00:58:07 -- 597864 Kbytes

VP Scheduler Statistics:
 vp    pid       class       semops    busy waits  spins/wait  bsy lspins
 1     26606     cpu         69        69          10001       0         
 2     26631     adm         0         0           0           0         
 3     26632     lio         2         0           0           0         
 4     26637     pio         2         0           0           0         
 5     26643     aio         160       0           0           0         
 6     26644     msc         11        0           0           0         
 7     26650     fifo        2         0           0           0         
 8     26656     cpu         266389    266787      9990        0         
 9     26667     aio         4         0           0           0         
 10    26672     aio         4         0           0           0         
 11    26673     aio         4         0           0           0         
 12    26674     aio         4         0           0           0         
 13    26675     aio         3         0           0           0         
 14    39853     cpu         262888    263233      9990        0         
 15    39854     cpu         262410    262600      9995        0         

Thread Migration Statistics:
 vp    pid       class      steal-at steal-sc idlvp-at idlvp-sc inl-polls Q-ln
 1     26606     cpu        1491341  424864   370      52       76120     0   
 2     26631     adm        0        0        9194907  766179   0         0   
 3     26632     lio        0        0        0        0        0         0   
 4     26637     pio        0        0        0        0        0         0   
 5     26643     aio        0        0        1        1        0         0   
 6     26644     msc        0        0        0        0        0         0   
 7     26650     fifo       0        0        0        0        0         0   
 8     26656     cpu        2643732  2509801  854      150      0         0   
 9     26667     aio        0        0        1        1        0         0   
 10    26672     aio        0        0        1        1        0         0   
 11    26673     aio        0        0        1        1        0         0   
 12    26674     aio        0        0        2        2        0         0   
 13    26675     aio        0        0        0        0        0         0   
 14    39853     cpu        2528843  2399366  422      52       0         0   
 15    39854     cpu        1495999  1409886  221      23       0         0   


[gbasedbt@devsvr ~]$ 

Print statistics for shared memory segments

Displays the current memory segments and the usage of each memory segment.

onstat -g seg
[gbasedbt@devsvr ~]$ onstat -g seg
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:23:20 -- 597864 Kbytes

Segment Summary:
id         key        addr             size             ovhd     class blkused  blkfree 
1540101    52ce4801   44000000         38227968         881240   R     9333     0       
1572870    52ce4802   46475000         78643200         923208   V     10997    8203    
1605639    52ce4803   4af75000         80166912         1        B     19572    0       
1638408    52ce4804   4fbe9000         415174656        1        B     101361   0       
Total:     -          -                612212736        -        -     141263   8203    

   (* segment locked in memory)
No reserve memory is allocated

[gbasedbt@devsvr ~]$ 
fieldexplain
idShared memory segment ID
keyShared memory key associated with the shared memory segment ID
addrShared memory segment address
sizeShared memory segment size (bytes)
ovhdShared memory segmentation control information (overhead) size (bytes)
classType of shared memory (B for shared memory pool, V for virtual, VX for virtual extension, M for message)
blkusedNumber of memory block s used
blkfreeNumber of block s of free memory

Print session related information

Print Session connection information.

onstat -g ses [session_id]
[gbasedbt@devsvr ~]$ onstat -g ses
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:11:04 -- 597864 Kbytes

session                                      #RSAM    total      used       dynamic 
id       user     tty      pid      hostname threads  memory     memory     explain 
56       gbasedbt -        0        -        0        16384      13712      off 
54       gbasedbt 4        22403    192.168. 1        73728      65560      off 
52       gbasedbt 4        18186    devsvr   1        114688     107624     off 
25       gbasedbt 3        40077    devsvr   1        90112      69168      off 
3        gbasedbt -        0        -        0        16384      15360      off 
2        gbasedbt -        0        -        0        16384      13712      off 

[gbasedbt@devsvr ~]$ 

Specify the SessionID to display more detailed information.

[gbasedbt@devsvr ~]$ onstat -g ses 54
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:13:38 -- 597864 Kbytes

session           effective                            #RSAM    total      used       dynamic 
id       user     user      tty      pid      hostname threads  memory     memory     explain 
54       gbasedbt -         4        22403    192.168. 1        73728      65560      off 

Program :
/opt/gbase/bin/dbaccess

tid      name     rstcb            flags    curstk   status
198      sqlexec  470f1568         Y--P---  3984     cond wait  netnorm   -

Memory pools    count 1
name         class addr              totalsize  freesize   #allocfrag #freefrag 
54           V     4a1f4040         73728      8168       80         5         

name           free       used           name           free       used      
overhead       0          3288           scb            0          144       
opentable      0          3824           filetable      0          528       
log            0          16536          temprec        0          2216      
ralloc         0          1024           gentcb         0          1616      
ostcb          0          2968           sqscb          0          21880     
sql            0          72             hashfiletab    0          552       
osenv          0          2768           sqtcb          0          7808      
fragman        0          336            

sqscb info
scb              sqscb            optofc   pdqpriority optcompind  directives
47b87290         4968c028         0        0           2           1         

Sess       SQL            Current            Iso Lock       SQL  ISAM F.E. 
Id         Stmt type      Database           Lvl Mode       ERR  ERR  Vers  Explain    
54         -              mydb2              LC  Not Wait   0    0    9.24  Off        

Last parsed SQL statement :
  Database 'mydb2@gbaseserver'

[gbasedbt@devsvr ~]$ 
fieldexplain
Session idSession ID
userThe user name to start the session
ttytty associated with the front end of this session
pidThe process ID associated with the front end of this session
hostnameThe host name to which this session is connected
#RSAM threadsThe number of RSAM threads allocated for this session
total memoryThe amount of memory allocated for this session
used memoryThe amount of memory actually used by this session
dynamic explainGenerate the description output (on or off) of the SQL statement of the session
fieldexplain
tidThread ID
nameThe name of the thread
rstcbRSAM control block
flagsUse the following code to describe the status of a thread:
curstkCurrent stack size
statusCurrent thread state
namePool name
classThe location of the memory pool allocated by the class. R stands for resident, V stands for virtual, and M stands for message
addrAddress of the pool structure
totalsizeThe total size of memory obtained by the pool, in bytes
freesizeNumber of bytes available in the pool
#allocfragThe number of memory slices allocated in the pool
#freefragNumber of available tiles in the pool
fieldexplain
nameThe name of the component that has allocated memory from the pool
freeNumber of bytes released
usedNumber of bytes allocated
fieldexplain
scbSession control block. This is the address of the main session structure in shared memory
sqscbSQL level control block of the session
optofcThe current value set by the OPTOFC environment variable or ONCONFIG profile
pdqpriorityThe current value set by the PDQPRIORITY environment variable or ONCONFIG configuration file
optcompindThe current value of the OPTCOMPIND environment variable or ONCONFIG profile setting
directivesThe current value set by the DIRECTIVES environment variable or the ONCONFIG configuration file

Print sbspace information

onstat -g smb [c | s] [e | h] [cad | fdd | lod]
commandexplain
onstat -g smb cLists all chunk s in the sbspace
onstat -g smb eLists entries for all smart large object table types
onstat -g smb e cadLists the chunk header table entries for smart large objects
onstat -g smb e fddList smart large object file descriptor entries
onstat -g smb e lodLists entries in the smart large object header table
onstat -g smb fddList smart large object file descriptors
onstat -g smb hLists all smart large object table type headers
onstat -g smb h cadLists the chunk header of smart large objects
onstat -g smb h fddList smart large object file descriptor header
onstat -g smb h lodLists the header of the smart large object header table
onstat -g smb lodLists the headers and entries in the smart large object header table
onstat -g smb sList sbspace attributes (owner, name, page size, - Df ID setting)
[gbasedbt@devsvr ~]$ onstat -g smb c
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 3 days 01:18:58 -- 597864 Kbytes

Chunk Summary:

sbnum 4    chunk 4   
    Chunk: address          flags    offset   size     orig fr  usr pgs  free pg
                   4861a028 FR------ 0        51200    47678    47678    47678   
           path: /opt/gbase/gbaseserver_dbs/sbspace1

           start pg npages 
    Ud1  : 53       23839   
    Md   : 23892    3469    
    Ud2  : 27361    23839   


[gbasedbt@devsvr ~]$ 

Print session information related to SQL

onstat -g sql <Session_ID>
[gbasedbt@devsvr ~]$ onstat -g sql 52
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 2 days 16:19:40 -- 597864 Kbytes


Sess       SQL            Current            Iso Lock       SQL  ISAM F.E. 
Id         Stmt type      Database           Lvl Mode       ERR  ERR  Vers  Explain    
52         SELECT         mydb               LC  Not Wait   0    0    9.24  Off        

Current statement name : slctcur

Current SQL statement (4) :
  select * from t_user

Last parsed SQL statement :
  select * from t_user

[gbasedbt@devsvr ~]$ 
fieldexplain
Sess idSession ID
SQL Stmt typeSQL statement type
Current DatabaseThe name of the current database for the session
ISO LvlIsolation level
Lock modeLock mode of the current session
SQL ErrorSQL error number encountered by the current statement
ISAM ErrorISAM error number encountered by the current statement
F.E. VersionThe version of SQLI protocol currently used by the client program
ExplainSET EXPLAIN settings

Isolation level

fieldexplain
DRDirty read
CRRead committed
CSCursor lock
DRUDirty read, keep update lock
CRURead committed, update lock reserved
CSUCursor lock, keep update lock
LCRead committed, last committed
LCURead committed, last committed, update lock reserved
RRRepeatable read
NLDatabase without transaction

Print thread profile

grammar

onstat -g tpf <thread_id>

Example

[gbasedbt@devsvr ~]$ onstat -g tpf 174
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 1 days 01:09:31 -- 597864 Kbytes

Thread profiles
tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus lsmx seq
174 3829   0   0  0  121  1605 14   0    4    2    1    0  4173 161 0    8284 10 

[gbasedbt@devsvr ~]$ 

Listingexplain
tidThread ID
lkreqsNumber of lock requests
lkwLock wait count
dlNumber of deadlocks
toRemote deadlock timeout
lgrsLogging
isrdNumber of reads
iswrNumber of writes
isrwNumber of rewrites
isdlNumber of deletions
isctNumber of submissions
isrbNumber of rollback
lxLong affairs
bfrNumber of buffer reads
bfwNumber of buffer writes
lsusLog space currently in use
lsmxMaximum log space used
seqNumber of sequential scans

Print wait queue thread queue

onstat -g wai
[gbasedbt@devsvr ~]$ onstat -g wai
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 3 days 01:28:05 -- 597864 Kbytes

Waiting threads:
 tid     tcb              rstcb            prty status                vp-class       name
 2        47ed0c88         0                1    IO Idle                 3lio*        lio vp 0
 3        47ef1368         0                1    IO Idle                 4pio*        pio vp 0
 4        47f12368         0                1    IO Idle                 5aio*        aio vp 0
 5        47f33368         20e1f00          1    IO Idle                 6msc*        msc vp 0
 6        47f64368         0                1    IO Idle                 7fifo*       fifo vp 0
 7        47f8cd30         470dc028         3    sleeping secs: 1        8cpu         main_loop()
 10       48173748         470dc8e8         1    sleeping secs: 1        8cpu         flush_sub(0)
 11       48173a88         470dd1a8         1    sleeping secs: 1        8cpu         flush_sub(1)
 12       481aa028         470dda68         1    sleeping secs: 1        8cpu         flush_sub(2)
 13       481aa368         470de328         1    sleeping secs: 1        8cpu         flush_sub(3)
......
 38       4848d6a8         470ebde8         1    sleeping secs: 1        8cpu         flush_sub(28)
 39       4848da38         470ec6a8         1    sleeping secs: 1        8cpu         flush_sub(29)
 40       484fa028         470ecf68         1    sleeping secs: 1        8cpu         flush_sub(30)
 41       484fa3b8         470ed828         1    sleeping secs: 1        8cpu         flush_sub(31)
 42       484fa748         0                3    IO Idle                 1cpu*        kaio
 43       484faad8         0                3    IO Idle                 8cpu*        kaio
 44       48616d48         0                1    IO Idle                 9aio*        aio vp 1
 45       48649368         0                1    IO Idle                10aio*        aio vp 2
 46       4866a368         0                1    IO Idle                11aio*        aio vp 3
 47       4868b368         0                1    IO Idle                12aio*        aio vp 4
 48       486ac368         0                1    IO Idle                13aio*        aio vp 5
 49       486cd758         470ee0e8         2    sleeping secs: 1        8cpu         aslogflush
 51       4868bce0         470ef268         3    cond wait  ReadAhead   15cpu         readahead_0
 52       486316c8         470efb28         3    sleeping secs: 1        8cpu         auto_tune
 155      494bcbc8         470f0ca8         3    sleeping secs: 1        1cpu*        onmode_mon
 156      487fc7f0         470f1e28         3    sleeping secs: 1        8cpu         periodic
 157      487fcc70         470f26e8         3    sleeping forever        1cpu         memory
 166      4a305028         470f03e8         1    cond wait  bp_cond      8cpu         bf_priosweep()
 170      4a21dbe0         0                3    IO Idle                14cpu*        kaio
 171      494c8368         0                2    sleeping forever        8cpu*        soctcplst
 173      4a433860         0                3    IO Idle                15cpu*        kaio
 189      49b32028         470f1568         1    yield time             14cpu         btscanner_0
 191      49d15370         470ee9a8         1    cond wait  netnorm      1cpu         sqlexec


[gbasedbt@devsvr ~]$ 

fieldexplain
tidThread ID
tcbMemory address of thread control block
rstcbMemory address of RSAM thread control block
prtyThread priority. Larger numbers represent higher priority
statusThe current state of the thread
vp-classThe virtual processor integer ID of the VP of the last running thread is connected with the name of the VP class of the running thread
nameThread name

Print thread wait statistics

onstat -g wst
[gbasedbt@devsvr ~]$ onstat -g wst
Your evaluation license will expire on 2022-06-18 00:00:00
On-Line -- Up 3 days 01:31:44 -- 597864 Kbytes
name     tid  state            n        avg(us)  max(us) 

btscanne 189  IO Wait          1               1         1 
btscanne 189  yield 0          19              4        12 
btscanne 189  yield time       372          88.0s    180.3s
btscanne 189  other mutex      26              4        30 
btscanne 189  ready            1147           21      2724 
btscanne 189  run              419           229      3868 
btscanne 189  IO Idle          1               2         2 

sqlexec  191  IO Wait          1             801       801 
sqlexec  191  other cond       4             112       143 
sqlexec  191  ready            6              10        57 
sqlexec  191  run              5             147       307 

[gbasedbt@devsvr ~]$ 

fieldexplain
nameThread name
tidThread ID
stateThe output description of the thread is in this line. If a single thread waits in multiple different states, it may have multiple lines of output.
nNumber of threads waiting in this state
avg(us)The average user time a thread waits in this state each time a wait occurs. The unit of time is microseconds, and the s after the value indicates that the user time is calculated in seconds.
max(us)The maximum user time the thread waits in this state when waiting occurs. The unit of time is microseconds, and the s after the value indicates that the user time is calculated in seconds.

state description

valueexplain
chkpt condThread waiting for checkpoint condition
cp mutexThe thread waits for the checkpoint mutex to be available
deadlock mutexThe thread waits for the deadlock mutex to become available
empty QThe thread waits for an empty buffer in the queue
forkThe thread waits for the child thread to run
full QThe thread waits for a complete buffer on the queue
IO IdleI/O thread idle
IO WaitThe thread is generated while waiting for the I/O to complete
join waitA thread waits for another thread to exit
lock mutexThread waiting for lock mutex available
lockfree mutexThread waiting for lock release mutex available
logflushLogical log emptying occurred
log mutexThe thread waits for the logical log mutex to be available
logcopy condThe thread waits for the logical log copy mutex to be available
logio condThread waiting for logical log condition
lrus mutexThe thread waits for the buffer LRU mutex to be available
miscMiscellaneous reasons for waiting on site
other condThread waiting for internal condition
other mutexThe thread waits for the internal system Mutex to be available
other yieldThread wait internal reason
OS readThe thread waits for the operating system read request to complete
OS writeThe thread waits for the operating system write request to complete
readyThe thread is ready to run
runThread already running
sort ioThe thread waits for the sort I/O to complete
vp mem syncThread waiting for virtual processor synchronization
yield bufwaitThe thread generates while waiting for the buffer to be available
yield 0The thread generated but timed out immediately
yield timeThread generation timeout
yield foreverThe thread generates and remains this way until it is awakened

Keywords: Database

Added by maxpup979 on Mon, 03 Jan 2022 19:07:53 +0200