File alteration monitor
Encyclopedia
In computing
, the File Alteration Monitor, also known as FAM and sgi_fam, provides a subsystem developed by Silicon Graphics
for Unix-like
operating system
s. The FAM subsystem allows applications
to watch certain files
and be notified when they are modified. This greatly aids the applications, because before FAM existed, such applications would have to read the disk repeatedly to detect any changes: this resulted in high disk
and CPU
usage.
For example, a file manager
application can detect if some file has changed and can then update a displayed icon and/or filename.
The FAM system consists of two parts:
Although FAM may seem unnecessary now that many newer kernels include built-in notification support (inotify
in Linux
, for example), using FAM provides two benefits:
The main problem of FAM is that during the creation of a large amount of files (for example during the first login in a desktop environment) it slows down the entire system, using many CPU cycles.
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...
, the File Alteration Monitor, also known as FAM and sgi_fam, provides a subsystem developed by Silicon Graphics
Silicon Graphics
Silicon Graphics, Inc. was a manufacturer of high-performance computing solutions, including computer hardware and software, founded in 1981 by Jim Clark...
for Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...
s. The FAM subsystem allows applications
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...
to watch certain files
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...
and be notified when they are modified. This greatly aids the applications, because before FAM existed, such applications would have to read the disk repeatedly to detect any changes: this resulted in high disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...
and CPU
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...
usage.
For example, a file manager
File manager
A file manager or file browser is a computer program that provides a user interface to work with file systems. The most common operations performed on files or groups of files are: create, open, edit, view, print, play, rename, move, copy, delete, search/find, and modify file attributes, properties...
application can detect if some file has changed and can then update a displayed icon and/or filename.
The FAM system consists of two parts:
-
famd
— the FAM Daemon, which provides notifications and listens for requests. Administrators can configure it by editing the file/etc/fam.conf
-
libfam
— the interface to the client
Although FAM may seem unnecessary now that many newer kernels include built-in notification support (inotify
Inotify
inotify is a Linux kernel subsystem that acts to extend filesystems to notice changes to the filesystem, and report those changes to applications. It replaces an earlier facility, dnotify, which had similar goals....
in Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
, for example), using FAM provides two benefits:
- Consistently using FAM enables applications to work on a greater variety of platforms, agnostic of the kernel
- FAM is network aware, and if a monitor is started on an NFS share, it will attempt to contact a FAM server on the NFS server and have it monitor the file locally, which is more efficient.
The main problem of FAM is that during the creation of a large amount of files (for example during the first login in a desktop environment) it slows down the entire system, using many CPU cycles.
See also
- kqueueKqueueKqueue is a scalable event notification interface introduced in FreeBSD 4.1, also supported in NetBSD, OpenBSD, DragonflyBSD, and Mac OS X. It's the foundation of Apple's Grand Central Dispatch....
- InotifyInotifyinotify is a Linux kernel subsystem that acts to extend filesystems to notice changes to the filesystem, and report those changes to applications. It replaces an earlier facility, dnotify, which had similar goals....
- DnotifyDnotifydnotify is a file system event monitor for the Linux kernel, one of the subfeatures of the fcntl call. It was introduced in the 2.4 kernel series...
- GaminGaminGamin is a monitoring system for files and directories that independently implements a subset of FAM, the File Alteration Monitor. Running as a service, it allows for the detection of modifications to a file or directory...
- FSEventsFSEventsThe FSEvents API in Mac OS X allows applications to register for notifications of changes to a given directory tree. Whenever the filesystem is changed, the kernel passes notifications via the special device file /dev/fsevents to a userspace process called fseventsd...
- portmapPortmapThe port mapper is an ONC RPC service that runs on network nodes that provide other ONC RPC services.....
- TCP WrapperTCP WrapperTCP Wrapper is a host-based networking ACL system, used to filter network access to Internet Protocol servers on operating systems such as Linux or BSD...
/libwrapLibwraplibwrap is a free software program library that implements generic TCP Wrapper functionality for network service daemons to use ....
External links
- The FAM homepage
- The Watchful Eye of FAM – Linuxdevcenter article