帮助:

  1. JDU:/host-001e67a8d50b /log/today # inotifywait -h
  2. inotifywait 3.14
  3. Wait for a particular event on a file or set of files.
  4. Usage: inotifywait [ options ] file1 [ file2 ] [ file3 ] [ ... ]
  5. Options:
  6. -h|--help Show this help text.
  7. @<file> Exclude the specified file from being watched.
  8. --exclude <pattern>
  9. Exclude all events on files matching the
  10. extended regular expression <pattern>.
  11. --excludei <pattern>
  12. Like --exclude but case insensitive.
  13. -m|--monitor Keep listening for events forever. Without
  14. this option, inotifywait will exit after one
  15. event is received.
  16. -d|--daemon Same as --monitor, except run in the background
  17. logging events to a file specified by --outfile.
  18. Implies --syslog.
  19. -r|--recursive Watch directories recursively.
  20. --fromfile <file>
  21. Read files to watch from <file> or `-' for stdin.
  22. -o|--outfile <file>
  23. Print events to <file> rather than stdout.
  24. -s|--syslog Send errors to syslog rather than stderr.
  25. -q|--quiet Print less (only print events).
  26. -qq Print nothing (not even events).
  27. --format <fmt> Print using a specified printf-like format
  28. string; read the man page for more details.
  29. --timefmt <fmt> strftime-compatible format string for use with
  30. %T in --format string.
  31. -c|--csv Print events in CSV format.
  32. -t|--timeout <seconds>
  33. When listening for a single event, time out after
  34. waiting for an event for <seconds> seconds.
  35. If <seconds> is , inotifywait will never time out.
  36. -e|--event <event1> [ -e|--event <event2> ... ]
  37. Listen for specific event(s). If omitted, all events are
  38. listened for.
  39. Exit status:
  40. - An event you asked to watch for was received.
  41. - An event you did not ask to watch for was received
  42. - The --timeout option was given and no events occurred
  43. in the specified interval of time.
  44. Events:
  45. access file or directory contents were read
  46. modify file or directory contents were written
  47. attrib file or directory attributes changed
  48. close_write file or directory closed, after being opened in writable mode
  49. close_nowrite file or directory closed, after being opened in read-only mode
  50. close file or directory closed, regardless of read/write mode
  51. open file or directory opened
  52. moved_to file or directory moved to watched directory
  53. moved_from file or directory moved from watched directory
  54. move file or directory moved to or from watched directory
  55. create file or directory created within watched directory
  56. delete file or directory deleted within watched directory
  57. delete_self file or directory was deleted
  58. unmount file system containing file or directory unmounted

示例:

  1. JDU:aSV/host-001e67a8d50b /sf # inotifywait -rme access,modify,open,close /sf/data/vs_rep2/images/
  2. Setting up watches. Beware: since -r was given, this may take a while!
  3. Watches established.
  4. /sf/data/vs_rep2/images/ OPEN,ISDIR
  5. /sf/data/vs_rep2/images/ CLOSE_NOWRITE,CLOSE,ISDIR
  6. /sf/data/vs_rep2/images/ OPEN,ISDIR cluster
  7. /sf/data/vs_rep2/images/cluster/ OPEN,ISDIR
  8. /sf/data/vs_rep2/images/ CLOSE_NOWRITE,CLOSE,ISDIR cluster
  9. /sf/data/vs_rep2/images/cluster/ CLOSE_NOWRITE,CLOSE,ISDIR

linux inotifywait 下监控是否有IO的更多相关文章

  1. linux下监控jvm 使用的方法

    之前一直用jconsole监控jvm,图形界面简单易用,最近因为需要在纯linux下进行操作,所以总结了一下 linux下监控jvm的例子,这次主要用到了jstat工具, 各个参数意义: jstat ...

  2. Linux 环境下 网络IO模型

    本文讨论的背景是Linux环境下的network IO. IO发生时涉及的对象和步骤: 对于一个network IO (这里我们以read举例),它会涉及到两个系统对象,一个是调用这个IO的proce ...

  3. Linux 下监控用户最大进程数参数(nproc)是否到达上限

    Linux 下监控用户最大进程数参数(nproc)是否到达上限的步骤: 1.查看各系统用户的进程(LWP)数: 注意:默认情况下采用 ps 命令并不能显示出所有的进程.因为 Linux 环境下执行多线 ...

  4. Linux 下的五种 IO 模型

    概念说明 用户空间与内核空间 现在操作系统都是采用虚拟存储器,那么对32位操作系统而言,它的寻址空间(虚拟存储空间)为4G(2的32次方).操作系统的核心是内核,独立于普通的应用程序,可以访问受保护的 ...

  5. linux下监控进程需掌握的四个命令

    linux下监控进程需掌握的四个命令   在LInux系统下,最困难的工作之一就是跟踪正在系统中运行的程序,尤其是现在,图形桌面使用很多的程序,只是为了生成一个桌面环境,系统中运行了太多的进程,幸运的 ...

  6. 操作系统复习——如何查看一个进程的详细信息,如何追踪一个进程的执行过程 ,如何在 Linux 系统下查看 CPU、内存、磁盘、IO、网卡情况?epoll和select区别?

    1. 如何查看一个进程的详细信息,如何追踪一个进程的执行过程 通过pstree命令(根据pid)进行查询进程内部当前运行了多少线程:# pstree -p 19135(进程号) 使用top命令查看(可 ...

  7. Linux下监控网卡流量的软件Nload

    Linux下监控网卡流量的软件Nload 安装nload: # wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz # tar zxvf ...

  8. Linux环境下的network IO

    同步IO和异步IO,阻塞IO和非阻塞IO分别是什么,到底有什么区别?不同的人在不同的上下文下给出的答案是不同的.所以先限定一下本文的上下文. 本文讨论的背景是Linux环境下的network IO. ...

  9. Linux 下监控用户最大进程数参数(nproc)是否到达上限的步骤:

    https://www.cnblogs.com/autopenguin/p/6184886.html 1.查看各系统用户的进程(LWP)数: 注意:默认情况下采用 ps 命令并不能显示出所有的进程.因 ...

随机推荐

  1. Oracle学习笔记(八)

    十一.子查询 1.子查询概述 学习子查询的原因 事例:查询工资比SCOTT高的员工信息 思路:1.scott的工资 select sal from emp where ename='SCOTT'; 2 ...

  2. 20155335俞昆《java程序设计》第6周总结

    20155335    <Java程序设计>第6周学习总结 ##  教材学习内容总结 首先,我们需要了解输入和输出的关系,我想,这不同于c语言中的输入和输出,我们首先明白,Java中以串流 ...

  3. 个人整理的一些iOS Entitlements

    收集了不少Entitlement,当然也肯定有遗漏.有的就是key的字面意思,就不多做解释.不过有的虽然字面意思好理解,不过具体的用处不太清楚,就写的Unknown use.在替换entitlemen ...

  4. tinymce与prism代码高亮实现及汉化的配置

    简单介绍:TinyMCE是一个轻量级的基于浏览器的所见即所得编辑器,由JavaScript写成.它对IE6+和Firefox1.5+都有着非常良好的支持.功能方强大,并且功能配置灵活简单.另一特点是加 ...

  5. [多线程] Thread

    多线程 概述 单任务处理:一个任务完成后才能进行下一个任务. 多任务处理:CPU分时操作,每个任务看似同时运行. 进程 应用程序的一个运行实例,包含程序所需资源的内存区域,是操作系统进行资源分配的单元 ...

  6. unity 加载资源

    Unity3D中的资源的处理种类 Unity中的资源资源的处理种类大致分为:Resources.StreamingAssets.AssetBundle Resources 是作为一个Unity的保留文 ...

  7. Katalon Studio简单使用(二)

    距离上一篇更新katalon学习部分已有两个月的时间 ,我的博文的访问量为400多,(*^__^*) 嘻嘻…… 说明还是很多同学在学习这个小tools的.所以再记录下 近两个月来对katalon的体验 ...

  8. Thread类

    Thread类相对于线程池中的线程,使用者有更多的控制权.该类允许创建前台线程,设置线程优先级等.Thread类的构造函数重载为接受ThreadStart和ParameterizedThreadSta ...

  9. C# 使用dynamic类型来访问JObject对象

    dynamic是C#里面的动态类型,可在未知类型的情况访问对应的属性,非常灵活和方便. 使用Json.Net可以把一个Json字符串转换成一个JObject对象,如果有已知强类型,如果有已知对应的强类 ...

  10. C#基础笔记(第十七天)

    1.复习 ref 传地址 用的是同一块内存 一个改变另一个也随着改变 return n1 > n2 ? n1 : n2; 三元表达式 int max=GetMax(1,2,3,4,5,6,); ...