informatique:system_admin:systemd
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:system_admin:systemd [31/10/2025 12:15] – [systemd] cyrille | informatique:system_admin:systemd [01/12/2025 10:15] (Version actuelle) – [Resolve] cyrille | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| Voir aussi [[/ | Voir aussi [[/ | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| Les directives: | Les directives: | ||
| Ligne 9: | Ligne 12: | ||
| * https:// | * https:// | ||
| - | Pour envoyer une notification en cas d' | + | Pour envoyer une notification en cas d' |
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | |||
| + | '' | ||
| ===== Timer (Cron) ===== | ===== Timer (Cron) ===== | ||
| Ligne 22: | Ligne 27: | ||
| - https:// | - https:// | ||
| - https:// | - https:// | ||
| + | |||
| + | ==== Exemple ==== | ||
| + | |||
| + | les stats de livraison d' | ||
| + | |||
| + | Le service ''/ | ||
| + | |||
| + | < | ||
| + | # | ||
| + | # Génère des stats de delivery pour Postfix | ||
| + | # | ||
| + | # Doc: | ||
| + | # Timer: https:// | ||
| + | # Service: https:// | ||
| + | # Unit: https:// | ||
| + | # | ||
| + | [Unit] | ||
| + | Description=Génère qlqs stats Postfix | ||
| + | # A space-separated list of one or more units that are activated when this unit enters the " | ||
| + | OnFailure=onfailure-email@%N.service | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | ExecStart=/ | ||
| + | # Additional commands that are executed after the service is stopped. | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | Le timer ''/ | ||
| + | |||
| + | < | ||
| + | [Unit] | ||
| + | Description=Génère périodiquement qlqs stats Postfix | ||
| + | |||
| + | [Timer] | ||
| + | # https:// | ||
| + | # check format with `systemd-analyze calendar "*-*-* 00/ | ||
| + | OnCalendar=*-*-* 00/6:00:00 | ||
| + | Persistent=true | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=timers.target | ||
| + | </ | ||
| + | |||
| + | ===== Resolve ===== | ||
| + | |||
| + | La gestion DSN par systemd. | ||
| + | |||
| + | * [[https:// | ||
| + | * https:// | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl status systemd-resolved.service | ||
| + | |||
| + | # ========== | ||
| + | |||
| + | $ sudo resolvectl status | ||
| + | Global | ||
| + | | ||
| + | resolv.conf mode: uplink | ||
| + | |||
| + | Link 2 (ens3) | ||
| + | Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 | ||
| + | | ||
| + | Current DNS Server: 2001: | ||
| + | DNS Servers: 2001: | ||
| + | |||
| + | Link 3 (ens4) | ||
| + | Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 | ||
| + | | ||
| + | Current DNS Server: 213.186.33.99 | ||
| + | DNS Servers: 213.186.33.99 | ||
| + | |||
| + | # ========== | ||
| + | |||
| + | $ sudo resolvectl statistics | ||
| + | DNSSEC supported by current servers: no | ||
| + | |||
| + | Transactions | ||
| + | Current Transactions: | ||
| + | Total Transactions: | ||
| + | | ||
| + | Cache | ||
| + | Current Cache Size: 1 | ||
| + | Cache Hits: 478 | ||
| + | Cache Misses: 4417 | ||
| + | | ||
| + | DNSSEC Verdicts | ||
| + | Secure: 0 | ||
| + | Insecure: 0 | ||
| + | | ||
| + | | ||
| + | |||
| + | # ========== | ||
| + | |||
| + | $ sudo resolvectl query 1.1.1.1 | ||
| + | 1.1.1.1: one.one.one.one | ||
| + | -- Information acquired via protocol DNS in 23.6ms. | ||
| + | -- Data is authenticated: | ||
| + | -- Data from: network | ||
| + | |||
| + | </ | ||
| + | |||
informatique/system_admin/systemd.1761909339.txt.gz · Dernière modification : de cyrille
