开发者

redis memory usage

开发者 https://www.devze.com 2023-03-05 21:47 出处:网络
How to get redis memory usage through java. For example im getting the dbsize of redis through Jedis java class, using the ethod dbsize() method in that jedis class. Is there any similar method for ge

How to get redis memory usage through java. For example im getting the dbsize of redis through Jedis java class, using the ethod dbsize() method in that jedis class. Is there any similar method for getting the memory usage? Thank开发者_如何学JAVAs in Advance.


To get memory used my Redis, you can run the INFO command. It will give you a lot of useless info, but somewhere in there will be used_memory and used_memory_human

root@this:~# redis-cli
redis> info
redis_version:2.2.4
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:32
...
used_memory:551084
used_memory_human:538.17K
used_memory_rss:1249280
...
0

精彩评论

暂无评论...
验证码 换一张
取 消