The Memory Edition (Cluster Architecture) encapsulates VIP, providing the user experience of a standalone version under cluster mode, bringing immense convenience to business operations. In operational scenarios, there may be a frequent need to access each node in the cluster to locate anomalies. A custom command adds a parameter, "Node ID", based on the existing command parameter list. The command format is COMMAND arg1 arg2 ... [Node ID], facilitating the retrieval of information from a specified node. Node ID information can be obtained from the Redis Console on the Node Management page, or through the cluster nodes command.
Release notes
In proxy agent versions prior to v5.5.0, the node ID is required for the execution of customized commands, but it is not required in v5.5.0 and later.
INFO
This command returns the information and statistics of a server.
Custom command format
info [section][node ID]
Here, optional parameters can be used to select a specific part of the information:
server: The general information about the Redis server
clients: The information of connected clients
memory: The information of memory usage.
persistence: The information of RDB and AOF
stats: General statistical data
replication: The information of master/replica replication
cpu: The information of CPU usage
commandstats: The statistics of Redis commands
cluster: The information of a Redis cluster
keyspace: Database-related statistics
Optional parameters can also take the following values:
The following example runs the INFO command with section being server:
SLOWLOG
To read slow logs, use the SLOWLOG GET command, which returns each entry in the slow logs. You can choose to return only the N most recent entries and pass other parameters to the command (e.g., SLOWLOG GET 10).
Custom command format
slowlog get [Redis node ID]
slowlog get [slow log quantity][Redis node ID]
Sample Code
FLUSHDB
This command deletes all keys of the currently selected database. It will never fail.