Skip to content

Instantly share code, notes, and snippets.

@mbj
Created January 13, 2012 12:35
Show Gist options
  • Save mbj/1605894 to your computer and use it in GitHub Desktop.
Save mbj/1605894 to your computer and use it in GitHub Desktop.
systemctl status check
radon# cat /etc/systemd/system/mongodb.service
[Unit]
Description=MongoDB Server
Wants=network.target
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/mongod --config /etc/mongodb.conf
User=mongodb
Group=mongodb
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target
radon# cat /etc/systemd/system/[email protected]
[Unit]
Description=dhcpcd on %I
Wants=network.target
Before=network.target
[Service]
Type=simple
ExecStart=/sbin/dhcpcd --timeout 0 --nobackground %I
Restart=always
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=network.target
radon# systemctl status [email protected]
[email protected] - dhcpcd on eth0
Loaded: loaded (/etc/systemd/system/[email protected]; disabled)
Active: active (running) since Fri, 16 Dec 2011 01:35:57 +0100; 4 weeks and 0 days ago
Main PID: 340 (dhcpcd)
CGroup: name=systemd:/system/[email protected]/eth0
└ 340 /sbin/dhcpcd --timeout 0 --nobackground eth0
radon#
radon# systemctl status mongodb.service
mongodb.service - MongoDB Server
Loaded: loaded (/etc/systemd/system/mongodb.service; enabled)
Active: active (running) since Fri, 13 Jan 2012 10:50:23 +0100; 2h 44min ago
Main PID: 4766 (mongod)
CGroup: name=systemd:/system/mongodb.service
└ 4766 /usr/bin/mongod --config /etc/mongodb.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment