温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

【Redis】 redis解析rdb文件,内存排序等

发布时间:2020-08-05 05:24:19 来源:ITPUB博客 阅读:195 作者:小亮520cl 栏目:关系型数据库
工具git地址为https://github.com/sripathikrishnan/redis-rdb-tools
解析rdf文件
  1. > rdb --command json /var/redis/6379/dump.rdb

  2. [{
  3. "user003":{"fname":"Ron","sname":"Bumquist"},
  4. "lizards":["Bush anole","Jackson's chameleon","Komodo dragon","Ground agama","Bearded dragon"],
  5. "user001":{"fname":"Raoul","sname":"Duke"},
  6. "user002":{"fname":"Gonzo","sname":"Dr"},
  7. "user_list":["user003","user002","user001"]},{
  8. "baloon":{"helium":"birthdays","medical":"angioplasty","weather":"meteorology"},
  9. "armadillo":["chacoan naked-tailed","giant","Andean hairy","nine-banded","pink fairy"],
  10. "aroma":{"pungent":"vinegar","putrid":"rotten eggs","floral":"roses"}}]

内存排序
  1. > rdb -c memory /var/redis/6379/dump.rdb --bytes 128 -f memory.csv
  2. > cat memory.csv

  3. database,type,key,size_in_bytes,encoding,num_elements,len_largest_element
  4. 0,list,lizards,241,quicklist,5,19
  5. 0,list,user_list,190,quicklist,3,7
  6. 2,hash,baloon,138,ziplist,3,11
  7. 2,list,armadillo,231,quicklist,5,20
  8. 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



向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI