https://www.reddit.com/r/redis/comments/atfvqy/how_to_grep_from_monitor_command/

_--------------------------------------------------

  1. the CLI shows the commands as upper-case, so you either need to grep for DEL, or use the -i switch for grep to match both cases

  2. my grep does not handle the | operator unless i specify -E to use extended regular expressions, not sure if this is the case with all greps

So, this should work for you:

redis-cli monitor | grep -iE "del|flush" >> redis-cli.log

 
 
level 2

This didn't work, however ./redis-cli monitor |grep -iE 'del|flush' works. But when i give it to written to a file, it doesn't work

grep redis-cli command的更多相关文章

  1. Redis: OOM command not allowed when used memory > ‘maxmemory

    Redis: OOM command not allowed when used memory > ‘maxmemory’ 解决方式: $ vim /etc/redis/6903.conf ma ...

  2. oozie.log报提示:org.apache.oozie.service.ServiceException: E0104错误 An Admin needs to install the sharelib with oozie-setup.sh and issue the 'oozie admin' CLI command to update sharelib

    不多说,直接上干货! 问题详情 关于怎么启动oozie,我这里不多赘述. Oozie的详细启动步骤(CDH版本的3节点集群) 然后,我在查看 [hadoop@bigdatamaster logs]$ ...

  3. redis cli命令

    redis安装后,在src和/usr/local/bin下有几个以redis开头的可执行文件,称为redis shell,这些可执行文件可做很多事情. 可执行文件 作用 redis-server  启 ...

  4. Redis: OOM command not allowed when used memory > ‘maxmemory’

    现象 日志里出现异常: OOM command not allowed when used memory > 'maxmemory' 原因 内存已满,不允许再存数据了,可以通过redis-cli ...

  5. [redis] redis cli的学习记录

    文档: https://redis.io/topics/rediscli help命令: The command can be used in two forms: . help @<categ ...

  6. AWS CLI command example

    1.list ec2 instance-id, instance status, type, ip address, name aws ec2 describe-instances --query ' ...

  7. aws cli command line interface的安装与使用

    安装 在centos中安装aws cli,安装依赖python,先装好python,然后按下述命令执行 yum install wget wget https://bootstrap.pypa.io/ ...

  8. Redis cli 操作

    备份 root@575e8088b5fb:/data# redis-cli LASTSAVE(integer) 1500273743root@575e8088b5fb:/data# redis-cli ...

  9. -bash: redis: command not found

    在linux中安装redis,先是拉过去安装,然后通过命令:make   进行编译  编译完成以后通过命令 make install 完成安装:结果在进行启动linux的时候执行           ...

  10. Redis安装完后redis-cli无法使用(redis-cli: command not found)

    之前安装redis后客户端无法使用,即redis-cli执行后报找不到的错误.这主要是安装redis的时候没有把客户端装上,在StackOverFlow上找到了一种只安装redis cli的方法,这里 ...

随机推荐

  1. axios ajax框架 请求配置

    请求参数 { // `url` is the server URL that will be used for the request url: '/user', // `method` is the ...

  2. Java并发处理锁 Lock

    在上一篇文章中我们讲到了如何使用关键字synchronized来实现同步访问.本文我们继续来探讨这个问题,从Java 5之后,在 java.util.concurrent.locks 包下提供了另外一 ...

  3. python 爬虫实例(四)

    环境: OS:Window10 python:3.7 爬取链家地产上面的数据,两个画面上的数据的爬取 效果,下面的两个网页中的数据取出来 代码 import datetime import threa ...

  4. 配置Hive数据仓库

    1.在线安装mysql服务 #下载安装mysql yum install mysql mysql-server mysql-devel #启动mysql服务 cd /etc/ init.d/mysql ...

  5. 使用fiddl模拟弱网

    原文地址:https://www.jianshu.com/p/71c3b4a49930 Fiddler-弱网设置 1.打开fiddler,点击 Rules->Performance-> 勾 ...

  6. AJAX-前后端交互的艺术

    AJAX-前后端交互的艺术 为什么要用AJAX? 当我们通过提交表单向服务器提交内容,或者进行一些其他操作,均涉及到了与浏览器之间的交互,传统的方式与AJAX方式的处理方法是不同的 传统方式:用户触发 ...

  7. Redis 缓存问题及解决方案

    [相关概念] 缓存击穿:指的是一些热点数据过期,由于热点数据存在并发量大的特性,所以短时间内对数据库的造成很大的冲击,导致系统瘫痪.常见于例如微博系统中明星结婚或出轨时微博瘫痪的情况. 缓存雪崩:指的 ...

  8. Java基础笔试练习(三)

    1.下列InputStream类中哪个方法可以用于关闭流? A.skip() B.close() C.mark() D.reset() 答案: B 解析: inputstream的close方法用来关 ...

  9. (8)Spring Boot 与数据访问

    文章目录 简介 整合基本的JDBC与数据源 整合 druid 数据源 整合 mybatis 简介 对于数据访问层,无论是 SQL 还是 NOSQL ,Spring Boot 默认都采用整合 Sprin ...

  10. 第二章 Python基础语法

    2.1 环境的安装 解释器:py2 / py3 (环境变量) 开发工具:pycharm 2.2 编码 编码基础 ascii ,英文.符号,8位为一个东西,2**8 unicode ,万国码,可以表示所 ...