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. golang 使用kcp实例

    简介kcp的具体概念与定义自行百度,特性可以浓缩为一句话,和tcp一样可靠,速度比tcp快,是一个用带宽换速度的新型协议.网上的示例代码很少,特此写一篇golang下的kcp实例. PS本文仅对ksp ...

  2. Eclipse下Maven安装和配置

    1. 下载 Maven 在百度输入 Maven 搜索 ,找到它的官网(http://maven.apache.org/),点击进入下载页面. 下载页面地址: http://maven.apache.o ...

  3. Flink状态管理和容错机制介绍

    本文主要内容如下: 有状态的流数据处理: Flink中的状态接口: 状态管理和容错机制实现: 阿里相关工作介绍: 一.有状态的流数据处理# 1.1.什么是有状态的计算# 计算任务的结果不仅仅依赖于输入 ...

  4. 关于wireshark的过滤器规则学习小结

    关于wireshark的过滤器规则学习小结 [前言] 这两天一直在熟悉wireshark的过滤器语法规则,以前也接触过这个工具,但只是学校老师教的如何去选择一个接口进行抓取,以及如何去分析一个包的数据 ...

  5. 综合应用,jieba,去标点,分词保存,统计,删词,输出

    import jieba fp1=r'D:/python/a.txt' outph=r'D:/python/out.txt' f=open(fp1,'r',encoding='utf-8') txt= ...

  6. UNIX环境高级编程笔记 目录

    每一章的重点会使用加粗字体 第一章:UNIX基础知识:UNIX体系结构:文件和目录:输入和输出:程序和进程:出错处理:信号:时间值:系统调用和库函数 第三章:文件I/O:文件描述符:文件操作函数:文件 ...

  7. nginx修改响应头(可屏蔽后端服务器的信息:IIS,PHP等)

    修改nginx反向代理请求的Header 需要使用到proxy_set_header和add_header指令.其中: proxy_set_header 来自内置模块ngx_http_proxy_mo ...

  8. 记一次构建SaaS平台项目失败后的反思(收集的客户需求太少,且没有区分重点,闭门造车。技术演变要渐进)

    记一次构建SaaS平台项目失败后的反思 前言: 笔者从2017年起开始着手将公司现有的软件系统改造成多租户模式,以降低整个系统的运营成本.但最后这个项目以失败告终.今天,我将对这个SaaS项目是如何走 ...

  9. RMAN备份,catalog注册rman带库备份信息

    客户需求:测试恢复的过程中,控制文件是全备时期的,recover database无法恢复到指定日期,控制文件中缺失后续新的归档备份信息. 方法:1.控制文件rman注册后续带库中的归档备份: 2.使 ...

  10. JQuery 的优先级

    1.使用最新的jQuery版本 2.用对选择器.   2.1 jquery最快的选择器是ID选择器:来源于js的getElementById()方法 注释:需要选择多个元素,必然涉及到Dom遍历和循环 ...