Commit Graph

216 Commits

Author SHA1 Message Date
Lennart Poettering
95ea1b90cc test: hook up more tests with make check 2012-07-13 13:50:39 +02:00
Lennart Poettering
b7def68494 util: rename join() to strjoin()
This is to match strappend() and the other string related functions.
2012-07-13 13:41:01 +02:00
Lennart Poettering
3913ac2041 journal: properly export sd_journal_add_disjunction() 2012-07-13 01:16:15 +02:00
Lennart Poettering
cbdca8525b journal: beef up journal matches considerably
we now can take multiple matches, and they will apply as AND if they
apply to different fields and OR if they apply to the same fields. Also,
terms of this kind can be combined with an overreaching OR.
2012-07-13 00:32:32 +02:00
Lennart Poettering
362a3f8122 journal: check fields we search for more carefully 2012-07-13 00:32:32 +02:00
Lennart Poettering
91a31dde6e journal: fix seeking by realtime/seqnum 2012-07-13 00:32:32 +02:00
Lennart Poettering
ecf68b1d38 journal: fix bad memory access 2012-07-13 00:32:32 +02:00
Lennart Poettering
a536e2613f journal: fix bisection logic for first entry 2012-07-13 00:32:32 +02:00
Lennart Poettering
c4aff78b2d journal: fix interleaving of files with different time sources 2012-07-13 00:32:32 +02:00
Lennart Poettering
b8156be03f journal: replace implicit flushing of journal by explicit one
The old automatism that the flushing of the journal from /run to /var
was triggered by the appearance of /var/log/journal is broken if that
directory is mounted from another host and hence always available to be
useful as mount point. To avoid probelsm with this, introduce a new unit
that is explicitly orderer after all mounte files systems and triggers
the flushing.
2012-07-11 02:41:16 +02:00
Lennart Poettering
14a65d65a0 journalctl: add a marker to log output for reboots
With this we'll print a marker "----- Reboot -----" between two
subsequent lines with different boot IDs.
2012-07-11 01:36:55 +02:00
Lennart Poettering
a963990ff4 journal: rework directory enumeration/watch logic
There's now sd_journal_new_directory() for watching specific journal
directories. This is exposed in journalctl -D.

sd_journal_wait() and sd_journal_process() now return whether changes in
the journal are invalidating or just appending.

We now create inotify kernel watches only when we actually need them
2012-07-11 01:08:38 +02:00
Lennart Poettering
e02d1cf72d journal: introduce sd_journal_wait() to simplify writing synchronous clients 2012-07-10 21:46:11 +02:00
Lennart Poettering
205c4d1d6a journald: use "persistent", not "permanent" as storage option
"permanent" is simply the wrong term and we use "persistant" in most
other contexts to correct this.
2012-07-10 19:39:27 +02:00
Lennart Poettering
461b182232 paranoia: refuse rm_rf("/") 2012-07-09 17:30:22 +02:00
Lennart Poettering
f4bad2bd2a journal: default ImportKernel=no until we make use of structured logging 2012-07-03 14:07:10 +02:00
Lennart Poettering
77f6520a81 journal: move Storage=auto stanza to right file 2012-07-03 12:25:53 +02:00
Lennart Poettering
4c2ecfafd7 journald: handle /proc/kmsg reads returning 0 more nicely 2012-07-03 12:23:33 +02:00
Lennart Poettering
e590af2666 journal: fix iteration through journal if one file is corrupt 2012-07-03 11:58:16 +02:00
Lennart Poettering
e156d769c3 journald: add Storage= setting to control where the journal is stored 2012-07-02 10:43:57 +02:00
Lennart Poettering
59cea26a34 journalctl: add new switch -b to show data from current boot only 2012-07-02 10:43:56 +02:00
Lennart Poettering
66a78c2b95 cryptsetup: allow configuration of LUKS disks via the kernel cmdline
This generalizes a bit of the functionality already available in dracut.
2012-06-22 10:11:06 +02:00
Lennart Poettering
c66e7bc7a1 man: document all kernel command line options we understand 2012-06-22 01:35:52 +02:00
Lennart Poettering
8b38f3cc3e journal: fix sd_journal_stream_fd() 2012-06-22 00:19:13 +02:00
Eelco Dolstra
62bca2c657 journal: set the _SYSTEMD_UNIT field for messages from terminated processes
As described in

  https://bugs.freedesktop.org/show_bug.cgi?id=50184

the journal currently doesn't set fields such as _SYSTEMD_UNIT
properly for messages coming from processes that have already
terminated.  This means among other things that "systemctl status" may
not show some of the output of services that wrote messages just
before they exited.

This patch fixes this by having processes that log to the journal
write their unit identifier to journald when the connection to
/run/systemd/journal/stdout is opened.  Journald stores the unit ID
and uses it to fill in _SYSTEMD_UNIT when it cannot be obtained
normally (i.e. from the cgroup).  To prevent impersonating another
unit, this information is only used when the caller is root.

This doesn't fix the general problem of getting metadata about
messages from terminated processes (which requires some kernel
support), but it allows "systemctl status" and similar queries to do
the Right Thing for units that log via stdout/stderr.
2012-06-22 00:14:08 +02:00
Lennart Poettering
10b6f904cc journal: fix monotonic seeking 2012-06-17 00:03:13 +02:00
Lennart Poettering
ba6b303953 journal: rotate on SIGUSR2 2012-06-17 00:03:12 +02:00
Lennart Poettering
38a6db16dc journal: fix SD_JOURNAL_SYSTEM_ONLY flag 2012-06-17 00:03:12 +02:00
Lennart Poettering
089842938d journal: expose and make use of cutoff times of journal
This helps explaining when the log output of "systemctl status" is
incomplete because the logs got rotated since the service was started.
2012-06-17 00:03:12 +02:00
Lennart Poettering
8db4213e7b journal: correct list link up on hash collisions 2012-06-17 00:03:12 +02:00
Lennart Poettering
8144056fa6 journal: add basic object definition for signatures 2012-06-17 00:03:12 +02:00
Lennart Poettering
23b0b2b264 journal: replace arena offset by header size 2012-06-17 00:03:11 +02:00
Michal Schmidt
d384c7a874 journal-file: fix mmap leak
https://bugzilla.redhat.com/show_bug.cgi?id=831132
2012-06-12 16:46:34 +02:00
Lennart Poettering
213ba152fd journal: allow setting of a cutoff log level for disk storage, syslog, kmsg, console forwarding 2012-06-01 17:27:16 +02:00
Lennart Poettering
0d9243f022 journal: support changing the console tty to forward to 2012-06-01 17:27:16 +02:00
Kay Sievers
d2e54fae5c mkdir: append _label to all mkdir() calls that explicitly set the selinux context 2012-05-31 12:40:20 +02:00
Lennart Poettering
96ceff5645 journald: properly handle if we have no PID in a kmsg line 2012-05-31 01:26:06 +02:00
Lennart Poettering
d94117a93c journal: don't allow adding invalid matches to the context 2012-05-30 22:46:07 +02:00
Lennart Poettering
e51240886f journalctl: check first if match is a path name 2012-05-30 22:45:47 +02:00
Shawn Landden
509407003d journalctl: support /usr/bin/nginx, etc 2012-05-30 22:34:20 +02:00
Lennart Poettering
ab4979d202 journalctl: for now complain if more than one match is provided since this is still broken 2012-05-30 22:30:35 +02:00
Lennart Poettering
ba1261bc02 build-sys: fix built with --disable-logind 2012-05-30 22:25:01 +02:00
Lennart Poettering
6c3569e11a journald: ignore messages read from /proc/kmsg that we generated via /dev/kmsg
Avoid a busy loop.
2012-05-30 15:42:35 +02:00
Matthias Clasen
a4a58cb335 journald: refer to the correct man page
Fix the reference to the journald.conf man page in the
config file of the same name.
2012-05-27 15:22:25 +02:00
Lennart Poettering
9262a51946 build-sys: prepare release 183 2012-05-24 15:44:38 +02:00
Lennart Poettering
1afd5be42f journal: don't complain if SELinux userspace is available but the kernel lacks it 2012-05-23 12:49:41 +02:00
Lennart Poettering
a690306153 log: make sure generators never log into the journal to avoid activation deadlocks
This makes all generators log to kmsg by default.
2012-05-22 22:00:37 +02:00
Lennart Poettering
5ad661b6b0 journal: log journal internal messages to kmsg 2012-05-22 19:26:51 +02:00
Sjoerd Simons
499fb2152f journal: crash when filesystem is low on space
When space is getting too low on a file system rotating the journal file
will fail after the rotation, as opening the new logfile will fail.

Recognize this when logging the error and don't try to dereference a
NULL JournalFile pointer.
2012-05-22 13:22:00 +02:00
Guillermo Vidal
fec2aa2f9e Fixed handling of posix_fallocate() returned value
According to the man pages of posix_fallocate, it returns zero on
success or an error number on failure; however,  errno is not set
on failure. If the kernel or a library other than glibc does not
support the function for example, EOPNOTSUPP will be returned and
the error will not be handled properly with original code.
2012-05-22 01:45:11 +02:00