Created
February 28, 2014 18:36
-
-
Save jordansissel/9276933 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost log]# systemctl start test | |
[root@localhost log]# systemctl status test | |
test.service - Starts and stops a single Logstash instance | |
Loaded: loaded (/usr/lib/systemd/system/test.service; disabled) | |
Active: active (running) since Fri 2014-02-28 13:34:56 EST; 5s ago | |
Docs: http://www.elasticsearch.org | |
Main PID: 1214 (sleep) | |
CGroup: name=systemd:/system/test.service | |
└─1214 /usr/bin/sleep 3600 | |
Feb 28 13:34:56 localhost.localdomain systemd[1]: Started Starts and stops a single Logstash instance. | |
[root@localhost log]# ps -fwwp 1214 | |
UID PID PPID C STIME TTY TIME CMD | |
root 1214 1 0 13:34 ? 00:00:00 /usr/bin/sleep 3600 | |
[root@localhost log]# systemctl stop test | |
[root@localhost log]# ps -fwwp 1214 | |
UID PID PPID C STIME TTY TIME CMD | |
[root@localhost log]# systemctl status test | |
test.service - Starts and stops a single Logstash instance | |
Loaded: loaded (/usr/lib/systemd/system/test.service; disabled) | |
Active: inactive (dead) since Fri 2014-02-28 13:36:03 EST; 4s ago | |
Docs: http://www.elasticsearch.org | |
Process: 1214 ExecStart=/usr/bin/sleep 3600 (code=killed, signal=TERM) | |
Feb 28 13:34:56 localhost.localdomain systemd[1]: Started Starts and stops a single Logstash instance. | |
Feb 28 13:36:03 localhost.localdomain systemd[1]: Stopping Starts and stops a single Logstash instance... | |
Feb 28 13:36:03 localhost.localdomain systemd[1]: Stopped Starts and stops a single Logstash instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Starts and stops a single Logstash instance | |
Documentation=http://www.elasticsearch.org | |
[Service] | |
Type=simple | |
User=root | |
Group=root | |
ExecStart=/usr/bin/sleep 3600 | |
# See MAX_OPEN_FILES in sysconfig | |
LimitNOFILE=16384 | |
TimeoutStopSec=20 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment