-a --all
With list-units , show inactive units and units which are following other units.
When showing unit/job/manager properties, show all properties
To list all units installed in the file system, use list-unit-files .
With list-dependencies, recursively show dependencies of all dependent units (by default only dependencies of target units are shown).
| -r --recursive
When listing units, show units of local containers. prefixed with containerName: .
| --reverse Show reverse dependencies between units with list-dependencies,
i.e. follow dependencies of type WantedBy=, RequiredBy=, PartOf=, BoundBy= , instead of Wants= and similar.
| --plain output as a list instead of a tree.
| list-sockets [jjj…]
currently in memory, ordered by listening address.
output similar to:
LISTEN UNIT ACTIVATES
/dev/initctl systemd-initctl.socket systemd-initctl.service
...
[::]:22 sshd.socket sshd.service
kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
5 sockets listed.
addresses might contains spaces, this output is not suitable for programmatic consumption.
| --show-types When showing sockets
| list-timers [jjj…] currently in memory, ordered by the time they elapse next.
see --show-types, --all, and --state
|
year, seconds and time zone removed in this document
> systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Thu -01-17 21:01 35min Thu -01-17 20:03 21min ago anacron.timer anacron.service
Fri -01-18 01:16 4h 50min Thu -01-17 08:23 12h ago apt-daily.timer apt-daily.service
Fri -01-18 06:36 10h Thu -01-17 06:58 13h ago apt-daily-upgrade.timer apt-daily-upgrade.service
Fri -01-18 16:58 20h Thu -01-17 16:58 3h 27min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.ser
4 timers listed.
Pass --all to see loaded but inactive timers, too
* *-*-* *:*:* dow yyyy-mm-dd HH:MM:SS iweb
list-dependencies [jjj]
Shows units required and wanted by the specified unit. recursively lists units following the Requires=,
Requisite=, ConsistsOf=, Wants=, BindsTo= dependencies.
If no unit is specified, default.target is implied.
By default, only target units are recursively expanded.
With --all is passed, all other units are recursively expanded as well.
--plain output as a list instead of a tree
--reverse--after, --before may be used to change what types of dependencies are shown.
systemctl list-dependencies remote-fs.target
remote-fs.target
* `-nfs-client.target
* |-auth-rpcgss-module.service
* |-nfs-blkmap.service
* `-remote-fs-pre.target
| -a --allrecursively show dependencies of all dependent units (by default only dependencies of target units are shown).
| --after show the units that are ordered before the specified unit. i.e. recursively list
units following After= dependency.
Any After= dependency is mirrored to create a Before= dependency.
Temporal dependencies may be specified explicitly, but are created implicitly for units which are WantedBy= targets (see
systemd.target(5)), and as a result of other directives (for example RequiresMountsFor= ).
Both explicitly and implicitly introduced dependencies are shown with list-dependencies.
| --before
show the units that are ordered after the specified unit. i.e. recursively list units following Before= dependency.
| Unit File Commands
|
is-active jjj…
is-failed jjj…
Outputs the current unit state unless --quiet ,
Returns 0 if at least one is active | failed, or non-zero otherwise.
From syslog:daemon.warning systemd[1]: ruuvicollector.service: Failed with result 'exit-code'.
systemctl is-active RuuviCo* ; echo $?
3
systemctl is-failed RuuviCo* ; echo $?
1
systemctl is-failed ruuvicollector.service ; echo $?
activating
1
| is-enabled name …
If any of the unit files are enabled returns exit code of 0
--full shows installation targets
Outputs the current enable status unless --quiet
systemctl is-enabled grafana-server
disabled
jebh:/ > echo $?
1
| | exit code
| enabled enabled-runtime Enabled via .wants/, .requires/ or alias symlinks
permanently in /etc/systemd/system/ or
transiently in /run/systemd/system/ . | 0
| disabled not enabled, but contains an [Install] section . | > 0
| masked
masked-runtime Completely disabled, so that any start operation on it fails
Permanently in /etc …or
transiently in /run …), even though the unit file might reside outside of the unit file search path. | > 0
| static unit file is not enabled and has no provisions for
enabling in the [Install] section. | <0
| indirect unit itself is not enabled, has
Also=jj setting in the [Install] section, listing other
unit files that might be enabled. | 0
| generated unit file was generated dynamically via a generator tool.
See systemd.generator(7).
Generated unit files are ONLY enabled implicitly by their generator. | 0
| transient unit file has been created dynamically with the runtime API.
Transient units may not be enabled. | 0
| bad unit file is invalid or an error occurred.
is-enabled does not display this state, rather it outputs an error message.
list-unit-files might show it. | > 0
| | | | | | | | |
|
status [jjj…|pid…]]
-n --lines=n |
number of journal lines to show, counting from the most recent ones. Default 10.
-o
--output=short| short-full| short-iso| short-precise| short-monotonic| short-unix| verbose| export|
json| json-pretty| json-sse| cat
| formatting journal entries. see journalctl. Default short
| |
Show runtime status and most recent log data from the † (N.B. cut to terminal width!!)
If no units are specified, shows system status.
|
systemctl status
* pi93graf
State: running
Jobs: 0 queued
Failed: 0 units
Since: Wed 1969-12-31 19:00:01 EST; 53 years 6 months ago
CGroup: /
|-user.slice
| `-user-501.slice
| |-user@501.service
| | `-init.scope
| | |-1560 /lib/systemd/systemd --user
| | `-1563 (sd-pam)
| |-session-c1.scope
| | |-1554 sshd: dgerman [priv]
| | |-1572 sshd: dgerman@pts/0
| | |-1575 -bash
| | |-4461 -bash
| | `-4463 /bin/systemctl --no-pager status
| `-session-c2.scope
| |-2004 sshd: dgerman [priv]
| |-2015 sshd: dgerman@pts/1
| `-2018 -bash
|-init.scope
| `-1 /sbin/init
`-system.slice
|-influxdb.service
| `-1108 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
|-ruuvicollector.service
| |- 376 /bin/bash /home/pi/RuuviCollector/RuuviCollector
| |-1307 java -jar target/ruuvi-collector-0.2.5.jar
| |-1316 hcitool lescan --duplicates --passive
| `-1318 hcidump --raw
|-systemd-timesyncd.service
| `-217 /lib/systemd/systemd-timesyncd
|-dbus.service
| `-255 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
|-chronograf.service
| `-361 /usr/bin/chronograf
|-hciuart.service
| `-406 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb:e3:a4:6c
|-ssh.service
| `-447 /usr/sbin/sshd -D
|-avahi-daemon.service
| |-282 avahi-daemon: running [pi93graf.local]
| `-288 avahi-daemon: chroot helper
|-system-getty.slice
| `-getty@tty1.service
| `-918 /sbin/agetty --noclear tty1 linux
|-wpa_supplicant.service
| `-295 /sbin/wpa_supplicant -u -s -d -O /run/wpa_supplicant >/boot/log/wpa.log
|-triggerhappy.service
| `-297 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user nobody --deviceglob /dev/inpu...
|-systemd-logind.service
| `-284 /lib/systemd/systemd-logind
|-system-postfix.slice
| `-postfix@-.service
| |- 804 /usr/lib/postfix/sbin/master -w
| |- 806 qmgr -l -t unix -u
| `-4088 pickup -l -t unix -u -c
|-grafana.service
| `-374 /usr/sbin/grafana --config=/etc/grafana/grafana.ini cfg:default.paths.logs=/var/log cfg:default.paths.data=/var/lib/...
|-cron.service
| `-292 /usr/sbin/cron -f
|-systemd-udevd.service
| `-113 /lib/systemd/systemd-udevd
|-rsyslog.service
| `-243 /usr/sbin/rsyslogd -n
|-bluetooth.service
| `-432 /usr/libexec/bluetooth/bluetoothd
|-systemd-journald.service
| `-78 /lib/systemd/systemd-journald
|-dhcpcd.service
| |-260 /sbin/dhcpcd -q -b
| `-556 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
`-kapacitor.service
`-1631 /usr/bin/kapacitord -config /etc/kapacitor/kapacitor.conf
With --all , shows the status of all units (subject to limitations specified with --type ).
By default, only shows 10 lines of output and ellipsizes lines to fit in the terminal window.
see --lines and --full,
journalctl --unit=NAME or journalctl --user-unit=NAME use a similar filter for messages and might be more convenient.
|
sudo systemctl status influxdb
* influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-12-01 19:24:27 EST; 1h 22min ago
Docs: https://docs.influxdata.com/influxdb/
Main PID: 14600 (influxd)
CGroup: /system.slice/influxdb.service
`-14600 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
widen terminal window to see all of the log message
Dec 01 20:15:43 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:15:43 -0500]
"POST /query?chunked=true&db=ruuvi&q=select+distinct%2
Dec 01 20:15:58 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:15:58 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+DISTINCT%2
Dec 01 20:16:15 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:16:15 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+DISTINCT%2
Dec 01 20:16:21 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:16:21 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+DISTINCT%2
Dec 01 20:16:59 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:16:59 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+minium%28b
Dec 01 20:17:31 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:17:31 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+min%28batt
Dec 01 20:17:48 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:17:48 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+min%28batt
Dec 01 20:18:04 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:17:55 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+min%28batt
Dec 01 20:18:43 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:18:30 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+mac%2C+min
Dec 01 20:22:28 pi93graf influxd[14600]: [httpd] ::1 - - [01/Dec/2018:20:22:10 -0500]
"POST /query?chunked=true&db=ruuvi&q=SELECT+mac%2C+min
Warning: influxdb.service changed on disk. Run 'systemctl daemon-reload' to reload units.
|
show [jjj…|job…]]
--value output only the value |
Show properties of units, jobs, or the manager itself.
If no argument is specified, properties of the manager will be shown.
With unit name/job ID , properties of the unit/job are shown
Empty properties are suppressed. Use --all to show those .
To select specific properties to show, use --property= .
used when parsable output is required.
Use status for formatted human-readable output.
|
Many default properties supresses in this document.
systemctl show influxdb.service| grep -v 18446744073709551615 |grep -v 65536|grep -v =0|grep -v '=no$'
ExecStart={
path=/usr/lib/influxdb/scripts/influxd-systemd-start.sh ;
argv[]=/usr/lib/influxdb/scripts/influxd-systemd-start.sh ;
ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }
Type=forking
TimeoutStartUsec=1min 30s
TimeoutStopUsec=1min 30s
RuntimeMaxUsec=infinity
Slice=system.slice
StandardInput=null
StandardOutput=journal
StandardError=inherit
SyslogPriority=30
SyslogLevelPrefix=yes
SyslogLevel=6
SyslogFacility=3
Description=InfluxDB
Documentation=https://docs.influxdata.com/influxdb/
Id=influxdb.service
Names=influxdb.service
Restart=on-failure
PIDFile=/var/lib/influxdb/influxd.pid
RestartUsec=10min
EnvironmentFile=/etc/default/influxdb (ignore_errors=yes)
User=influxdb
Group=influxdb
Requires=
system.slice
sysinit.target
After=
system.slice
systemd-journald.socket
sysinit.target
basic.target
network-online.target
LoadState=loaded
ActiveState=inactive
SubState=dead
FragmentPath=/lib/systemd/system/influxdb.service
UnitFileState=disabled
UnitFilePreset=enabled
Result=success
UID=4294967295
GID=4294967295
IgnoreSIGPIPE=yes
RestrictNamespace=2114060288
KillMode=control-group
KillSignal=15
SendSIGKILL=yes
Conflicts=shutdown.target
Before=shutdown.target
CanStart=yes
CanStop=yes
DefaultDependencies=yes
OnFailureJobMode=replace
JobTimeoutUsec=infinity
StartLimitIntervalSec=10000000
StartLimitBurst=5 | | | |
systemctl show
Version=232
Features=+PAM +AUDIT +SELINUX +IMA +APPARMOR
+SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT
+GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +
Architecture=arm
FirmwareTimestampMonotonic=0
LoaderTimestampMonotonic=0
UNKN = Wed 1969-12-31 19:00:00 EST
KernelTimestamp=UNKN
KernelTimestampMonotonic=0
InitRDTimestampMonotonic=0
UserspaceTimestamp=UNKN
UserspaceTimestampMonotonic=1717322
FinishTimestamp=Mon 2018-11-05 12:23:01 EST
FinishTimestampMonotonic=20937116
SecurityStartTimestamp=UNKN
SecurityStartTimestampMonotonic=1754193
SecurityFinishTimestamp=UNKN
SecurityFinishTimestampMonotonic=1758961
GeneratorsStartTimestamp=Thu 2016-11-03 13:16:42
GeneratorsStartTimestampMonotonic=2020354
GeneratorsFinishTimestamp=Thu 2016-11-03 13:16:42
GeneratorsFinishTimestampMonotonic=2611909
UnitsLoadStartTimestamp=Thu 2016-11-03 13:16:42
UnitsLoadStartTimestampMonotonic=2624651
UnitsLoadFinishTimestamp=Thu 2016-11-03 13:16:43
UnitsLoadFinishTimestampMonotonic=3010388
LogLevel=info
LogTarget=journal-or-kmsg
NNames=232
NFailedUnits=0
NJobs=0
NInstalledJobs=192
NFailedJobs=0
Progress=1
Environment=LANG=C.UTF-8
PATH=/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:/bin
ConfirmSpawn=no
ShowStatus=no
UnitPath=
/run/systemd/transient
/etc/systemd/system
/run/systemd/system
/run/systemd/generator
/lib/systemd/system
/usr/lib/systemd/system
/
DefaultStandardOutput=journal
DefaultStandardError=journal
RuntimeWatchdogUSec=0
ShutdownWatchdogUSec=10min
SystemState=running
DefaultTimerAccuracyUSec=1min
DefaultTimeoutStartUSec=1min 30s
DefaultTimeoutStopUSec=1min 30s
DefaultRestartUSec=100ms
DefaultStartLimitIntervalSec=10000000
DefaultStartLimitBurst=5
DefaultCPUAccounting=no
DefaultBlockIOAccounting=no
DefaultMemoryAccounting=no
DefaultTasksAccounting=yes
|
DefaultLimits ;
∞ ==
18446744073709551615
i.e. FFFFFFFF FFFFFFFF
CPU=∞
CPUSoft=∞
FSIZE=∞
FSIZESoft=∞
DATA=∞
DATASoft=∞
STACK=∞
STACKSoft=8388608
CORE=∞
CORESoft=0
RSS=∞
RSSSoft=∞
NOFILE=4096
NOFILESoft=1024
AS=∞
ASSoft=∞
NPROC=3400
NPROCSoft=3400
MEMLOCK=65536
MEMLOCKSoft=65536
LOCKS=∞
LOCKSSoft=∞
SIGPENDING=3400
SIGPENDINGSoft=3400
MSGQUEUE=819200
MSGQUEUESoft=819200
NICE=0
NICESoft=0
RTPRIO=0
RTPRIOSoft=0
RTTIME=∞
RTTIMESoft=∞
DefaultTasksMax=4915 | | |
| -p p[,p … --property= p[,p …
With show unit/job/manager properties with, limit display to properties specified, such as "MainPID". .
Shell completion is implemented for property names.
For the manager itself, systemctl show will show all available properties. See systemd-system.conf(5) .
Properties for units vary by unit type, so showing any unit lists properties pertaining to this type.
Showing any job will list properties pertaining to all jobs.
Properties are documented in systemd.unit(5) , and individual unit types systemd.service(5), systemd.socket
| cat jjj… Show backing files of units.
Prints the "fragment" and "drop-ins" (source files) of units.
Each file is preceded by a comment which includes the file name.
Shows the contents of the backing files on disk,
which may not match the system manager's understanding of these units if any unit files were updated on disk and the
daemon-reload command wasn't issued since.
| set-property name
assignment …
[--runtime]
Set unit properties at runtime, changing configuration parameter
properties such as resource control settings at runtime.
Not all properties may be changed at runtime, settings in systemd.resource-control(5)) may.
The changes are applied immediately and stored on disk .
With --runtime the settings only apply until the next boot.
The syntax of the property assignment follows the syntax of assignments in unit files.
Example: systemctl set-property foobar.service CPUShares=777
If the unit appears to be inactive, the changes will be stored on disk and will be effective when the unit will be started.
Allows changing multiple properties at the same time, which is preferable over setting them individually.
Assigning the empty list to list parameters will reset the list.
| help jjj…|PID… Show manual pages.
| reset-failed [jjj…] Default all units.
When a unit fails (example: exiting with non-zero error code, terminating abnormally or timing out), it
enters the "failed" state and its exit code and status is recorded until the service is restarted or reset with this command.
|
list-unit-files [jjj…]
List unit files installed on the system, in combination with their enablement state (as reported by is-enabled ).
UNIT FILE STATE
proc-sys-fs-binfmt_misc.automount static
-.mount generated
boot.mount generated
dev-hugepages.mount static
dev-mqueue.mount static
proc-fs-nfsd.mount static
proc-sys-fs-binfmt_misc.mount static
run-rpc_pipefs.mount static
sys-fs-fuse-connections.mount static
sys-kernel-config.mount static
sys-kernel-debug.mount static
varnew.mount generated
systemd-ask-password-console.path static
systemd-ask-password-plymouth.path static
systemd-ask-password-wall.path static
session-c1.scope transient
2ping.service disabled
alsa-restore.service static
alsa-state.service static
alsa-utils.service masked
anacron.service enabled
…
bluemon.service generated
bluetooth.service enabled
bootlogd.service masked
bootlogs.service masked
bootmisc.service masked
bthelper@.service static
checkfs.service masked
checkroot-bootclean.service masked
…
grafana-server.service masked
grafana.service masked
halt.service masked
hciuart.service enabled
hostname.service masked
hwclock.service masked
ifup@.service static
influx.service disabled
influxd.service enabled
influxdb.service enabled
…
rc-local.service static
rc.local.service static
…
resize2fs_once.service generated
…
rsyslog.service enabled
ruuvicollector.service enabled
…
wpa_supplicant.service disabled
wpa_supplicant@.service disabled
…
bluetooth.target static
…
umount.target static
anacron.timer enabled
apt-daily-upgrade.timer enabled
apt-daily.timer enabled
systemd-tmpfiles-clean.timer static
290 unit files listed.
enable unit…, path…
[--force]
[--now]
[--runtime]
[--no-reload]
Creates a set of symlinks, as per the [Install] sections of the unit files.
--force overwrites existing conflicting symlinks.
With --now starts units, otherwise does not start them.
System manager configuration is reloaded to ensure the changes effected immediately unless --no-reload .
In case of unit instance enablement (i.e. enablement of units of the form foo@bar.service),
symlinks named the same as instances are
created in the unit configuration directory, which point to the single template unit file they are instantiated from.
Expects unit (in which case various unit file directories are automatically searched
for unit files with appropriate names), or
absolute paths to unit files (in which case these files are read directly).
If a unit file is located outside of the usual unit file directories, an additional symlink is
created, linking it into the unit configuration path, ensuring it is found when requested by commands such as start .
Outputs file system operations executed, suppress with --quiet .
Creates symlinks as per the [Install] section of the unit files.
Changes can be made by placing or removing symlinks below this directory. Useful to
create configurations that deviate from the suggested default installation.
Use reload daemon to effect the changes
Depending on whether --system, --user, --runtime, or --global is specified,
this enables the unit for the system,
for the calling user only, for only this boot of the system, or
for all future logins of all users, or only this boot.
in the last case, no systemd daemon configuration is reloaded.
masked units cannot be enabled.
|
> systemctl enable influxdb.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Created symlink /etc/systemd/system/influxd.service ->
/lib/systemd/system/influxdb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/influxdb.service ->
/lib/systemd/system/influxdb.service.
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
> systemctl status influxdb.service
* influxdb.service - InfluxDB
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https://docs.influxdata.com/influxdb/
systemctl start influxdb.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
pi93graf: > systemctl status influxdb.service
* influxdb.service - InfluxDB
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-11-07 19:10:50 EST; 2s ago
Docs: https://docs.influxdata.com/influxdb/
Process: 1066 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh
(code=exited, status=0/SUCCESS)
Main PID: 30167 (influxd)
CGroup: /system.slice/influxdb.service
`-30167 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
ts=2022-11-08T00:10:50.10319Z lvl=info msg="Starting precreation serv
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]: line truncated at window size ^
ts=2022-11-08T00:10:50.114868Z lvl=info msg="Starting snapshot service
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
ts=2022-11-08T00:10:50.115072Z lvl=info msg="Starting HTTP service" lo
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
ts=2022-11-08T00:10:50.115183Z lvl=info msg="opened HTTP access log" l
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
ts=2022-11-08T00:10:50.116027Z lvl=info msg="Listening on HTTP" log_id
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
ts=2022-11-08T00:10:50.116335Z lvl=info msg="Starting retention policy
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
ts=2022-11-08T00:10:50.120244Z lvl=info msg="Listening for signals" lo
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]:
[httpd] ::1 - - [07/Nov/2022:9:10:50 -0500] "GET /health HTTP/1.1" 20
Nov 07 9:10:50 pi93graf influxd-systemd-start.sh[1066]: InfluxDB started
Nov 07 9:10:50 pi93graf systemd[1]: Started InfluxDB.
| reenable unir …
Combination of disable and enable .
Useful to reset symlinks a unit file is enabled with to the defaults configured in its [Install] .
name must be a unit name.
| disable name …
[--no-reload]
[--runtime]
[--now]
also=unit
Removes symlinks to the unit files backing the units from the unit
configuration directory, and unit files, including manually created ones
and undoes changes made by enable or link .
also=unit units are disable as well.
Not symmetric with enable , as disable may remove
more symlinks than a prior enable invocation of the same unit created.
Include --now to stop units otherwise does not stop them.
Outputs information about the file system operations (symlink removals) executed. which may be suppressed with --quiet.
Honors --system, --user, --runtime and --global in a similar way as enable .
Reloads system manager configuration after completing the operation unless --no-reload .
--now the units will be stopped
| --global With enable and disable ,
operate on the global user directory, i.e. for all future logins of all users.
| mask name …
[--now]
Link these unit files to /dev/null, making it impossible to start them.
Stronger than disable, since it prohibits all kinds of activation of the
unit, including enablement and manual activation. Use this option with care.
With --now the units masked are stopped.
With --runtime to only mask temporarily until the next boot.
Expects valid unit names , not unit file paths.
| unmask name … Unmask unit files. unit names only, not unit file paths.
| preset name …
Reset the enable/disable status unit files, to the defaults configured
in the preset policy files.
Same as disable or enable depending how the unit is listed in the preset files.
If the unit ihas no install information, it will be silently ignored .
name must be the real unit name, alias names are ignored .
See systemd.preset(5).
| --preset-mode=
with the preset or preset-all commands,
full (the default), enable-only , disable-only .
controls whether units shall be disabled and enabled according to the preset rules, or only enabled, or only disabled.
| preset-all Resets all installed unit files to the defaults configured in the preset policy file (see above).
| linked linked-runtime Made available through one or more symlinks to the unit file
(permanently in /etc …or transiently in /run …), even though the unit file might reside outside of the unit file search path.
| link PATH...
Link a unit file that is not in the unit file search paths into the unit file search path. expects an
absolute path to a unit file.
May be undone with disable.
Makes a unit file available for commands such as start even though it is not installed directly in the unit search path.
| revert name …
Revert unit files to their vendor versions. Removes drop-in configuration files that modify
units, as well as any user-configured unit file that overrides a matching vendor supplied unit file.
For a unit foo.service the matching directories foo.service.d/ with all their contained files are
removed, both below the persistent and runtime configuration directories (i.e. below /etc/systemd/system and
/run/systemd/system ); if the unit file has a vendor-supplied version (i.e. a unit file located below /usr) any
matching persistent or runtime unit file that overrides it is removed.
If a unit file has no vendor-supplied version (i.e. is only defined below /etc/systemd/system or /run/systemd/system, but not in a unit
file stored below /usr), it is not removed. Masked units are unmasked.
Used to undo all changes made with systemctl edit, systemctl set-property and
systemctl mask and puts the original unit file with its settings back in effect.
| add-wants target name …
add-requires target name…
[--runtime]
[--full]
[--force]
|--user|--system|--global]
Adds dependencies,
sudo systemctl add-requires ruuvicollector.service influxdb.service
Created symlink /etc/systemd/system/ruuvicollector.service.requires/influxdb.service ->
/lib/systemd/system/influxdb.service.
| edit name …
[--runtime]
[--full]
[--force]
|--user|--system|--global]
Edit a drop-in snippet or a whole replacement file
if --full is specified, to extend or override the specified unit.
Depending on whether --system (the default), --user, or --global is specified,
creates a drop-in file
for each unit either for the system, for the calling user, or for all futures logins of all users.
Then, the editor (see the "Environment" section below) is invoked on temporary files which will be written to the real location if the
editor exits successfully.
With --full copy the original units instead of creating drop-in files.
With --force unit files will be created for editing if they don't exist.
With --runtime changes will be made temporarily and they will be lost on the next boot.
If the temporary file is empty upon exit, the modification of the related unit is canceled.
After the units have been edited, systemd configuration is reloaded (daemon-reload ).
Cannot be used to remotely edit units and cannot temporarily edit units which are in /etc , since they take precedence over /run.
| get-default Return the default target to boot into. target unit name default.target is aliased (symlinked) to.
| set-default name Set the default target to boot into. This sets (symlinks) the default.target alias to the given target unit.
| isolate name
Allowed only on units where AllowIsolate= is enabled.
grep AllowIsolate /etc/systemd/system
Start name and its dependencies and stop all others.
If no extension is given, .target is used is used
Similar to changing the runlevel in a traditional init system.
Immediately stops processes not enabled in the new unit, possibly including the graphical environment or terminal you are currently using.!,
| start jjj…
Units not active and are not in a failed state usually are not in memory, and will not be matched by any pattern.
In case of instantiated units, systemd is often unaware of the instance name until the instance has been started.
using glob patterns with start has limited usefulness, secondary alias names of units are not considered.
| stop jjj… deactivate (issues SIGTERM )
| try-restart jjj… if the units are running.
| try-reload-or-restart jjj… |
Reload units if they support reload . If not, restart them ( most do not include reload) small>.
restart jjj… If not running , they will be started.
| reload jjj… Asks units to reload their configuration. ( most do not include reload)
Reloads the service-specific configuration, not the unit configuration file of systemd.
To reload the configuration file of a unit, use the daemon-reload
Example:
Apache: Apache's httpd.conf the web server, not the apache.service systemd unit file.
sudo systemctl reload influxdb
Failed to reload influxdb.service:
Job type reload is not applicable for unit influxdb.service.
See system logs and 'systemctl status influxdb.service' for details.
| reload-or-restart jjj… reload if they support it. If not, restart them,
If the units are not running they will be started.
|
kill jjj… Send a signal to one or more processes of the unit.
| -s SIGsss --signal= SIGsss
with kill, SIGTERM, SIGINT or SIGSTOP . default:TERM .
| --kill-who= with kill, which processes to send a signal to.
Must be one of main , control or all to select
whether to kill only the main process, the control process or all processes of the unit.
The main process of the unit is the one that defines the life-time of it.
A control process of a unit is one that is invoked by the manager to induce state changes of it.
For example, all processes started due to the ExecStartPre=, ExecStop= or ExecReload=
settings of service units are control processes.
there is only one control process per unit at a time, as only one state change is executed at a time.
For services of type Type=forking, the initial process started by the
manager for ExecStart= is a control process, while the process ultimately forked off by that one is then considered
the main process of the unit (if it can be determined). This is different for service units of other types, where the
process forked off by the manager for ExecStart= is always the main process itself. A service unit consists of zero
or one main process, zero or one control process plus any number of additional processes. Not all unit types manage
processes of these types however. For example, for mount units, control processes are defined (which are the
invocations of /bin/mount and /bin/umount), but no main process is defined. If omitted, defaults to all.
| --fail --job-mode=fail | with the kill command, if no units were killed, results in an error.
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |