summaryrefslogtreecommitdiffstats
path: root/systemd/kresd.systemd.7.in
blob: a602b8e68888a3af1c2975b2b5f79cbf04c00c8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.TH "kresd.systemd" "7" "@date@" "CZ.NIC" "Knot Resolver @version@ Systemd Units"
.\"
.\" kresd.systemd.7 -- man page for systemd units for kresd
.\"
.\" Copyright (c) CZ.NIC. All rights reserved.
.\"
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\"
.\"
.SH "NAME"
kresd.systemd
\- managing Knot Resolver @version@ through systemd.

.SH "SYNOPSIS"
.nf
kresd@.service
kresd.target
system-kresd.slice
.fi

.SH "DESCRIPTION"
.P
This manual page describes how to manage \fBkresd\fR using \fBsystemd\fR
units.

.B QUICKSTART

.nf
.RS 4n
\fBsystemctl start kresd@1\fR - single instance of kresd, responding on localhost
.RE
.fi

.B CONCURRENT DAEMONS

\fBkresd\fR daemon can be executed in multiple independent processes, which are
managed with \fBsystemd\fR via systemd templates (see \fBsystemd.unit\fR(5)).
Each \fBsystemd\fR service instance of \fBkresd\fR (\fIkresd@.service\fR)
represents a single, independent kresd process.

If you have more than one CPU core available, a single running \fBkresd\fR
daemon will only be able to make use of one core at a time, leaving the other
cores idle.  If you want \fBkresd\fR to take advantage of all available cores,
while sharing both cache and sockets, you should enable and start as many
instances of the \fBkresd@.service\fR as you have cores.  Typically, each
instance is just named \fIkresd@\fBN\fI.service\fR, where \fIN\fR is a decimal
number. For example, to enable and start 3 concurrent daemons:

.nf
.RS 4n
.B systemctl enable --now kresd@1.service kresd@2.service kresd@3.service
.RE
.fi

The systemd-managed \fBkresd\fR service set is grouped in the
\fIsystem-kresd.slice\fR slice.  The slice includes all running daemons
(instances of \fIkresd@.service\fR).

.SH "EXAMPLES"

To start a single kresd instance and enable it at boot:
.nf
.RS 4n
.B systemctl enable --now kresd@1.service
.RE
.fi

To restart (or stop) all running instances, you can use a glob expression.
Please note that glob can't be used to start or enable instances.
.nf
.RS 4n
.B systemctl restart 'kresd@*'
.RE
.fi

Bash users can also use Brace Expansion to enable or start multiple instances,
instead of listing them manually.
.nf
.RS 4n
.B systemctl enable --now kresd@{1..4}.service
.RE
.fi

To start all enabled kresd daemons, you can also use the provided \fIkresd.target\fR:
.nf
.RS 4n
.B systemctl start kresd.target
.RE
.fi

.RE

.SH "SEE ALSO"
\fIkresd(8)\fR,
\fIsystemd.unit(5)\fR,
\fIhttps://knot-resolver.readthedocs.io/en/v@version@/\fR

.SH "AUTHORS"
.B kresd
developers are mentioned in the AUTHORS file in the distribution.