4 Core daemons

Linux requires some core daemons to work properly. Switch the run level to 1 (single user) using the following command:

sudo init 1  
  

If you are running any GUI, it will stop the GUI and drop back to a command line interface. Then, we execute the following command:

ps -Af --forest | less  
  

The output of this command uses ASCII characters to approxiate a tree, much like when Windows Explorer displays folders and files when a folder is explored.. In such a tree, a child process/thread is indented to the right when compared to its parent process/thread.

At run level 1, you should see kthreadd as a top-level process and many threads as its children. kthreadd is a daemon that starts kernel threads, mostly for module (device driver) purposes. These children of kthreadd are usually essential to the operation of the system.

The top-level process init usually has at least one child called bash (that is your command line interface interpreter). bash should list ps, which is the command that is being run (from the command line interface).

Other than the tree rooted at init, this list of processes identifies all the important core daemons. Even this list of daemons can be reduced in some systems. Some of these daemons (children of kthreadd) are the results of loading specific kernel modules (device drivers). For instance, the thread named kacpid is required by the device driver module acpi, which stands for “Advanced Configuration and Power Interface”. If the device driver module acpi is not loaded, the associated thread kacpid does not get started.

Experienced Linux users can use the command lsmod, lspci, lsusb and lspcmcia to discover what hardware devices are present and which device driver modules are associated with them. Armed with such information, a user can potentially trim the number of loaded modules to reduce consumed processing resources.