Redis(2.8.3) 命令學習 - Server

來源:互聯網
上載者:User

標籤:

BGREWRITEAOF

Asynchronously rewrite the append-only file

 

BGSAVE

Asynchronously save the dataset to disk

 

CLIENT KILL [ip:port] [ID client-id] [TYPE normal|slave|pubsub] [ADDR ip:port] [SKIPME yes/no]

Kill the connection of a client

 

CLIENT LIST

Get the list of client connections

 

CLIENT GETNAME

Get the current connection name

 

CLIENT PAUSE timeout

Stop processing commands from clients for some time

 

CLIENT SETNAME connection-name

Set the current connection name

 

COMMAND

Get array of Redis command details

More: http://redis.io/commands/command

 

COMMAND COUNT

Get total number of Redis commands

127.0.0.1:6379> COMMAND COUNT(integer) 163

More: http://redis.io/commands/command-count

 

COMMAND GETKEYS

Extract keys given a full Redis command

127.0.0.1:6379> COMMAND GETKEYS MSET a b c d e f1) "a"2) "c"3) "e"127.0.0.1:6379> COMMAND GETKEYS EVAL "not consulted" 3 key1 key2 key3 arg1 arg2 arg3 argN1) "key1"2) "key2"3) "key3"127.0.0.1:6379> COMMAND GETKEYS SORT mylist ALPHA STORE outlist1) "mylist"2) "outlist"

More: http://redis.io/commands/command-getkeys

 

COMMAND INFO command-name [command-name ...]

Get array of specific Redis command details

127.0.0.1:6379> COMMAND INFO get1) 1) "get"   2) (integer) 2   3) 1) readonly      2) fast   4) (integer) 1   5) (integer) 1   6) (integer) 1

More: http://redis.io/commands/command-info

 

CONFIG GET parameter

Get the value of a configuration parameter

 

CONFIG REWRITE

Rewrite the configuration file with the in memory configuration

 

CONFIG SET parameter value

Set a configuration parameter to the given value

 

CONFIG RESETSTAT

Reset the stats returned by INFO

 

DBSIZE

Return the number of keys in the selected database

127.0.0.1:6379> DBSIZE(integer) 0127.0.0.1:6379> SET foo helloOK127.0.0.1:6379> DBSIZE(integer) 1127.0.0.1:6379> MSET a 1 b 2 c 3OK127.0.0.1:6379> DBSIZE(integer) 4

More: http://redis.io/commands/dbsize, http://www.redis.cn/commands/dbsize.html

 

DEBUG OBJECT key

Get debugging information about a key

 

DEBUG SEGFAULT

Make the server crash

 

FLUSHALL

Remove all keys from all databases

More: http://redis.io/commands/flushall, http://www.redis.cn/commands/flushall.html

 

FLUSHDB

Remove all keys from the current database

More: http://redis.io/commands/flushdb, http://www.redis.cn/commands/flushdb.html

 

INFO [section]

Get information and statistics about the server

More: http://redis.io/commands/info, http://www.redis.cn/commands/info.html

 

LASTSAVE

Get the UNIX time stamp of the last successful save to disk

127.0.0.1:6379> LASTSAVE(integer) 1443163307

More: http://redis.io/commands/lastsave, http://www.redis.cn/commands/lastsave.html

 

MONITOR

Listen for all requests received by the server in real time

 

ROLE

Return the role of the instance in the context of replication

127.0.0.1:6379> ROLE1) "master"2) (integer) 03) (empty list or set)

More: http://redis.io/commands/role

 

SAVE

Synchronously save the dataset to disk

 

SHUTDOWN [NOSAVE] [SAVE]

Synchronously save the dataset to disk and then shut down the server

 

SLAVEOF host port

Make the server a slave of another instance, or promote it as master

 

SLOWLOG subcommand [argument]

Manages the Redis slow queries log

 

SYNC

Internal command used for replication

 

TIME

Return the current server time

127.0.0.1:6379> TIME1) "1443239214"2) "873649"

More: http://redis.io/commands/time, http://www.redis.cn/commands/time.html

 

Redis(2.8.3) 命令學習 - Server

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.