Skip to main content

SHOW PROC

Description

Shows certain indicators of the StarRocks cluster.

tip

This operation requires the SYSTEM-level OPERATE privilege. You can follow the instructions in GRANT to grant this privilege.

Syntax

SHOW PROC { '/backends' | '/compute_nodes' | '/dbs' | '/jobs' 
| '/statistic' | '/tasks' | '/frontends' | '/brokers'
| '/resources' | '/load_error_hub' | '/transactions'
| '/monitor' | '/current_queries' | '/current_backend_instances'
| '/cluster_balance' | '/routine_loads' | '/colocation_group'
| '/catalog' | '/replications' }

Parameters

ParameterDescription
'/backends'Shows the information of BE nodes in the cluster.
'/compute_nodes'Shows the information of CN nodes in the cluster.
'/dbs'Shows the information of databases in the cluster.
'/jobs'Shows the information of jobs in the cluster.
'/statistic'Shows the statistics of each database in the cluster.
'/tasks'Shows the total number of all generic tasks and the failed tasks in the cluster.
'/frontends'Shows the information of FE nodes in the cluster.
'/brokers'Shows the information of Broker nodes in the cluster.
'/resources'Shows the information of resources in the cluster.
'/load_error_hub'Shows the configuration of the cluster's Load Error Hub, which is used to manage error messages of loading jobs.
'/transactions'Shows the information of transactions in the cluster.
'/monitor'Shows the monitoring information in the cluster.
'/current_queries'Shows the information of running queries on the current FE node.
'/current_backend_instances'Shows the BE nodes that are processing requests in the cluster.
'/cluster_balance'Shows the load balance information in the cluster.
'/routine_loads'Shows the information of Routine Load in the cluster.
'/colocation_group'Shows the information of Colocate Join groups in the cluster.
'/catalog'Shows the information of catalogs in the cluster.
'/replications'Shows the information of data replication tasks in the cluster.

Examples

Example 1: Shows the information of BE nodes in the cluster.

mysql> SHOW PROC '/backends'\G
*************************** 1. row ***************************
BackendId: 10004
IP: xxx.xx.92.200
HeartbeatPort: 9354
BePort: 9360
HttpPort: 8338
BrpcPort: 8360
LastStartTime: 2023-04-21 09:56:10
LastHeartbeat: 2023-04-21 09:56:10
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 2199
DataUsedCapacity: 0.000
AvailCapacity: 584.578 GB
TotalCapacity: 1.968 TB
UsedPct: 71.00 %
MaxDiskUsedPct: 71.00 %
ErrMsg:
Version: BRANCH-3.0-RELEASE-8eb8705
Status: {"lastSuccessReportTabletsTime":"N/A"}
DataTotalCapacity: 584.578 GB
DataUsedPct: 0.00 %
CpuCores: 16
NumRunningQueries: 0
MemUsedPct: 0.52 %
CpuUsedPct: 0.0 %
ReturnDescription
BackendIdID of the BE node.
IPIP address of the BE node.
HeartbeatPortHeartbeat service port of the BE node.
BePortThrift Server port of the BE node.
HttpPortHTTP Server port of the BE node.
BrpcPortbRPC port of the BE node.
LastStartTimeThe last time when the BE node was started.
LastHeartbeatThe last time when the BE node received a heartbeat.
AliveIf the BE node is alive.
SystemDecommissionedIf the BE node is decommissioned.
ClusterDecommissionedIf the BE node is decommissioned within the cluster.
TabletNumNumber of tablets in the BE node.
DataUsedCapacityStorage capacity that is used for data in the BE node.
AvailCapacityAvailable storage capacity in the BE node.
TotalCapacityTotal storage capacity in the BE node.
UsedPctPercentage at which the storage capacity is used in the BE node.
MaxDiskUsedPctThe maximum percentage at which the storage capacity is used in the BE node.
ErrMsgError messages in the BE node.
VersionStarRocks version of the BE node.
StatusStatus information of the BE node, including the last time when the BE node reported tablets.
DataTotalCapacityTotal of used and available data storage capacity. The sum of DataUsedCapacity and AvailCapacity.
DataUsedPctPercentage at which the data storage takes up the total data capacity (DataUsedCapacity/DataTotalCapacity).
CpuCoresNumber of CPU cores in the BE node.
NumRunningQueriesThe number of queries currently running in the cluster.
MemUsedPctThe current memory usage percentage.
CpuUsedPctThe current CPU usage percentage.

Example 2: Shows the information of databases in the cluster.

mysql> SHOW PROC '/dbs';
+---------+------------------------+----------+----------------+--------------------------+---------------------+
| DbId | DbName | TableNum | Quota | LastConsistencyCheckTime | ReplicaQuota |
+---------+------------------------+----------+----------------+--------------------------+---------------------+
| 1 | information_schema | 22 | 8388608.000 TB | NULL | 9223372036854775807 |
| 840997 | tpcds_100g | 25 | 1024.000 GB | NULL | 1073741824 |
| 1275196 | _statistics_ | 3 | 8388608.000 TB | 2022-09-06 23:00:58 | 9223372036854775807 |
| 1286207 | tpcds_n | 24 | 8388608.000 TB | NULL | 9223372036854775807 |
| 1381289 | test | 6 | 8388608.000 TB | 2022-01-14 23:10:18 | 9223372036854775807 |
| 6186781 | test_stddev | 1 | 8388608.000 TB | 2022-09-06 23:00:58 | 9223372036854775807 |
+---------+------------------------+----------+----------------+--------------------------+---------------------+
ReturnDescription
DbIdDatabase ID.
DbNameDatabase name.
TableNumNumber of tables in the database.
QuotaStorage quota of the database.
LastConsistencyCheckTimeThe last time when consistency check is executed.
ReplicaQuotaData replica quota of the database.

Example 3: Shows the information of jobs in the cluster.

mysql> SHOW PROC '/jobs';
+-------+--------------------------------------+
| DbId | DbName |
+-------+--------------------------------------+
| 10005 | default_cluster:_statistics_ |
| 0 | default_cluster:information_schema |
| 12711 | default_cluster:starrocks_audit_db__ |
+-------+--------------------------------------+
3 rows in set (0.00 sec)

mysql> SHOW PROC '/jobs/10005';
+---------------+---------+---------+----------+-----------+-------+
| JobType | Pending | Running | Finished | Cancelled | Total |
+---------------+---------+---------+----------+-----------+-------+
| load | 0 | 0 | 3 | 0 | 3 |
| rollup | 0 | 0 | 0 | 0 | 0 |
| schema_change | 0 | 0 | 0 | 0 | 0 |
| export | 0 | 0 | 0 | 0 | 0 |
+---------------+---------+---------+----------+-----------+-------+
4 rows in set (0.00 sec)
ReturnDescription
DbIdDatabase ID.
DbNameDatabase name.
JobTypeJob type.
PendingNumber of jobs that are pending.
RunningNumber of jobs that are running.
FinishedNumber of jobs that are finished.
CancelledNumber of jobs that are cancelled.
TotalTotal number of jobs.

Example 4: Shows the statistics of each database in the cluster.

mysql> SHOW PROC '/statistic';
+--------+----------------------------------------------------------+----------+--------------+----------+-----------+------------+--------------------+-----------------------+------------------+---------------------+
| DbId | DbName | TableNum | PartitionNum | IndexNum | TabletNum | ReplicaNum | UnhealthyTabletNum | InconsistentTabletNum | CloningTabletNum | ErrorStateTabletNum |
+--------+----------------------------------------------------------+----------+--------------+----------+-----------+------------+--------------------+-----------------------+------------------+---------------------+
| 10004 | _statistics_ | 3 | 3 | 3 | 30 | 60 | 0 | 0 | 0 | 0 |
| 1 | information_schema | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 92498 | stream_load_test_db_03afc714_b1cb_11ed_a82c_00163e237e98 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 92542 | stream_load_test_db_79876e92_b1da_11ed_b50e_00163e237e98 | 1 | 1 | 1 | 3 | 3 | 0 | 0 | 0 | 0 |
| 115476 | testdb | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 10002 | zq_test | 8 | 8 | 8 | 5043 | 7063 | 0 | 0 | 0 | 2 |
| Total | 6 | 12 | 12 | 12 | 5076 | 7126 | 0 | 0 | 0 | 2 |
+--------+----------------------------------------------------------+----------+--------------+----------+-----------+------------+--------------------+-----------------------+------------------+---------------------+
7 rows in set (0.01 sec)

mysql> show proc '/statistic/10002';
+------------------+---------------------+----------------+-------------------+
| UnhealthyTablets | InconsistentTablets | CloningTablets | ErrorStateTablets |
+------------------+---------------------+----------------+-------------------+
| [] | [] | [] | [116703, 116706] |
+------------------+---------------------+----------------+-------------------+
ReturnDescription
DbIdDatabase ID.
DbNameDatabase name.
TableNumNumber of tables in the database.
PartitionNumNumber of partitions in the database.
IndexNumNumber of indexes in the database.
TabletNumNumber of tablets in the database.
ReplicaNumNumber of replicas in the database.
UnhealthyTabletNumNumber of unfinished (unhealthy) tablets in the database during data redistribution.
InconsistentTabletNumNumber of inconsistent tablets in the database.
CloningTabletNumNumber of tablets that are being cloned in the database.
ErrorStateTabletNumIn a Primary Key type table, the number of tablets in Error state.
ErrorStateTabletsIn a Primary Key type table, the IDs of the tablets in Error state.

Example 5: Shows the total number of all generic tasks and the failed tasks in the cluster.

mysql> SHOW PROC '/tasks';
+-------------------------+-----------+----------+
| TaskType | FailedNum | TotalNum |
+-------------------------+-----------+----------+
| CREATE | 0 | 0 |
| DROP | 0 | 0 |
| PUSH | 0 | 0 |
| CLONE | 0 | 0 |
| STORAGE_MEDIUM_MIGRATE | 0 | 0 |
| ROLLUP | 0 | 0 |
| SCHEMA_CHANGE | 0 | 0 |
| CANCEL_DELETE | 0 | 0 |
| MAKE_SNAPSHOT | 0 | 0 |
| RELEASE_SNAPSHOT | 0 | 0 |
| CHECK_CONSISTENCY | 0 | 0 |
| UPLOAD | 0 | 0 |
| DOWNLOAD | 0 | 0 |
| CLEAR_REMOTE_FILE | 0 | 0 |
| MOVE | 0 | 0 |
| REALTIME_PUSH | 0 | 0 |
| PUBLISH_VERSION | 0 | 0 |
| CLEAR_ALTER_TASK | 0 | 0 |
| CLEAR_TRANSACTION_TASK | 0 | 0 |
| RECOVER_TABLET | 0 | 0 |
| STREAM_LOAD | 0 | 0 |
| UPDATE_TABLET_META_INFO | 0 | 0 |
| ALTER | 0 | 0 |
| INSTALL_PLUGIN | 0 | 0 |
| UNINSTALL_PLUGIN | 0 | 0 |
| NUM_TASK_TYPE | 0 | 0 |
| Total | 0 | 0 |
+-------------------------+-----------+----------+
ReturnDescription
TaskTypeTask type.
FailedNumNumber of failed tasks.
TotalNumTotal number of tasks.

Example 6: Shows the information of FE nodes in the cluster.

mysql> SHOW PROC '/frontends';
+----------------------------------+---------------+-------------+----------+-----------+---------+----------+------------+-------+-------+-------------------+---------------+----------+---------------+-----------+---------+
| Name | IP | EditLogPort | HttpPort | QueryPort | RpcPort | Role | ClusterId | Join | Alive | ReplayedJournalId | LastHeartbeat | IsHelper | ErrMsg | StartTime | Version |
+----------------------------------+---------------+-------------+----------+-----------+---------+----------+------------+-------+-------+-------------------+---------------+----------+---------------+-----------+---------+
| xxx.xx.xx.xxx_9009_1600088918395 | xxx.xx.xx.xxx | 9009 | 7390 | 0 | 0 | FOLLOWER | 1747363037 | false | false | 0 | NULL | true | got exception | NULL | NULL |
+----------------------------------+---------------+-------------+----------+-----------+---------+----------+------------+-------+-------+-------------------+---------------+----------+---------------+-----------+---------+
ReturnDescription
NameFE node name.
IPIP address of the FE node.
EditLogPortPort for communication between FE nodes.
HttpPortHTTP Server port of the FE node.
QueryPortMySQL Server port of the FE node.
RpcPortRPC port of the FE node.
RoleRole of the FE node (Leader, Follower, or Observer).
ClusterIdCluster ID.
JoinIf the FE node has joined a cluster.
AliveIf the FE node is alive.
ReplayedJournalIdThe largest metadata ID that the FE node has replayed.
LastHeartbeatThe last time when the FE node sent a heartbeat.
IsHelperIf the FE node is the BDBJE helper node.
ErrMsgError messages in the FE node.
StartTimeTime when the FE node is started.
VersionStarRocks version of the FE node.

Example 7: Shows the information of Broker nodes in the cluster.

mysql> SHOW PROC '/brokers';
+-------------+---------------+------+-------+---------------+---------------------+--------+
| Name | IP | Port | Alive | LastStartTime | LastUpdateTime | ErrMsg |
+-------------+---------------+------+-------+---------------+---------------------+--------+
| hdfs_broker | xxx.xx.xx.xxx | 8500 | true | NULL | 2022-10-10 16:37:59 | |
| hdfs_broker | xxx.xx.xx.xxx | 8500 | true | NULL | 2022-10-10 16:37:59 | |
| hdfs_broker | xxx.xx.xx.xxx | 8500 | true | NULL | 2022-10-10 16:37:59 | |
+-------------+---------------+------+-------+---------------+---------------------+--------+
ReturnDescription
NameBroker node name.
IPIP address of the broker node.
PortThrift Server port of the broker node. The port is used to receive requests.
AliveIf the broker node is alive.
LastStartTimeThe last time when the broker node was started.
LastUpdateTimeThe last time when the broker node was updated.
ErrMsgError message in the broker node.

Example 8: Shows the information of resources in the cluster.

mysql> SHOW PROC '/resources';
+-------------------------+--------------+---------------------+------------------------------+
| Name | ResourceType | Key | Value |
+-------------------------+--------------+---------------------+------------------------------+
| hive_resource_stability | hive | hive.metastore.uris | thrift://xxx.xx.xxx.xxx:9083 |
| hive2 | hive | hive.metastore.uris | thrift://xxx.xx.xx.xxx:9083 |
+-------------------------+--------------+---------------------+------------------------------+
ReturnDescription
NameResource name.
ResourceTypeResource type.
KeyResource key.
ValueResource value.

Example 9: Shows the information of transactions in the cluster.

mysql> SHOW PROC '/transactions';
+-------+--------------------------------------+
| DbId | DbName |
+-------+--------------------------------------+
| 10005 | default_cluster:_statistics_ |
| 12711 | default_cluster:starrocks_audit_db__ |
+-------+--------------------------------------+
2 rows in set (0.00 sec)

mysql> SHOW PROC '/transactions/10005';
+----------+--------+
| State | Number |
+----------+--------+
| running | 0 |
| finished | 4 |
+----------+--------+
2 rows in set (0.00 sec)
ReturnDescription
DbIdDatabase ID.
DbNameDatabase name.
StateThe state of the transaction.
NumberNumber of transactions.

Example 10: Shows the monitoring information in the cluster.

mysql> SHOW PROC '/monitor';
+------+------+
| Name | Info |
+------+------+
| jvm | |
+------+------+
ReturnDescription
NameJVM name.
InfoJVM information.

Example 11: Shows the load balance information in the cluster.

mysql> SHOW PROC '/cluster_balance';
+-------------------+--------+
| Item | Number |
+-------------------+--------+
| cluster_load_stat | 1 |
| working_slots | 3 |
| sched_stat | 1 |
| priority_repair | 0 |
| pending_tablets | 2001 |
| running_tablets | 0 |
| history_tablets | 1000 |
+-------------------+--------+
ReturnDescription
ItemSub-command item in cluster_balance.
  • cluster_load_stat: The current load status of the cluster.
  • working_slots: The number of currently available working slots.
  • sched_stat: The current status of the scheduler.
  • priority_repair: The number of Tablet repair tasks that are prioritized.
  • pending_tablets: The number of Tablets waiting to be processed.
  • running_tablets: The number of Tablets currently being repaired.
  • history_tablets: The total number of Tablets repaired historically.
NumberNumber of each sub-command in cluster_balance.

Example 12: Shows the information of Colocate Join groups in the cluster.

mysql> SHOW PROC '/colocation_group';
+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+-------------+----------+
| GroupId | GroupName | TableIds | BucketsNum | ReplicationNum | DistCols | IsStable |
+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+-------------+----------+
| 24010.177354 | 24010_lineitem_str_g1 | 177672 | 12 | 1 | varchar(-1) | true |
| 24010.182146 | 24010_lineitem_str_g2 | 182144 | 192 | 1 | varchar(-1) | true |
| 1439318.1735496 | 1439318_group_agent_uid | 1735677, 1738390 | 12 | 2 | bigint(20) | true |
| 24010.37804 | 24010_gsdaf2449s9e | 37802 | 192 | 1 | int(11) | true |
| 174844.175370 | 174844_groupa4 | 175368, 591307, 591362, 591389, 591416 | 12 | 1 | int(11) | true |
| 24010.30587 | 24010_group2 | 30585, 30669 | 12 | 1 | int(11) | true |
| 10005.181366 | 10005_lineorder_str_normal | 181364 | 192 | 1 | varchar(-1) | true |
| 1904968.5973175 | 1904968_groupa2 | 5973173 | 12 | 1 | int(11) | true |
| 24010.182535 | 24010_lineitem_str_g3 | 182533 | 192 | 1 | varchar(-1) | true |
+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+-------------+----------+
ReturnDescription
GroupIdColocate Join Group ID.
GroupNameColocate Join Group name.
TableIdsIDs of tables in the Colocate Join Group.
BucketsNumBuckets in the Colocate Join Group.
ReplicationNumReplications in the Colocate Join Group.
DistColsDistribution column of the Colocate Join Group.
IsStableIf the Colocate Join Group is stable.

Example 13: Shows the information of catalogs in the cluster.

mysql> SHOW PROC '/catalog';
+--------------------------------------------------------------+----------+----------------------+
| Catalog | Type | Comment |
+--------------------------------------------------------------+----------+----------------------+
| resource_mapping_inside_catalog_hive_hive2 | hive | mapping hive catalog |
| resource_mapping_inside_catalog_hive_hive_resource_stability | hive | mapping hive catalog |
| default_catalog | Internal | Internal Catalog |
+--------------------------------------------------------------+----------+----------------------+
ReturnDescription
CatalogCatalog name.
TypeCatalog type.
CommentComments for the catalog.

Example 14: Shows the information of replication tasks in the cluster.

mysql> SHOW PROC '/replications';
+-------------------------------------------------+------------+---------+-------+---------------------+---------------------+-----------+----------+-------+
| JobID | DatabaseID | TableID | TxnID | CreatedTime | FinishedTime | State | Progress | Error |
+-------------------------------------------------+------------+---------+-------+---------------------+---------------------+-----------+----------+-------+
| FAILOVER_GROUP_group1-11006-11010-1725593360156 | 11006 | 11010 | 99 | 2024-09-06 11:29:20 | 2024-09-06 11:29:21 | COMMITTED | | |
| FAILOVER_GROUP_group1-11006-11009-1725593360161 | 11006 | 11009 | 98 | 2024-09-06 11:29:20 | 2024-09-06 11:29:21 | COMMITTED | | |
| FAILOVER_GROUP_group1-11006-11074-1725593360161 | 11006 | 11074 | 100 | 2024-09-06 11:29:20 | 2024-09-06 11:29:21 | COMMITTED | | |
| FAILOVER_GROUP_group1-11006-12474-1725593360250 | 11006 | 12474 | 102 | 2024-09-06 11:29:20 | 2024-09-06 11:29:24 | COMMITTED | | |
| FAILOVER_GROUP_group1-11006-11024-1725593360293 | 11006 | 11024 | 101 | 2024-09-06 11:29:20 | 2024-09-06 11:29:24 | COMMITTED | | |
| FAILOVER_GROUP_group1-11006-13861-1725607270963 | 11006 | 13861 | 627 | 2024-09-06 15:21:10 | 2024-09-06 15:21:14 | COMMITTED | | |
+-------------------------------------------------+------------+---------+-------+---------------------+---------------------+-----------+----------+-------+
ReturnDescription
JobIDJob ID.
DatabaseIDDatabase ID.
TableIDTable ID.
TxnIDTransaction ID.
CreatedTimeTime when the task was created.
FinishedTimeTime when the task finished.
StateStatus of the task. Valid values: INITIALIZING, SNAPSHOTING, REPLICATING, COMMITTED, ABORTED.
ProgressProgress of the task.
ErrorError message (if any).