Linux Daemon and services



A daemon should be distinguished from a demon, which is an evil spirit in some religions. 


A daemon is a type of program on Unix-like operating systems that runs unobtrusively in the background, rather than under the direct control of a user, waiting to be activated by the occurance of a specific event or condition.

Unix-like systems typically run numerous daemons, mainly to accommodate requests for services from other computers on a network, but also to respond to other programs and to hardware activity. Examples of actions or conditions that can trigger daemons into activity are a specific time or date, passage of a specified time interval, a file landing in a particular directory, receipt of an e-mail or a Web request made through a particular communication line. It is not necessary that the perpetrator of the action or condition be aware that a daemon is listening, although programs frequently will perform an action only because they are aware that they will implicitly arouse a daemon.
Daemons are usually instantiated as processes. A process is an executing (i.e., running) instance of a program. Processes are managed by the kernel (i.e., the core of the operating system), which assigns each a unique process identification number (PID).
There are three basic types of processes in Linux: interactive, batch and daemon. Interactive processes are run interactively by a user at the command line (i.e., all-text mode). Batch processes are submitted from a queue of processes and are not associated with the command line; they are well suited for performing recurring tasks when system usage is otherwise low.
Daemons are recognized by the system as any processes whose parent process has a PID of one, which always represents the process init. init is always the first process that is started when a Linux computer is booted up (i.e., started), and it remains on the system until the computer is turned off. init adopts any process whose parent process dies (i.e., terminates) without waiting for the child process's status. Thus, the common method for launching a daemon involves forking (i.e., dividing) once or twice, and making the parent (and grandparent) processes die while the child (or grandchild) process begins performing its normal function.
Some daemons are launched via System V init scripts, which are scripts (i.e., short programs) that are run automatically when the system is booting up. They may either survive for the duration of the session or be regenerated at intervals.
Many daemons are now started only as required and by a single daemon, xinetd (which has replaced inetd in newer systems), rather than running continuously. xinetd, which is referred to as a TCP/IP super server, itself is started at boot time, and it listens to the ports assigned to the processes listed in the /etc/inetd.conf or in /etc/xinetd.conf configuration file. Examples of daemons that it starts include crond (which runs scheduled tasks), ftpd (file transfer), lpd (laser printing), rlogind (remote login), rshd (remote command execution) and telnetd (telnet).
In addition to being launched by the operating system and by application programs, some daemons can also be started manually. Examples of commands that launch daemons include binlogd (which logs binary events to specified files), mysqld (the MySQL databse server) and apache (the Apache web server).
In many Unix-like operating systems, including Linux, each daemon has a single script (i.e., short program) with which it can be terminated, restarted or have its status checked. The handling of these scripts is based on runlevels. A runlevel is a configuration or operating state of the system that only allows certain selected processes to exist. Booting into a different runlevel can help solve certain problems, including repairing system errors.
The term daemon is derived from the daemons of Greek mythology, which were supernatural beings that ranked between gods and mortals and which possessed special knowledge and power1. For example, Socrates claimed to have a daemon that gave him warnings and advice but never coerced him into following it. He also claimed that his daemon exhibited greater accuracy than any of the forms of divination practiced at the time.
The word daemon was first used in a computer context at the pioneering Project MAC (which later became the MIT Laboratory for Computer Science) using the IBM 7094 in 1963. This usage was inspired by Maxwell's daemon of physics and thermodynamics, which was an imaginary agent that helped sort molecules of different speeds and worked tirelessly in the background. The term was then used to describe background processes which worked tirelessly to perform system chores. The first computer daemon was a program that automatically made tape backups. After the term was adopted for computer use, it was rationalized as an acronym for Disk And Execution MONitor.
On the Microsoft Windows operating systems, programs called services perform the functions of daemons, although the term daemon is now sometimes being used with regard to those systems as well.


acpid
This a completely flexible, totally extensible daemon for delivering ACPI events. It listens on a file (/proc/acpi/event) and when an event occurs, executes programs to handle the event.
ACPI stands for: Advanced Configuration and Power Interface.
aep1000
For AEP 1000 coprocessors. It's used for hardware cryptographic acceleration under Linux.
anacron
Anacron is a periodic command scheduler. It executes commands at intervals specified in days. Unlike cron, it does not assume that the system is running continuously.
Every time Anacron is run, it reads a configuration file that specifies the jobs Anacron controls, and their periods in days. If a job wasn't executed in the last n days, where n is the period of that job, Anacron executes it. Anacron then records the date in a special timestamp file that it keeps for each job, so it can know when to run it again
apmd
The apmd package is a set of user-level programs to control the Advanced Power Management system found in all modern laptop computers and most modern desktops. apmd talks to the Linux kernel APM layer, which does all the hardware-dependent stuff.
atd
atd runs jobs queued by at.
autofs
Auto-autofs detects Disks, Partitions, CD-ROMs, Floppies etc. and sets up an automount configuration.
So it provides an easy access to the hardware.
Auto-autofs is a Perl script that searches the hardware for block devices using the /proc directory. It finds partitions on harddisks via fdisk and tries to detect the filesystems.
bcm5820
Hardware cryptographic accelerator support for Broadcom BCM5820 eCommerce Processor.
chargen
Character Generator Protocol.
A useful debugging and measurement tool is a character generator service. A character generator service simply sends data without regard to the input. Listens on port 19 TCP/UDP.
chargen-udp
See chargen.
crond
Daemon to execute scheduled commands.
cups
The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments. It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers.
cups-lpd
This is the CUPS Line Printer Daemon ("LPD") mini-server that supports legacy client systems that use the LPD protocol.
daytime The Daytime Protocol (Internet RFC 867) is a simple protocol that allows clients to retrieve the current date and time from a remote server. While useful at a bsic level, the Daytime protocol is most often used for debugging purposes rather than actually acquire the current date and time. The daytime protocol is available on TCP port 13.
daytime-udp
See daytime.
echo
Service for testing, everything you send to port 7 (echo) would be sent back to you.
echo-udp
see echo
gpm
General Purpose Mouse Daemon. Necessary only if you want to use your mouse on the console (not xterms).
httpd
The apache web server.
iptables
firewall
irda
(Infrared Data Association) is an industry standard for infrared wireless communication.
irqbalance
Daemon to balance irq's across multiple CPUs. Only useful on SMP systems (more than one processor)
isdn
ISDN (Integrated Services Digital Network). Use only with ISDN network interfaces.
ktalk
A graphical talk client for KDE.
kudzu
Detects and configures new and/or changed hardware on a system.
lisa
LISa is a small daemon which is intended to run on end user systems. It provides something like a "network neighborhood", but only relying on the TCP/IP protocol stack, no smb or whatever.
The information about the hosts in your "neighborhood" is provided via TCP port 7741.
To use it: from a client computer, open konqueror and type lan://targetIP
messagebus
D-BUS is first a library that provides one-to-one communication between any two applications; dbus-daemon-1 is an application that uses this library to implement a message bus daemon. Multiple programs connect to the message bus daemon and can exchange messages with one another.
microcode_ctl
It decodes and sends new microcode to the kernel driver to be uploaded to Intel IA32 processors. (Pentium Pro, PII, PIII, Pentium 4, Celeron, Xeon etc - all P6 and above, which does NOT include pentium classics)
It signals the kernel driver to release any buffers it may hold.
The microcode update is volatile and needs to be uploaded on each system boot i.e. it doesn't reflash your cpu permanently, reboot and it reverts back to the old microcode.
This driver is designed for Intel IA32 microprocessors only, it will not work with AMD or any other non-Intel processors as they don't support microcode updates or they support it in a manner different from Intel's specs.
mysqld
MySQL database server.
named
DNS server. Bind.
netfs
Network Filesystem Mounter. Needed for mounting NFS, SMB and NCP shares on boot.
network
Activates all network interfaces at boot time.
nfslock
To help manage file access conflicts and protect NFS sessions during failures, NFS offers a file and record locking service called the network lock manager. The network lock manager is a separate service NFS makes available to user applications. To use the locking service, applications must make calls to standard lock routines.
ntpd
The ntpd sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4. Allows other computers to synchronize system time with your server.
pcmcia
PCMCIA cards.
portmap
The portmap service is a dynamic port assignment daemon for RPC services such as NIS and NFS.
postgresql
PostgreSQL database server.
random
Initialize kernel random number generator
rawdevices
Block devices.  Links hardware to devices that store data.
rhnsd
Red Hat Network Service. Informs you about official security and bug updates for your system.
rsync
Its just like rpc with much more features. Provides a very fast method for bringing remote files into sync.
saslauthd
SASL (Simple Authentication and Security Layer) authentication server. Server to allow others identify on this server.
sendmail
Mail server, allows to send emails using this machine as mail server.
services
An internal xinetd services, listing active services.
sgi_fam
File Alteration Monitor, provides an API that applications can use to be notified when specific files or directories are changed. For example, consider a graphical file manager, when the user removes a file thru the file manager, their changes are visible immediately.
smartd
Self Monitor Analysis and Reporting Technology System. Monitor you hard disk for failures.
smb
Samba, allows to share and access MS windows network.
snmpd
Simple Network Management protocol. A standard protocol for non-windows networks.
snmptrapd
This is an SNMP application that recieves and logs SNMP TRAP and INFORM messages. Uses UDP port 162.
squid
Web proxy cache.
sshd
Secure Shell daemon, allows secure and remote logging to this machine.
syslog
Logs all system activities.
time
Retrieve the date and time from a host or hosts on the network and set the local system time TCP version.
time-udp
Retrieve the date and time from a host or hosts on the network and set the local system time UDP version.
tux
The TUX Web Server is an HTTP daemon for Linux . The TUX Web Server is different from other Web servers in that it runs partially from within the Linux kernel as a module, or kernel subsystem. Given sufficient networking cards, it enables direct scatter-gather direct memory access (DMA) and hardware-based TCP/IP checksums from the page cache (the Linux file data cache) directly to the network, avoiding extra data copies.
vncserver
VNC stands for Virtual Network Computing. It is remote control software which allows you to view and interact with one computer (the "server") using a simple program (the "viewer") on another computer anywhere on the Internet.
vsftpd
Secure FTP daemon.
winbind Winbind is an nss switch module to map Windows NT Domain databases to Unix.
In combination with Samba and pam_ntdom, a Unix box will be able to integrate straight into a full Windows NT Domain environment, without needing a Unix Account database.

xfs
The X font server (xfs) provides a standard mechanism for an X server to communicate with a font renderer, frequently running on a remote machine. It usually runs on TCP port 7100.
You need to be running xfs if you want a remote X terminal to be able to use fonts from your system, or if you want to use fonts that your X server doesn't understand (and the font server does).
xinetd
Service wrapper. xinetd is a replacement for inetd, the internet services daemon.
xinetd - eXtended InterNET services daemon - provides a good security against intrusion and reduces the risks of Denial of Services (DoS) attacks. Like the well known couple (inetd+tcpd), it enables the configuration of the access rights for a given machine.
yum
yum is an automatic updater and package installer/remover for rpm systems.
It automatically computes dependencies and figures out what things should occur to install packages.
It makes it easier to maintain groups of machines without having to manually update each one using rpm.

1 comment: