[Redis] redis parses rdb files, memory sorting, etc.
The git address of the tool is https://github.com/sripathikrishnan/redis-rdb-tools
Parsing rdf files
> rdb-- command json / var/redis/6379/dump.rdb
[{
"user003": {"fname": "Ron", "sname": "Bumquist"}
"lizards": ["Bush anole", "Jackson's chameleon", "Komodo dragon", "Ground agama", "Bearded dragon"]
"user001": {"fname": "Raoul", "sname": "Duke"}
"user002": {"fname": "Gonzo", "sname": "Dr"}
"user_list": ["user003", "user002", "user001"]}, {
"baloon": {"helium": "birthdays", "medical": "angioplasty", "weather": "meteorology"}
"armadillo": ["chacoan naked-tailed", "giant", "Andean hairy", "nine-banded", "pink fairy"]
"aroma": {"pungent": "vinegar", "putrid": "rotten eggs", "floral": "roses"}}]
Memory sort
> rdb-c memory / var/redis/6379/dump.rdb-- bytes 128-f memory.csv
> cat memory.csv
Database,type,key,size_in_bytes,encoding,num_elements,len_largest_element
0,list,lizards,241,quicklist,5,19
0,list,user_list,190,quicklist,3,7
2,hash,baloon,138,ziplist,3,11
2,list,armadillo,231,quicklist,5,20
2,hash,aroma,129,ziplist,3,11
Many functions, check the official text specifically!
Other tool references:
Https://mp.weixin.qq.com/s/02NDtPI_CyDLDxAnf_OLdg
Https://www.alibabacloud.com/help/zh/faq-detail/50037.htm-Aliyun rdb+sqllite