Skip to content

Instantly share code, notes, and snippets.

@seb-m
Created March 19, 2012 17:03
Show Gist options
  • Save seb-m/2119404 to your computer and use it in GitHub Desktop.
Save seb-m/2119404 to your computer and use it in GitHub Desktop.
Pyinotify's output
mkdir -p /tmp/base; mkdir -p /tmp/base/d1; mkdir -p /tmp/base/d2; touch /tmp/base/d1/foo; mv /tmp/base/d1 /tmp/base/d2; rm -f /tmp/base/d2/d1/foo;
ookoi@mysterion:~$ python -m pyinotify -v -a -r /tmp
[2012-03-19 18:24:03,916 pyinotify DEBUG] Event queue size: 32
[2012-03-19 18:24:03,916 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000100 name=base wd=1 >
[2012-03-19 18:24:03,917 pyinotify DEBUG] New <Watch wd=3 path=/tmp/base mask=4095 proc_fun=None auto_add=True exclude_filter=<function <lambda> at 0x87a164c> dir=True >
<Event dir=True mask=0x40000100 maskname=IN_CREATE|IN_ISDIR name=base path=/tmp pathname=/tmp/base wd=1 >
[2012-03-19 18:24:03,918 pyinotify DEBUG] Event queue size: 96
[2012-03-19 18:24:03,919 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000020 name=base wd=1 >
[2012-03-19 18:24:03,919 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000020 name='' wd=3 >
[2012-03-19 18:24:03,919 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000010 name=base wd=1 >
[2012-03-19 18:24:03,920 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000010 name='' wd=3 >
<Event dir=True mask=0x40000020 maskname=IN_OPEN|IN_ISDIR name=base path=/tmp pathname=/tmp/base wd=1 >
<Event dir=True mask=0x40000020 maskname=IN_OPEN|IN_ISDIR name='' path=/tmp/base pathname=/tmp/base wd=3 >
<Event dir=True mask=0x40000010 maskname=IN_CLOSE_NOWRITE|IN_ISDIR name=base path=/tmp pathname=/tmp/base wd=1 >
<Event dir=True mask=0x40000010 maskname=IN_CLOSE_NOWRITE|IN_ISDIR name='' path=/tmp/base pathname=/tmp/base wd=3 >
[2012-03-19 18:24:03,924 pyinotify DEBUG] Event queue size: 32
[2012-03-19 18:24:03,925 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000100 name=d1 wd=3 >
[2012-03-19 18:24:03,926 pyinotify DEBUG] New <Watch wd=4 path=/tmp/base/d1 mask=4095 proc_fun=None auto_add=True exclude_filter=<function <lambda> at 0x87a164c> dir=True >
<Event dir=True mask=0x40000100 maskname=IN_CREATE|IN_ISDIR name=d1 path=/tmp/base pathname=/tmp/base/d1 wd=3 >
[2012-03-19 18:24:03,927 pyinotify DEBUG] Event queue size: 96
[2012-03-19 18:24:03,927 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000020 name=d1 wd=3 >
[2012-03-19 18:24:03,927 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000020 name='' wd=4 >
[2012-03-19 18:24:03,928 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000010 name=d1 wd=3 >
[2012-03-19 18:24:03,928 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000010 name='' wd=4 >
<Event dir=True mask=0x40000020 maskname=IN_OPEN|IN_ISDIR name=d1 path=/tmp/base pathname=/tmp/base/d1 wd=3 >
<Event dir=True mask=0x40000020 maskname=IN_OPEN|IN_ISDIR name='' path=/tmp/base/d1 pathname=/tmp/base/d1 wd=4 >
<Event dir=True mask=0x40000010 maskname=IN_CLOSE_NOWRITE|IN_ISDIR name=d1 path=/tmp/base pathname=/tmp/base/d1 wd=3 >
<Event dir=True mask=0x40000010 maskname=IN_CLOSE_NOWRITE|IN_ISDIR name='' path=/tmp/base/d1 pathname=/tmp/base/d1 wd=4 >
[2012-03-19 18:24:03,934 pyinotify DEBUG] Event queue size: 32
[2012-03-19 18:24:03,935 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000100 name=d2 wd=3 >
[2012-03-19 18:24:03,936 pyinotify DEBUG] New <Watch wd=5 path=/tmp/base/d2 mask=4095 proc_fun=None auto_add=True exclude_filter=<function <lambda> at 0x87a164c> dir=True >
<Event dir=True mask=0x40000100 maskname=IN_CREATE|IN_ISDIR name=d2 path=/tmp/base pathname=/tmp/base/d2 wd=3 >
[2012-03-19 18:24:03,940 pyinotify DEBUG] Event queue size: 224
[2012-03-19 18:24:03,941 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x100 name=foo wd=4 >
[2012-03-19 18:24:03,942 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x20 name=foo wd=4 >
[2012-03-19 18:24:03,946 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x4 name=foo wd=4 >
[2012-03-19 18:24:03,947 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x8 name=foo wd=4 >
[2012-03-19 18:24:03,948 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000020 name=d2 wd=3 >
[2012-03-19 18:24:03,949 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000020 name='' wd=5 >
[2012-03-19 18:24:03,950 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000010 name=d2 wd=3 >
[2012-03-19 18:24:03,953 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x40000010 name='' wd=5 >
<Event dir=False mask=0x100 maskname=IN_CREATE name=foo path=/tmp/base/d1 pathname=/tmp/base/d1/foo wd=4 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=foo path=/tmp/base/d1 pathname=/tmp/base/d1/foo wd=4 >
<Event dir=False mask=0x4 maskname=IN_ATTRIB name=foo path=/tmp/base/d1 pathname=/tmp/base/d1/foo wd=4 >
<Event dir=False mask=0x8 maskname=IN_CLOSE_WRITE name=foo path=/tmp/base/d1 pathname=/tmp/base/d1/foo wd=4 >
<Event dir=True mask=0x40000020 maskname=IN_OPEN|IN_ISDIR name=d2 path=/tmp/base pathname=/tmp/base/d2 wd=3 >
<Event dir=True mask=0x40000020 maskname=IN_OPEN|IN_ISDIR name='' path=/tmp/base/d2 pathname=/tmp/base/d2 wd=5 >
<Event dir=True mask=0x40000010 maskname=IN_CLOSE_NOWRITE|IN_ISDIR name=d2 path=/tmp/base pathname=/tmp/base/d2 wd=3 >
<Event dir=True mask=0x40000010 maskname=IN_CLOSE_NOWRITE|IN_ISDIR name='' path=/tmp/base/d2 pathname=/tmp/base/d2 wd=5 >
[2012-03-19 18:24:03,961 pyinotify DEBUG] Event queue size: 112
[2012-03-19 18:24:03,962 pyinotify DEBUG] <_RawEvent cookie=5798 mask=0x40000040 name=d1 wd=3 >
[2012-03-19 18:24:03,964 pyinotify DEBUG] <_RawEvent cookie=5798 mask=0x40000080 name=d1 wd=5 >
[2012-03-19 18:24:03,965 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x800 name='' wd=4 >
[2012-03-19 18:24:03,966 pyinotify DEBUG] <_RawEvent cookie=0 mask=0x200 name=foo wd=4 >
<Event cookie=5798 dir=True mask=0x40000040 maskname=IN_MOVED_FROM|IN_ISDIR name=d1 path=/tmp/base pathname=/tmp/base/d1 wd=3 >
<Event cookie=5798 dir=True mask=0x40000080 maskname=IN_MOVED_TO|IN_ISDIR name=d1 path=/tmp/base/d2 pathname=/tmp/base/d2/d1 src_pathname=/tmp/base/d1 wd=5 >
<Event dir=True mask=0x800 maskname=IN_MOVE_SELF name='' path=/tmp/base/d2/d1 pathname=/tmp/base/d2/d1 wd=4 >
<Event dir=False mask=0x200 maskname=IN_DELETE name=foo path=/tmp/base/d2/d1 pathname=/tmp/base/d2/d1/foo wd=4 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment