工具git地址为https://github.com/sripathikrishnan/redis-rdb-tools
解析rdf文件
-
> 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"}}]
内存排序
-
> 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
很多功能,具体查看官文吧!
其他工具参考:
https://mp.weixin.qq.com/s/02NDtPI_CyDLDxAnf_OLdg
https://www.alibabacloud.com/help/zh/faq-detail/50037.htm --阿里云 rdb+sqllite
当前题目:【Redis】redis解析rdb文件,内存排序等
文章网址:https://www.cdcxhl.com/article32/gphjpc.html
成都网站建设公司_创新互联,为您提供网站改版、企业建站、域名注册、手机网站建设、软件开发、品牌网站制作
广告
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源:
创新互联