Debugging native file system watcher for Linux

Skip to end of sidebar
Go to start of sidebar
Skip to end of metadata
Go to start of metadata

Due to tons of variations of Linux environment recently introduced native file system watcher for Linux may refuse to function properly. Here are some simple steps which may help to track down a problem.

Update

Make sure you are using the latest versions (download them from Git repository), they are named fsnotifier and fsnotifier64, placed into bin/ directory of IDEA, and granted execution rights.

Self-test

Execute watcher in self-diagnostics mode:

It should print something like this:

Examine its output for any errors or warnings.

Warning: fsnotifier will try to setup a watch for directory tree starting from current directory – if hierarchy is deep, there will be lots of output.

Activate logging

The next step is to activate logging for watcher and see what's happening in real.

Watcher utilizes "user" facility of syslog(3) – messages usually can be found in /var/log/user.log. Verbosity is regulated via FSNOTIFIER_LOG_LEVEL environment variable, possible values are: debug, info, warning, error, off.

By default logging is switched off. To activate it set FSNOTIFIER_LOG_LEVEL to appropriate value before starting IDEA, e.g.:

Warning: "debug" verbosity level may produce really huge amount of messages – use with care.

If you see something suspicious in logs please feel free to post it here as comment (or via attachment if your log is long enough).

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Oct 04, 2010

    Does fsnotify start watching directories with root as the directory from where it was started?

    1. Oct 04, 2010

      No. It communicates with IDEA and watches directories IDEA asked him to watch.

      1. Oct 04, 2010

        Anonymous

        thanks...

        Which directories does IDEA give it? Only the directories under Content roots?

        1. Oct 04, 2010

          Project roots, SDKs and libraries, IDEA config directories. It is also used by file choosers.

Add Comment