用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/pippip 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