Javatpoint Logo
Javatpoint Logo

Redis Server

Redis Server commands are used to manage Redis Server. There are different server commands which can be used to fetch server information, statistics and other characteristics of server.

Example

Let's take an example to see how to get all statistics and information about the server.

Redis Publish Server 1

Redis Server Commands

Following is a list of some server commands used in Redis database:

Index Command Description
1 BGREWRITEAOF This command is used to asynchronously rewrite the append-only file.
2 BGSAVE This command is used to asynchronously save the dataset to the disk.
3 CLIENT KILL [ip:port] [ID client-id] This command is used to kill the connection of a client.
4 CLIENT LIST This command is used to get the list of client connections to the server.
5 CLIENT GETNAME This command is used to get the name of the current connection.
6 CLIENT PAUSE timeout This command is used to stop processing commands from the clients for a specified time.
7 CLIENT SETNAME connection-name This command is used to set the current connection name.
8 CLUSTER SLOTS This command is used to get an array of Cluster slot to node mappings.
9 COMMAND This command is used to get an array of Redis command details.
10 COMMAND COUNT This command is used to get total number of Redis commands.
11 COMMAND GETKEYS This command is used to extract the keys given a full Redis command.
12 BGSAVE This command is used to asynchronously save the dataset to the disk.
13 COMMAND INFO command-name [command-name ...] This command is used to get an array of specific Redis command details.
14 CONFIG GET parameter This command is used to get the value of a configuration parameter.
15 CONFIG REWRITE This command is used to rewrite the configuration file with the in-memory configuration.
16 CONFIG SET parameter value This command is used to get a configuration parameter to the given value.
17 CONFIG RESETSTAT This command is used to reset the stats returned by INFO.
18 DBSIZE This command is used to return the number of keys in the selected database.
19 DEBUG OBJECT key This command is used to get debugging information about a key.
20 DEBUG SEGFAULT This command is used to make the server crash.
21 FLUSHALL This command is used to remove all the keys from all databases.
22 FLUSHDB This command is used to remove all the keys from the current database.
23 INFO [section] This command is used to get information and statistics about the server.
24 LASTSAVE This command is used to retrieve the UNIX time stamp of the last successful save to the disk.
25 MONITOR This command is used to listen for all the requests received by the server in real time.
26 ROLE This command is used to return the role of the instance in the context of replication.
27 SAVE This command is used to synchronously saves the dataset to the disk.
28 SHUTDOWN [NOSAVE] [SAVE] This command is used to synchronously saves the dataset to the disk and then shuts down the server .
29 SLAVEOF host port This command is used to make the server a slave of another instance, or promotes it as a master .
30 SLOWLOG subcommand [argument] This command is used to manage the Redis slow queries log.
31 SYNC This command is used for replication.
32 TIME This command is used to return the current server time.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA