Skip to content

Commit

Permalink
Add cluster section into the info command (#87)
Browse files Browse the repository at this point in the history
This was added in apache/kvrocks#1379
  • Loading branch information
enjoy-binbin authored Apr 14, 2023
1 parent eda7910 commit 631c7cd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/info-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The optional section parameter can be used to select a specific section of infor
| replication | Master/replica replication information |
| cpu | CPU consumption statistics |
| commandstats | Kvrocks command statistics |
| cluster | Cluster section |
| keyspace | Database related statistics |
| rocksdb | RocksDB related statistics |

Expand Down Expand Up @@ -75,6 +76,9 @@ used_cpu_user:0
cmdstat_command:calls=1,usec=904,usec_per_call=904
cmdstat_info:calls=1,usec=0,usec_per_call=0

# Cluster
cluster_enabled:0

# Keyspace
# Last scan db time: Thu Jan 1 08:00:00 1970
db0:keys=0,expires=0,avg_ttl=0,expired=0
Expand Down Expand Up @@ -227,6 +231,14 @@ Here is the meaning of all fields in the cpu section:
| used_cpu_sys | System CPU consumed by the Kvrocks server, which is the sum of system CPU consumed by all threads of the server process (main thread and background threads) |
| used_cpu_user | User CPU consumed by the Kvrocks server, which is the sum of user CPU consumed by all threads of the server process (main thread and background threads) |

## Cluster section

Here is the meaning of all fields in the cluster section:

| Property | Desc |
|------------------|----------------------------------------------------------|
| cluster_enabled | Indicate Kvrocks cluster is enabled |

## Keyspace section

The keyspace section provides statistics on the main dictionary of each database. The statistics are the number of keys, and the number of keys with an expiration. Note that Kvrocks only have `db0` and keys statistics wasn't manipulated in memory, so we need to use the `dbsize scan` to async scan and calculate the keys number like below:
Expand Down

0 comments on commit 631c7cd

Please sign in to comment.