replication 명령어
replicaof <ip> <port> : replica 설정
replicaof no one : replica 해제
config rewrite : config변경내용 저장
$ redis-cli --stat : Redis인스턴스 실시간 모니터링( -i <interval )
ubuntu@docker1:~/redis-alone$ redis-cli --stat
------- data ------ --------------------- load -------------------- - child -
keys mem clients blocked requests connections
25 878.99K 2 0 22 (+0) 3
25 878.99K 2 0 23 (+1) 3
25 878.99K 2 0 24 (+1) 3
27 879.37K 2 0 31 (+7) 3
31 880.13K 2 0 44 (+13) 3
35 881.16K 2 0 57 (+13) 3
38 881.73K 2 0 67 (+10) 3
41 882.32K 2 0 77 (+10) 3
43 882.70K 2 0 84 (+7) 3
$ redis-cli --bigkeys : 키 공간 분석기
buntu@docker1:~/redis-alone$ 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 hash found so far 'adFrequency:169169' with 4 fields
[21.57%] Biggest set found so far 'adFrequency' with 50 members
-------- summary -------
Sampled 51 keys in the keyspace!
Total key length in bytes is 911 (avg len 17.86)
Biggest hash found 'adFrequency:169169' has 4 fields
Biggest set found 'adFrequency' has 50 members
0 lists with 0 items (00.00% of keys, avg size 0.00)
50 hashs with 200 fields (98.04% of keys, avg size 4.00)
0 strings with 0 bytes (00.00% of keys, avg size 0.00)
0 streams with 0 entries (00.00% of keys, avg size 0.00)
1 sets with 50 members (01.96% of keys, avg size 50.00)
0 zsets with 0 members (00.00% of keys, avg size 0.00)
monitor : 실시간으로 수행되는 명령어 모니터링
ubuntu@docker1:~/redis-alone$ redis-cli monitor
OK
1651545312.539852 [0 100.51.2.78:40062] "DEL" "adFrequency:118809"
1
scan
127.0.0.1:3000> scan 0 MATCH adFre* COUNT 5
1) "24"
2) 1) "adFrequency:169169"
2) "adFrequency:143070"
3) "adFrequency:114371"
4) "adFrequency:187734"
5) "adFrequency:146408"
127.0.0.1:3000>
반응형