CLI - Services(daemons)

Revision as of 18:12, 19 April 2021 by Shin (talk | contribs)

Services

You can see all services for the imRAD system by the show service command.

LYSH@MyHostName# show service -h
usage: show service [-h] {all,dhcpv4,dhcpv6,logexp,status} ...

positional arguments:
    all                              Show List all services
    dhcpv4                           dhcpv4 ...
    dhcpv6                           dhcpv6 ...
    logexp                           logexp ...
    status                           Show the status of a service

optional arguments:
  -h, --help                         show this help message and exit


Controling a service

You can start, stop, and restart a service(daemon) using the systemctl command. You can't control all services in the operating system but only the imRAD services and some services. The following services are the names controllable.

  • smgr
  • dhcpv4
  • dhcpv6
  • failover
  • startup
  • logexp
  • radiusd
  • mysql
  • apache2
  • rsyslog
LYSH@MyHostName# systemctl -h
usage: systemctl [-h] {disable,enable,reload,restart,start,status,stop} ... service

 The 'systemctl' command

positional arguments:
  service               service name( start only this one ) or all

optional arguments:
  -h, --help            show this help message and exit

Commands arguments:
    disable             disable service
    enable              enable service
    reload              reload service
    restart             restart service
    start               start service
    status              status service
    stop                stop service

Note that some services do not support the reload command.

LYSH@MyHostName# systemctl start smgr		// Starting the smgr service.
LYSH@MyHostName# show service			// display all services

LYSH@MyHostName# systemctl stop smgr		// Stopping the smgr service.
LYSH@MyHostName# show service			// display all services

LYSH@MyHostName# systemctl restart smgr		// Restarting the smgr service.
LYSH@MyHostName# show service			// display all services