Commit graph

982 commits

Author SHA1 Message Date
Maciej Wereski 9b9b3d36b8 systemctl: option to list units by state
This allows to show only units with specified LOAD or SUB or ACTIVE state.
2013-07-18 19:50:04 +02:00
Tomasz Torcz 44bc6e1fe0 journalctl: add ”short-iso” output format with verbose ISO8601 timestamps
Example:
2013-07-18T10:10:01+0200 sandworm CROND[20957]: (root) CMD (/usr/lib64/sa/sa1 1 1)
2013-07-18 15:58:49 +02:00
Zbigniew Jędrzejewski-Szmek d121b396cc journalctl: remove ":" from the --boot syntax
Instead of :-0, :1, :5, etc., use -0, 1 or +1, 5, etc. For BOOT_ID+OFFSET,
use BOOT_ID+offset or BOOT_ID-offset (either + or - is required).

Also make error handling a bit more robust and verbose.
Modify the man page to describe the most common case (-b) first,
and the second most common case (-b -1) second.
2013-07-17 23:41:10 -04:00
Zbigniew Jędrzejewski-Szmek 248fc619b5 journalctl: augment short mode with a cursor at the end
Two options are added: --show-cursor to print the cursor at the end,
and --after-cursor to resume logs on the next line after the previous one.
2013-07-16 22:41:47 -04:00
Tom Gundersen 84b6ad702e udev: export tags of "dead" device nodes to /run/udev/static_node-tags/
Based on a patch by Kay Sievers.

A tag is exported at boot as a symlinks to the device node in the folder
/run/udev/static_node-tags/<tagname>/, if the device node exists.

These tags are cleaned up by udevadm info --cleanup-db, but are otherwise
never removed.
2013-07-16 20:07:57 +02:00
Zbigniew Jędrzejewski-Szmek a65f06bb27 journal: return -ECHILD after a fork
A few asserts are replaced with 'return -EINVAL'. I think that
assert should not be used to check argument in public functions.

Fields in struct sd_journal are rearranged to make it less
swiss-cheesy.
2013-07-16 12:09:48 -04:00
Jason St. John 9c33d34fe4 man: improve readability of --output options in journalctl(1)
The list and descriptions of valid output options was difficult to read,
so break up the long block of text into discrete man page list items to
improve readability.
2013-07-16 17:43:11 +02:00
Jason St. John 6ed80a4e34 man: use HTTPS links for links that support it 2013-07-16 17:42:56 +02:00
Jan Janssen a331b5e6d4 journalctl: Add support for showing messages from a previous boot
Hi,

I redid the boot ID look up to use enumerate_unique.

This is quite fast if the cache is warm but painfully slow if
it isn't. It has a slight chance of returning the wrong order if
realtime clock jumps around.

This one has to do n searches for every boot ID there is plus
a sort, so it depends heavily on cache hotness. This is in contrast
to the other way of look-up through filtering by a MESSAGE_ID,
which only needs about 1 seek + whatever amount of relative IDs
you want to walk.

I also have a linked-list + (in-place) mergesort version of this
patch, which has pretty much the same runtime. But since this one
is using libc sorting and armortized allocation, I prefer this
one.

To summarize: The MESSAGE_ID way is a *lot* faster but can be
incomplete due to rotation, while the enumerate+sort will find
every boot ID out there but will be painfully slow for large
journals and cold caches.

You choose :P

Jan
2013-07-16 17:38:12 +02:00
Ramkumar Ramachandra 7080ea16b5 detect-virt: detect User-Mode Linux
In a User-Mode Linux session:

  $ systemd-detect-virt
  none

Although it is possible to reliably detect virtualization:

  $ cat /proc/cpuinfo
  processor       : 0
  vendor_id       : User Mode Linux
  model name      : UML
  mode            : skas
  host            : Linux kytes 3.11.0-rc1-00009-ge5fd680 (...)
  bogomips        : 7007.43

So, grep for the string "\nvendor_id\t: User Mode Linux\n" in
/proc/cpuinfo, and say "uml" when asked.
2013-07-16 14:27:53 +02:00
Shawn Landden 3a83211689 journal: add logging of effective capabilities _CAP_EFFECTIVE
I think this is the most important of the capabilities bitmasks to log.
2013-07-16 04:27:04 +02:00
Zbigniew Jędrzejewski-Szmek 65cd79f7f5 man: add FILES section to systemd-journald.service(8) 2013-07-15 22:20:17 -04:00
Zbigniew Jędrzejewski-Szmek 77a9e8de65 man: add note about paging and colors to journalctl(1) 2013-07-15 21:34:57 -04:00
Jan Janssen 8cf3ca8068 cryptsetup: Add tcrypt support
Tcrypt uses a different approach to passphrases/key files. The
passphrase and all key files are incorporated into the "password"
to open the volume. So, the idea of slots that provide a way to
open the volume with different passphrases/key files that are
independent from each other like with LUKS does not apply.

Therefore, we use the key file from /etc/crypttab as the source
for the passphrase. The actual key files that are combined with
the passphrase into a password are provided as a new option in
/etc/crypttab and can be given multiple times if more than one
key file is used by a volume.
2013-07-16 01:24:31 +02:00
Shawn Landden b8547c10c8 journalctl: add --force option to recreate FSS 2013-07-14 23:55:18 -04:00
Zbigniew Jędrzejewski-Szmek 3eb1395706 man: tweak WantedBy=/RequiredBy= description a bit
https://bugs.freedesktop.org/show_bug.cgi?id=55663
2013-07-13 23:36:51 -04:00
Jan Engelhardt 6a75304e41 man: wording and grammar update 2013-07-13 07:56:11 -04:00
Zbigniew Jędrzejewski-Szmek d868475ad6 man: document the slice and scope units, add systemd.cgroup(5) 2013-07-12 01:10:04 -04:00
Zbigniew Jędrzejewski-Szmek 479fe882ae man: use <literal> not <filename> for suffixes
Especially sentences like "filename ends in .suffix" are easier to
parse if the suffix is surrounded by quotes. In sentences like
"requires a .service unit", where the suffix is used as a class
designation, there is no need to use quotes.
2013-07-12 01:09:25 -04:00
Zbigniew Jędrzejewski-Szmek b54022fb92 man: remove note about shutdown being legacy
This can only confuse people, because there's no need to
discourage people from using shutdown. It is fully functional
and supported.
2013-07-12 01:01:10 -04:00
Shawn Landden f7db7a691c basic SO_REUSEPORT support 2013-07-11 03:09:18 +02:00
Zbigniew Jędrzejewski-Szmek f09114bcc7 man: document systemd-run 2013-07-10 02:16:20 -04:00
Zbigniew Jędrzejewski-Szmek fade1ec6e0 man: document four basic slices 2013-07-10 02:16:20 -04:00
Jason St. John a3f6aa268c man: improve word usage and grammar in logind.conf(5) 2013-07-09 09:07:33 -04:00
Jan Engelhardt 7b870f607b man: wording and grammar updates 2013-07-09 09:07:33 -04:00
Zbigniew Jędrzejewski-Szmek 65b571fcfb man: tweak the description of System/RuntimeMaxUse
https://bugs.freedesktop.org/show_bug.cgi?id=66657
2013-07-06 23:35:09 -04:00
Zbigniew Jędrzejewski-Szmek 19887cd06a man: document machinectl and systemd-machined 2013-07-06 22:23:31 -04:00
Jan Engelhardt 409dee2e44 man: more grammar improvements
- place commas
- expand contractions (this is written prose :)
- add some missing words
2013-07-03 08:19:20 -04:00
Zbigniew Jędrzejewski-Szmek 5199cbe4a4 man: describe OBJECT_PID= 2013-07-02 23:35:38 -04:00
Jason St. John e9c1ea9de8 replace tabs with spaces in various files
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.
2013-07-02 23:06:22 -04:00
Zbigniew Jędrzejewski-Szmek 05cc726731 man: add more formatting markup 2013-07-02 23:06:22 -04:00
Jason St. John e9dd9f9547 man: improve grammar and word formatting in numerous man pages
Use proper grammar, word usage, adjective hyphenation, commas,
capitalization, spelling, etc.

To improve readability, some run-on sentences or sentence fragments were
revised.

[zj: remove the space from 'file name', 'host name', and 'time zone'.]
2013-07-02 23:06:22 -04:00
Jason St. John 1e158d273b man: fix spacing issue in various man pages
Before: libsystemd-daemonpkg-config(1)
After: libsystemd-daemon pkg-config(1)

This fix is more complicated than it should be due to the consecutive
XML elements separated by collapsible whitespace.

Merging the lines and separating the XML elements with an en space or a
non-breaking space is the only solution that results in one, and only
one, space being inserted between them when testing. An em space results
in two spaces being inserted.
2013-06-29 10:28:57 -04:00
Zbigniew Jędrzejewski-Szmek 74d005783e man: use <constant> for various constants which look ugly with quotes 2013-06-26 19:47:34 -04:00
Zbigniew Jędrzejewski-Szmek 909f413d3c man: always supply quotes around literals
When manpages are displayed on a terminal, <literal>s are indistinguishable
from surrounding text. Add quotes everywhere, remove duplicate quotes,
and tweak a few lists for consistent formatting.

https://bugzilla.redhat.com/show_bug.cgi?id=874631
2013-06-26 08:05:14 -04:00
David King aed63d6758 man: Small language improvements to sd_journal_open 2013-06-25 07:52:01 -04:00
Zbigniew Jędrzejewski-Szmek 670b110c3b journald: fix space limits reporting
Reporting of the free space was bogus, since the remaining space
was compared with the maximum allowed, instead of the current
use being compared with the maximum allowed. Simplify and fix
by reporting limits directly at the point where they are calculated.

Also, assign a UUID to the message.
2013-06-24 21:06:06 -04:00
Zbigniew Jędrzejewski-Szmek 92fba83e3a journal-verify: allow unlinked data entries
Sometimes an entry is not successfully written, and we end up with
data items which are "unlinked", not connected to, and not used by any
entry. This will usually happen when we write to write a core dump,
and the initial small data fields are written successfully, but
the huge COREDUMP= field is not written. This situation is hard
to avoid, but the results are mostly harmless. Thus only warn about
unused data items.

Also, be more verbose about why journal files failed verification.
This should help diagnose journal failure modes without resorting
to a hexadecimal editor.

https://bugs.freedesktop.org/show_bug.cgi?id=65235 (esp. see
system.journal attached to the bug report).
2013-06-22 20:36:01 -04:00
Michael Biebl fb69ed55e5 man: Fix small typo 2013-06-22 00:55:18 +02:00
Lennart Poettering 78894537e0 man: fix example for DefaultEnvironment=
The example mentioned Environment= rather than DefaultEnvironment=.

Also made some other clean-ups.
2013-06-20 23:31:21 +02:00
Lennart Poettering 3c86d34cf1 man: document that shutdown() is only sometimes OK on sockets passed in via socket activation 2013-06-20 23:25:41 +02:00
Umut Tezduyar 97d0e5f83b manager: add DefaultEnvironment option
This complements existing functionality of setting variables
through 'systemctl set-environment', the kernel command line,
and through normal environment variables for systemd in session
mode.
2013-06-20 16:27:45 -04:00
Łukasz Stelmach 77f40f165c Describe handling of an AF_UNIX socket
Describe how to handle an AF_UNIX socket, with Accept set to false,
received from systemd, upon exit.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2013-06-19 15:24:05 -07:00
Lennart Poettering fe004b7c3a journal: add references to SSKG paper FSS is based on 2013-06-18 16:25:11 +02:00
Daniel Albers 98a6e132b5 journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --full
https://bugs.freedesktop.org/show_bug.cgi?id=65850
2013-06-17 10:33:34 -04:00
Zbigniew Jędrzejewski-Szmek fa3868c6d3 man: update systemd-analyze invocation 2013-06-14 16:25:38 -04:00
Jason St. John 3ae83f9896 man: improve readability of "_TRANSPORT=" section in systemd.journal-fields(7)
The list and descriptions of valid transports was difficult to read, so
break the long sentence up into discrete man page list items to improve
readability.
2013-06-14 16:21:41 -04:00
Zbigniew Jędrzejewski-Szmek 5e9dfd2ef9 man: add sd_j_open_files to return values section 2013-06-13 23:36:08 -04:00
Zbigniew Jędrzejewski-Szmek 7699b6eb98 man: add note that sd_journal_open_files is racy 2013-06-10 10:22:08 -04:00
Zbigniew Jędrzejewski-Szmek 8d98da3f11 journalctl: allow the user to specify the file(s) to use
This is useful for debugging and feels pretty natural. For example
answering the question "is this big .journal file worth keeping?"
is made easier.
2013-06-10 10:10:07 -04:00