website/docs/commands/server.md
COMMAND
Return an array with details about every Garnet command.
Array reply: a nested list of command details.
COMMAND COUNT
Returns Integer reply of number of total commands in this Garnet server.
Integer reply: the number of commands returned by COMMAND.
COMMAND DOCS [command-name [command-name ...]]
Return documentary information about commands.
By default, the reply includes all of the server's commands. You can use the optional command-name argument to specify the names of one or more commands.
Array reply: a map, as a flattened array, where each key is a command name, and each value is the documentary information.
COMMAND GETKEYS command-name [arg [arg ...]]
Returns an array of keys that would be accessed by the given command.
command-name: The name of the command to analyzearg: The arguments that would be passed to the commandArray reply: a list of keys that the command would access.
COMMAND GETKEYSANDFLAGS command-name [arg [arg ...]]
Returns an array of key names and access flags for keys that would be accessed by the given command.
command-name: The name of the command to analyzearg: The arguments that would be passed to the commandArray reply: a nested array where each item contains:
COMMAND INFO [command-name [command-name ...]]
Returns Array reply of details about multiple Garnet commands.
Same result format as COMMAND except you can specify which commands get returned.
If you request details about non-existing commands, their return position will be nil.
Array reply: a nested list of command details.
COMMITAOF
This command manually issues a commit to write ahead logging (append-only file)
Simple string reply: AOF file committed
CONFIG GET parameter [parameter ...]
The CONFIG GET command is used to read the configuration parameters of a running Garnet server.
Array reply: a list of configuration parameters matching the provided arguments.
CONFIG SET parameter value [parameter value ...]
The CONFIG SET command is used in order to reconfigure the server at run time without the need to restart Garnet.
Simple string reply: OK when the configuration was set properly. Otherwise an error is returned.
DBSIZE
Return the number of keys in the currently-selected database.
Integer reply: the number of keys in the currently-selected database.
DEBUG [subcommand [...]]
The DEBUG command is an internal command. It is meant to be used for developing and testing the server and its clients. See DEBUG HELP for subcommand list. It's disabled by default unless EnableDebugCommand option is set or --enable-debug-command command line option is used.
FLUSHALL [ASYNC | SYNC]
Delete all the keys of all the existing databases, not just the currently selected one. This command never fails.
Simple string reply: OK.
FLUSHDB [ASYNC | SYNC]
Delete all the keys of the currently selected DB. This command never fails.
Simple string reply: OK.
LATENCY HELP
Returns all the supported LATENCY sub-commands
Array reply: a list of LATENCY supported sub-command details.
LATENCY HISTOGRAM [event [event ...]]
Return latency histogram of or more <event> classes.
If no commands are specified then all histograms are replied
Array reply
LATENCY RESET [event [event ...]]
Reset latency data of one or more <event> (default: reset all data for all event classes).
Simple string reply: OK.
SLOWLOG GET [count]
Returns entries in the slow log. The default is to return the latest 10 entries. Use a negative count to return all entries.
SLOWLOG LEN
Returns the length of the slow queries log.
SLOWLOG RESET
Reset the slow log (discard all existing entries).
SLOWLOG HELP
Returns a list of supported SLOWLOG sub-commands.
MEMORY USAGE key [SAMPLES count]
The MEMORY USAGE command reports the number of bytes that a key and its value require to be stored in RAM.
One of the following:
REPLICAOF <host port | NO ONE>
The REPLICAOF command can change the replication settings of a replica on the fly.
Simple string reply: OK.
ROLE
Provide information on the role of a Redis instance in the context of replication, by returning if the instance is currently a master, slave, or sentinel. The command also returns additional information about the state of the replication (if the role is master or slave) or the list of monitored master names (if the role is sentinel).
The command returns an array of elements. The elements of the array depends on the role.
The master output is composed of the following parts:
master.The replica output is composed of the following parts:
slave, because of backward compatibility (see note at the end of this page).connect (the instance needs to connect to its master), connecting (the master-replica connection is in progress), sync (the master and replica are trying to perform the synchronization), connected (the replica is online).SLAVEOF <host port | NO ONE>
The SLAVEOF command can change the replication settings of a slave on the fly.
Simple string reply: OK.
SWAPDB index1 index2
This command swaps two Garnet databases, so that immediately all the clients connected to a given database will see the data of the other database, and the other way around.
Simple string reply: OK.
TIME
The TIME command returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second. Basically the interface is very similar to the one of the gettimeofday system call.
Array reply: specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count.
MONITOR
MONITOR is a debugging command that streams back every command processed by the Redis server. It can help in understanding what is happening to the database.
Non-standard return value. Dumps the received commands in an infinite flow.