首页 > 其他分享 >rdb-tools查询大key

rdb-tools查询大key

时间:2022-11-21 16:24:42浏览次数:73  
标签:bin local rdb usr key memory tools

用redis自带命令查询大keyredis-cli -h 192.168.246.74 -p 6390 --bigkeys



yum install python-devel #
在安装python-lzf之前,要安装python-devel依赖包,否则安装会失败
ln -s /usr/local/python36/bin/pip3 /usr/local/bin/pip
pip install rdbtools python-lzfln -s /usr/local/python36/bin/rdb /usr/bin/rdb
导出csv
rdb -c memory dump-6379.rdb -f red6379.csv
# 查询占用最大的3个key
rdb -c memory -l 3 dump-6379.rdb
# 查询key信息
ln -s /usr/local/python36/bin/redis-memory-for-key /usr/local/bin/redis-memory-for-keyredis-memory-for-key -s 192.168.246.74 -p 6390 key名
# Centos6更换腾讯的yum源 wget http://mirrors.cloud.tencent.com/repo/centos6_base.repo && sed -i 's#http#https#g' centos6_base.repo &&  yum clean all & yum makecache fastsed -i 's#http#https#g' centos6_base.repo yum clean allyum makecache fast

来自为知笔记(Wiz)

标签:bin,local,rdb,usr,key,memory,tools
From: https://www.cnblogs.com/kaixin940/p/16911764.html

相关文章