Skip to content

Instantly share code, notes, and snippets.

@prashanthpai
Created August 8, 2014 09:09
Show Gist options
  • Save prashanthpai/221a058c8b038e6999be to your computer and use it in GitHub Desktop.
Save prashanthpai/221a058c8b038e6999be to your computer and use it in GitHub Desktop.
Tracking inotify watches

Enable kernel debug tracing

echo 1 > /sys/kernel/debug/tracing/tracing_on

Enable tracing of all inotify syscalls

for i in `ls /sys/kernel/debug/tracing/events/syscalls | grep inotify`; do echo 1 >| /sys/kernel/debug/tracing/events/syscalls/$i/enable; done;

Check trace output

cat /sys/kernel/debug/tracing/trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment