LinuxVillage community documentation

Ceci est une ancienne révision du document !


A PCRE internal error occured. This might be caused by a faulty plugin

====== Teutates : ta dernière révision pour la page d'accueil est sous les tutoriels suivants à la section "Bienvenue sur le wiki LinuxVillage !": ====== ====== PlayGround ====== ====== Welcome to LinuxVillage wiki! ====== LinuxVillage wiki is meant to help all users, from the very beginners to the advanced. All are welcome to participate and bring knowledge. ---- <WRAP group> <WRAP half column> ==== Some sections ==== * Beginners * Average * Advanced </WRAP> <WRAP half column> ==== More sections ==== * Software * Hardware * System * Desktop </WRAP> </WRAP> ---- <html><span style="float:left;width:48%;"></html> ====sec=== * test * test <html></span></html> <html><span style="float:right;width:48%;"></html> ====sec=== * test * test <html></span></html> <html><span style="color:red;font-size:150%;">inline HTML</span></html> <html> This is some <span style="color:red;font-size:150%;">inline HTML</span> </html> <HTML> <p style="border:2px dashed red;">And this is some block HTML</p> </HTML> ---- ==== Astuce suivante ==== Samedi 13 mai 2015 - cours LPIC nouveau programme : Systemd. Projet du jour, apprendre en traduisant un wiki anglais en wiki français : https://wiki.archlinux.org/index.php/Systemd puis porter la traduction vers les wiki archlinux.fr, debian-facile, et linuxvillage. Paragraphe de la présentation en anglais: systemd Related articles systemd/User systemd/Timers systemd FAQ init init Rosetta Daemons List udev Improve boot performance Allow users to shutdown From the project web page: systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. Note: For a detailed explanation as to why Arch has moved to systemd, see this forum post. Traduction de la présentation: Selon la page web du projet: systemd est un système et un gestionnaire de services pour Linux, compatible avec SysV et les scripts d'init LSB. systemd fournit des fonctionnalités de parallelization agressives, utilise l'activation de socket et D-Bus pour démarrer des services, offre un démarrage des daemons à la demande, effectue un suivi des processus en utilisant les groupes de contrôle Linux (cgroups), permet d'effectuer et de restaurer des instantanés (snapshots) de l'état du système, s'assure de l'état des points de montage et d'automontage et implémente une logique transactionnelle de contrôle des services élaborée, basée sur les dépendances. Note: pour une explication détaillée sur le pourquoi Arch a changé pour systemd, voyez ce post sur le forum. (ici, il y a un hyperlien - https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530). Basic systemctl usage The main command used to introspect and control systemd is systemctl. Some of its uses are examining the system state and managing the system and services. See man 1 systemctl for more details. Tip: * You can use all of the following systemctl commands with the -H user@host switch to control a systemd instance on a remote machine. This will use SSH to connect to the remote systemd instance. * systemadm is the official graphical frontend for systemctl. It is provided by systemd-ui from the official repositories or by systemd-ui-gitAUR from the AUR for the development version. Analyzing the system state List running units: $ systemctl or: $ systemctl list-units List failed units: $ systemctl --failed The available unit files can be seen in /usr/lib/systemd/system/ and /etc/systemd/system/ (the latter takes precedence). You can see a list of the installed unit files with: $ systemctl list-unit-files Utilisation basique de systemctl La principale commande utilisée pour pratiquer une introspection et contrôler systemd est systemctl. Certaines de ses utilisations sont d'examiner l'état du système et de génrer le système et les services. Voyez man 1 systemctl pour plus de détails. Astuce: * Vous pouvez toutes les commandes systemctl suivantes avec l'option user@host pour contrôler une instance de systemd sur une machine distante. Cela utilisera SSH pour se connecter à l'instance systemd distante. * systemadm est l'interface graphique officielle pour systemctl. Elle est fournie par systemd-ui depuis les dépôts officiels ou par systemd-ui-gitAUR depuis AUR pour la version de développement. Analyser l'état du système Lister les unités en cours d'utilisation: $ systemctl ou: $ systemclt list-units Lister les unités qui ont échoué: $ systemctl --failed Les fichiers des unités disponibles se trouvent sous /usr/lib/systemd/system/ et /etc/systemd/system/ (ce dernier est prioritaire). Vous pouvez voir une liste des fichiers des unités installées avec: $ systemctl list-unit-files Using units Units can be, for example, services (.service), mount points (.mount), devices (.device) or sockets (.socket). When using systemctl, you generally have to specify the complete name of the unit file, including its suffix, for example sshd.socket. There are however a few short forms when specifying the unit in the following systemctl commands: * If you do not specify the suffix, systemctl will assume .service. For example, netctl and netctl.service are equivalent. * Mount points will automatically be translated into the appropriate .mount unit. For example, specifying /home is equivalent to home.mount. * Similar to mount points, devices are automatically translated into the appropriate .device unit, therefore specifying /dev/sda2 is equivalent to dev-sda2.device. See man systemd.unit for details. Note: Some unit names contain an @ sign (e.g. name@string.service): this means that they are instances of a template unit, whose actual file name does not contain the string part (e.g. name@.service). string is called the instance identifier, and is similar to an argument that is passed to the template unit when called with the systemctl command: in the unit file it will substitute the %i specifier. To be more accurate, before trying to instantiate the name@.suffix template unit, systemd will actually look for a unit with the exact name@string.suffix file name, although by convention such a "clash" happens rarely, i.e. most unit files containing an @ sign are meant to be templates. Also, if a template unit is called without an instance identifier, it will just fail, since the %i specifier cannot be substituted. Tip: XX * Most of the following commands also work if multiple units are specified, see man systemctl for more information. * A package may offer units for different purposes. If you just installed a package, pacman -Qql package | grep -Fe .service -e .socket can be used to check and find them. Start a unit immediately: # systemctl start unit Stop a unit immediately: # systemctl stop unit Restart a unit: # systemctl restart unit Ask a unit to reload its configuration: # systemctl reload unit Show the status of a unit, including whether it is running or not: $ systemctl status unit Check whether a unit is already enabled or not: $ systemctl is-enabled unit Enable a unit to be started on bootup: # systemctl enable unit Disable a unit to not start during bootup: # systemctl disable unit Mask a unit to make it impossible to start it: # systemctl mask unit Unmask a unit: # systemctl unmask unit Show the manual page associated with a unit (this has to be supported by the unit file): $ systemctl help unit Reload systemd, scanning for new or changed units: # systemctl daemon-reload Utiliser des unités: Des unités peuvent être, par exemple, des services (.service), des points de montage (.mount), des périphériques (.device) ou des sockets (.socket). Lors de l'appel de systemctl, il est en règle générale nécessaire de préciser le nom complet du fichier d'unité, en incluant son suffixe, comme par exemple sshd.socket. Il existe cependant quelques formes abrégées pour l'appel des unités dans les commandes systemctl suivantes : * Si le suffixe n'est pas spécifié, systemctl supposera qu'il s'agit de .service. Par exemple, netctl et netctl.service sont équivalents. * Les points de montages sont automatiquement remplacés traduits par l'unité .mount appropriée. Par exemple, indiquer /home est équivalent à home.mount * De même que pour les points de montage, les périphériques sont automatiquement traduits dans leur unité .device appropriée, donc si on spécifie /dev/sda2 c'est équivalent à dev-sda2.device. Voyez man systemd.unit pour les détails. Note: Certains noms d'unités contiennent un signe @ (ex: nom@chaine.service): Cela signifie qu'il sont des instances d'une unité template, dont le nom de fichier ne contient en fait pas la partie chaine (ex: nom@.service). chaine est dénommée l'identifiant d'instance, et il est similaire à un argument passé à l'unité de template quand elle est appelée par la commande systemctl : dans le fichier d'unité, cela remplacera l'argument %i. Pour être plus précis, avant d'essayer d'instancier le nom@.suffix de l'unité de template, systemd va en fait rechercher une unité avec le nom de fichier exact nom@chaine.suffix, bien que par convention un tel "clash" se produise rarement, ex: la plupart des fichiers d'unité contenant un signe @ sont destinés à être des templates. Aussi, si une unité de template est appelée sans un identifiant d'instance, il va simplement échouer, puisque l'argument %i ne peut pas être remplacé. Astuce: * La plupart des commandes suivantes fonctionnent aussi si des unités multiples sont spécifiées, voir man systemctl pour plus d'information. * Un paquet peut offrir des unités pour différents objectifs. Si vous venez juste d'installer un paquet, pacman -Qql paquet | grep -Fe .service -e .socket peut être utilisé pour vérifier et pour les trouver. Lancer une unité immédiatement: #systemctl start unit || la commande start l'unité Power management polkit is necessary for power management as an unprivileged user. If you are in a local systemd-logind user session and no other session is active, the following commands will work without root privileges. If not (for example, because another user is logged into a tty), systemd will automatically ask you for the root password. Shut down and reboot the system: $ systemctl reboot Shut down and power-off the system: $ systemctl poweroff Suspend the system: $ systemctl suspend Put the system into hibernation: $ systemctl hibernate Put the system into hybrid-sleep state (or suspend-to-both): $ systemctl hybrid-sleep Writing unit files The syntax of systemd's unit files is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files. Unit files are loaded from two locations. From lowest to highest precedence they are: * /usr/lib/systemd/system/: units provided by installed packages * /etc/systemd/system/: units installed by the system administrator Note: The load paths are completely different when running systemd in user mode. Look at the units installed by your packages for examples. Tip: Comments prepended with # may be used in unit-files as well, but only in new lines. Do not use end-line comments after systemd parameters or the unit will fail to activate. Handling dependencies With systemd, dependencies can be resolved by designing the unit files correctly. The most typical case is that the unit A requires the unit B to be running before A is started. In that case add Requires=B and After=B to the [Unit] section of A. If the dependency is optional, add Wants=B and After=B instead. Note that Wants= and Requires= do not imply After=, meaning that if After= is not specified, the two units will be started in parallel. Dependencies are typically placed on services and not on targets. For example, network.target is pulled in by whatever service configures your network interfaces, therefore ordering your custom unit after it is sufficient since network.target is started anyway. Service types There are several different start-up types to consider when writing a custom service file. This is set with the Type= parameter in the [Service] section: * Type=simple (default): systemd considers the service to be started up immediately. The process must not fork. Do not use this type if other services need to be ordered on this service, unless it is socket activated. * Type=forking: systemd considers the service started up once the process forks and the parent has exited. For classic daemons use this type unless you know that it is not necessary. You should specify PIDFile= as well so systemd can keep track of the main process. * Type=oneshot: this is useful for scripts that do a single job and then exit. You may want to set RemainAfterExit=yes as well so that systemd still considers the service as active after the process has exited. * Type=notify: identical to Type=simple, but with the stipulation that the daemon will send a signal to systemd when it is ready. The reference implementation for this notification is provided by libsystemd-daemon.so. * Type=dbus: the service is considered ready when the specified BusName appears on DBus's system bus. * Type=idle: behavior of idle is very similar to Type=simple; however, actual execution of the service binary is delayed until all jobs are dispatched. This may be used to avoid interleaving of output of shell services with the status output on the console. See man systemd.service for a more detailed explanation. Editing provided unit files There are two ways to edit a unit file provided by a package: replace the entire unit file with a new one or create drop-in snippets which are applied on top of the existing unit file. For both methods, you must reload the unit afterwards to apply your changes. This can be done either by editing the unit with systemctl edit (which reloads the unit automatically) or by reloading all units with: # systemctl daemon-reload Tip: * You can use systemd-delta to see which unit files have been overridden or extended and what exactly has been changed. * Use systemctl cat unit to view the content of a unit file and all associated drop-in snippets. * Syntax highlighting for systemd unit files within Vim can be enabled by installing vim-systemd from the official repositories. Replacement unit files To replace the unit file /usr/lib/systemd/system/unit, create the file /etc/systemd/system/unit and reenable the unit to update the symlinks: # systemctl reenable unit Alternatively, run # systemctl edit --full unit This opens /etc/systemd/system/unit in your editor (copying the installed version if it does not exist yet) and automatically reloads it when you finish editing. Note: Pacman does not update the replacement unit files when the originals are updated, so this method can make system maintenance more difficult. For this reason the next approach is recommended. Drop-in snippets To create drop-in snippets for the unit file /usr/lib/systemd/system/unit, create the directory /etc/systemd/system/unit.d/ and place .conf files there to override or add new options. systemd will parse these .conf files and apply them on top of the original unit. The easiest way to do this is to run: # systemctl edit unit This opens the file /etc/systemd/system/unit.d/override.conf in your text editor (creating it if necessary) and automatically reloads the unit when you are done editing. Examples For example, if you simply want to add an additional dependency to a unit, you may create the following file: /etc/systemd/system/unit.d/customdependency.conf [Unit] Requires=new dependency After=new dependency As another example, in order to replace the ExecStart directive for a unit that is not of type oneshot, create the following file: /etc/systemd/system/unit.d/customexec.conf [Service] ExecStart= ExecStart=new command Note how ExecStart must be cleared before being re-assigned ([1]). One more example to automatically restart a service: /etc/systemd/system/unit.d/restart.conf [Service] Restart=always RestartSec=30 Targets systemd uses targets which serve a similar purpose as runlevels but act a little different. Each target is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some targets are implemented by inheriting all of the services of another target and adding additional services to it. There are systemd targets that mimic the common SystemVinit runlevels so you can still switch targets using the familiar telinit RUNLEVEL command. Get current targets The following should be used under systemd instead of running runlevel: $ systemctl list-units --type=target Create custom target The runlevels that are assigned a specific purpose on vanilla Fedora installs; 0, 1, 3, 5, and 6; have a 1:1 mapping with a specific systemd target. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named systemd target as /etc/systemd/system/your target that takes one of the existing runlevels as a base (you can look at /usr/lib/systemd/system/graphical.target as an example), make a directory /etc/systemd/system/your target.wants, and then symlink the additional services from /usr/lib/systemd/system/ that you wish to enable. Targets table SysV Runlevel systemd Target Notes 0 runlevel0.target, poweroff.target Halt the system. 1, s, single runlevel1.target, rescue.target Single user mode. 2, 4 runlevel2.target, runlevel4.target, multi-user.target User-defined/Site-specific runlevels. By default, identical to 3. 3 runlevel3.target, multi-user.target Multi-user, non-graphical. Users can usually login via multiple consoles or via the network. 5 runlevel5.target, graphical.target Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login. 6 runlevel6.target, reboot.target Reboot emergency emergency.target Emergency shell Change current target In systemd targets are exposed via target units. You can change them like this: # systemctl isolate graphical.target This will only change the current target, and has no effect on the next boot. This is equivalent to commands such as telinit 3 or telinit 5 in Sysvinit. Change default target to boot into The standard target is default.target, which is aliased by default to graphical.target (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following kernel parameters to your bootloader: * systemd.unit=multi-user.target (which roughly corresponds to the old runlevel 3), * systemd.unit=rescue.target (which roughly corresponds to the old runlevel 1). Alternatively, you may leave the bootloader alone and change default.target. This can be done using systemctl: # systemctl set-default multi-user.target To be able to override the previously set default.target, use the force option: # systemctl set-default -f multi-user.target The effect of this command is output by systemctl; a symlink to the new default target is made at /etc/systemd/system/default.target. Temporary files "systemd-tmpfiles creates, deletes and cleans up volatile and temporary files and directories." It reads configuration files in /etc/tmpfiles.d/ and /usr/lib/tmpfiles.d/ to discover which actions to perform. Configuration files in the former directory take precedence over those in the latter directory. Configuration files are usually provided together with service files, and they are named in the style of /usr/lib/tmpfiles.d/program.conf. For example, the Samba daemon expects the directory /run/samba to exist and to have the correct permissions. Therefore, the samba package ships with this configuration: /usr/lib/tmpfiles.d/samba.conf D /run/samba 0755 root root Configuration files may also be used to write values into certain files on boot. For example, if you used /etc/rc.local to disable wakeup from USB devices with echo USBE > /proc/acpi/wakeup, you may use the following tmpfile instead: /etc/tmpfiles.d/disable-usb-wake.conf w /proc/acpi/wakeup - - - - USBE See the systemd-tmpfiles(8) and tmpfiles.d(5) man pages for details. Note: This method may not work to set options in /sys since the systemd-tmpfiles-setup service may run before the appropriate device modules is loaded. In this case you could check whether the module has a parameter for the option you want to set with modinfo module and set this option with a config file in /etc/modprobe.d. Otherwise you will have to write a udev rule to set the appropriate attribute as soon as the device appears. Timers A timer is a unit configuration file whose name ends with .timer and encodes information about a timer controlled and supervised by systemd, for timer-based activation. See systemd/Timers. Note: Timers can replace cron functionality to a great extent. See systemd/Timers#As a cron replacement. Journal systemd has its own logging system called the journal; therefore, running a syslog daemon is no longer required. To read the log, use: # journalctl In Arch Linux, the directory /var/log/journal/ is a part of the systemd package, and the journal (when Storage= is set to auto in /etc/systemd/journald.conf) will write to /var/log/journal/. If you or some program delete that directory, systemd will not recreate it automatically and instead will write its logs to /run/systemd/journal in a nonpersistent way. However, the folder will be recreated when you set Storage=persistent and run systemctl restart systemd-journald (or reboot). Filtering output journalctl allows you to filter the output by specific fields. Be aware that if there are many messages to display or filtering of large time span has to be done, the output of this command can be delayed for quite some time. Tip: While the journal is stored in a binary format, the content of stored messages is not modified. This means it is viewable with strings, for example for recovery in an environment which does not have systemd installed. Example command: $ strings /mnt/arch/var/log/journal/af4967d77fba44c6b093d0e9862f6ddd/system.journal | grep -i message Examples: * Show all messages from this boot: * # journalctl -b * However, often one is interested in messages not from the current, but from the previous boot (e.g. if an unrecoverable system crash happened). This is possible through optional offset parameter of the -b flag: journalctl -b -0 shows messages from the current boot, journalctl -b -1 from the previous boot, journalctl -b -2 from the second previous and so on. See man 1 journalctl for full description, the semantics is much more powerful. * Show all messages from date (and optional time): * # journalctl --since="2012-10-30 18:17:16" * Show all messages since 20 minutes ago: * # journalctl --since "20 min ago" * Follow new messages: * # journalctl -f * Show all messages by a specific executable: * # journalctl /usr/lib/systemd/systemd * Show all messages by a specific process: * # journalctl _PID=1 * Show all messages by a specific unit: * # journalctl -u netcfg * Show kernel ring buffer: * # journalctl -k * Show auth.log equivalent by filtering on syslog facility: * # journalctl -f -l SYSLOG_FACILITY=10 See man 1 journalctl, man 7 systemd.journal-fields, or Lennart's blog post for details. Tip: By default, journalctl truncates lines longer than screen width, but in some cases, it may be better to enable wrapping instead of truncating. This can be controlled by the SYSTEMD_LESS environment variable, which contains options passed to less (the default pager) and defaults to FRSXMK (see man 1 less and man 1 journalctl for details). By omitting the S option, the output will be wrapped instead of truncated. For example, start journalctl as follows: $ SYSTEMD_LESS=FRXMK journalctl If you would like to set this behaviour as default, export the variable from ~/.bashrc or ~/.zshrc. Journal size limit If the journal is persistent (non-volatile), its size limit is set to a default value of 10% of the size of the respective file system. For example, with /var/log/journal located on a 50 GiB root partition this would lead to 5 GiB of journal data. The maximum size of the persistent journal can be controlled by SystemMaxUse in /etc/systemd/journald.conf, so to limit it for example to 50 MiB uncomment and edit the corresponding line to: SystemMaxUse=50M Refer to man journald.conf for more info. Journald in conjunction with syslog Compatibility with a classic, non-journald aware syslog implementation can be provided by letting systemd forward all messages via the socket /run/systemd/journal/syslog. To make the syslog daemon work with the journal, it has to bind to this socket instead of /dev/log (official announcement). As of systemd 216 the default journald.conf for forwarding to the socket was changed to ForwardToSyslog=no to avoid system overhead, because rsyslog or syslog-ng (since 3.6) pull the messages from the journal by itself. See Syslog-ng#Overview and Syslog-ng#syslog-ng and systemd journal, or rsyslog respectively, for details on configuration. Forward journald to /dev/tty12 Create a drop-in directory /etc/systemd/journald.conf.d and create a fw-tty12.conf file in it: /etc/systemd/journald.conf.d/fw-tty12.conf [Journal] ForwardToConsole=yes TTYPath=/dev/tty12 MaxLevelConsole=info Then restart systemd-journald. Troubleshooting Investigating systemd errors As an example, we will investigate an error with systemd-modules-load service: 1. Lets find the systemd services which fail to start: $ systemctl --failed systemd-modules-load.service loaded failed failed Load Kernel Modules 2. Ok, we found a problem with systemd-modules-load service. We want to know more: $ systemctl status systemd-modules-load systemd-modules-load.service - Load Kernel Modules Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static) Active: failed (Result: exit-code) since So 2013-08-25 11:48:13 CEST; 32s ago Docs: man:systemd-modules-load.service(8). man:modules-load.d(5) Process: 15630 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE) If the Process ID is not listed, just restart the failed service with systemctl restart systemd-modules-load 3. Now we have the process id (PID) to investigate this error in depth. Enter the following command with the current Process ID (here: 15630): $ journalctl _PID=15630 -- Logs begin at Sa 2013-05-25 10:31:12 CEST, end at So 2013-08-25 11:51:17 CEST. -- Aug 25 11:48:13 mypc systemd-modules-load[15630]: Failed to find module 'blacklist usblp' Aug 25 11:48:13 mypc systemd-modules-load[15630]: Failed to find module 'install usblp /bin/false' 4. We see that some of the kernel module configs have wrong settings. Therefore we have a look at these settings in /etc/modules-load.d/: $ ls -Al /etc/modules-load.d/ ... -rw-r--r-- 1 root root 79 1. Dez 2012 blacklist.conf -rw-r--r-- 1 root root 1 2. Mär 14:30 encrypt.conf -rw-r--r-- 1 root root 3 5. Dez 2012 printing.conf -rw-r--r-- 1 root root 6 14. Jul 11:01 realtek.conf -rw-r--r-- 1 root root 65 2. Jun 23:01 virtualbox.conf ... 5. The Failed to find module 'blacklist usblp' error message might be related to a wrong setting inside of blacklist.conf. Lets deactivate it with inserting a trailing # before each option we found via step 3: /etc/modules-load.d/blacklist.conf # blacklist usblp# install usblp /bin/false 6. Now, try to start systemd-modules-load: $ systemctl start systemd-modules-load If it was successful, this should not prompt anything. If you see any error, go back to step 3 and use the new PID for solving the errors left. If everything is ok, you can verify that the service was started successfully with: $ systemctl status systemd-modules-load systemd-modules-load.service - Load Kernel Modules Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static) Active: active (exited) since So 2013-08-25 12:22:31 CEST; 34s ago Docs: man:systemd-modules-load.service(8) man:modules-load.d(5) Process: 19005 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS) Aug 25 12:22:31 mypc systemd[1]: Started Load Kernel Modules. Often you can solve these kind of problems like shown above. For further investigation look at #Diagnosing boot problems. Diagnosing boot problems Boot with these parameters on the kernel command line:systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M More Debugging Information. Diagnosing problems with a specific service The factual accuracy of this article or section is disputed. Reason: This may not catch all errors such as missing libraries. (Discuss in User talk:Alucryd#Plex) If some systemd service misbehaves and you want to get more information about what is going on, set the SYSTEMD_LOG_LEVEL environment variable to debug. For example, to run the systemd-networkd daemon in debug mode: # systemctl stop systemd-networkd # SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd Or, equivalently, modify the service file temporarily for gathering enough output. For example: /usr/lib/systemd/system/systemd-networkd.service [Service] ... Environment=SYSTEMD_LOG_LEVEL=debug .... If debug information is required long-term, add the variable the regular way. Shutdown/reboot takes terribly long If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. systemd waits some time for each service to exit before trying to kill it. To find out if you are affected, see this article. Short lived processes do not seem to log any output If journalctl -u foounit does not show any output for a short lived service, look at the PID instead. For example, if systemd-modules-load.service fails, and systemctl status systemd-modules-load shows that it ran as PID 123, then you might be able to see output in the journal for that PID, i.e. journalctl -b _PID=123. Metadata fields for the journal such as _SYSTEMD_UNIT and _COMM are collected asynchronously and rely on the /proc directory for the process existing. Fixing this requires fixing the kernel to provide this data via a socket connection, similar to SCM_CREDENTIALS. Disabling application crash dumps journaling Edit the file /etc/systemd/coredump.conf by adding this line: Storage=none and run systemctl daemon-reload to reload the configuration. Error message on reboot or shutdown cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd" See this thread for an explanation. watchdog watchdog0: watchdog did not stop! See this thread for an explanation. Boot time increasing over time After using systemd-analyze a number of users have noticed that their boot time has increased significantly in comparison with what it used to be. After using systemd-analyze blame NetworkManager is being reported as taking an unusually large amount of time to start. The problem for some users has been due to /var/log/journal becoming too large. This may have other impacts on performance, such as for systemctl status or journalctl. As such the solution is to remove every file within the folder (ideally making a backup of it somewhere, at least temporarily) and then setting a journal file size limit as described in #Journal size limit. systemd-tmpfiles-setup.service fails to start at boot Starting with systemd 219, /usr/lib/tmpfiles.d/systemd.conf specifies ACL attributes for directories under /var/log/journal and, therefore, requires ACL support to be enabled for the filesystem the journal resides on. See Access Control Lists#Enabling ACL for instructions on how to enable ACL on the filesystem that houses /var/log/journal. === ====== Bienvenue sur le wiki LinuxVillage ! ====== Le wiki LinuxVillage est destiné à aider tous les utilisateurs depuis les plus débutants jusqu'aux utilisateurs avancés. Tous sont les bienvenus pour participer et apporter leur savoir. <WRAP center round important 60%> Veuillez utiliser le [[playground:playground|bac à sable]] pour vous exercer, </WRAP> ---- <WRAP group> <WRAP half column> ==== Où commencer (débutants) ==== * [[fr:materiel|Matériel]] * [[fr:tester Tester - Diverses méthodes]] * [[fr:choix_distribution|Choisir une distribution]] * [[fr:choix_bureau|Choisir son environnement de bureau]] * [[fr:terrain|Préparer le terrain]] * [[fr:partitionner|Partionner avec GParted LiveCD]] * [[fr:equivalence_logicielle|Equivalence logicielle]] </WRAP> <WRAP half column> ==== Sujets généraux ==== * [[fr:logiciels|Logiciels et astuces]] * [[fr:configuration:apercuspersonalises|Aperçus de fichiers PCManFM]] * [[fr:configuration:|Redshift sous Ubuntu]] * [[fr:configuration:gestionnaire de fenêtres|Openbox]] * [[fr:materiel|Matériel]] * [[fr:administration|Administration]] * [[fr:configuration:grub2_personnaliser|Personnaliser Grub2]] * [[fr:configuration:dracut_error|Erreur Dracut : la solution]] </WRAP> </WRAP> <WRAP group> <WRAP half column> <WRAP half column> ==== Distributions et administrations ==== * [[fr:debian|Debian]] * [[fr:configuration:debian_update:|Gérer les applications sous Debian (paquetages)]] * [[fr:configuration:debian_upgrade|Mettre à niveau Debian (monter vers la version supérieure]] * [[fr:fedora|Fedora]] * [[fr:configuration:fedora_update:|Gérer les applications sous Fedora (paquetages)]] * [[fr:configuration:fedora_upgrade|Mettre à niveau Fedora (monter vers la version supérieure]] * [[fr:mageia|Mageia]] * [[fr:configuration:mageia_update:|Gérer les applications sous Mageia (paquetages)]] * [[fr:configuration:mageia_upgrade|Mettre à niveau Mageia (monter vers la version supérieure]] * [[fr:manjaro|Manjaro]] * [[fr:configuration:manjaro_update:|Gérer les applications sous Manjaro (paquetages)]] * [[fr:configuration:manjaro_upgrade|Mettre à niveau Manjaro (monter vers la version supérieure]] * [[fr:ubuntu|Ubuntu]] * [[fr:configuration:ubuntu_update:|Gérer les applications sous Ubuntu (paquetages)]] * [[fr:configuration:ubuntu_upgrade|Mettre à niveau Ubuntu (monter vers la version supérieure]] </WRAP> <WRAP half column> ==== Créer des projets ==== * Création de remix * Méthode Ubuntu Mini Remix + Ubuntu Builder * Méthode des seeds </WRAP> <WRAP half column> ==== Réseaux ==== * [[fr:Filtrer des mails|Astuce filtrage pour Fetchmail]] </WRAP> </WRAP> <WRAP group> <WRAP half column> ==== Contribuer ==== * [[http://wiki.linuxvillage.org/doku.php?id=traduire_des_applications|Traduire des applications]] </WRAP>


Traductions
QR Code
QR Code playground:playground (generated for current page)