| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
core: add support for setting CPUAffinity= to special "numa" value
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
$ sudo ln -svf multi-user.target /run/systemd/generator.early/default.target
'/run/systemd/generator.early/default.target' -> 'multi-user.target'
$ sudo build/systemctl set-default --root=/ sysinit.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/sysinit.target.
Note: "multi-user.target" is the default unit (possibly a runtime override).
The output is not super informative, but it should be enough to point the user in
the right direction.
Fixes #3645.
|
|/
|
|
|
| |
Things can be pretty confusing when there's a commandline option overrding the
configured default... Let's be nice to the user and emit a warning.
|
|
|
|
| |
Fixes: #15077
|
|
|
|
| |
Other similar commands do, no reason not to do this here too.
|
|
|
|
| |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1807485.
|
|
|
|
| |
"set up" and "look up" are the verbs, "setup" and "lookup" are the nouns.
|
|
|
|
|
|
|
|
| |
The enum used for column names is integer type while table_set_display() is parsing
arguments on size_t alignment which may result in assert in table_set_display() if
the size between types missmatch. This patch cast the enums to size_t.
It also fixes all other occurences for table_set_display() and
table_set_sort().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inside format_bytes, we return NULL if the value is UINT64_MAX. This
makes some kind of sense where this has some other semantic meaning than
being a value, but in this case the value is both a.) not the default
(so we definitely want to display it), and b.) means "infinity" (or
"max" in cgroup terminology).
This patch adds a small wrapper around format_bytes that can be used for
these cases, to avoid the following situation:
[root@tangsanjiao ~]# cat /sys/fs/cgroup/workload.slice/memory.low
max
[root@tangsanjiao ~]# systemctl show workload.slice -p MemoryLow
MemoryLow=infinity
[root@tangsanjiao ~]# systemctl status workload.slice | grep low:
Memory: 14.9G (low: (null))
After the patch:
[root@tangsanjiao ~]# systemctl status workload.slice | grep low:
Memory: 15.1G (low: infinity)
|
| |
|
| |
|
|\
| |
| | |
systemctl: Add --with-dependencies switch
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Will print a unit and all of its dependencies. Works with cat, status,
list-units, and list-unit-files. This flag can also be used in conjunction
with --reverse, --before, and --after.
We also vastly simplify the list_dependencies_get_dependencies logic.
Instead of using 5 strvs and merging them into one, use one strv and
have the bus append all the map values to it.
Fixes #9273
|
| |
| |
| |
| |
| | |
Show the install value presets would suggest for each service in a
separate column.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When processing list of units (either provided manually or as a
wildcard), let's skip units for which we don't have an on-disk
counterpart, but note the -ENOENT error code and propagate it back to
the user.
Fixes: #14082
|
|/
|
|
| |
Signed-off-by: Bart Willems <bwillems@protonmail.com>
|
|
|
| |
This fixes a double "or" in the text of `systemctl --help`.
|
|
|
|
| |
Fixes #7730.
|
|
|
|
|
|
|
|
| |
Follow-up for 0d588deae21234c9a9d64d9eddbcbe7da5c9a39d.
In that commit the output got moved a 2 chars to the right, hence make
sure to also shift the cgroup tree to the right, so that it gets
properly aligned under the cgroup path again.
|
|
|
|
|
|
|
|
|
|
| |
Move the explanation of options three columns to the right: then almost
all options fit and we do not need to break lines so often.
When a multi-line explanation precedes a section break, i.e. there is a
half-line on the right side, do not use an empty space. This saves a line,
and actually looks visually better because the text is still clearly
separated, but we don't get the big vertical white space.
|
|
|
|
|
| |
The rationale is the same as for log-level/log-target: this controls the behaviour
of the manager, and belongs in systemctl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This copies the commands log-level and log-target (to query and set the current
settings) from systemd-analyze to systemctl, essentially reverting
a65615ca5d78be0dcd7d9c9b4a663fa75f758606. Controllling the log level settings
of the manager is basic functionality, that should be available even if
systemd-analyze (which is more of an analysis tool) is not installed. This is
like dmesg and journalctl, which should be available even if a debugger and
more advanced tools to analyze the kernel are not available. (Note that dmesg
is used to control the log level too, not just to browse the kernel logs.)
I chose to copy&paste the methods from analyze.c to the new location. There
isn't enough code to share, because acquire_bus() in both places has a
different signature despite the same name, so the only part that is common
is the invocation of sd_bus_set_property().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up and unifies the outut of --help texts a bit:
1. Highlight the human friendly description string, not the command
line via ANSI sequences. Previously both this description string and
the brief command line summary was marked with the same ANSI
highlight sequence, but given we auto-page to less and less does not
honour multi-line highlights only the command line summary was
affectively highlighted. Rationale: for highlighting the description
instead of the command line: the command line summary is relatively
boring, and mostly the same for out tools, the description on the
other hand is pregnant, important and captions the whole thing and
hence deserves highlighting.
2. Always suffix "Options" with ":" in the help text
3. Rename "Flags" → "Options" in one case
4. Move commands to the top in a few cases
5. add coloring to many more help pages
6. Unify on COMMAND instead of {COMMAND} in the command line summary.
Some tools did it one way, others the other way. I am not sure what
precisely {} is supposed to mean, that uppercasing doesn't, hence
let's simplify and stick to the {}-less syntax
And minor other tweaks.
|
|
|
|
|
|
| |
This makes the ask-password agent handling more alike the polkit agent
handling again, and introduces ask_password_agent_open_if_enabled() that
works just like the already existing polkit_agent_open_if_enabled().
|
|\
| |
| | |
systemctl: Add timer activation to status
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
For all units that aren't timers, if it is activated by another unit,
add the triggering unit under the "TriggeredBy:" header. If a unit can
trigger other units, print the units it triggers other the "Triggers:"
header.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://bugzilla.redhat.com/show_bug.cgi?id=1763488: when we say that
'foo@*.service' is not a valid unit name, this is not clear enough. Let's
include the name of the operation that does not support globbing in the
error message:
$ build/systemctl enable 'foo@*.service'
Glob pattern passed to enable, but globs are not supported for this.
Invalid unit name "foo@*.service" escaped as "foo@\x2a.service".
...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
chase_symlinks() would return negative on error, and either a non-negative status
or a non-negative fd when CHASE_OPEN was given. This made the interface quite
complicated, because dependning on the flags used, we would get two different
"types" of return object. Coverity was always confused by this, and flagged
every use of chase_symlinks() without CHASE_OPEN as a resource leak (because it
would this that an fd is returned). This patch uses a saparate output parameter,
so there is no confusion.
(I think it is OK to have functions which return either an error or an fd. It's
only returning *either* an fd or a non-fd that is confusing.)
|
|
|
|
| |
Fixes #6379.
|
| |
|
|
|
|
|
| |
This doesn't cover all the binaries, but I don't know how to script
this, and I run out of steam ;)
|
|
|
|
|
|
|
| |
For executables which take a verb, we should list the verbs first, and
then options which modify those verbs second. The general layout of
the man page is from general description to specific details, usually
Overview, Commands, Options, Return Value, Examples, References.
|
|
|
|
|
| |
* use .timer suffix by default for systemctl list-timers
* use .socket suffix by default for systemctl list-sockets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce support for configuring cpus and mems for processes using
cgroup v2 CPUSET controller. This allows users to limit which cpus
and memory NUMA nodes can be used by processes to better utilize
system resources.
The cgroup v2 interfaces to control it are cpuset.cpus and cpuset.mems
where the requested configuration is written. However, it doesn't mean
that the requested configuration will be actually used as parent cgroup
may limit the cpus or mems as well. In order to reflect the real
configuration cgroup v2 provides read-only files cpuset.cpus.effective
and cpuset.mems.effective which are exported to users as well.
|
|
|
|
|
|
| |
The "Ex" variant was originally only added for ExecStartXYZ= but it makes
sense to have feature parity for the rest of the exec command properties
as well (e.g. ExecReload=, ExecStop=, etc).
|
| |
|
| |
|
|\
| |
| | |
Rework unit loading to take into account all aliases
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
v2:
- do not watch mtime of transient and generated dirs
We'd reload the map after every transient unit we created, which we don't
need to do, since we create those units ourselves and know their fragment
path.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reworks how we load units from disk. Instead of chasing symlinks every
time we are asked to load a unit by name, we slurp all symlinks from disk
and build two hashmaps:
1. from unit name to either alias target, or fragment on disk
(if an alias, we put just the target name in the hashmap, if a fragment
we put an absolute path, so we can distinguish both).
2. from a unit name to all aliases
Reading all this data can be pretty costly (40 ms) on my machine, so we keep it
around for reuse.
The advantage is that we can reliably know what all the aliases of a given unit
are. This means we can reliably load dropins under all names. This fixes #11972.
|
| |
| |
| |
| |
| | |
After all these two exit codes are defined by ISO C as part of the C
library, and it's not the GNU implementation defines them.
|
| |
| |
| |
| |
| |
| |
| | |
If for some reason we do not know some signal, instead of silently
skipping it, let's print it numerically. Likewise, 'show' is not the
right place to do value filtering for exit codes. If pid1 accepted it,
let's just print it with no fuss.
|
| |
| |
| |
| |
| |
| |
| |
| | |
{RestartPrevent,RestartForce,Success}ExitStatus
We were passing 1/4th of the size in bytes as argument. So depending
on the size of the array, either we'd only transfer a subset of values,
or we'd get an alignment error.
|