php - How can I get the amount of memory that remains for Redis -


with redis command info can current memory usage:

for example:

  'used_memory' => int 600832   'used_memory_human' => string '586.75k' (length=7)   'used_memory_rss' => int 1998848   'used_memory_peak' => int 845056   'used_memory_peak_human' => string '825.25k' (length=7)   'used_memory_lua' => int 31744 

and want check how memory left redis. way see check cat /proc/meminfo , compare it. there other way it?

there no built-in functionality in redis supply information.

the available memory machine-wide. parsing /proc/meminfo indeed way info.

see here python example: nagios plugins check_memory

we use similar script on our dedicated redis machines (which run several redis-server instances piece), send alerts our in-house exception handling portal when our memory limit reached.

kind regards, tw


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -