Systemd - dogtagpki/pki GitHub Wiki
To list services:
$ systemctl list-units --type=service
To start a service:
$ systemctl start <name>.service
To stop a service:
$ systemctl stop <name>.service
To check service status:
$ systemctl status <name>.service
To reload systemd configuration:
$ systemctl daemon-reload
The global systemd journal configuration is located at /etc/systemd/journald.conf.
To restrict the journal size to 100 MB:
[Journal] SystemMaxUse=100M
Then restart the systemd journal service:
$ systemctl restart systemd-journald
To view systemd journal for a PKI instance:
$ journalctl -u pki-tomcatd@<instance>.service
To clear systemd journals except for the last 2 days:
$ journalctl --vacuum-time=2d
To clear systemd journals except for the last 100 MB:
$ journalctl --vacuum-size=100M
$ systemd-ask-password --keyname=nssdb --accept-cached "NSS database password:" NSS database password: ********** Secret.123
$ keyctl search @u user nssdb @s 576612158
$ keyctl print %user:nssdb Secret.123
To notify that the service is ready:
$ systemd-notify --pid=<PID> --ready
If PKI service fails to start with the following error:
Starting PKI Tomcat Server pki-tomcat... [email protected]: Failed to determine user credentials: No such process [email protected]: Failed at step USER spawning /usr/sbin/pki-server: No such process [email protected]: Control process exited, code=exited, status=217/USER [email protected]: Failed with result 'exit-code'. Failed to start PKI Tomcat Server pki-tomcat.
execute the following command:
$ systemctl daemon-reexec
- systemd.service
- Understanding Systemd Units and Unit Files
- How To Use Systemctl to Manage Systemd Services and Units
- Packaging:Systemd
- RHEL 7 - System Administrator's Guide - Working with systemd Targets
- Using environment variables in systemd units
- DS Systemd
- Tomcat Systemd
- PKI Systemd Service
- Nuxwdog
- Keyring
- Understanding Systemd Units and Unit Files
- systemd-notify
- sd_notify