Redis live
Redis Live是一个用来监控redis实例,分析查询语句并且有web界面的监控工具,使用python编写
Install Dependencies
- tornado pip install tornado
- redis.py pip install redis
- python-dateutil pip install python-dateutil
if you’re running Python < 2.7: - ** argparse** pip install argparse
官方说明: http://www.nkrode.com/article/real-time-dashboard-for-redis
pip
下载地址: https://pypi.python.org/pypi/pip#downloads
pip 依赖 setuptools
Finished processing dependencies for setuptools==32.3.1
1 | $tar -zxvf pip-9.0.1.tar.gz |
Finished processing dependencies for python-dateutil==2.6.0
Finished processing dependencies for redis==2.10.5
1 | $sudo apt-get install build-essential python-dev |
Dpkg: Warning: ** ldconfig ** could not be found in the PATH environment variable or no executable privileges
Tip: The root PATH environment variable should normally contain ** / usr / local / sbin, / usr / sbin, and / sbin **
1 | $locate ldconfig #sbin目录存在 ldconfig |
Finished processing dependencies for tornado==4.5.dev1
列出安装的packages
1 | $ sudo pip freeze |
redislive
1 | git clone https://github.com/kumarnitin/RedisLive.git |
配置文件redis-live.conf【redis-live.conf.example】
1 | { |
启动服务
1 | ./redis-monitor.py --duration=30 //启动监控,duration是心跳时间 |
env: …py 权限不够
给予执行权
1 | chmod +x redis-monitor.py |