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 |
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.
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 ]
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. |
|
-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. |
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
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
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:
// 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