Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Checking Broker Status

Description

By providing various options, the cubrid broker status utility allows you to check the status of the Broker, such as the number of completed jobs by each Broker and the number of standby jobs. Take a look at the syntax and its examples.

Syntax

The following is the syntax for monitoring the status of the CUBRID Broker. If exor is specified, monitoring of the status of the specified Broker is performed; if omitted, all Brokers registered in the CUBRID Broker environment configuration file (cubrid_broker.conf) are monitored.

cubrid broker status options [<expr>]

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

Options

The following table shows options that can be used together with cubrid broker status.

Options

Description

expr

Displays the status of the Broker of which name contains <expr>. If this option is not specified, the status of all Brokers is displayed.

-b

Displays the status of the Broker only, excluding the information on the application server (CAS).

-f [-l secs]

Displays DB and host information accessed by Broker.
If it is used with the -b option, information on CAS is displayed as well.
The -l secs option is used to specify accumulation period (unit: sec.) when displaying the number of CASs of which status is Waiting or Busy. If the -l secs option is omitted, one sec. is specified by default.

-q

Displays standby jobs in the job queue.

-t

Displays on screen in tty mode. The output contents can be redirected so that it can be used as a file.

-s

Displays the status of the Broker regularly according to the specified time period. Returns to the command prompt if q is entered.

-f

Displays DB and host information where the Broker is connected.

Example

If you do not specify any option and argument to check the status of all Brokers, you will get the following output:

% 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

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW

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

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    50144 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

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW

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

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

  • % query_editor : Broker name
  • cub_cas : Type of the CUBRID application server
  • [28433, 40820] : Broker process ID and connection port number of the Broker
  • /home/CUBRID/log/broker/query_editor.access : Path of the access log file of query_editor
  • JOB QUEUE : The number of standby jobs in the job queue
  • AUTO_ADD_APPL_SERVER : The value of the AUTO_ADD_APPL_SERVER parameter in cubrid_broker.conf is ON, which allows the application server to be added automatically.
  • SQL_LOG_MODE : The value of the SQL_LOG parameter in the cubrid_broker.conf file is ALL, which allows the SQL log to be recorded.
  • LONG_TRANSACTION_TIME : Transaction execution time which determines long-duration transaction. Exceeding 60 seconds is regarded as long-duration transaction.
  • LONG_QUERY_TIME : Query execution time which determines long-duration query. Exceeding 60 seconds is regarded as long-duration query.
  • SESSION_TIMEOUT : Session timeout value; the value of SESSION_TIMEOUT parameter in the cubrid_broker.conf file is 300.
  • KEEP_CONNECTION :  The value of KEEP_CONNECTION parameter in the cubrid_broker.conf file is AUTO, which allows client applications is automatically connected to their server.
  • ACCESS_MODE: The Broker action mode; Database manipulation as well as retrieval is allowed in the RW mode.
  • ID : Serial number of the application server (CAS) within the Broker
  • PID : Application server (CAS) process ID within the Broker
  • QPS :  The number of queries processed per second
  • LQS : The number of long-duration queries processed per second
  • PSIZE : Size of the application server process
  • STATUS : The current status of the application server (BUSY, IDLE, CLIENT_WAIT, CLOSE_WAIT)

To check the status of the Broker, enter as follows:

% 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

  • NAME : Broker name
  • PID : Process ID of the Broker
  • PORT : Port number of the Broker
  • AS : The number of application servers
  • JQ : The number of standby jobs in the job queue
  • REQ : The number of client requests processed by the Broker
  • TPS : The number of transactions processed per second (calculated only when the option is configured to "-b -s <sec>")
  • QPS : The number of queries processed per second (calculated only when the option is configured to "-b -s <sec>")
  • LONG-T : The number of transactions which exceed LONG_TRANSACTION_TIME; the value of the LONG_TRANSACTION_TIME parameter
  • LONG-Q : The number of queries which exceed LONG_QUERY_TIME; the value of the LONG_QUERY_TIME parameter
  • ERR-Q : The number of queries with errors found

Check the status of the Broker whose name contains broker1 by using the -q option, and then enter the following to check the status of the standby jobs in the job queue of the specified Broker. If broker1 is not entered as an argument, the list of all standby jobs in the job queue of all Brokers is outputted.

% 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

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW

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

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 the monitoring interval of the Broker whose name contains broker1 by using the -s option, and then enter the following to monitor the status of the Broker regularly. If broker1 is not entered as an argument, monitoring of the status of all Brokers is performed regularly. If you enter q, the monitoring screen returns to the command prompt.

% 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

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW

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

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

Output TPS and QPS information to a file by using the -t option. To cancel the output process, press <CTRL+C> to stop the program.

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

Enter the following to monitor the status of all Brokers (including TPS and QPS) regularly by using 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 the following to view information of a server/database connected to the Broker, its access time, and the IP addresses connected to CAS by using 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

 LONG_TRANSACTION_TIME:60, LONG_QUERY_TIME:60, SESSION_TIMEOUT:300

 KEEP_CONNECTION:AUTO, ACCESS_MODE:RW

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

ID   PID   QPS   LQS  PSIZE STATUS     LAST ACCESS TIME        DB      HOST   LAST CONNECT TIME      CLIENT IP

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

 1  26946   0    0    51168  IDLE     2009/11/06 16:06:41      -         -            -             10.0.1.101

 2  26947   0    0    51172  IDLE     2009/11/06 16:06:41      -         -            -             10.0.1.101

 3  26948   0    0    51172  IDLE     2009/11/06 16:06:41      -         -            -             10.0.1.101

 4  26949   0    0    51172  IDLE     2009/11/06 16:06:41      -         -            -             10.0.1.101

 5  26950   0    0    51172  IDLE     2009/11/06 16:06:41      -         -            -             10.0.1.101

The -b and the -f options are used to display information on AS(T W B Ns-W Ns-B) and CANCELED. The description of each information are as follows:

  • T : Total number of CASs being executed
  • W : The number of CASs in the state of Waiting
  • B : The number of CASs in the state of Busy
  • Ns-W : The number of CASs that the client belongs to has been waited for N secs.
  • Ns-B : The number of CASs that the client belongs to has been Busy for N secs.
  • CANCELED: The number of queries have canceled by user interruption since Broker is started (if it is used with the -l N option, it specifies the number of accumulations for N secs).

// Adding the -f option upon the execution of Broker state information. The -l option is used to specify the N value (unit: sec) so that Ns-W and Ns-B can be displayed for specified N secs.

% 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