`
sillycat
  • 浏览: 2489469 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Redis(8)Monitor and Data Type Design

 
阅读更多
Redis(8)Monitor and Data Type Design

1. Redis-stat
Try this tool https://github.com/junegunn/redis-stat
> sudo gem install redis-stat

Command to start it can be as follow pattern.
redis-stat localhost:6379 localhost:6380 —server=8080 5 —daemon

I am running single node on my local machine, so I will use this command
> redis-stat localhost:6379 --server=8082 5 --daemon

Stop the daemon
Verify it is running
> ps -ef | grep redis-stat

Kill that
> sudo killall -9 redis-stat-daemon

2. Connect to the Server and Range the Set
> redis-cli -h 127.0.0.1 -p 6379

> MSET 78729_sillycat_engineer_22 "I am value, I know how this job desc 22"
> KEYS *_sillycat_*

This one makes more sences
>zadd 2015-6-11-13-78729-sillycat-engineer 22 "I am a engineer job with 22 cent cpc"
>zadd 2015-6-11-13-78729-sillycat-engineer 33 "I am a engineer job with 33 cent cpc"
>zadd 2015-6-11-13-78729-sillycat-sales 23 "I am a sales job with 23 cent cpc"

Get the highest value by Key
>ZREVRANGE 2015-6-11-13-78729-sillycat-engineer 0 0
1) "I am a engineer job with 33 cent cpc"

List all keys based on zipcode or etc
>KEYS 2015-6-11-13-78729*
1) "2015-6-11-13-78729-sillycat-engineer"
2) "2015-6-11-13-78729-sillycat-sales"

References:
Basic Data Type
http://sillycat.iteye.com/blog/1553507
http://sillycat.iteye.com/blog/1553508
http://sillycat.iteye.com/blog/1553509

Monitor
https://github.com/LittlePeng/redis-monitor
http://redis.io/commands/MONITOR
https://github.com/junegunn/redis-stat

key pattern
http://redis.io/commands/KEYS
http://redis.io/commands/scan
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics