summaryrefslogtreecommitdiffstats
path: root/src/systemctl (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | shared/exit-status: turn status level into a bitmask, add "test"Zbigniew Jędrzejewski-Szmek2019-07-291-2/+3
| | | | | | | | | | The "test" doesn't really test much automatically, but it is still useful to look at the mappings.
* | [systemctl] Don't print ExecXYZEx= when doing 'systemctl status'Anita Zhang2019-07-241-0/+5
|/ | | | | | | | The info printed in this function is the same as the non-Ex version of the property so there's no point double printing. Other places that print ExecXYZEx= properties are left alone since the displayed information is different.
* systemctl: call the unit dbus path dbus_path everywhereZbigniew Jędrzejewski-Szmek2019-07-171-22/+22
| | | | | | Similar variables had differing names: unit, path, unit_path. We also have file system paths in surrounding code. Let's make this easier for the reader and use "dbus_path" consistently.
* pid1: kill unit_file_find_dropin_paths() helperZbigniew Jędrzejewski-Szmek2019-07-171-1/+3
| | | | | | It had two users, but it is just a very thin wrapper around unit_file_find_dropin_paths(), so using it seems more complicated than directly invoking unit_file_find_dropin_paths() twice.
* Merge pull request #13076 from keszybz/pr/13062Zbigniew Jędrzejewski-Szmek2019-07-161-7/+10
|\ | | | | Timer formatting fixes
| * systemctl: print non-elapsing timers as "n/a" not "(null)"Zbigniew Jędrzejewski-Szmek2019-07-161-7/+10
| | | | | | | | | | | | TimersCalendar={ OnCalendar=1970-01-01 00:00:00 UTC ; next_elapse=(null) } ↓ TimersCalendar={ OnCalendar=1970-01-01 00:00:00 UTC ; next_elapse=n/a }
* | Merge pull request #13063 from keszybz/cgroup-path-fixesLennart Poettering2019-07-161-1/+2
|\ \ | | | | | | Cgroup path fixes
| * | systemctl: emit warning when we get an invalid process entry from pid1 and ↵Zbigniew Jędrzejewski-Szmek2019-07-151-1/+2
| |/ | | | | | | | | | | | | continue Output looks like this: Invalid process description in GetUnitProcesses reply: cgroup="machine.slice/machine-rawhide.scope/payload/system.slice/systemd-journald.service" pid=638367 command="/usr/lib/systemd/systemd-journald", ignoring: Invalid argument
* / tree-wide: drop duplicated blank linesYu Watanabe2019-07-151-1/+0
|/ | | | | | | ``` $ for i in */*.[ch] */*/*.[ch]; do sed -e '/^$/ {N; s/\n$//g}' -i $i; done $ git checkout HEAD -- basic/linux shared/linux ```
* systemctl: do not suggest passing --all if the user passed --state=Alan Jenkins2019-07-151-2/+4
| | | | | | | | | | | | | | | | | | "systemctl --failed" suggested I pass "--all" to see units in the inactive state as well. I thought this was not very useful. If you explicitly asked for units in a specific state, then you already know you have narrowed it down. And if you ran "systemctl --state=inactive", it is even more strange to see this message. @keszybz suggests we probably don't want to suggest "list-unit-files" either :-). Let's only suggest that if the user passed "--state=inactive". Finally, this means the output for "systemctl --failed" could be just "0 loaded units listed". In this case, we don't need any highlight on that text, to distinguish it from the hint. This matches "list-unit-files". This also means we happen to avoid using red highlight, when there are zero failed units, as if that itself was a failure. @kesbyz pointed out that old behaviour was a bit weird.
* tree-wide: some more [static] related fixesLennart Poettering2019-07-121-0/+2
| | | | | | | | | | | let's add [static] where it was missing so far Drop [static] on parameters that can be NULL. Add an assert() around parameters that have [static] and can't be NULL hence. Add some "const" where it was forgotten.
* tree-wide: get rid of strappend()Lennart Poettering2019-07-121-1/+1
| | | | | It's a special case of strjoin(), so no need to keep both. In particular as typing strjoin() is even shoert than strappend().
* systemctl: port "systemctl start --wait" logic to new bus-wait-for-units.c APILennart Poettering2019-07-111-171/+15
|
* systemctl: add new "clean" operation to systemctlLennart Poettering2019-07-111-0/+136
| | | | | This exposes the CleanUnit() bus calls in systemctl, i.e. makes all the infrastructure we previously added useful to people.
* Merge pull request #12939 from yuwata/lgtm-fixesLennart Poettering2019-07-101-1/+1
|\ | | | | make LGTM quiet
| * tree-wide: introduce strerror_safe()Yu Watanabe2019-07-041-1/+1
| |
* | systemctl: allow "cat" on units with bad settingsZbigniew Jędrzejewski-Szmek2019-07-101-6/+7
| | | | | | | | That's precisely the state where 'cat' is particularly useful ;).
* | basic/time-util: add helper function to check if timestamp is setZbigniew Jędrzejewski-Szmek2019-07-041-2/+2
|/ | | | No functional change.
* Merge pull request #12870 from yuwata/tree-wide-further-path-join-cleanupsLennart Poettering2019-06-251-2/+2
|\ | | | | tree-wide: further path_join() and path_joina() cleanups
| * tree-wide: replace strjoina() with prefix_roota()Yu Watanabe2019-06-241-2/+2
| |
* | core: introduce NUMAPolicy and NUMAMask optionsMichal Sekletar2019-06-241-2/+12
|/ | | | | | | | | | | | | Make possible to set NUMA allocation policy for manager. Manager's policy is by default inherited to all forked off processes. However, it is possible to override the policy on per-service basis. Currently we support, these policies: default, prefer, bind, interleave, local. See man 2 set_mempolicy for details on each policy. Overall NUMA policy actually consists of two parts. Policy itself and bitmask representing NUMA nodes where is policy effective. Node mask can be specified using related option, NUMAMask. Default mask can be overwritten on per-service level.
* tree-wide: replace strjoin() with path_join()Yu Watanabe2019-06-201-2/+2
|
* systemctl: Prevent state_missing from being used uninitChris Down2019-06-071-1/+1
|
* Merge pull request #12508 from keszybz/no-root-checksYu Watanabe2019-06-061-5/+13
|\ | | | | Drop many root checks
| * systemctl: show a hint if root privileges might yield more informationZbigniew Jędrzejewski-Szmek2019-05-081-3/+11
| |
| * systemctl: drop one must_be_root_check()Zbigniew Jędrzejewski-Szmek2019-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (before) $ build/systemctl list-machines Need to be root. $ sudo build/systemctl list-machines NAME STATE FAILED JOBS krowka (host) running 0 0 rawhide running 0 0 2 machines listed. (after) $ build/systemctl list-machines NAME STATE FAILED JOBS krowka (host) running 0 0 rawhide n/a 0 0 2 machines listed. The output for non-root is missing some bits of information, but we display what information is missing nicely, and e.g. in the case when no machines are running at all, or only VMs are running, the unprivileged output would be the same as the privileged one.
* | core: add ExecStartXYZEx= with dbus support for executable prefixesAnita Zhang2019-05-311-96/+137
| | | | | | | | Closes #11654
* | systemctl: process all units matched by a glob in the cat verb by defaultFrantisek Sumsal2019-05-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, `systemctl cat` would match only active units, for example: $ systemctl cat sshd.service would cat the sshd.service unit file even if the service was inactive. However: $ systemctl cat ssh* would show it only if it was active. Let's unify the behavior and cat all unit files regardless of a state, if no state was given explicitly to filter.
* | systemctl: present CPUAffinity mask as a list of CPU index rangesMichal Sekletar2019-05-291-0/+22
|/
* codespell: fix spelling errorsBen Boeckel2019-04-291-8/+8
|
* Merge pull request #12074 from poettering/io-acctZbigniew Jędrzejewski-Szmek2019-04-251-1/+14
|\ | | | | expose IO stats on the bus and in "systemctl status" and "systemd-run --wait"
| * systemctl: show IO stats in 'status' outputLennart Poettering2019-04-121-1/+14
| |
* | unit: Add DefaultMemoryMinChris Down2019-04-161-0/+2
| |
* | cgroup: Implement default propagation of MemoryLow with DefaultMemoryLowChris Down2019-04-121-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cgroup v2 we have protection tunables -- currently MemoryLow and MemoryMin (there will be more in future for other resources, too). The design of these protection tunables requires not only intermediate cgroups to propagate protections, but also the units at the leaf of that resource's operation to accept it (by setting MemoryLow or MemoryMin). This makes sense from an low-level API design perspective, but it's a good idea to also have a higher-level abstraction that can, by default, propagate these resources to children recursively. In this patch, this happens by having descendants set memory.low to N if their ancestor has DefaultMemoryLow=N -- assuming they don't set a separate MemoryLow value. Any affected unit can opt out of this propagation by manually setting `MemoryLow` to some value in its unit configuration. A unit can also stop further propagation by setting `DefaultMemoryLow=` with no argument. This removes further propagation in the subtree, but has no effect on the unit itself (for that, use `MemoryLow=0`). Our use case in production is simplifying the configuration of machines which heavily rely on memory protection tunables, but currently require tweaking a huge number of unit files to make that a reality. This directive makes that significantly less fragile, and decreases the risk of misconfiguration. After this patch is merged, I will implement DefaultMemoryMin= using the same principles.
* systemctl: print a more accurate error message when we canLennart Poettering2019-04-011-1/+1
|
* util-lib: when copying files make sure to apply some chattrs early, some lateLennart Poettering2019-03-281-1/+1
| | | | | | | Some chattrs only work sensible if you set them right after opening a file for create (think: FS_NOCOW_FL). Others only work when they are applied when the file is fully written (think: FS_IMMUTABLE_FL). Let's take that into account when copying files and applying a chattr to them.
* Merge pull request #12115 from poettering/verbose-job-enqueueZbigniew Jędrzejewski-Szmek2019-03-281-134/+186
|\ | | | | add "systemctl --show-transaction start" as a more verbose "systemctl start" that shows enqueued jobs
| * systemctl: add new --show-transaction switchLennart Poettering2019-03-271-55/+127
| | | | | | | | | | | | | | This new switch uses the new method call EnqueueUnitJob() for enqueuing a job and showing the jobs it enqueued. Fixes: #2297
| * systemctl: split out extra args generation into helper function of its ownLennart Poettering2019-03-271-15/+21
| |
| * systemctl: reindent tableLennart Poettering2019-03-271-15/+15
| |
| * systemctl: more SYNTHETIC_ERRNO() conversionLennart Poettering2019-03-271-2/+2
| |
| * systemctl: replace switch statement by table of structuresLennart Poettering2019-03-271-47/+21
| |
* | Merge pull request #12119 from keszybz/voidify-mkdir-pLennart Poettering2019-03-271-0/+4
|\ \ | |/ |/| Voidify mkdir_p() and normalize util.h includes
| * headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek2019-03-271-0/+4
| | | | | | | | | | This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
* | systemctl: define less stuff when !HAVE_SYSV_COMPATZbigniew Jędrzejewski-Szmek2019-03-263-5/+7
|/ | | | | | | We'd translate our action to sysv runlevel action, only to discard the result in talk_initctl(). Let's just ifdef the whole thing away. Fixes #12103.
* systemctl: move --failed close to --state= in help textLennart Poettering2019-03-251-1/+1
|
* systemctl: underline sections in help textLennart Poettering2019-03-251-9/+10
| | | | | Taking inspiration from the recent commit that added that to nspawn's help text.
* systemctl: use structured initializationLennart Poettering2019-03-251-8/+10
|
* systemctl: use SYNTHETIC_ERRNO everywhereLennart Poettering2019-03-251-56/+33
|
* systemctl: split out some SysV compat stuff into its own C fileLennart Poettering2019-03-253-111/+132
| | | | | systemctl.c is way to large already. Let's split out some stuff out that is easy to split out.