nodetool clientstats¶
Displays information about connected clients.
Synopsis¶
nodetool [connection_options] clientstats [--all] [--by-protocol] [--clear]
Description¶
nodetool clientstats displays statistics about client connections to the Cassandra node. This includes information about connected clients, their protocols, and connection details.
Options¶
| Option | Description |
|---|---|
--all |
Include all client information |
--by-protocol |
Group statistics by protocol version |
--clear |
Clear the statistics |
Examples¶
Basic Usage¶
nodetool clientstats
Grouped by Protocol¶
nodetool clientstats --by-protocol
Clear Statistics¶
nodetool clientstats --clear
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¶
Monitor Client Connections¶
# View all connected clients
nodetool clientstats --all
Protocol Version Analysis¶
# Check which protocol versions are in use
nodetool clientstats --by-protocol
Connection Troubleshooting¶
# Check for unexpected connections
nodetool clientstats | grep -v expected_client_ip
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¶
| Command | Relationship |
|---|---|
| status | Cluster overview |
| info | Node information |
| tpstats | Thread pool statistics |