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. Teaset-React Native UI 组件库

    GitHub地址 https://github.com/rilyu/teaset/blob/master/docs/cn/README.md React Native UI 组件库, 超过 20 个纯 ...

  2. spark源码阅读 RDDs

    RDDs弹性分布式数据集 spark就是实现了RDDs编程模型的集群计算平台.有很多RDDs的介绍,这里就不仔细说了,这儿主要看源码. abstract class RDD[T: ClassTag]( ...

  3. SQL优化————Insert

    1.如果是非生产环境,可以先将索引和约束删掉,等数据插入完之后,再建立索引和约束. 2.如果一次性插入数据较大,可以使用游标,每次小批量的插入数据. 3.如果数据表太大,可以构建历史表,老数据通常不会 ...

  4. [转帖]使用Nginx转发TCP/UDP数据

    使用Nginx转发TCP/UDP数据 https://www.cnblogs.com/guigujun/p/8075620.html 编译安装Nginx 从1.9.0开始,nginx就支持对TCP的转 ...

  5. 从零开始学Flask框架-006

    重定向和用户会话 因为刷新页面时浏览器会重新发送之前已经发送过的最后一个请求.如果这个请求是一个包含表单数据的POST 请求,刷新页面后会再次提交表单. 基于这个原因,最好别让Web 程序把POST ...

  6. 《MySQL数据库从入门到精通》 高级运维人才的必备书籍

    众所周知,每年就业市场都会迎来千万量级的高校毕业生,然而企业招工难和毕业生就业难的矛盾却一直没有得到很好地解决.究其原因,主要矛盾还是在于传统的学历教育与企业实际需求相脱节.为了杜绝高校毕业生求职时常 ...

  7. 编译内核提示mkimage command not found – U-Boot images will not be built

     转載與:http://www.mr-wu.cn/u-boot-tools-binary-package-in-ubuntu/ ubuntu 编译linux kernel时提示: “mkimage” ...

  8. java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常解决

    不能实例化activity有如下三种情况: 1.没有在Manifest.xml 清单中注册该activity,或者在创建完activity后,修改了包名或者activity的类名,而配置清单中没有修改 ...

  9. C#数字日期转成中文日期

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cons ...

  10. C#正则表达式根据分组命名取值

    string[] regexList = new string[] { @"^(?<TickerPart1>[0-9A-Z])[ 0_]?(?<TickerPart2> ...