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') # ...
随机推荐
- 3.2 while 循环
Python 编程中 while 语句用于循环执行程序,即在条件满足的情况下,循环执行某段代码.所以就需要在循环的代码块中设计一种使代码块循环执行一定次数后是while语句的条件不满足,从而中止whi ...
- uva 1583
枚举1~100000把所有数的最小generators记录下来,直接查表即可. AC代码: #include<cstdio> #include<cstring> #includ ...
- 高并发场景下的httpClient优化使用
1.背景 我们有个业务,会调用其他部门提供的一个基于http的服务,日调用量在千万级别.使用了httpclient来完成业务.之前因为qps上不去,就看了一下业务代码,并做了一些优化,记录在这里. 先 ...
- JDBC底层原理
Class.forName(“com.mysql.jdbc.Driver”)是 强制JVM将com.mysql.jdbc.Driver这个类加载入内存,并将其注册到DriverManager类,然后根 ...
- openstack-ocata-环境准备1
Openstack环境准备1. 最少两台机器2. Controller:1核cpu 4G内存 5G硬盘3. Computer:1核cpu 2G内存 10G硬盘4. 至少两个网卡,本次采用四个网卡(1网 ...
- linux pxe网络装机无人值守
项目分析远程装机的实现:配置DHCP+HTTP+TFTP提供通过vesamenu.c32模块实现图形PXE菜单为不同系统分别提供ks应答文件将第三方rpm包以yum源的方式提供:集中提供ntfs-3g ...
- 关于我上传的activiti自定义流程demo的说明
最近又收到了一些询问activiti的问题,其中好几个都是向我索要我上传的这个activiti自定义流程demo的数据库设计. 索要的多了,而我早就把这个库给删掉了,所以我便觉得有必要做一个说明: 我 ...
- caffe+CPU︱虚拟机+Ubuntu16.04+CPU+caffe安装笔记
由于本机是window10系统,所以想尝试caffe就在自己电脑上整了一个虚拟机(详情可见:win10系统搭建虚拟机:VMware Workstation Player 12环境+Ubuntu Kyl ...
- Unhandled event loop exception GC overhead limit exceeded
1.错误描述 java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.zip.ZipFile.<init>( ...
- 芝麻HTTP:如何寻找爬虫入口
寻找爬虫入口 1 .本次任务的入口 这个爬虫的更好的入口就是我们平常使用的搜索引擎.搜索引擎虽然有很多种,但是其实都是在干一件事,收录网页,处理,然后提供搜索服务.在平时使用的过程中,我们通常都是直接 ...