summaryrefslogtreecommitdiff
path: root/src/systemctl
AgeCommit message (Collapse)Author
2013-06-19cgls,loginctl,systemctl: fix -lZbigniew Jędrzejewski-Szmek
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --full".
2013-06-17core: add new .slice unit type for partitioning systemsLennart Poettering
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.
2013-06-17journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --fullDaniel Albers
https://bugs.freedesktop.org/show_bug.cgi?id=65850
2013-06-09Allow for the use of @ in remote host callsDaniel Wallace
Without this you have to use %40 with the -H flag because dbus doesn't like the @ sign being unescaped.
2013-06-09systemctl: remove extra padding from status outputZbigniew Jędrzejewski-Szmek
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.
2013-06-04systemctl: add missing verbs to helpZbigniew Jędrzejewski-Szmek
2013-05-30systemctl: suggest 'systemctl daemon-reload' without --systemZbigniew Jędrzejewski-Szmek
--system is default anyway, and some poor user might type 9 characters without needing to.
2013-05-30systemctl: add command set-log-levelVáclav Pavlín
Command changes current log level
2013-05-30systemctl: add commands set-default and get-defaultVáclav Pavlín
systemctl set-default NAME links the default.target to the given unit, get-default prints out the path to the currently set default target.
2013-05-23systemctl: mangle names when avoiding dbusVáclav Pavlín
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.
2013-05-21systemctl: honor "--no-legend" in 'list-sockets'Mantas Mikulėnas
2013-05-03systemctl: use GREEDY_REALLOC in one more placeZbigniew Jędrzejewski-Szmek
2013-05-03systemctl: add --plain option to list-dependenciesLukas Nykryn
This patch adds more script-friendly output for list-dependencies.
2013-05-02Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek
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.
2013-04-24systemctl: show reverse dependencies or before/after orderingZbigniew Jędrzejewski-Szmek
Also update completion scripts a bit.
2013-04-24Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek
Freeing in error path is the common pattern with set_put().
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-18systemctl: drop usage of "internally loaded modules"Lennart Poettering
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.
2013-04-17systemctl:enable_sysv_units() more _cleanup_free_Harald Hoyer
2013-04-17systemctl: clarify usage of "--all" versus list-unit-filesHarald Hoyer
Novice users might think, that $ systemctl --all is equal to $ systemctl list-unit-files https://bugzilla.redhat.com/show_bug.cgi?id=748512
2013-04-16util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()Lennart Poettering
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.
2013-04-15Fix spelling errors using 'codespell' toolAnatol Pomozov
2013-04-12systemctl: new verb 'list-sockets'Zbigniew Jędrzejewski-Szmek
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.
2013-04-11errno is positiveZbigniew Jędrzejewski-Szmek
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.
2013-04-11systemctl: show the name of failing unit in redZbigniew Jędrzejewski-Szmek
It makes it easier to pick out problematic unit names from a long list.
2013-04-11systemctl: allow multiple arguments to --typeZbigniew Jędrzejewski-Szmek
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.
2013-04-10systemctl: ellipsize job list only when necessary, highlight runningZbigniew Jędrzejewski-Szmek
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.
2013-04-05Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek
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.
2013-04-05systemctl: tweak drop-in displayLennart Poettering
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...)
2013-04-05systemctl: tweak output of Listen: fields a bitLennart Poettering
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)
2013-04-05systemctl: Add DropIn paths to status messageOleksii Shevchuk
$ 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
2013-04-05systemctl: align cgroups to 'n' in 'name='Zbigniew Jędrzejewski-Szmek
Also drop ':' in repeated Docs lines.
2013-04-04util: make time formatting a bit smarterLennart Poettering
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.
2013-04-01systemctl: align all status fields to common columnZbigniew Jędrzejewski-Szmek
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
2013-04-01Add Listen* to dbus propertiesOleksii Shevchuk
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.]
2013-04-01Always use our own MAX/MIN definitionsCristian Rodríguez
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.]
2013-03-31ModernizationZbigniew Jędrzejewski-Szmek
Use _cleanup_ and wrap lines to ~80 chars and such.
2013-03-30unit: no need to export variables if we can avoid itLennart Poettering
2013-03-29Always use errno > 0 to help gccZbigniew Jędrzejewski-Szmek
gcc thinks that errno might be negative, and functions could return something positive on error (-errno). Should not matter in practice, but makes an -O4 build much quieter.
2013-03-23add --with-telinit=PATH configure optionCristian Rodríguez
Distributions that never shipped upstart do not have "telinit" in /lib/upstart/.. Defaults to /lib/upstart/telinit so there is no change for systems existing installs.
2013-03-13systemctl: remove unused variableMichal Sekletar
2013-03-13initctl: catch write error, use _cleanup_Zbigniew Jędrzejewski-Szmek
!= operator always returns something nonnegative, so the error condition was not caught.
2013-03-13logs-show: export logic to add matches for unitsZbigniew Jędrzejewski-Szmek
After that functions which add matches, show_journal_by_unit and show_journal_by_user_unit, become nearly identical, so I merged them into one function.
2013-03-07pager: introduce "jump to end" optionHarald Hoyer
$ journalctl -be is what you want :) https://bugzilla.redhat.com/show_bug.cgi?id=867841
2013-03-07systemctl: mangle unit name in is-enabledLukas Nykryn
https://bugs.freedesktop.org/show_bug.cgi?id=56072 https://bugzilla.redhat.com/show_bug.cgi?id=880353
2013-03-01systemctl: check if iterator was initialized succesfullyLukas Nykryn
2013-03-01Revert "systemctl: try to reload daemon after enable/disable only when not ↵Lennart Poettering
running in a chroot" This reverts commit 5522a1fa876f1ab94a2accaadca824799fdf2cab. I am an idiot, the chroot case was already filtered out, so no point in checking this again.
2013-03-01systemctl: try to reload daemon after enable/disable only when not running ↵Lennart Poettering
in a chroot http://lists.freedesktop.org/archives/systemd-devel/2013-February/009208.html
2013-02-27systemctl: fix minimal number of params for new cgroup commandsLennart Poettering
2013-02-27unit: rework resource management APILennart Poettering
This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.