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 [2018/05/23 12:03] – [Timeout in attesa di un device] niccolo | doc:appunti:linux:sa:systemd [2024/11/15 15:01] (current) – [Verifica dipendenze servizi] niccolo | ||
---|---|---|---|
Line 152: | Line 152: | ||
</ | </ | ||
+ | ===== 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 ===== | ===== Riferimenti web ===== |
doc/appunti/linux/sa/systemd.1527069832.txt.gz · Last modified: 2018/05/23 12:03 by niccolo