doc:appunti:linux:sa:systemd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:systemd [2017/12/28 23:05] – [Modificare Ctrl-Alt-Del con Systemd] niccolo | doc:appunti:linux:sa:systemd [2024/11/15 15:01] (current) – [Verifica dipendenze servizi] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Systemd ====== | ====== Systemd ====== | ||
+ | **[[wp> | ||
===== Comandi di servizio ===== | ===== Comandi di servizio ===== | ||
- | Quando si modifica qualche file di configurazione (ad esempio gli script | + | Quando si modifica qualche file di configurazione (ad esempio gli //unit files// |
< | < | ||
Line 143: | Line 144: | ||
Non è necessario modificare il contenuto di questa directory, si può fare un override creando il link simbolico opportuno nella directory **/ | Non è necessario modificare il contenuto di questa directory, si può fare un override creando il link simbolico opportuno nella directory **/ | ||
- | ===== Riferimenti web ===== | + | ===== Timeout in attesa di un device |
+ | Può capitare che il processo di **bootstrap fallisce** perché un device elencato in **/ | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ===== Verifica Servizi ===== | ||
+ | |||
+ | Alcuni comandi utili per **verificare il funzionamento** dei servizi gestiti da **systemd**. | ||
+ | |||
+ | Mostra lo stato di tutti i **servizi** e di tutte le **unit**: | ||
+ | |||
+ | < | ||
+ | systemctl --all --full status | ||
+ | </ | ||
+ | |||
+ | Mostra le **unit** // | ||
+ | |||
+ | < | ||
+ | systemctl --all list-dependencies ntp.service | ||
+ | </ | ||
+ | |||
+ | ===== Verifica dipendenze servizi ===== | ||
+ | |||
+ | Generates textual **dependency graph** description in //dot// format: | ||
+ | |||
+ | < | ||
+ | systemd-analyze dot | ||
+ | systemd-analyze dot ' | ||
+ | systemd-analyze dot dhcpcd.service | ||
+ | </ | ||
+ | |||
+ | Prints an **SVG graphic** detailing **which system services have been started at what time**: | ||
+ | |||
+ | < | ||
+ | systemd-analyze plot > services-start-graph.svg | ||
+ | </ | ||
+ | |||
+ | Shows units **required** and **wanted** by the specified units: | ||
+ | |||
+ | < | ||
+ | systemctl list-dependencies | ||
+ | systemctl list-dependencies dhcpcd.service | ||
+ | systemctl list-dependencies wpa_supplicant@..service | ||
+ | </ | ||
+ | |||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | |||
+ | ===== Alternativa allo script rc.local ===== | ||
+ | |||
+ | Come eseguire uno script all' | ||
+ | |||
+ | Creare una unit Systemd **/ | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | # | ||
+ | # Service executed once the system has reached the multi-user status. | ||
+ | # | ||
+ | # Type=oneshot | ||
+ | # RemainAfterExit=yes | ||
+ | # when all its processes exited. | ||
+ | # | ||
+ | # Eanble the service with: | ||
+ | # | ||
+ | |||
+ | [Service] | ||
+ | Type=oneshot | ||
+ | RemainAfterExit=yes | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | Abilitare la unit e predisporre lo script **/ | ||
+ | |||
+ | ===== Riferimenti web ===== | ||
* **[[https:// | * **[[https:// | ||
Understanding Systemd Units and Unit Files]]** | Understanding Systemd Units and Unit Files]]** | ||
* **[[https:// | * **[[https:// |
doc/appunti/linux/sa/systemd.1514498727.txt.gz · Last modified: 2017/12/28 23:05 by niccolo