Age | Commit message (Collapse) | Author |
|
|
|
This makes sure "systemctl status user.slice" shows a nice cgroup tree
of all logged in users.
|
|
When we issue a reexecution request via the private socket we need to
expect a "Disconnected" in addition to "NoReply" when the connection is
terminated.
|
|
reloaded
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=66542
|
|
The affected files in this patch had inconsistent use of tabs vs. spaces
for indentation, and this patch eliminates the stray tabs.
Also, the opening brace of sigchld_hdl() in activate.c was moved so the
opening braces are consistent throughout the file.
|
|
In order to prepare things for the single-writer cgroup scheme, let's
make logind use systemd's own primitives for cgroup management.
Every login user now gets his own private slice unit, in which his sessions
live in a scope unit each. Also, add user@$UID.service to the same
slice, and implicitly start it on first login.
|
|
|
|
|
|
|
|
and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus
properties, optionally with persistence.
This currently hooks this up only for three cgroup atributes, but this
brings the infrastructure to add more changable attributes.
This allows setting multiple attributes at once, and takes an array
rather than a dictionary of properties, in order to implement simple
resetting of lists using the same approach as when they are sourced from
unit files. This means, that list properties are appended to by this
call, unless they are first reset via assigning the empty list.
|
|
Replace the very generic cgroup hookup with a much simpler one. With
this change only the high-level cgroup settings remain, the ability to
set arbitrary cgroup attributes is removed, so is support for adding
units to arbitrary cgroup controllers or setting arbitrary paths for
them (especially paths that are different for the various controllers).
This also introduces a new -.slice root slice, that is the parent of
system.slice and friends. This enables easy admin configuration of
root-level cgrouo properties.
This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in
/dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is
turned off by DevicePolicy=).
|
|
check for pid file existance before returning 1
|
|
http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action
https://bugzilla.redhat.com/show_bug.cgi?id=975016
|
|
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l
as alias for --full".
|
|
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.
Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.
Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree.
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=65850
|
|
Without this you have to use %40 with the -H flag because dbus doesn't
like the @ sign being unescaped.
|
|
In 131601349 'systemctl: align all status fields to common column',
padding was calculated for 'ListenStream: ...', etc. Later on in
45a4f7233 'systemctl: tweak output of Listen: fields a bit' output
was changed to 'Listen: ... (stream)', but calculation didn't change.
Just remove the calculation, since now the result will be always 8,
and it it more important to have everything aligned to the widest
field ("Main-PID"), than to save a few columns, usually at most two
(e.g. "Listen").
Note: strlen is more natural, and is optimized to sizeof even
with -O0.
|
|
|
|
--system is default anyway, and some poor user might type 9
characters without needing to.
|
|
Command changes current log level
|
|
systemctl set-default NAME links the default.target to the given unit,
get-default prints out the path to the currently set default target.
|
|
Unit names were mangled in function enable_unit only when dbus was
used. This patch adds mangling also when the dbus is not in use.
This makes it possible to say e.g.:
systemctl --root=/path enable cups
without spelling cups.service out in full.
|
|
|
|
|
|
This patch adds more script-friendly output for list-dependencies.
|
|
I'm assuming that it's fine if a _const_ or _pure_ function
calls assert. It is assumed that the assert won't trigger,
and even if it does, it can only trigger on the first call
with a given set of parameters, and we don't care if the
compiler moves the order of calls.
|
|
Also update completion scripts a bit.
|
|
Freeing in error path is the common pattern with set_put().
|
|
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
|
|
I wouldn't know what "internally" is supposed to mean hear, and we use
this terminology in this context nowhere else, so let's drop this.
|
|
|
|
Novice users might think, that
$ systemctl --all
is equal to
$ systemctl list-unit-files
https://bugzilla.redhat.com/show_bug.cgi?id=748512
|
|
DECIMAL_STR_WIDTH() now works on any numeric type, and is easier to
distingish from DECIMAL_STR_MAX().
This also replaces another manual implementaiton of ulog10 by this macro.
|
|
|
|
LISTEN UNIT ACTIVATES
/dev/initctl systemd-initctl.socket systemd-initctl.service
/dev/log systemd-journald.socket systemd-journald.service
...
[::]:19531 systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
17 sockets listed.
Pass --all to see loaded but inactive sockets, too.
|
|
Make sure we compare errno against positive error codes.
The ones in hwclock.c and install.c can have an impact, the
rest are unlikely to be hit or in code that isn't widely
used.
Also check that errno > 0, to help gcc know that we are
returning a negative error code.
|
|
It makes it easier to pick out problematic unit
names from a long list.
|
|
This mirrors --property, and is generally useful.
New functionality is used in bash completion.
In case of zsh completion, new functionality is less useful
because of caching. Nevertheless, zsh completion for restart
is made to behave more-or-less the same as bash completion.
At least sockets can be restarted.
|
|
I was debugging systemd waiting on a missing disk, and noticed
that the job listing could use some polishing. Jobs that are
actually running are highlighted, so it's easier to see what
very actually waiting for.
Also, the needed widths are precalculated, to use available columns
more ecomically.
|
|
Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.
A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:
$ size build/.libs/systemd
text data bss dec hex filename
before 897737 107300 2560 1007597 f5fed build/.libs/systemd
after 897873 107300 2560 1007733 f6075 build/.libs/systemd
… actually less than 1‰.
A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert.
|
|
So far we didn't place spaces between the box drawing chars and the
values next to them. Let's be consistent here.
(Or to turn this around: if we really want to place a space there we
probably should do that in all our tree outputs, not just here...)
|
|
It's probably a good idea to minimize the number of field names to show
in the "systemctl status" output, in order to make them useful as a
guide for the reader how things are "grouped". This patch moves
information about the used socket technology to the end of the output
lines in brackets, rather than into the field names. This turns the used
socket technology into what it is -- peripheral meta information --
instead of something that was at the core.
New output:
systemd-journald.socket - Journal Socket
Loaded: loaded (/usr/lib/systemd/system/systemd-journald.socket; static)
Active: active (running) since Fr 2013-03-29 02:16:30 CET; 1 weeks 0 days ago
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
man:systemd-journald.service(8)
man:journald.conf(5)
Listen: /run/systemd/journal/stdout (Stream)
/run/systemd/journal/socket (Datagram)
/dev/log (Datagram)
|
|
$ systemctl status null.target
null.target - NYAN
Loaded: loaded (/home/alxchk/.config/systemd/user/null.target; disabled)
Drop-In: /home/alxchk/.config/systemd/user/null.target.d
└─ descr.conf, install-1.conf, install.conf
/etc/systemd/user/null.target.d
└─ test.conf
Active: active since Пт 2013-04-05 20:42:13 EEST; 1min 58s ago
|
|
Also drop ':' in repeated Docs lines.
|
|
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h
55.050003s". Also, while outputting the accuracy is configurable.
Basically we now try use "dot notation" for all time values > 1min. For
>= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and
finally 'us'.
This should give reasonably values in most cases.
|
|
avahi-daemon.socket - Avahi mDNS/DNS-SD Stack Activation Socket
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.socket; enabled)
Active: active (listening) since Mon 2013-04-01 09:02:44 EDT; 14h ago
ListenStream: /var/run/avahi-daemon/socket
|
|
sockets.socket - Test
Loaded: loaded (/home/alxchk/.config/systemd/user/sockets.socket; static)
Active: inactive (dead)
Listen: Stream: /tmp/stream1
Stream: @stream4
Stream: [::]:9999
Stream: 127.0.0.2:9996
Stream: [::1]:9996
Datagram: /tmp/stream2
Datagram: @stream5
Datagram: [::]:9998
Datagram: 127.0.0.2:9995
Datagram: [::1]:9995
SequentialPacket: @stream6
SequentialPacket: /tmp/stream3
FIFO: /tmp/fifo1
Special: /dev/input/event9
Netlink: kobject-uevent 0
MessageQueue: /msgqueue1
[zj: - minor cleanups,
- free i.listen,
- remove sorting, because the order or sockets matters.]
|
|
code in src/shared/macro.h only defined MAX/MIN in case
they were not defined previously. however the MAX/MIN
macros implemented in glibc are not of the "safe" kind but defined
as:
define MIN(a,b) (((a)<(b))?(a):(b))
define MAX(a,b) (((a)>(b))?(a):(b))
Avoid nasty side effects by using our own versions instead.
Also fix the warnings derived from this change.
[zj: - modify MAX3 macro to fix warning about _a shadowing _a,
- do bootchart/svg.c too,
- remove unused MIN3.]
|