redis's usage
author:headsen chen
date:2017-12-07 16:33:40
notice:This article is created by headsen chen ,and not allowed to copy,or you will counter law question.
install:
yum -y install epel-release
yum -y install redis
modify redis's control file:
vim /etc/redis.conf
bind 192.168.1.10 # just listen the real ip of localhost.
daemonize yes # redis can work in daemon states,and when machine is open and redis service is running.
start:
systemctl enable redis
systemctl start redis
manage:
[root@node1 tmp]# redis-cli -h 192.168.1.10
192.168.13.164:6379[6]> info # to show more detail of redis
...
# Keyspace
db6:keys=2,expires=0,avg_ttl=0 # db6 means database is 6 and keys=2 means in 6 has two keys
192.168.13.164:6379[6]> keys * # keys * show keys name
1) "nginx-log"
2) "system"
192.168.13.164:6379[6]> llen system # see system key information,means that has 121962 values in this key not read ,and when readed for all ,will change to 0
(integer) 121962
192.168.13.164:6379[6]> LINDEX system -1 # to see the latest message of system key
"{\"message\":\"Dec 7 16:37:50 node1 elasticsearch: [2017-12-07 16:37:50,074][WARN ][monitor.jvm ] [node-1] [gc][young][80898][1132] duration [2.8s], collections [1]/[2.9s], total [2.8s]/[1.5m], memory [135.7mb]->[119.2mb]/[1015.6mb], all_pools {[young] [40.1mb]->[21.8mb]/[66.5mb]}{[survivor] [6.9mb]->[8.3mb]/[8.3mb]}{[old] [88.6mb]->[89.1mb]/[940.8mb]}\",\"@version\":\"1\",\"@timestamp\":\"2017-12-07T08:37:52.085Z\",\"path\":\"/var/log/messages\",\"host\":\"node1.com\",\"type\":\"system\"}"
192.168.13.164:6379[6]> quit # exit of redis managerment
[root@node1 tmp]#
redis's usage的更多相关文章
- Redis: Reducing Memory Usage
High Level Tips for Redis Most of Stream-Framework's users start out with Redis and eventually move ...
- 161128、Redis 4.0发布及其新功能介绍
Redis 4.0-rc1 发布了,这是 4.0 的首个 RC 版.Redis 是一个高性能的key-value数据库.Redis 的出现,很大程度补偿了memcached这类keyvalue存储的不 ...
- Redis 4.0新功能介绍
Redis 的作者 antirez 在三天之前通过博客文章<The first release candidate of Redis 4.0 is out>发布了 Redis 4.0 的第 ...
- redis的数据持久化策略
redis提供了两种不同的持久化方法来将数据存储到硬盘里面.一种方法叫快照,它可以将存在于某一时刻的所有数据都写入硬盘里面.另一种方法叫只追加文件(AOF),它会在执行写命令时,将被执行的写命令复制到 ...
- Lazy freeing of keys 对数据的额异步 同步操作 Redis 4.0 微信小程序
https://github.com/antirez/redis/blob/4.0-rc1/00-RELEASENOTES 数据缓存 · 小程序 https://developers.weixin.q ...
- (十二)zabbix监控redis
1)agent端配置 安装redis yum install epel-release -y yum install redis -y 配置认证密码 #vim /etc/redis.conf requ ...
- 【特性】Redis4.0新特性
模块系统 Redis 4.0 发生的最大变化就是加入了模块系统, 这个系统可以让用户通过自己编写的代码来扩展和实现 Redis 本身并不具备的功能, 具体使用方法可以参考 antirez 的博文< ...
- Redis4.0新特性(一)-Memory Command
Redis4.0版本增加了很多诱人的新特性,在redis精细化运营管理中都非常有用(猜想和antirez加入redislabs有很大关系):此系列几篇水文主要介绍以下几个新特性的使用和效果. Redi ...
- Redis client Python usage
http://www.yiibai.com/redis/redis_sorted_sets.html mport redis r_server = redis.Redis('localhost') # ...
随机推荐
- POJ - 1733 Parity game 种类并查集+离散化
思路:d(i, j)表示区间(i, j]的1的个数的奇偶性.输入最多共有5000*2个点,需要离散化处理一下.剩下的就是并查集判冲突. AC代码 #include <cstdio> #in ...
- MinGW下简单编译FFmpeg
2009.03.21补充:ffmpeg-0.5正式发布,地址为:[url]http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2[/url].修改了第7步, ...
- u盘安装ubuntu10.04 、11.04 server
10.04 先将 ubuntu server 的 iso 放到优盘上,然后在提示无法找到光驱时,按 alt+f2 打开一个新的 console 窗口,将 iso mount 上,具体操作如下: ls ...
- FindBugs找到错误(一)
FindBugs找到错误(一) 错误类型: SBSC_USE_STRINGBUFFER_CONCATENATION
- zTree实现删除树子节点
zTree实现删除树子节点 1.实现源码 <!DOCTYPE html> <html> <head> <title>zTree实现基本树</tit ...
- Caused by: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index
1.错误描述 WARN:2015-05-01 16:45:37[main] - Exception encountered during context initialization - cancel ...
- Linux显示目前与过去登入系统的用户相关信息
Linux显示目前与过去登入系统的用户相关信息 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ last youhaido pts/0 :0 Sat Jan 2 ...
- IOLI-crackme0x06-0x09 writeup
前几天写了使用Radare2并用3中方法来解决crackme0x00, 然后紧接着第二天 就写了另外5个writeup, 如果认真看会发现那几个crackme的分析也是一开始 走了很多弯路, 但玩多了 ...
- 数据分析神器Colab的初探
为什么要使用Colab 使用过Jupyter(参看<「极客时间」带来的社区价值思考>章节:社区交流的基建设施)的朋友,一定会醉心于它干净简洁的设计,以及在"摆脱Python命令行 ...
- 【Luogu3804】【模板】后缀自动机(后缀自动机)
[Luogu3804][模板]后缀自动机(后缀自动机) 题面 洛谷 题解 一个串的出现次数等于\(right/endpos\)集合的大小 而这个集合的大小等于所有\(parent\)树上儿子的大小 这 ...