summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-17journalctl: specify "--unit=" and "--user-unit" multiple timesHarald Hoyer
Previously only one "--unit=" or "--user-unit" could be specified. With this patch, journalcrtl can show multiple units. $ journalctl -u systemd-udevd.service -u sshd.service -u crond.service -b -- Logs begin at Sa 2013-03-23 11:08:45 CET, end at Fr 2013-04-12 09:10:22 CEST. -- Apr 12 08:41:37 lenovo systemd[1]: Started udev Kernel Device Manager. Apr 12 08:41:37 lenovo systemd[1]: Stopped udev Kernel Device Manager. Apr 12 08:41:38 lenovo systemd[1]: Started udev Kernel Device Manager. Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (Syslog will be used instead of sendmail.) Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (running with inotify support) Apr 12 08:41:39 lenovo systemd[1]: Starting OpenSSH server daemon... Apr 12 08:41:39 lenovo systemd[1]: Started OpenSSH server daemon. Apr 12 08:41:39 lenovo sshd[355]: Server listening on 0.0.0.0 port 22. Apr 12 08:41:39 lenovo sshd[355]: Server listening on :: port 22. Apr 12 08:41:39 lenovo mtp-probe[373]: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6.2/1-1.5.6.2.1"
2013-04-17journal: add one more level on top with ANDHarald Hoyer
When using "-p" and "-b" in combination with "-u", the output is not what you would expect. The reason is the sd_journal_add_disjunction() call in add_matches_for_unit() and add_matches_for_user_unit(), which adds two ORs without taking the other conditions to every OR. Adding another level on top with AND and sd_journal_add_conjunction() solves the problem. Output before: $ journalctl -o short-monotonic -ab -p 0 -u sshd.service -- Reboot -- [ 3.216305] lenovo systemd[1]: Starting OpenSSH server daemon... -- Reboot -- [ 3.168666] lenovo systemd[1]: Starting OpenSSH server daemon... [ 3.169639] lenovo systemd[1]: Started OpenSSH server daemon. [36285.635389] lenovo systemd[1]: Stopped OpenSSH server daemon. -- Reboot -- [ 10.838657] lenovo systemd[1]: Starting OpenSSH server daemon... [ 10.913698] lenovo systemd[1]: Started OpenSSH server daemon. [ 6881.035183] lenovo systemd[1]: Stopped OpenSSH server daemon. -- Reboot -- [ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon... [ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon. [ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22. [ 6.681379] lenovo sshd[397]: Server listening on :: port 22. As we see, the output is from _every_ boot and priority 0 is not taken into account. Output after patch: $ journalctl -o short-monotonic -ab -p 0 -u sshd.service -- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:58:21 CET. -- Increasing the priority: $ journalctl -o short-monotonic -ab -p 6 -u sshd.service -- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:59:12 CET. -- [ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon... [ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon. [ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22. [ 6.681379] lenovo sshd[397]: Server listening on :: port 22.
2013-04-17core/device.c: fix possible segfaultHarald Hoyer
https://bugs.freedesktop.org/show_bug.cgi?id=63189 better fail than segfault systemd[1]: Failed to load device unit: Invalid argument systemd[1]: Failed to process udev device event: Invalid argument
2013-04-17TODO: remove fixed systemctl property bugHarald Hoyer
2013-04-17timedated: fixed NTP enabled: n/aHarald Hoyer
2013-04-17configure: use AC_CHECK_TOOL for objcopy, strings and gperfMartin Jansa
* using AC_PATH_TOOL does not allow to override it from shell environment which is useful when cross-compiling * with external toolchain I have different HOST_PREFIX and HOST_SYS AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy which is available only as ${TARGET_PREFIX}-objcopy then it tries objcopy without prefix which is found on host, but that objcopy does not work for !host (e.g. arm when building on x86) libs
2013-04-17fileio: also escape $ and ` when writing out env varsMantas Mikulėnas
These are also considered special by sh and bash.
2013-04-17build-sys: make sure kdbus.h is part of tarballZbigniew Jędrzejewski-Szmek
Also fix 'update-man-list' rule and add rules for new man pages.
2013-04-17journalctl: show fields requested with --field in fullZbigniew Jędrzejewski-Szmek
I see little point in silently truncating fields when they are explictly requested. With this change e.g. journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART works as expected.
2013-04-17systemd: ignore hw timestamps in containersZbigniew Jędrzejewski-Szmek
They are irrelevant and misleading. E.g. systemd-analyze: Startup finished in 6d 4h 15min 32.330s (kernel) + 49ms 914us (userspace) = 6d 4h 15min 32.380s becomes Startup finished in 53.735ms (userspace) = 53.735ms which looks much better :)
2013-04-17bash-completion: --property supportZbigniew Jędrzejewski-Szmek
Just bash.
2013-04-17man: fix syntax in nsenter exampleZbigniew Jędrzejewski-Szmek
Apparently nsenter doesn't handle options concatenated together. I'm pretty sure it worked at one point, but it seems like magic, since each of those options can take arguments.
2013-04-17sd-messages.h: add new bootchart message idZbigniew Jędrzejewski-Szmek
2013-04-17core/main: use _cleanup_Zbigniew Jędrzejewski-Szmek
2013-04-17Report about syntax errors with metadataZbigniew Jędrzejewski-Szmek
The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-04-17core: log a few more things under UNIT=...Zbigniew Jędrzejewski-Szmek
2013-04-17core/main: generate 4 parsing functions from a macroZbigniew Jędrzejewski-Szmek
2013-04-17conf-parser: generate 7 parsing functions from a macroZbigniew Jędrzejewski-Szmek
Those functions were identical, apart from typos. Log message is modified to contain the type of destination var (int, double, ...). I think this might make it easier to understand why a value was rejected (e.g. a minus from an unsigned type).
2013-04-17python-systemd: Reader return special fields and _Reader changesSteven Hiscocks
Changes to _Reader make it match closer to C API, by removing `get_next` and `get_previous`. A `get_all` method added, which returns dictionary of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used in conjunction with `next`. _Reader `get`, `next`, `get_{realtime,monotonic,cursor}` and new `previous` methods are made private. This is so the traversal and getting of journal fields can be made transparent in the python interface. Reader now solely implements `get_next` and `get_previous`, returning a standard dictionary (future: other mapping types?) with all standard and special fields through the converters. This makes the output the same as journalctl json/export format output. Iterator methods also moved to Reader, as they do not function as intend with changes to _Reader. These changes also mean that more optimised journal interfaces can be made more easily from _Reader, by avoiding getting of unrequired fields by using the `_get` method, and avoiding field conversions.
2013-04-16systemd-python: export new sd_journal_{process,get_events,get_timeout}Zbigniew Jędrzejewski-Szmek
get_timeout_ms is added as a convenience function, since it is abysmally hard to call clock_gettime() in Python versions lower than 3.3. And even for Python 3.3 users it saves a few lines.
2013-04-16journal: fix off-by-one error in native message iovec countingMichal Schmidt
Thanks to Cristian Ciupitu for a reproducer. https://bugzilla.redhat.com/show_bug.cgi?id=924359
2013-04-16util: make generation of profcs PID paths nicerLennart Poettering
2013-04-16path-util: unify code for detecting OS treesLennart Poettering
This also makes sure we always detect an OS tree the same way, by checking for /etc/os-release.
2013-04-16macro: rework how we define cleanup macrosLennart Poettering
There's now a generic _cleanup_ macro with an argument. The macros for specific types are now defined using this macro, and in the header files where they belong. All cleanup handlers are now inline functions.
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-16bus: parse unit/user unit/session from cgroup pathLennart Poettering
2013-04-16update TODOLennart Poettering
2013-04-16nspawn: introduce the new /machine/ tree in the cgroup tree and move ↵Lennart Poettering
containers there Containers will now carry a label (normally derived from the root directory name, but configurable by the user), and the container's root cgroup is /machine/<label>. This label is called "machine name", and can cover both containers and VMs (as soon as libvirt also makes use of /machine/). libsystemd-login can be used to query the machine name from a process. This patch also includes numerous clean-ups for the cgroup code.
2013-04-16util: make sure result of hostname_cleanup() passes hostname_is_valid()Lennart Poettering
2013-04-16logind: filter configured cgroup controller listsLennart Poettering
2013-04-16logind: when looking for cgroup prefixes, allocate from stackLennart Poettering
2013-04-16libudev: remove udev_monitor_new_from_socket() symbolMichael Biebl
This function was removed in v183, so drop it from the symbols versioning file.
2013-04-16bus: copy iteration macro from the kernelKay Sievers
2013-04-16hwdb: updateKay Sievers
2013-04-16bus: catch up with kernel changesKay Sievers
2013-04-15bootchart: put the bootchart into the journal.Auke Kok
This bit of code is mostly stolen from coredump.c. We construct a simple journal message and append the bootchart file in the journal automatically. You can extract the latest bootchart from the current boot with something like: $ journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART which prints it to stdout. None of the other logic is touched. The journal entry is created even if bootchart was run manually, which is probably wrong.
2013-04-15bus: fix missing macro argument renamingKay Sievers
<fdo-vcs> systemd kay master * b1454bf src/libsystemd-bus/ bus-kernel.c kdbus.h <fdo-vcs> systemd bus: catch up with kernel changes <kmacleod> kay: randomly looked at your commit, it looks like in KDBUS_FOREACH_ITEM you missed changing a (d) to an (i) in (uint8_t*) (d) < (uint8_t*) (k) + (k)->size; ? <kay> kmacleod: hah, so there *is* a reason for using _foo in macros :) <kay> kmacleod: thanks!
2013-04-15bus: catch up with kernel changesKay Sievers
2013-04-15audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user ↵Lennart Poettering
this anymore to skip audit session ID retrieval As audit is still broken in containers we need a reliable way how we can determine whether the audit data we read from 7proc is actually useful. Previously we used CAP_AUDIT_CONTROL for this, since nspawn removed that from the nspawn container. This has changed a while back however, which means we used audit data of host system in the container. This adds an explicit container check to the audit calls, so that all audit data is turned off in containers. This should fix session creation with pam_systemd/logind in nspawn containers.
2013-04-15core: let's make our log messages proper sentences with full stopsLennart Poettering
2013-04-15core: always create /user and /machine top-level cgroup dirsLennart Poettering
This allows clients to put inotify watches on these trees to watch for state changes, without having to wait until these dirs are created. This introduces the new top-level /machine cgroup dir as canonical location where OS containers and VMs shall be located (as discussed with the libvirt folks).
2013-04-15update TODOLennart Poettering
2013-04-15do not change console to non-unicode for LANG=CHarald Hoyer
If systemd-vconsole-setup was started with LANG=C (no locale.conf), then it would set the console to non-unicode, which is not what we want.
2013-04-15Fix spelling errors using 'codespell' toolAnatol Pomozov
2013-04-15sd-login: add a sd_pid_get_user_unit() callLennart Poettering
2013-04-15bus: handle env vars safelyLennart Poettering
Make sure that our library is safe for usage in SUID programs when it comes to env var handling
2013-04-15kdbus: parse cgroup meta data, tooLennart Poettering
2013-04-15localectl: read X11 keymaps from the correct fileLennart Poettering
As reported by Sergey Udaltsov.
2013-04-14udev/ata_id: zero out variable properlyZbigniew Jędrzejewski-Szmek
b8a2b0f76 'use initalization instead of explicit zeroing' introduced a bug where only the first sizeof(uint_t*) bytes would be zeroed out, instead of the whole array.