-
Notifications
You must be signed in to change notification settings - Fork 0
STATS
Young Yu edited this page May 26, 2024
·
4 revisions
Returns information about the entire system and about each stash. The information returned includes:
- On-heap memory stats
- Off-heap memory stats
- Disk stats
- General stash info
- Info about each stash (similar to when running the INFO command).
- Replication info (this is different for master and slave nodes)
stats
In the example below, we request the stats from a master node.
> stats
Heap memory stats (bytes):
- Used: 47788832
- Max: 4294967296
- Available: 4247178464
- Committed: 113246208
Non-heap memory stats (bytes):
- Used: 63994048
- Max: -1
- Available: -1
Disk stats (bytes):
- Free space: 193293123584
- Total space: 494384795648
- Usable space: 193293123584
General stash stats:
- Number of stashes: 1
- Stash limit: 100
Specific stash stats:
Name: default
- Number of keys: 1
- Max keys allowed: 1000000
- Off-heap: true
- Snapshots enabled: false
Replication:
- Read replica: false
- Read replica count: 1
Replica locations:
- /192.168.1.239:5050
In this second example, we request stats about a read replica node.
> stats
Heap memory stats (bytes):
- Used: 45671168
- Max: 4294967296
- Available: 4249296128
- Committed: 113246208
Non-heap memory stats (bytes):
- Used: 63366576
- Max: -1
- Available: -1
Disk stats (bytes):
- Free space: 193294729216
- Total space: 494384795648
- Usable space: 193294729216
General stash stats:
- Number of stashes: 1
- Stash limit: 100
Specific stash stats:
Name: default
- Number of keys: 0
- Max keys allowed: 1000000
- Off-heap: true
- Snapshots enabled: false
Replication:
- Read replica: true
- Master port: 4000
- Master ip: localhost
For how to send commands directly through the TCP connection, see the protocol section.
STATS
STATS
would be encoded as:
5\r\nSTATS