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') # ...
随机推荐
- Ubuntu17.10下启动Rancher
1.安装Docker: 获取最新的docker安装包 wget -qO- https://get.docker.com/ | sh 2.启动docker后台服务: service docker sta ...
- java的mac自动化-自动运行java程序
本文旨在帮助读者介绍,如果一个测试工程师拿到了mac本,该如何在本地自动运行java代码 首先如图所示写下如下一段代码 package zlr;import org.junit.Test;public ...
- Luogu P1877 [HAOI2012]音量调节
题目描述 一个吉他手准备参加一场演出.他不喜欢在演出时始终使用同一个音量,所以他决定每一首歌之前他都需要改变一次音量.在演出开始之前,他已经做好一个列表,里面写着每首歌开始之前他想要改变的音量是多少. ...
- Ubuntu版本更替所引发的“血案”
Ubuntu版本更替所引发的"血案" 今天,我兴致很高的装了双系统,并且配置了Linux的网络,接下来就是安装一些软件,来实现我想达到的功能了,结果被一个小小的命令卡的 ...
- 面试题:HTTP与HTTPS
记录个面试题 HTTP与HTTPS的不同 1.HTTP的URL为http://开头,HTTPS的URL为https://开头 2.HTTP标准端口80,HTTPS标准端口是443 3.在OSI网络模型 ...
- 为你的APK进行数字签名
摘要: 我们需要为 APK进行数字签名,这样才能发布到 Google Play商店.解决方法很简单,使用 Java的keytool命令创建证书并在 Gradle构建文件的 signingConfigs ...
- R语言︱基本函数、统计量、常用操作函数
先言:R语言常用界面操作 帮助:help(nnet) = ?nnet =??nnet 清除命令框中所有显示内容:Ctrl+L 清除R空间中内存变量:rm(list=ls()).gc() 获取或者设置当 ...
- vector 遍历
vector向量容器,是数组的一个泛化推广.实现了类似于数据结构中顺序表的操作. vector容器是一个模板类,可以存放任何类型的对象(但必须是同一类对象).vector对象可以在运行时高效地添加元素 ...
- LogHelper 日志记录帮助类
1.LogHelper 日志记录帮助类 using System; using System.Collections.Generic; using System.Linq; using System. ...
- 7.C++类与封装的概念
类通常分为以下两部分 -类的内部具体实现 -类的外部使用方法 比如: 用户使用手机,只需要知道如何使用. 而手机开发者,则需要考虑手机内部的实现细节. 类的封装 并不是类的每个成员变量和成员函数都要对 ...