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') # ...
随机推荐
- 算法提高 拿糖果 线性DP
题目链接:拿糖果 思路:首先给小于根号n的素数打表.d(i)表示当前剩余i颗糖,最多可以拿到多少糖. 转移方程:d(i) = max(d(i), k + d(i - 2 * k)),此处k表示 ...
- 使用line_profiler查看api接口函数每行代码执行时间
项目情景描述: 在restful架构风格的项目交付测试的过程中,某接口出现 请求超时导致的http 502 Bad Gateway,于是开始排查具体是接口函数中的哪行代码或函数 响应时间过长导致的50 ...
- H3C虚拟化之IRF
SA system-view irf domain 10 irf member 1 ren 1 y int ten 1/0/50 shu qu irf-port 1/1 port group int ...
- Linux定时及mysql远程
(1)crontab crontab使用方法: (1)使用命令 crontab -e 然后直接编辑定时脚本. 这样执行以后,属于用户自定义的,会被写到 /var/spool/cron 目录下,生成一个 ...
- Redis多服务器负载均衡的实现
集群是一组相互独立的.通过高速网络互联的计算机,它们构成了一个组,并以单一系统的模式加以管理.一个客户与集群相互作用时,集群像是一个独立的服务器.集群配置是用于提高可用性和可缩放性. 上图是三个主服务 ...
- 0_OpenCV3.4.0+Visual Studio2017 + win10环境配置
研究生学习方向是计算机视觉,因此想从传统的算法开始,于是尝试安装Opencv做一些项目.在安装过程中碰到很多问题,搭建成功后立刻记录下来,一遍以后查看. 安装环境:windows10 64bit 专业 ...
- LVDS/DVI/HDMI Interface
数字视频信号 以SXGA为例,其时序如下: 垂直: 水平: 图中DSPTMG为使能信号,VSYNC为场同步信号,HSYNC为行同步信号.在行场的消隐期(T1与T7),DSPTMG为低电 ...
- Android 进程常驻、进程守护、进程保活技术的总结
转载自:http://blog.csdn.net/marswin89/article/details/50917098 这是一个轻量级的库,配置几行代码,就可以实现在Android上实现进程常驻,也就 ...
- TOE(TCP/IP Offload Engine)网卡与一般网卡的区别
TCP减压引擎,第一次听说这个名词,但是并不是一个新的概念了,若干年前听说过设备厂商在研究在FPGA之中实现TCP Stack,但是后来没有听到任何的产品出来,应该是路由设备to host的traff ...
- freemarker自定义标签报错(七)
1.错误描述 六月 09, 2014 11:11:09 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template proc ...