redis-rdb-tools
redis-rdb-tools copied to clipboard
future request: get total memory used by multiple keys via pattern
Motivation:
most of time the keys in the same scene with the same key prefix and knows how many memory consumed in this scene is meaningful and helpful.
Result:
get total memory used by keys which start with 'keyprefix'
rdb -c memory /var/redis/6379/dump.rdb --pattern 'keyprefix*'
@sripathikrishnan What do you think?
sripathikrishnan isn't active here anymore. i'm currently maintaining this repo, but i don't have much time to contribute either. looks like a good idea, it can be a subclass of the MemoryCallback class, which only sums the total memory rather than giving a detail report, and then allows the user to perform various types of filtering. here are some ideas:
- filter by pattern like you suggested
- filter by type (e.g. hash / set / etc)
- sum only key names excluding values (or the other way around)
pull requests are welcome.