Difference between revisions of "Daemons"

From ArchWiki
Jump to: navigation, search
(List of Daemons)
m
(28 intermediate revisions by 16 users not shown)
Line 3: Line 3:
 
[[cs:Daemon]]
 
[[cs:Daemon]]
 
[[de:Daemons]]
 
[[de:Daemons]]
 +
[[es:Daemon]]
 
[[it:Daemon]]
 
[[it:Daemon]]
 +
[[ja:Daemons]]
 
[[pl:Daemon]]
 
[[pl:Daemon]]
 
[[ro:Daemon]]
 
[[ro:Daemon]]
Line 9: Line 11:
 
[[tr:Artsüreç]]
 
[[tr:Artsüreç]]
 
[[zh-CN:Daemon]]
 
[[zh-CN:Daemon]]
A [[Wikipedia:Daemon (computing)|daemon]] is a program that runs in the background, waiting for events to occur and offering services. A good example is a web server that waits for a request to deliver a page or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. Daemons are for tasks like writing messages into a log file (e.g. {{ic|syslog}}, {{ic|metalog}}) or keeping your system time accurate (e.g. [[Network Time Protocol daemon|{{ic|ntpd}}]]).
+
A [[Wikipedia:Daemon (computing)|daemon]] is a program that runs as a "background" process (without a terminal or user interface), commonly waiting for events to occur and offering services. A good example is a web server that waits for a request to deliver a page, or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. Daemons are for tasks like writing messages into a log file (e.g. {{ic|syslog}}, {{ic|metalog}}) or keeping your system time accurate (e.g. [[Network Time Protocol daemon|{{ic|ntpd}}]]). For more information see {{ic|man 7 daemon}}.
  
{{Note|The word daemon is sometimes used for a class of programs that are started at boot but have no process which remains in memory.  They are called daemons simply because they utilize the same startup/shutdown framework (e.g. {{ic|/etc/rc.d/}} scripts) used to start traditional daemons.  For example, the {{ic|/etc/rc.d}} scripts for {{ic|alsa}} and {{ic|cpufreq}} provide persistent configuration support for their perspective kernel modules but do not start additional background processes to service requests or respond to events.
+
{{Note|The word daemon is sometimes used for a class of programs that are started at boot but have no process which remains in memory.  They are called daemons simply because they utilize the same startup/shutdown framework (e.g. systemd service files of Type oneshot) used to start traditional daemons.  For example, the service files for {{ic|alsa-store}} and {{ic|alsa-restore}} provide persistent configuration support but do not start additional background processes to service requests or respond to events.
  
 
From the user's perspective the distinction is typically not significant unless the user tries to look for the "daemon" in a process list.
 
From the user's perspective the distinction is typically not significant unless the user tries to look for the "daemon" in a process list.
 
}}
 
}}
  
==Initscripts system==
+
==Managing daemons==
 +
In Arch Linux, daemons are managed by [[systemd]]. The [[systemd#Basic systemctl usage|systemctl]] command is the user interface used to manage them. It reads ''<service>''.service files that contain information about how and when to start the associated daemon. Service files are stored in {{ic|/{etc,usr/lib,run}/systemd/system}}. See [[systemd#Using units]] for complete information about using systemctl to manage daemons.
  
===Starting on Boot===
+
===Starting on boot===
A default install of Arch Linux will leave you with very few services (or daemons) enabled during boot. You can add or remove services by editing the {{ic|DAEMONS}} array in your [[rc.conf]] file. It will initially look something like this:
+
To add or remove services to be started at boot-time, use {{ic|systemctl enable<nowiki>|</nowiki>disable ''<service_name>''}}
DAEMONS=(syslog-ng network netfs crond)
+
  
They will start in the order you have them listed. You can disable one and keep it in the array by prefixing it with an exclamation mark ({{ic|!}}). You can also have them start in the background by adding the {{ic|@}} symbol in front of it.
+
===Starting manually===
 +
To start or stop services at runtime, use {{ic|systemctl start<nowiki>|</nowiki>stop ''<service_name>''}}.
  
Daemon scripts are stored in {{ic|/etc/rc.d/}}. You can print the list of all the available daemons on your system, along with their current status, with:
+
===Restarting===
$ rc.d list
+
To restart services, use {{ic|systemctl restart ''<service_name>''}}.
  
===Performing daemon actions manually===
+
===Status reporting===
Every daemon has a series of actions that can be called with specific commands: usually there are at least {{ic|start}}, {{ic|stop}}, and {{ic|restart}}. You can issue each with:
+
To report the current status of a service, use {{ic|systemctl status ''<service_name>''}}.
# /etc/rc.d/''daemon-name'' {start|stop|restart|...}
+
A completely equivalent way is:
+
# rc.d {start|stop|restart|...} ''daemon-name-1'' ''daemon-name-2'' ''daemon-name-3'' ...
+
which, as it is clear from the example, works also with a list of daemons, calling for each the given action.
+
  
For a list of all the available commands for a specific daemon, check its documentation, or just open the script in a text viewer.
+
==List of daemons==
 
+
See [[Daemons List]] for a list of daemons with the name of the service and legacy rc.d script.
===Essentials===
+
You do not have to add any more services, if you do not feel the need. However, a typical desktop user will add at least [[CUPS]] and [[D-Bus|dbus]]. As you install new services, you will have to manually add them to the {{ic|DAEMONS}} array in {{ic|/etc/[[rc.conf]]}}.
+
 
+
===Starting Daemons in Background===
+
This is helpful for starting a service and letting the next service start before the previous one has finished. Which services to start background depends on your needs. Do not background anything you need immediately. Here is an example:
+
DAEMONS=(syslog-ng gensplash dbus network netfs @avahi-daemon @samba @crond @openntpd @cupsd @mpd)
+
 
+
Starting {{ic|openntpd}} in the background could lead to synchronization errors between the actual time and the time stored on your computer. If you recognize an increasing time difference between your desktop clock and the actual time, try to start the {{ic|openntpd}} daemon normally and not in the background.
+
 
+
===rc.conf GUI front-ends===
+
[[Rc.conf GUI Frontends|rc.conf GUI front-ends]] allow one to easily change settings in {{ic|/etc/rc.conf}} using a graphical application.
+
 
+
==Systemd system==
+
 
+
To see a list of running units (some of which will be daemons, amongst other things), type:
+
$ systemctl list-units
+
To see all available ones, add {{ic| --all}} to the end of a command.
+
 
+
To start a daemon, use:
+
# systemctl start <name>.service
+
 
+
To enable it at boot, in the above replace {{ic|start}} with {{ic|enable}}.
+
 
+
The counter-parts to the previous commands are {{ic|stop}} and {{ic|disable}}.
+
 
+
You can read more at the [[Systemd#Systemd_commands]] section.
+
 
+
==List of Daemons==
+
Here is a list of daemons. Note that any package can provide a daemon, so this list will never be complete. Please feel free to add any missing daemons here, in alphabetical order.
+
For each daemon the name of the script (for [[rc.conf|initscripts]]) and of the service (for [[systemd]]) is given.
+
{| border="1"
+
!Initscripts!!Systemd!!Description
+
|-
+
|[[acpid]]||acpid.service||Delivers ACPI events.
+
|-
+
|[[Advanced Linux Sound Architecture|alsa]]||alsa-store.service
+
alsa-restore.service
+
||Advanced Linux Sound Architecture; provides device drivers for sound cards.
+
|-
+
|atd||''not yet implemented''||Run jobs queued for later execution.
+
|-
+
|[[Avahi|avahi-daemon]]||avahi-daemon.service||Allows programs to automatically find local network services.
+
|-
+
|[[Avahi|avahi-dnsconfd]]||avahi-dnsconfd.service||
+
|-
+
|[[Chrony|chrony]]||chrony.service||Alternative NTP client/server designed for systems not online all the time.
+
|-
+
|[[ClamAV|clamav]]||clamd.service
+
freshclamd.service
+
||Antivirus.
+
|-
+
|[[CPU_Frequency_Scaling|cpupower]]||cpupower.service||Userspace tools for the kernel cpufreq subsystem
+
|-
+
|craftbukkit||''not yet implemented''||CraftBukkit Minecraft server
+
|-
+
|[[Cron|crond]]||cronie.service||Daemon to schedule and time events. The daemon name ''crond'' is used by at least two packages, {{Pkg|cronie}} and {{Pkg|dcron}}.
+
|-
+
|[[CUPS|cupsd]]||cupsd.service
+
''or'' cups.service
+
||Common UNIX Printing System daemon.
+
|-
+
|[[D-Bus|dbus]]||dbus.service||Message bus system for software communication.
+
|-
+
|[[Deluge|deluged]]||deluged.service||Cross-platform and full-featured BitTorrent client.
+
|-
+
|[[Deluge|deluge-web]]||deluge-web.service||Cross-platform and full-featured BitTorrent client web UI.
+
|-
+
|[[Dropbox|dropboxd]]||''not yet implemented''||Cross-platform file synchronisation with version control.
+
|-
+
|[[FAM|fam]]||''deprecated''||File Alteration Monitor. (deprecated)
+
|-
+
|fancontrol||fancontrol.service||Fan control daemon (part of lm_sensors)
+
|-
+
|[[Fbsplash|fbsplash]]||''not yet implemented''||Graphical boot splash screen for the user.
+
|-
+
|ftpd||''not yet implemented''||Inetutils ftp daemon
+
|-
+
|[[GDM|gdm]]||gdm.service||Gnome Display Manager (Login Screen)
+
|-
+
|[[Git|git-daemon]]||git-daemon.socket||GIT daemon
+
|-
+
|[[Console Mouse Support|gpm]]||gpm.service||Console mouse support.
+
|-
+
|[[HAL|hal]]||''deprecated''||Hardware Abstraction Layer. (Deprecated)
+
|-
+
|hddtemp||hddtemp.service||Hard drive temperature monitor daemon
+
|-
+
|healthd||healthd.service||A daemon which can be used to alert you in the event of a hardware health monitoring alarm (part of lm_sensors).
+
|-
+
|-
+
|iptables||iptables.service||Load firewall rules.
+
|-
+
|-
+
|ip6tables||ip6tables.service||Load firewall rules for ipv6.
+
|-
+
|[[LAMP|httpd]]||httpd.service
+
See [[Systemd/Services#apache2]] for manual configuration.
+
||Apache HTTP Server (Web Server)
+
|-
+
|[[hwclock]]||||Not a daemon as such, but on shutdown, updates hwclock to compensate for drift. Only run this daemon if ntpd is not running as both daemons adjust the hardware clock.
+
|-
+
|irqbalance||''not yet implemented''||Irqbalance is the Linux utility tasked with making sure that interrupts from your hardware devices are handled in as efficient a manner as possible.
+
|-
+
|[[KDE|kdm]]||kdm.service||KDE Display Manager (Graphical Login)
+
|-
+
|krb5-kadmind||krb5-kadmind.service||Kerberos 5 administration server
+
|-
+
|krb5-kdc||krb5-kdc.service||Kerberos 5 KDC
+
|-
+
|krb5-kpropd||krb5-kpropd.service||Kerberos 5 propagation server
+
|-
+
|[[Laptop Mode Tools|laptop-mode]]||laptop-mode-tools.service||Laptop Power Saving Tools
+
|-
+
|[[lighttpd]]||lighttpd.service||Lighttpd HTTP Server (Web Server).
+
|-
+
|mdadm||mdadm.service||MD Administration (Linux Software RAID).
+
|-
+
|[[Music Player Daemon|mpd]]||mpd.service||Music Player Daemon.
+
|-
+
|[[MySQL|mysqld]]||mysqld.service||MySQL database server.
+
|-
+
|netfs||''unused, handled automatically, see''
+
remote-fs.target
+
''to manually execute scripts''
+
||Mounts network file systems.
+
|-
+
|[[Netcfg|net-auto-wired]]||net-auto-wired.service||Netcfg replacement for {{ic|network}} - connects to wired network
+
|-
+
|[[Netcfg|net-auto-wireless]]||net-auto-wireless.service||Netcfg replacement for {{ic|network}} - connects to wireless network
+
|-
+
|[[Netcfg|net-profiles]]||netcfg.service
+
netcfg@<profile-name>.service
+
||Netcfg replacement for {{ic|network}} - connects to profiles
+
|-
+
|[[Configuring_Network|network]]||''(dynamic Ethernet)'' dhcpcd@<interface>.service||To bring up the network connections.
+
|-
+
|[[NetworkManager|networkmanager]]||NetworkManager.service
+
NetworkManager-wait-online.service
+
||Replaces {{ic|network}}, and provides configuration and detection for automatic network connections.
+
|-
+
|[[Nginx|nginx]]||nginx.service||Nginx HTTP Server and IMAP/POP3 proxy server (Web Server)
+
|-
+
|nscd||nscd.service||Name service cache daemon
+
|-
+
|[[Network Time Protocol daemon|ntpd]]||ntpd.service||Network Time Protocol daemon (client and server).
+
|-
+
|[[OpenNTPD|openntpd]]||openntpd.service||alternate Network Time Protocol daemon (client and server).
+
|-
+
|osspd||osspd.service||OSS Userspace Bridge.
+
|-
+
|[[Pdnsd|pdnsd]]||pdnsd.service||Proxy DNS server with permanent caching.
+
|-
+
|[[Nginx#1st_Method_.22New.22_.28as_of_PHP_5.3.3.29|php-fpm]]||||FastCGI Process Manager for PHP
+
|-
+
|[[PostgreSQL|postgresql]]||postgresql.service||PostgreSQL database server.
+
|-
+
|[[powernowd]]||''not yet implemented''||To adjust speed of CPU depending on system load. See also [[CPU Frequency Scaling]]
+
|-
+
|ppp||''not yet implemented''||A daemon which implements the Point-to-Point Protocol for dial-up networking.
+
|-
+
|[[preload]]||preload.service||Makes applications run faster by prefetching binaries and shared objects.
+
|-
+
|pure-ftpd||''not yet implemented''||FTP server.
+
|-
+
|[[readahead]]||systemd-readahead-collect.service
+
systemd-readahead-done.service
+
 
+
systemd-readahead-drop.service
+
 
+
systemd-readahead-replay.service
+
||Readahead for faster boot
+
|-
+
||rfkill||rfkill.service||(Un)block radio devices. (.service does not seem to provide equivalent functionality.)
+
|-
+
|[[Rsync|rsyncd]]||rsyncd.service||Rsync daemon.
+
|-
+
|[[Rsyslog|rsyslogd]]||rsyslog.service||The latest version of a system logger.
+
|-
+
|[[samba]]||smbd.service
+
nmbd.service
+
 
+
winbindd.service
+
||File and print services for Microsoft Windows clients.
+
|-
+
|[[USB_Scanner_Support|saned]]||saned@.service||To share the scanner system over network.
+
|-
+
|sensord||sensord.service||Sensor information logging daemon (part of lm_sensors)
+
|-
+
|[[Lm sensors|sensors]]||lm_sensors.service||Hardware (temperature, fans etc) monitoring.
+
|-
+
|[[SLiM|slim]]||slim.service||Simple Login Manager
+
|-
+
|[[SMART|smartd]]||smartd.service||Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T) Hard Disk Monitoring
+
|-
+
|snmpd||''not yet implemented''||A suite of applications used to implement SNMP
+
|-
+
|soundmodem||''not yet implemented''||Multiplatform Soundcard Packet Radio Modem
+
|-
+
|[[Secure Shell|sshd]]||sshd.service
+
sshd@.service
+
 
+
sshdgenkeys.service
+
||OpenSSH (secure shell) daemon.
+
|-
+
|stbd||''deprecated''||This daemon was previously necessary for gnome-system-tools.  However, as of gnome-tools 2.28, it is no longer needed.
+
|-
+
|svnserve||svnserve.service||Subversion server
+
|-
+
|syslogd||''deprecated''||This was the older and basic system logger.
+
|-
+
|[[syslog-ng]]||syslog-ng.service||System logger next generation.
+
|-
+
|[[Timidity|timidity++]]||''not yet implemented''||Software synthesizer for MIDI.
+
|-
+
|[[Transmission|transmissiond]]||transmission.service||Bit Torrent Daemon.
+
|-
+
|[[Ufw|ufw]]||ufw.service||Uncomplicated FireWall.
+
|-
+
|[[VirtualBox|vboxservice]]||vboxservice.service||VirtualBox Guest Service
+
|-
+
|[[Very Secure FTP Daemon|vsftpd]]||vsftpd.service
+
vsftpd@.service
+
 
+
vsftpd-ssl.service
+
||FTP server.
+
|-
+
|[[wicd]]||wicd.service||Combine with dbus to replace {{ic|network}}, a lightweight alternative to NetworkManager.
+
|-
+
|[[x11vnc]]||''not yet implemented''||VNC remote desktop daemon
+
|-
+
|}
+
  
 
==See also==
 
==See also==
* [[rc.conf|Initscripts]]
 
 
* [[Systemd|systemd]]
 
* [[Systemd|systemd]]
* Examples for [[writing rc.d scripts]]
 
 
* Examples for writing [[Systemd/Services]]
 
* Examples for writing [[Systemd/Services]]

Revision as of 13:22, 8 February 2013

A daemon is a program that runs as a "background" process (without a terminal or user interface), commonly waiting for events to occur and offering services. A good example is a web server that waits for a request to deliver a page, or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. Daemons are for tasks like writing messages into a log file (e.g. syslog, metalog) or keeping your system time accurate (e.g. ntpd). For more information see man 7 daemon.

Note: The word daemon is sometimes used for a class of programs that are started at boot but have no process which remains in memory. They are called daemons simply because they utilize the same startup/shutdown framework (e.g. systemd service files of Type oneshot) used to start traditional daemons. For example, the service files for alsa-store and alsa-restore provide persistent configuration support but do not start additional background processes to service requests or respond to events.

From the user's perspective the distinction is typically not significant unless the user tries to look for the "daemon" in a process list.

Managing daemons

In Arch Linux, daemons are managed by systemd. The systemctl command is the user interface used to manage them. It reads <service>.service files that contain information about how and when to start the associated daemon. Service files are stored in /{etc,usr/lib,run}/systemd/system. See systemd#Using units for complete information about using systemctl to manage daemons.

Starting on boot

To add or remove services to be started at boot-time, use systemctl enable|disable <service_name>

Starting manually

To start or stop services at runtime, use systemctl start|stop <service_name>.

Restarting

To restart services, use systemctl restart <service_name>.

Status reporting

To report the current status of a service, use systemctl status <service_name>.

List of daemons

See Daemons List for a list of daemons with the name of the service and legacy rc.d script.

See also