Linux/Systemd: Difference between revisions
< Linux
No edit summary |
mNo edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
journalctl | journalctl | ||
journalctl -u NAME | |||
journalctl -xeu munin-node.service | |||
systemd-analyze critical-chain munin-node.service | |||
hostnamectl | hostnamectl | ||
</pre> | </pre> | ||
* .bashrc | * .bashrc ([[Linux/2-Config/bashrc]]) | ||
<pre> | <pre> | ||
alias systemctl='systemctl --no-pager' | alias systemctl='systemctl --no-pager' | ||
Line 42: | Line 47: | ||
PIDFile=/var/run/dhis/dhid.pid | PIDFile=/var/run/dhis/dhid.pid | ||
</pre> | </pre> | ||
[[Category:Linux/System]] | |||
[[Category:Linux]] |
Latest revision as of 19:12, 29 October 2024
systemctl
systemctl list-units systemctl list-units -t service systemctl status NAME systemctl start NAME systemctl stop NAME systemctl restart NAME systemctl reload NAME systemctl list-unit-files systemctl enable NAME systemctl disable NAME systemctl is-enabled NAME systemctl --failed journalctl journalctl -u NAME journalctl -xeu munin-node.service systemd-analyze critical-chain munin-node.service hostnamectl
- .bashrc (Linux/2-Config/bashrc)
alias systemctl='systemctl --no-pager'
/lib/systemd/system
[Service] Type=forking PrivateTmp=yes User=nobody Group=nobody # Run ExecStartPre with root-permissions PermissionsStartOnly=true ExecStartPre=-/usr/bin/mkdir /var/run/dhis ExecStartPre=/usr/bin/chown -R nobody:nobody /var/run/dhis/ # Run ExecStart with User=nobody / Group=nobody ExecStart=/usr/sbin/dhid -P /var/run/dhis/dhid.pid PIDFile=/var/run/dhis/dhid.pid