开发者

redis memory usage

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜