Checking Broker Status

Description

The cubrid broker status utility allows you to check the broker status such as number of completed jobs and the number of standby jobs.

Syntax

The following syntax shows how to check the CUBRID status; specifying <expr> as an argument indicates status monitoring of a specific broker and omitting an argument indicates status monitoring of all brokers registered in the Broker configuration file (cubrid_broker.conf).

cubrid broker status options [<expr>]

options : [ -b | -f [-l secs] | -q | -t | -s secs ]

Options

The following table shows options available with the cubrid broker status utility.

Option

Description

expr

Displays the status information of a specific broker whose name includes <expr>. If it is not specified, status information of all brokers are displayed.

-b

Displays the status information of a broker but does not display information on application server (CAS).

-f [-l secs]

Displays information of DB and host accessed by broker.
If it is used with the -b option, additional information on CAS is displayed.
The -l secs option is used to specify accumulation period (unit : sec.) when displaying the number of application servers whose client status is Waiting or Busy. If it is omitted, the default value (1 second) is specified.

-q

Displays standby jobs in the job queue.

-t

Displays results in tty mode on the screen. The output can be redirected and used as a file.

-s secs

Regularly displays the status of broker based on specified period. It returns to a command prompt if p is entered.

-f

Displays information of DB and host accessed by broker.

Example

If you do not specify an option or argument to check the status of all brokers, the following result is displayed.

% cubrid broker status

@ cubrid broker status

% query_editor  - cub_cas [28433,40820] /home/CUBRID/log/broker/query_editor.access /home/CUBRID/

 JOB QUEUE:0, AUTO_ADD_APPL_SERVER:ON, SQL_LOG_MODE:ALL:100000, SLOW_LOG:ON

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW, MAX_QUERY_TIMEOUT:0

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

ID   PID   QPS   LQS PSIZE STATUS

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

 1 28434     0     0 50144 IDLE

 2 28435     0     0 50144 IDLE

 3 28436     0     0 50144 IDLE

 4 28437     0     0 50140 IDLE

 5 28438     0     0 50144 IDLE

 

% broker1  - cub_cas [28443,40821] /home/CUBRID/log/broker/broker1.access /home/CUBRID/

 JOB QUEUE:0, AUTO_ADD_APPL_SERVER:ON, SQL_LOG_MODE:ALL:100000, SLOW_LOG:ON

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW, MAX_QUERY_TIMEOUT:0

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

ID   PID   QPS   LQS PSIZE STATUS

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

 1 28444     0     0 50144 IDLE

 2 28445     0     0 50140 IDLE

 3 28446     0     0 50144 IDLE

 4 28447     0     0 50144 IDLE

 5 28448     0     0 50144 IDLE

To check the status of broker, enter the code below.

% cubrid broker status -b

@ cubrid broker status

  NAME           PID  PORT  AS  JQ      REQ  TPS  QPS  LONG-T  LONG-Q ERR-Q

===========================================================================

* query_editor  4094 30000   5   0        0    0    0    0/60    0/60    0

* broker1       4104 33000   5   0        0    0    0    0/60    0/60    0

Enter code below to check the status of broker whose name includes broker1 with the -q option and job status of a specific broker in the job queue. If you do not specify broker1 as an argument, list of jobs in the job queue for all brokers is displayed.

% cubrid broker status -q broker1

@ cubrid broker status

% broker1  - cub_cas [28443,40821] /home/CUBRID/log/broker/broker1.access /home/CUBRID/

 JOB QUEUE:0, AUTO_ADD_APPL_SERVER:ON, SQL_LOG_MODE:ALL:100000, SLOW_LOG:ON

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW, MAX_QUERY_TIMEOUT:0

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

ID   PID   QPS   LQS PSIZE STATUS

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

 1 28444     0     0 50144 IDLE

 2 28445     0     0 50140 IDLE

 3 28446     0     0 50144 IDLE

 4 28447     0     0 50144 IDLE

 5 28448     0     0 50144 IDLE

Enter code below to input the monitoring interval of broker whose name includes broker1 with the -s option and monitor broker status regularly. If you do not specify broker1 as an argument, monitoring status for all brokers is performed regularly. It returns to a command prompt if q is not entered.

% cubrid broker status -s 5 broker1

% broker1  - cub_cas [28443,40821] /home/CUBRID/log/broker/broker1.access /home/CUBRID/

 JOB QUEUE:0, AUTO_ADD_APPL_SERVER:ON, SQL_LOG_MODE:ALL:100000, SLOW_LOG:ON

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW, MAX_QUERY_TIMEOUT:0

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

ID   PID   QPS   LQS PSIZE STATUS

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

 1 28444     0     0 50144 IDLE

 2 28445     0     0 50140 IDLE

 3 28446     0     0 50144 IDLE

 4 28447     0     0 50144 IDLE

 5 28448     0     0 50144 IDLE

Display information of TPS and QPS to a file with the -t option. To cancel the process, press <CTRL+C> to stop program.

 % cubrid broker status -b -t -s 1 > log_file

Enter code below to regularly monitor status of all brokers including TPS and QPS with the -b and -s options.

% cubrid broker status -b -s 1

NAME           PID  PORT  AS  JQ      REQ  TPS  QPS  LONG-T  LONG-Q ERR-Q

===========================================================================

* query_editor 28433 40820   5   0        0    0    0    0/60    0/60    0

* broker1      28443 40821   5   0        0    0    0    0/60    0/60    0

Enter code below to view information of server/database accessed by broker, access time, the IP addresses accessed to CAS with the -f option.

$ cubrid broker status -f broker1

@ cubrid broker status

% broker1  - cub_cas [28443,40821] /home/CUBRID/log/broker/broker1.access /home/CUBRID/

 JOB QUEUE:0, AUTO_ADD_APPL_SERVER:ON, SQL_LOG_MODE:ALL:100000, SLOW_LOG:ON

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW, MAX_QUERY_TIMEOUT:0

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

ID   PID   QPS   LQS PSIZE STATUS         LAST ACCESS TIME      DB       HOST   LAST CONNECT TIME       CLIENT IP   SQL_LOG_MODE   TRANSACTION STIME # CONNECT # RESTART
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1 26946     0     0 51168 IDLE         2011/11/16 16:23:42  demodb  localhost 2011/11/16 16:23:40      10.0.1.101           NONE 2011/11/16 16:23:42         0         0

2 26947     0     0 51172 IDLE         2011/11/16 16:23:34      -          -                   -          0.0.0.0              -                   -         0         0

3 26948     0     0 51172 IDLE         2011/11/16 16:23:34      -          -                   -          0.0.0.0              -                   -         0         0

4 26949     0     0 51172 IDLE         2011/11/16 16:23:34      -          -                   -          0.0.0.0              -                   -         0         0

5 26950     0     0 51172 IDLE         2011/11/16 16:23:34      -          -                   -          0.0.0.0              -                   -         0         0

Meaning of every column in code above is as follows:

Enter code below to display information on AS (T W B Ns-W Ns-B) and CANCELED with the -b and -f options.

// The -f option is added upon execution of Broker status information. Configuring Ns-W and Ns-B are displayed as long as N seconds by using the -l.

% cubrid broker status -b -f -l 2

@ cubrid broker status

NAME          PID    PSIZE PORT  AS(T W B 2s-W 2s-B) JQ REQ TPS QPS LONG-T LONG-Q ERR-Q CANCELED ACCESS_MODE SQL_LOG

====================================================================================================================

query_editor 16784 56700 38000      5 0 0     0   0   0   0  0    0 0/60.0 0/60.0     0        0          RW     ALL

Meaning of every column in code above is as follows: