Dnotify
   HOME

TheInfoList



OR:

dnotify is a file system event monitor for the
Linux kernel The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
, one of the subfeatures of the fcntl call. It was introduced in the 2.4 kernel series. It has been obsoleted by
inotify inotify (inode notify) is a Linux kernel subsystem created by John McCutchan, which monitors changes to the filesystem, and reports those changes to applications. It can be used to automatically update directory views, reload configuration files, ...
, but will be retained for compatibility reasons. Its function is essentially an extension to filesystems to notice changes to the filesystem, and report those changes to applications. Instead of application checking for changes to filesystem, application can register to be notified by kernel when changes to filesystem occur. Application can select directories to monitor and types of changes to be notified for. One major use is in
desktop search Desktop search tools search within a user's own computer files as opposed to searching the Internet. These tools are designed to find information on the user's PC, including web browser history, e-mail archives, text documents, sound files, images ...
utilities like
Beagle The Beagle is a small breed of scent hound, similar in appearance to the much larger foxhound. The beagle was developed primarily for hunting rabbit or hare, known as beagling. Possessing a great sense of smell and superior tracking inst ...
, where its functionality permits reindexing of changed files without scanning the filesystem for changes every few minutes, which would be very inefficient. By being ''told'' that a file has changed directly by the kernel, rather than actively looking, Beagle and such utilities can achieve change-to-reindexing times of only about a second, with very small performance hits (dnotify therefore enables the use of such programs in a sensible manner;
daemon A demon is a malevolent supernatural being, evil spirit or fiend in religion, occultism, literature, fiction, mythology and folklore. Demon, daemon or dæmon may also refer to: Entertainment Fictional entities * Daemon (G.I. Joe), a character ...
s are generally not accepted by distributors if they drain system performance noticeably to provide userland functionality).


Limitations

* dnotify can only watch directories. * dnotify requires maintaining an open file descriptor to the directory that the user wants to watch. First, the directory is open, hence disallowing the device on which it resides from being unmounted. Second, watchlist is limited by open file limit of the process.


See also

* Linux kernel API * File alteration monitor *
inotify inotify (inode notify) is a Linux kernel subsystem created by John McCutchan, which monitors changes to the filesystem, and reports those changes to applications. It can be used to automatically update directory views, reload configuration files, ...
, a dnotify replacement. * The Documentation/filesystems/dnotify.txt file in the kernel source tree


Footnotes

Linux kernel features {{linux-stub