Skip to main content
Version: Latest-3.3

SHOW COMPUTE NODES

Description

Shows the information of all CN nodes in the cluster.

tip

Only users with the SYSTEM-level OPERATE privilege or the cluster_admin role can perform this operation.

Syntax

SHOW COMPUTE NODES

Return

+---------------+--------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+--------+--------------------+----------+-------------------+------------+------------+----------------+-------------+----------+-------------------+-----------+
| ComputeNodeId | IP | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | ClusterDecommissioned | ErrMsg | Version | CpuCores | NumRunningQueries | MemUsedPct | CpuUsedPct | HasStoragePath | StarletPort | WorkerId | WarehouseName | TabletNum |
+---------------+--------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+--------+--------------------+----------+-------------------+------------+------------+----------------+-------------+----------+-------------------+-----------+

The following table describes the parameters returned by this statement.

ParameterDescription
ComputeNodeIdThe ID of the CN node.
IPThe IP address of the CN node.
HeartbeatPortThe heartbeat port of the CN node. It is used to receive heartbeats from the FE node.
BePortThrift server port of the CN node. It is used to receive requests from the FE node.
HttpPortHTTP server port of the CN node. It is used to access the CN node via web page.
BrpcPortbRPC port of the CN node. It is used for communication across CN nodes.
LastStartTimeThe last time at which the CN node starts.
LastHeartbeatThe last time at which the CN node sends a heartbeat.
AliveWhether the CN node is alive or not.
  • true: the CN node is alive.
  • false: the CN node is not alive.
SystemDecommissionedIf the value of the parameter is true, the CN node is removed from your StarRocks cluster.
ClusterDecommissionedThis parameter is used for system compatibility.
ErrMsgThe error message if the CN node fails to send a heartbeat.
VersionThe StarRocks version of the CN node.
CpuCoresThe number of CPU cores in the CN node.
NumRunningQueriesThe number of running queries on the CN node.
MemUsedPctThe percentage of used memory.
CpuUsedPctThe percentage of used CPU cores.
HasStoragePathWhether the CN node has storage paths configured.
StarletPortThe starlet_port of the CN node. It is an extra agent service port.
WorkerIdThe ID of the CN node for internal scheduling.
WarehouseNameThe name of the warehouse to which the CN node belongs. The value is always default_warehouse.
TabletNumThe number of tablets (of cached data) on the CN node.

Example

View the information of all CN nodes in the cluster.

MySQL > SHOW COMPUTE NODES\G
*************************** 1. row ***************************
ComputeNodeId: 10001
IP: x.x.x.x
HeartbeatPort: 9050
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
LastStartTime: 2024-05-14 15:45:34
LastHeartbeat: 2024-05-14 15:47:59
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
ErrMsg:
Version: 3.3.0-rc01-3b8cb0c
CpuCores: 4
NumRunningQueries: 0
MemUsedPct: 1.95 %
CpuUsedPct: 0.0 %
HasStoragePath: true
StarletPort: 8167
WorkerId: 1
WarehouseName: default_warehouse
TabletNum: 58
1 row in set (0.00 sec)