Demon

from Wikipedia, the free encyclopedia

Under Unix or Unix -like systems, a program that runs in the background and provides certain services is referred to as a daemon [ ˈdiːmən ] or daemon (also often in the spelling Demon ) . User interactions only take place indirectly, for example via signals , pipes and, above all, ( network ) sockets . The term daemon is also an abbreviation for d isk a nd e xecution mon itor interpreted, but what a Backronym is.

In Microsoft Windows , the corresponding programs are called services or system services .

Call and functionality

Normally daemons are not started by user interaction, but automatically when changing to another runlevel or when the system is started . As a result, daemons represent an essential part of the boot process, since with most Unix derivatives the essential application logic of the operating system runs in the user space and thus in the daemons. Typical daemon programs in Unix operating systems are therefore not just servers - processes such as network services, e-mail servers , database servers and print servers , but also processes that configure or monitor hardware , such as sound daemons or removable media management daemons . Periodic tasks or tasks occurring at set times are also implemented using daemons.

However, daemons can also be started by a user like normal processes in a shell . These processes then fork and in this way create a process that is no longer connected to the calling shell and thus becomes a direct child process of the main process init . In practice many daemons be constructed so that it via command line parameters either both backward ( detached can walk) and in the foreground, d. H. in the context of the shell. Log outputs are then often output on the standard output.

Examples

Several key components of the graphical Linux desktop are actually daemons, e.g. B. D-Bus -, NetworkManager - (here called unetwork ), PulseAudio - or Avahi Daemon, for which different graphic front-ends are available

To denote their daemon character, the name of many such programs has an appended "d", for example syslog d or cups d .

Program
name
description interaction
cron Starts other programs at specified times. Configuration via local CLI program crontab
atd Starts programs after a specified period of time. Configuration via local CLI program at
syslogd Receives messages from programs and writes them to files or forwards them to another syslogd (e.g. on a central log server). Use by system routines of the C standard library such as Syslog , control by signals
sendmail A mail transfer agent that sends emails over the network using SMTP Use by any (SMTP-capable) e-mail program over the network
lpd Receives incoming data in order to print them out on a connected printer . Use by any program that supports the LPD protocol
cupsd Compared to lpd, it is a powerful print server on Unix systems Use and configuration by the program library libcups , domain sockets or the IPP ; Control and configuration via a web - frontend or local CLI programs
httpd An httpd is a synonym for a web server that responds to requests in the HTTP protocol. Can be used by any web browser
inetd The Internet daemon can receive connections on several TCP ports and pass them on to special programs that are only started when the connection is established in order to conserve resources. Process signals to control the inetd ; various clients for the services provided
udev Daemon for the dynamic creation of device files under Linux Control by local auxiliary programs such as udevcontrol or udevinfo

The BSD daemon

In allusion to a demon , the BSD - Unix derivatives have made such a logo. The figure contains some imagery that characterizes Daemons. It was chosen as the logo for these Unix derivatives because daemons are a central operating system component.

The BSD derivatives FreeBSD and NetBSD also originally took over the daemon, but in the meantime all derivatives have switched to an alternative or modified logo.

See also

Web links