Debian Codegraph @

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

raw
1 '\" t
2 .TH "USER@\&.SERVICE" "5" "" "systemd 261~rc3" "[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
50 when started, and removes it when it is stopped\&. It also might apply runtime quota settings on
51 /tmp/
52 and/or
53 /dev/shm/
54 for the user\&.
55 user\-runtime\-dir@\fIUID\fR\&.service
56 executes the
57 systemd\-user\-runtime\-dir
58 binary to do the actual work\&.
59 .PP
60 User processes may be started by the
61 user@\&.service
62 instance, in which case they will be part of that unit in the system hierarchy\&. They may also be started elsewhere, for example by
63 \fBsshd\fR(8)
64 or a display manager like
65 \fBgdm\fR, in which case they form a \&.scope unit (see
66 \fBsystemd.scope\fR(5))\&. Both
67 user@\fIUID\fR\&.service
68 and the scope units are collected under the
69 user\-\fIUID\fR\&.slice\&.
70 .PP
71 Individual
72 user\-\fIUID\fR\&.slice
73 slices are collected under
74 user\&.slice, see
75 \fBsystemd.special\fR(7)\&.
76 .SH "CONTROLLING RESOURCES FOR LOGGED\-IN USERS"
77 .PP
78 Options that control resources available to logged\-in users can be configured at a few different levels\&. As described in the previous section,
79 user\&.slice
80 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\&.
81 /etc/systemd/system/user\&.slice\&.d/resources\&.conf\&.
82 .PP
83 The processes of a single user are collected under
84 user\-\fIUID\fR\&.slice\&. Resource limits for that user can be configured through drop\-ins for that unit, e\&.g\&.
85 /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,
86 user\-\&.slice\&. For example, configuration in
87 /etc/systemd/system/user\-\&.slice\&.d/resources\&.conf
88 is included in all
89 user\-\fIUID\fR\&.slice
90 units, see
91 \fBsystemd.unit\fR(5)
92 for a discussion of the drop\-in mechanism\&.
93 .PP
94 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
95 \fBpam_systemd\fR(8)\&. This PAM module communicates with
96 \fBsystemd-logind\fR(8)
97 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
98 \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\&.
99 .PP
100 In general any resources that apply to units may be set for
101 user@\fIUID\fR\&.service
102 and the slice units discussed above, see
103 \fBsystemd.resource-control\fR(5)
104 for an overview\&.
105 .SH "EXAMPLES"
106 .PP
107 \fBExample\ \&1.\ \&Hierarchy of control groups with two logged in users\fR
108 .sp
109 .if n \{\
110 .RS 4
111 .\}
112 .nf
113 $ systemd\-cgls
114 Control group /:
115 \-\&.slice
116 ├─user\&.slice
117 │ ├─user\-1000\&.slice
118 │ │ ├─user@1000\&.service
119 │ │ │ ├─pulseaudio\&.service
120 │ │ │ │ └─2386 /usr/bin/pulseaudio \-\-daemonize=no
121 │ │ │ └─gnome\-terminal\-server\&.service
122 │ │ │ └─init\&.scope
123 │ │ │ ├─ 4127 /usr/libexec/gnome\-terminal\-server
124 │ │ │ └─ 4198 zsh
125 │ │ \&...
126 │ │ └─session\-4\&.scope
127 │ │ ├─ 1264 gdm\-session\-worker [pam/gdm\-password]
128 │ │ ├─ 2339 /usr/bin/gnome\-shell
129 │ │ \&...
130 │ │ ├─session\-19\&.scope
131 │ │ ├─6497 sshd: zbyszek [priv]
132 │ │ ├─6502 sshd: zbyszek@pts/6
133 │ │ ├─6509 \-zsh
134 │ │ └─6602 systemd\-cgls \-\-no\-pager
135 │ \&...
136 │ └─user\-1001\&.slice
137 │ ├─session\-20\&.scope
138 │ │ ├─6675 sshd: guest [priv]
139 │ │ ├─6708 sshd: guest@pts/6
140 │ │ └─6717 \-bash
141 │ └─user@1001\&.service
142 │ ├─init\&.scope
143 │ │ ├─6680 /usr/lib/systemd/systemd \-\-user
144 │ │ └─6688 (sd\-pam)
145 │ └─sleep\&.service
146 │ └─6706 /usr/bin/sleep 30
147 \&...
148 .fi
149 .if n \{\
150 .RE
151 .\}
152 .PP
153 User with UID 1000 is logged in using
154 \fBgdm\fR
155 (session\-4\&.scope) and
156 \fBssh\fR(1)
157 (session\-19\&.scope), and also has a user manager instance running (user@1000\&.service)\&. User with UID 1001 is logged in using
158 \fBssh\fR
159 (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
160 user\-1000\&.slice
161 and
162 user\-1001\&.slice
163 below
164 user\&.slice\&. User units are visible below the
165 user@\&.service
166 instances (pulseaudio\&.service,
167 gnome\-terminal\-server\&.service,
168 init\&.scope,
169 sleep\&.service)\&.
170 .PP
171 \fBExample\ \&2.\ \&Default user resource limits\fR
172 .sp
173 .if n \{\
174 .RS 4
175 .\}
176 .nf
177 $ systemctl cat user\-1000\&.slice
178 # /usr/lib/systemd/system/user\-\&.slice\&.d/10\-defaults\&.conf
179 # \&...
180 [Unit]
181 Description=User Slice of UID %j
182 After=systemd\-user\-sessions\&.service
183
184 [Slice]
185 TasksMax=33%
186 .fi
187 .if n \{\
188 .RE
189 .\}
190 .PP
191 The
192 user\-\fIUID\fR\&.slice
193 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\&.
194 .SH "SEE ALSO"
195 .PP
196 \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)