127.0.0.1:6379> memory help 1) MEMORY <subcommand> [<arg> [value] [opt] ...]. Subcommands are: 2) DOCTOR 3) Return memory problems reports. 4) MALLOC-STATS Return internal statistics report from the memory allocator. 5) PURGE 6) Attempt to purge dirty pages for reclamation by the allocator. 7) STATS 8) Return information about the memory usage of the server. 9) USAGE <key> [SAMPLES <count>] 10) Return memory in bytes used by <key> and its value. Nested values are 11) sampled up to <count> times (default: 5). 12) HELP 13) Prints this help.
127.0.0.1:6379> memory doctor #无问题 Hi Sam, I can't find any memory issue in your instance. I can only account for what occurs on this base.
#有问题 Sam, I detected a few issues in this Redis instance memory implants: * Peak memory: In the past this instance used more than 150% the memory that is currently using. The allocator is normally not able to release memory after a peak, so you can expect to see a big fragmentation ratio, however this is actually harmless and is only due to the memory peak, and if the Redis instance Resident Set Size (RSS) is currently bigger than expected, the memory will be used as soon as you fill the Redis instance with more data. If the memory peak was only occasional and you want to try to reclaim memory, please try the MEMORY PURGE command, otherwise the only other option is to shutdown and restart the instance.
I'm here to keep you safe, Sam. I want to help you.
1) CLIENT <subcommand> [<arg> [value] [opt] ...]. Subcommands are: 2) CACHING (YES|NO) 3) Enable/disable tracking of the keys for next command in OPTIN/OPTOUT modes. 4) GETREDIR 5) Return the client ID we are redirecting to when tracking is enabled. 6) GETNAME 7) Return the name of the current connection. 8) ID 9) Return the ID of the current connection. 10) INFO 11) Return information about the current client connection. 12) KILL <ip:port> 13) Kill connection made from <ip:port>. 14) KILL <option> <value> [<option> <value> [...]] 15) Kill connections. Options are: 16) * ADDR (<ip:port>|<unixsocket>:0) 17) Kill connections made from the specified address 18) * LADDR (<ip:port>|<unixsocket>:0) 19) Kill connections made to specified local address 20) * TYPE (normal|master|replica|pubsub) 21) Kill connections by type. 22) * USER <username> 23) Kill connections authenticated by <username>. 24) * SKIPME (YES|NO) 25) Skip killing current connection (default: yes). 26) LIST [options ...] 27) Return information about client connections. Options: 28) * TYPE (NORMAL|MASTER|REPLICA|PUBSUB) 29) Return clients of specified type. 30) UNPAUSE 31) Stop the current client pause, resuming traffic. 32) PAUSE <timeout> [WRITE|ALL] 33) Suspend all, or just write, clients for <timout> milliseconds. 34) REPLY (ON|OFF|SKIP) 35) Control the replies sent to the current connection. 36) SETNAME <name> 37) Assign the name <name> to the current connection. 38) UNBLOCK <clientid> [TIMEOUT|ERROR] 39) Unblock the specified blocked client. 40) TRACKING (ON|OFF) [REDIRECT <id>] [BCAST] [PREFIX <prefix> [...]] 41) [OPTIN] [OPTOUT] 42) Control server assisted client side caching. 43) TRACKINGINFO 44) Report tracking status for the current connection. 45) HELP 46) Prints this help.
五、config
六、slowlog
slowlog help
1 2 3 4 5 6 7 8 9 10 11 12
1) SLOWLOG <subcommand> [<arg> [value] [opt] ...]. Subcommands are: 2) GET [<count>] 3) Return top <count> entries from the slowlog (default: 10). Entries are 4) made of: 5) id, timestamp, time in microseconds, arguments array, client IP and port, 6) client name 7) LEN 8) Return the length of the slowlog. 9) RESET 10) Reset the slowlog. 11) HELP 12) Prints this help.
七、monitor
八、type
九、object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1) OBJECT <subcommand> [<arg> [value] [opt] ...]. Subcommands are: 2) ENCODING <key> 3) Return the kind of internal representation used in order to store the value 4) associated with a <key>. 5) FREQ <key> 6) Return the access frequency index of the <key>. The returned integer is 7) proportional to the logarithm of the recent access frequency of the key. 8) IDLETIME <key> 9) Return the idle time of the <key>, that is the approximated number of 10) seconds elapsed since the last access to the key. 11) REFCOUNT <key> 12) Return the number of references of the value associated with the specified 13) <key>. 14) HELP 15) Prints this help.