Debian Codegraph @

upstream/debian-trixie/man5/[email protected]

raw
1 '\" t
2 .TH "USER@\&.SERVICE" "5" "" "systemd 257.13" "[email protected]"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 [email protected], [email protected], systemd-user-runtime-dir \- System units to start the user manager
24 .SH "SYNOPSIS"
25 .PP
26 user@\fIUID\fR\&.service
27 .PP
28 user\-runtime\-dir@\fIUID\fR\&.service
29 .PP
30 /usr/lib/systemd/systemd\-user\-runtime\-dir
31 .PP
32 user\-\fIUID\fR\&.slice
33 .SH "DESCRIPTION"
34 .PP
35 The
36 \fBsystemd\fR(1)
37 system manager (PID 1) starts user manager instances as
38 user@\fIUID\fR\&.service, with the user\*(Aqs numerical UID used as the instance identifier\&. These instances use the same executable as the system manager, but running in a mode where it starts a different set of units\&. Each
39 \fBsystemd \-\-user\fR
40 instance manages a hierarchy of units specific to that user\&. See
41 \fBsystemd\fR(1)
42 for a discussion of units and
43 \fBsystemd.special\fR(7)
44 for a list of units that form the basis of the unit hierarchies of system and user units\&.
45 .PP
46 user@\fIUID\fR\&.service
47 is accompanied by the system unit
48 user\-runtime\-dir@\fIUID\fR\&.service, which creates the user\*(Aqs runtime directory
49 /run/user/\fIUID\fR, and then removes it when this unit is stopped\&.
50 user\-runtime\-dir@\fIUID\fR\&.service
51 executes the
52 systemd\-user\-runtime\-dir
53 binary to do the actual work\&.
54 .PP
55 User processes may be started by the
56 user@\&.service
57 instance, in which case they will be part of that unit in the system hierarchy\&. They may also be started elsewhere, for example by
58 \fBsshd\fR(8)
59 or a display manager like
60 \fBgdm\fR, in which case they form a \&.scope unit (see
61 \fBsystemd.scope\fR(5))\&. Both
62 user@\fIUID\fR\&.service
63 and the scope units are collected under the
64 user\-\fIUID\fR\&.slice\&.
65 .PP
66 Individual
67 user\-\fIUID\fR\&.slice
68 slices are collected under
69 user\&.slice, see
70 \fBsystemd.special\fR(7)\&.
71 .SH "CONTROLLING RESOURCES FOR LOGGED\-IN USERS"
72 .PP
73 Options that control resources available to logged\-in users can be configured at a few different levels\&. As described in the previous section,
74 user\&.slice
75 contains processes of all users, so any resource limits on that slice apply to all users together\&. The usual way to configure them would be through drop\-ins, e\&.g\&.
76 /etc/systemd/system/user\&.slice\&.d/resources\&.conf\&.
77 .PP
78 The processes of a single user are collected under
79 user\-\fIUID\fR\&.slice\&. Resource limits for that user can be configured through drop\-ins for that unit, e\&.g\&.
80 /etc/systemd/system/user\-1000\&.slice\&.d/resources\&.conf\&. If the limits should apply to all users instead, they may be configured through drop\-ins for the truncated unit name,
81 user\-\&.slice\&. For example, configuration in
82 /etc/systemd/system/user\-\&.slice\&.d/resources\&.conf
83 is included in all
84 user\-\fIUID\fR\&.slice
85 units, see
86 \fBsystemd.unit\fR(5)
87 for a discussion of the drop\-in mechanism\&.
88 .PP
89 When a user logs in and a \&.scope unit is created for the session (see previous section), the creation of the scope may be managed through
90 \fBpam_systemd\fR(8)\&. This PAM module communicates with
91 \fBsystemd-logind\fR(8)
92 to create the session scope and provide access to hardware resources\&. Resource limits for the scope may be configured through the PAM module configuration, see
93 \fBpam_systemd\fR(8)\&. Configuring them through the normal unit configuration is also possible, but since the name of the slice unit is generally unpredictable, this is less useful\&.
94 .PP
95 In general any resources that apply to units may be set for
96 user@\fIUID\fR\&.service
97 and the slice units discussed above, see
98 \fBsystemd.resource-control\fR(5)
99 for an overview\&.
100 .SH "EXAMPLES"
101 .PP
102 \fBExample\ \&1.\ \&Hierarchy of control groups with two logged in users\fR
103 .sp
104 .if n \{\
105 .RS 4
106 .\}
107 .nf
108 $ systemd\-cgls
109 Control group /:
110 \-\&.slice
111 ├─user\&.slice
112 │ ├─user\-1000\&.slice
113 │ │ ├─user@1000\&.service
114 │ │ │ ├─pulseaudio\&.service
115 │ │ │ │ └─2386 /usr/bin/pulseaudio \-\-daemonize=no
116 │ │ │ └─gnome\-terminal\-server\&.service
117 │ │ │ └─init\&.scope
118 │ │ │ ├─ 4127 /usr/libexec/gnome\-terminal\-server
119 │ │ │ └─ 4198 zsh
120 │ │ \&...
121 │ │ └─session\-4\&.scope
122 │ │ ├─ 1264 gdm\-session\-worker [pam/gdm\-password]
123 │ │ ├─ 2339 /usr/bin/gnome\-shell
124 │ │ \&...
125 │ │ ├─session\-19\&.scope
126 │ │ ├─6497 sshd: zbyszek [priv]
127 │ │ ├─6502 sshd: zbyszek@pts/6
128 │ │ ├─6509 \-zsh
129 │ │ └─6602 systemd\-cgls \-\-no\-pager
130 │ \&...
131 │ └─user\-1001\&.slice
132 │ ├─session\-20\&.scope
133 │ │ ├─6675 sshd: guest [priv]
134 │ │ ├─6708 sshd: guest@pts/6
135 │ │ └─6717 \-bash
136 │ └─user@1001\&.service
137 │ ├─init\&.scope
138 │ │ ├─6680 /usr/lib/systemd/systemd \-\-user
139 │ │ └─6688 (sd\-pam)
140 │ └─sleep\&.service
141 │ └─6706 /usr/bin/sleep 30
142 \&...
143 .fi
144 .if n \{\
145 .RE
146 .\}
147 .PP
148 User with UID 1000 is logged in using
149 \fBgdm\fR
150 (session\-4\&.scope) and
151 \fBssh\fR(1)
152 (session\-19\&.scope), and also has a user manager instance running (user@1000\&.service)\&. User with UID 1001 is logged in using
153 \fBssh\fR
154 (session\-20\&.scope) and also has a user manager instance running (user@1001\&.service)\&. Those are all (leaf) system units, and form part of the slice hierarchy, with
155 user\-1000\&.slice
156 and
157 user\-1001\&.slice
158 below
159 user\&.slice\&. User units are visible below the
160 user@\&.service
161 instances (pulseaudio\&.service,
162 gnome\-terminal\-server\&.service,
163 init\&.scope,
164 sleep\&.service)\&.
165 .PP
166 \fBExample\ \&2.\ \&Default user resource limits\fR
167 .sp
168 .if n \{\
169 .RS 4
170 .\}
171 .nf
172 $ systemctl cat user\-1000\&.slice
173 # /usr/lib/systemd/system/user\-\&.slice\&.d/10\-defaults\&.conf
174 # \&...
175 [Unit]
176 Description=User Slice of UID %j
177 After=systemd\-user\-sessions\&.service
178
179 [Slice]
180 TasksMax=33%
181 .fi
182 .if n \{\
183 .RE
184 .\}
185 .PP
186 The
187 user\-\fIUID\fR\&.slice
188 units by default do not have a unit file\&. The resource limits are set through a drop\-in, which can be easily replaced or extended following standard drop\-in mechanisms discussed in the first section\&.
189 .SH "SEE ALSO"
190 .PP
191 \fBsystemd\fR(1), \fBsystemd.service\fR(5), \fBsystemd.slice\fR(5), \fBsystemd.resource-control\fR(5), \fBsystemd.exec\fR(5), \fBsystemd.special\fR(7), \[email protected]\fR(5), \fBpam\fR(8)