【Redis】 redis解析rdb檔案,記憶體排序等

小亮520cl發表於2018-05-07
工具git地址為
解析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

--阿里雲 rdb+sqllite



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29096438/viewspace-2154076/,如需轉載,請註明出處,否則將追究法律責任。

相關文章