Skip to content

Instantly share code, notes, and snippets.

@zhongql
zhongql / ReadMe.md
Created May 22, 2017 10:02 — forked from iBaozi/ReadMe.md
redis 查看指定key 占用大小。用复制,查看增量方法,注意不要用于过大的key

#步骤(How to use it)

  1. 保存脚本到(Save script as ) redis_size.lua
  2. 注册脚本 (Load script)
    redis-cli -h 192.168.1.1 -p 6371 script load "$(cat redis_size.lua)"
  3. 调用(Call it)
    evalsha 78331e1d4741cad34084d357e19ce6dbca8e202e 0 test_key // 注意与上步返回的一致