Suivant: , Précédent: , Monter: Services   [Table des matières][Index]


Linux Services

8.8.29 Early OOM Service

Early OOM, also known as Earlyoom, is a minimalist out of memory (OOM) daemon that runs in user space and provides a more responsive and configurable alternative to the in-kernel OOM killer. It is useful to prevent the system from becoming unresponsive when it runs out of memory.

Scheme Variable : earlyoom-service-type

The service type for running earlyoom, the Early OOM daemon. Its value must be a earlyoom-configuration object, described below. The service can be instantiated in its default configuration with:

Data Type : earlyoom-configuration

This is the configuration record for the earlyoom-service-type.

earlyoom (default: earlyoom)

The Earlyoom package to use.

minimum-available-memory (default: 10)

The threshold for the minimum available memory, in percentages.

minimum-free-swap (default: 10)

The threshold for the minimum free swap memory, in percentages.

prefer-regexp (default: #f)

A regular expression (as a string) to match the names of the processes that should be preferably killed.

avoid-regexp (default: #f)

A regular expression (as a string) to match the names of the processes that should not be killed.

memory-report-interval (default: 0)

The interval in seconds at which a memory report is printed. It is disabled by default.

ignore-positive-oom-score-adj? (default: #f)

A boolean indicating whether the positive adjustments set in /proc/*/oom_score_adj.

show-debug-messages? (default: #f)

A boolean indicating whether debug messages should be printed. The logs are saved at /var/log/earlyoom.log.

send-notification-command (default: #f)

This can be used to provide a custom command used for sending notifications.

8.8.29.1 Kernel Module Loader Service

The kernel module loader service allows one to load loadable kernel modules at boot. This is especially useful for modules that don’t autoload and need to be manually loaded, as it’s the case with ddcci.

Scheme Variable : kernel-module-loader-service-type

The service type for loading loadable kernel modules at boot with modprobe. Its value must be a list of strings representing module names. For example loading the drivers provided by ddcci-driver-linux, in debugging mode by passing some module parameters, can be done as follow:

(use-modules (gnu) (gnu services))
(use-package-modules linux)
(use-service-modules linux)

(define ddcci-config
  (plain-file "ddcci.conf"
              "options ddcci dyndbg delay=120"))

(operating-system
  ...
  (services (cons* (service kernel-module-loader-service-type
                            '("ddcci" "ddcci_backlight"))
                   (simple-service 'ddcci-config etc-service-type
                                   (list `("modprobe.d/ddcci.conf"
                                           ,ddcci-config)))
                   %base-services))
  (kernel-loadable-modules (list ddcci-driver-linux)))

Suivant: , Précédent: , Monter: Services   [Table des matières][Index]