systemd.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 29 Jan 2019 00:11:34 +0200
changeset 2346 f644e8d27cd2
parent 2315 51097a1f0381
permissions -rw-r--r--
updated commands to 2.x/3.x syntax.


=========
 Systemd
=========

Managing services
=================

Display service details/status::

  $ sudo systemctl show   my.service
  $ sudo systemctl status my.service

Start/stop service::

  $ sudo systemctl start   repricer-server.service
  $ sudo systemctl stop    repricer-server.service
  $ sudo systemctl restart repricer-server.service

Enabling/disabling service::

  $ sudo systemctl enable  my.service
  $ sudo systemctl disable my.service

Systemd journal
===============

Get service console output::

  $ journalctl -u repricer-server.service

Like ``tail -n 20``::

  $ journalctl -n 20 ...

Like ``tail -f``::

  $ journalctl -f ...