- x reading a parameter from standard input
such as:
Echo–en "Shaw" |. /redis-cli–x SetName = = Set name Shaw
- R repeats the number of times a command is specified
- I. set the interval for command execution
such as:
| 12345 |
[[email protected]_Redis1 src]# ./redis-cli -r 100 -i 1 info | grep total_commands_processed # 每隔1秒执行一次,共执行100次info命令total_commands_processed:140total_commands_processed:141total_commands_processed:142total_commands_processed:143 |
--rdb gets the specified Redis instance of Rdb file, save to local
For example:
| 123 |
[[email protected]_Redis1 src]# ./redis-cli --rdb /home/tools/6379.rdbSYNC sent to master, writing 31 bytes to ‘/home/tools/6379.rdb‘Transfer finished with success. |
--scan Use Scan Command Scan lists Redis in the Key
--pattern Specifies the scanned Key of the pattern, compared to keys Pattern mode, does not block for a long time Redis while the command requests from other clients remain blocked
For example:
| 12 |
[[email protected]_Redis1 src]# ./redis-cli --scan --pattern ‘na*‘name |
- H Specifies the linked IP
- P Specify the connection port
-A Specify the password for the connected user, or you can connect Auth Command Complete Authorization
- S only the client and the server are on the same machine and can be UNIX Sockets Way to connect
--stat Get Redis the diagnostic data
For example :
| 1234567 |
[[email protected]_Redis1 src]# ./redis-cli --stat------- data ------ --------------------- load -------------------- - child -keys mem clients blocked requests connections 1 1.78M 1 0 169 (+0) 22 1 1.78M 1 0 170 (+1) 22 1 1.78M 1 0 171 (+1) 22 1 1.78M 1 0 172 (+1) 22 |
--pipe Send the original Redis Protocl format data to server-side Execution
--bigkeys the Redis in the Key sampling to find the larger Keys, You can also get approximate data statistics based on sampling.
For example :
| 12345678910111213141516 |
[[email protected]_Redis1 src]# ./redis-cli --bigkeys# Scanning the entire keyspace to find biggest keys as well as# average sizes per key type. You can use -i 0.1 to sleep 0.1 sec# per 100 SCAN commands (not usually needed).[00.00%] Biggest string found so far ‘name‘ with 4 bytes-------- summary -------Sampled 1 keys in the keyspace!Total key length in bytes is 4 (avg len 4.00)Biggest string found ‘name‘ has 4 bytes1 strings with 4 bytes (100.00% of keys, avg size 4.00)0 lists with 0 items (00.00% of keys, avg size 0.00)0 sets with 0 members (00.00% of keys, avg size 0.00)0 hashs with 0 fields (00.00% of keys, avg size 0.00)0 zsets with 0 members (00.00% of keys, avg size 0.00) |
--latency gets the request time to the command, including (MIN,MAX,AVG)
To be supplemented and perfected ...
Redis second (redis basic command)