nodetool clientstats
Displays information about connected clients.
Synopsis
Section titled “Synopsis”nodetool [connection_options] clientstats [--all] [--by-protocol] [--clear]See connection options for connection options.
Description
Section titled “Description”nodetool clientstats displays statistics about client connections to the Cassandra node. This includes information about connected clients, their protocols, and connection details.
Options
Section titled “Options”| Option | Description |
|---|---|
--all | Include all client information |
--by-protocol | Group statistics by protocol version |
--clear | Clear the statistics |
Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”nodetool clientstatsGrouped by Protocol
Section titled “Grouped by Protocol”nodetool clientstats --by-protocolClear Statistics
Section titled “Clear Statistics”nodetool clientstats --clearOutput Fields
Section titled “Output Fields”| Field | Description |
|---|---|
| Address | Client IP address |
| Connections | Number of connections |
| Protocol version | CQL protocol version |
| User | Authenticated user (if auth enabled) |
Use Cases
Section titled “Use Cases”Monitor Client Connections
Section titled “Monitor Client Connections”# View all connected clientsnodetool clientstats --allProtocol Version Analysis
Section titled “Protocol Version Analysis”# Check which protocol versions are in usenodetool clientstats --by-protocolConnection Troubleshooting
Section titled “Connection Troubleshooting”# Check for unexpected connectionsnodetool clientstats | grep -v expected_client_ipBest Practices
Section titled “Best Practices”Client Stats Guidelines
- Regular monitoring - Track connection patterns
- Protocol awareness - Know which versions clients use
- Security - Identify unexpected connections
- Capacity planning - Monitor connection growth
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| status | Cluster overview |
| info | Node information |
| tpstats | Thread pool statistics |