Lennart Poettering
fd5dc3204d
journal: verify compressed objects
2012-08-16 17:10:57 +02:00
Lennart Poettering
4da416aa20
journalctl: add --verify-seed= switch to specify seed value
2012-08-16 17:10:57 +02:00
Lennart Poettering
f59a5f6b87
journal: verify hashes only during actual verification, not all the time
2012-08-16 17:10:57 +02:00
Lennart Poettering
0284adc6a6
journal: split up journal-file.c
2012-08-16 17:10:57 +02:00
Lennart Poettering
f65425cbc4
journal: add superficial structure verifier
2012-08-16 17:10:57 +02:00
Lennart Poettering
beec008561
journal: implement basic journal file verification logic
2012-08-16 17:10:57 +02:00
Lennart Poettering
16e9f408fa
journal: implement generic sharable mmap caching logic
...
instead of having one simple per-file cache implement an more
comprehensive one that works for multiple files and can actually
maintain multiple maps per file and per object type.
2012-08-16 17:10:56 +02:00
Lennart Poettering
d98cc1f29f
journal: include tag object header in hmac
2012-08-13 21:52:58 +02:00
Lennart Poettering
b0af6f41ea
journal: add all objects we add to HMAC
2012-08-13 20:57:38 +02:00
Lennart Poettering
7560fffcd2
journald: initial version of FSPRG hookup
...
This adds forward-secure authentication of journal files. This patch
includes key generation as well as tagging of journal files,
Verification of journal files will be added in a later patch.
2012-08-13 20:31:10 +02:00
Lennart Poettering
cee5e9a7ca
journald: never read the same kernel msg twice, and generate message when we lose one
2012-08-09 17:52:05 +02:00
Lennart Poettering
b6a345143b
journalctl: support device node matches as shortcut
2012-08-09 17:05:29 +02:00
Lennart Poettering
5b4c61cd0b
journald: properly unescape messages from /dev/kmsg
2012-08-09 16:49:28 +02:00
Lennart Poettering
e7573d7fa9
journald: also parse kernel key/value fields and store them prefixed with _KERNEL_ as journal fields
2012-08-09 16:29:16 +02:00
Lennart Poettering
51abe64c85
journald: basic support for /dev/kmsg parsing
2012-08-09 15:57:24 +02:00
Lennart Poettering
64825d3c58
fix a couple of issues found with llvm-analyze
2012-08-08 23:54:21 +02:00
Lennart Poettering
c269cec334
build-sys: prepare release 188
2012-08-08 21:49:01 +02:00
Lennart Poettering
de2c390731
journalctl: include corrupted files in output
...
If a journal file was rotated away because it was corrupted or dirty we
should still show its contents via "journalctl".
2012-08-07 00:51:17 +02:00
Zbigniew Jędrzejewski-Szmek
ab060556a9
test: allow deletion of temporary files from normal fs
...
Not everybody has /tmp on tmpfs, and this was breaking 'make check'.
2012-08-03 18:11:55 +02:00
Lennart Poettering
18c7ed186b
journal: add sd_journal_perror() to API
2012-08-01 19:53:23 +02:00
Artur Zaprzala
4cdc45994a
journald: fixed memory leak
2012-07-31 14:15:34 +02:00
Lennart Poettering
941e990db1
journalctl: add --priority= switch for filtering by priority
2012-07-27 10:32:37 +02:00
Lennart Poettering
c51742d029
journald: log driver messages at LOG_INFO
2012-07-26 16:56:22 +02:00
Lennart Poettering
498261871d
journalctl: hightlight log lines by priority
...
warn/notice = bright white
< error = red
2012-07-26 16:56:21 +02:00
Shawn Landden
0d0f0c50d3
log.h: new log_oom() -> int -ENOMEM, use it
...
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera
2012-07-26 11:48:26 +02:00
Shawn Landden
669241a076
use "Out of memory." consistantly (or with "\n")
...
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.
Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id
2012-07-25 11:23:57 +02:00
Zbigniew Jedrzejewski-Szmek
fafb6eccc2
journalctl: fix ellipsization with PAGER=cat
...
There are other reasons for not opening the pager then the --no-pager
or --follow options (described below). If the pager is not used,
messages must be ellipsized.
On Fri, Jul 20, 2012 at 05:42:44AM +0000, Shawn Landen wrote:
> "Pager to use when --no-pager is not given; overrides $PAGER.
> Setting this to an empty string or the value cat is equivalent to passing --no-pager."
2012-07-23 17:57:11 +02:00
Lennart Poettering
3146a302d1
journald: upgrade signal reception message to INFO
2012-07-19 12:44:58 +02:00
Shawn Landden
c2f1db8f83
use #pragma once instead of foo*foo #define guards
...
#pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported
in other compilers.
I've been using and maintaining (rebasing) this patch for a while now, as
it annoyed me to see #ifndef fooblahfoo, etc all over the place,
almost arrogant about the annoyance of having to define all these names to
perform a commen but neccicary functionality, when a completely superior
alternative exists.
I havn't sent it till now, cause its kindof a style change, and it is bad
voodoo to mess with style that has been established by more established
editors. So feel free to lambast me as a crazy bafoon.
v2 - preserve externally used headers
2012-07-19 12:30:59 +02:00
Lennart Poettering
4a842cadb8
journal: allow watching symlinked journal dirs
2012-07-19 03:22:07 +02:00
Lennart Poettering
7827b1a10f
journal: when watching directories actually watch the directories asked for
2012-07-19 03:21:49 +02:00
Lennart Poettering
a1a1898f71
journal: rotate busy files away when we try to write to them
2012-07-19 03:21:04 +02:00
Lennart Poettering
6f5878a286
journal: follow symlinks when enumerating journals
2012-07-19 02:35:17 +02:00
Lennart Poettering
9f8d29834b
journald: don't choke on journal files with no cutoff date
2012-07-19 02:03:22 +02:00
Lennart Poettering
4a299a7ad5
journal: remove all of /run/log/journal when serializing, since the machine ID might deviate
2012-07-18 16:23:26 +02:00
Lennart Poettering
4ca86bbc25
journal: don't complain if the syslog forwarder socket doesn't exist
2012-07-18 16:23:06 +02:00
Lennart Poettering
361f9cbc7e
journal: when we suggest a rotation, explain why
2012-07-18 16:22:40 +02:00
Lennart Poettering
dfabe643f3
journal: estimate data hash table size a bit larger by default
2012-07-18 16:22:25 +02:00
Lennart Poettering
c2a623d842
journald: fix another bad memory access
...
If we rotate due to header out of date we need the new journal file
object, too.
2012-07-18 13:28:39 +02:00
Lennart Poettering
32fca2d5b7
journald: fix bad memory access
...
After vacuuming we need to retrieve the journal file object again, since
it might have changed.
2012-07-18 13:13:15 +02:00
Zbigniew Jędrzejewski-Szmek
92a1fd9e95
journalctl: do not ellipsize when using pager
...
If a pager is used, ellipsization is redundant — the pager does
that better by hiding the part that cannot be shown. Pager's advantage
is that the user can press → to view the hidden part of a message,
and then ← to return.
2012-07-17 17:20:58 +02:00
Zbigniew Jędrzejewski-Szmek
25277cd7fb
logs: Adapt interface in log-show.c (output_journal)
...
In preparation for adding more output switches, convert a series of
flags arguments into one flag variable.
2012-07-17 17:20:57 +02:00
Lennart Poettering
cd96b3b86a
journal: actually set archived files to archived state
2012-07-17 00:59:03 +02:00
Lennart Poettering
dc36ac6733
journalctl: decode more header files in --header
2012-07-17 00:59:03 +02:00
Lennart Poettering
4a92baf3fa
journal: size journal data hash table based on maximum file size metrics
...
The default of 2047 hash table entries turned out to result in way too
many collisions for bigger files, hence scale the hash table size by the
estimated maximum file size.
2012-07-17 00:59:03 +02:00
Lennart Poettering
71fa6f006f
journal: immediately rotate when the journal was previously not closed properly
2012-07-17 00:59:03 +02:00
Lennart Poettering
dca6219e04
journal: automatically rotate journal files if the data hash table is full > 75%
...
Previously, when the main data hash table grows too full the performance
simply started to decrease drastically. Instead, now simply rotate to a
new journal file as the hash table gets to full, so that we can start
with a new fresh empty hash table.
2012-07-17 00:59:03 +02:00
Lennart Poettering
162566a4a1
journal: use tail/head timestamps from header for cutoff logic
...
We have them, they are faster to use them, so use them...
2012-07-16 19:28:05 +02:00
Lennart Poettering
74d29da524
journald: don't enforce monotonicity of realtime clocks when copying entries
...
After all the point of the realtime clock (in contrast to the monotonic
clock) is that it does not have to be strictly monotonic, hence don't
enforce this when flushing the journal from /run to /var.
2012-07-16 19:26:54 +02:00
Ville Skyttä
49f43d5f91
Spelling fixes.
2012-07-16 12:16:29 +02:00
Kay Sievers
19d1e4eeb6
journal: align byte-buffer that gets cased to an object
...
On Sun, Jul 15, 2012 at 2:00 PM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> | src/journal/sd-journal.c: In function 'sd_journal_process':
> | src/journal/sd-journal.c:1891:21: warning: cast increases required alignment of target type [-Wcast-align]
> | src/journal/sd-journal.c:1900:29: warning: cast increases required alignment of target type [-Wcast-align]
2012-07-15 14:58:29 +02:00
Kay Sievers
dbfd912258
journal: avoid re-definition of enums for older gcc versions
...
On Sun, Jul 15, 2012 at 2:00 PM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> | In file included from src/journal/sd-journal.c:37:0:
> | src/journal/journal-internal.h:47:3: error: redefinition of typedef 'MatchType'
> | src/journal/journal-internal.h:36:24: note: previous declaration of 'MatchType' was here
> | src/journal/journal-internal.h:67:3: error: redefinition of typedef 'LocationType'
> | src/journal/journal-internal.h:37:27: note: previous declaration of 'LocationType' was here
2012-07-15 14:56:57 +02:00
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
Michal Schmidt
401cc72da8
journald: one more SYSLOG_IDENTIFIER length fix
2012-05-21 20:21:49 +02:00
Michal Schmidt
fca1b90a0d
journald: fix length of "SYSLOG_IDENTIFIER="
...
Fixes weird messages like:
May 20 22:23:30 jik2 TIFIER=systemd-logind[795]: New session 46 of user gdm.
https://bugzilla.redhat.com/show_bug.cgi?id=823498
2012-05-21 20:03:26 +02:00
Daniel Mack
89834a7c1c
journalctl: fix built-in usage output
...
This brings journalctl's built-in usage output in sync with the man page.
There are no commands to pass, and the help screen should not confuse
users.
2012-05-21 17:30:11 +02:00
Kay Sievers
9eb977db5b
util: split-out path-util.[ch]
2012-05-08 02:33:10 +02:00
Lennart Poettering
e58a12770c
nspawn: fake /dev/kmsg and /proc/kmsg as fifo
2012-04-13 18:52:52 +02:00
Lennart Poettering
7ea07dcdda
fix a couple of things found with the llvm static analyzer
2012-04-13 13:58:50 +02:00
Lennart Poettering
25d042e815
journal: fix missing variable initialization
2012-04-12 17:43:33 +02:00
Lennart Poettering
2abf99ac07
journald: add missing flag to open()
2012-04-12 12:58:19 +02:00
Lennart Poettering
5430f7f2bc
relicense to LGPLv2.1 (with exceptions)
...
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.
Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.
The bits that used to be MIT continue to be MIT.
The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends.
2012-04-12 00:24:39 +02:00
Kay Sievers
79c077224b
put acl.la in 'if HAVE_ACL' and rename acl.[ch] to acl-util.[ch]
2012-04-11 16:47:09 +02:00
Kay Sievers
49e942b2bc
rename basic.la to shared.la and put selinux deps in shared-selinx.la
...
Only 34 of 74 tools need libselinux linked, and libselinux is a pain
with its unconditional library constructor.
2012-04-10 22:43:05 +02:00
Kay Sievers
78b2e3a632
util: move ACL code into internal library
2012-04-10 14:59:45 +02:00
Kay Sievers
d7832d2c6e
util: move all to shared/ and split external dependencies in separate internal libraries
...
Before:
$ ldd /lib/systemd/systemd-timestamp
linux-vdso.so.1 => (0x00007fffb05ff000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f90aac57000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f90aaa53000)
librt.so.1 => /lib64/librt.so.1 (0x00007f90aa84a000)
libc.so.6 => /lib64/libc.so.6 (0x00007f90aa494000)
/lib64/ld-linux-x86-64.so.2 (0x00007f90aae90000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f90aa290000)
libattr.so.1 => /lib64/libattr.so.1 (0x00007f90aa08a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f90a9e6e000)
After:
$ ldd systemd-timestamp
linux-vdso.so.1 => (0x00007fff3cbff000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5eaa1c3000)
librt.so.1 => /lib64/librt.so.1 (0x00007f5ea9fbb000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5ea9c04000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5eaa3fc000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f5ea9a00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5ea97e4000)
2012-04-10 14:13:38 +02:00
Lennart Poettering
3eff4208ff
logind: log with AUTH facility
2012-04-03 19:26:02 +02:00
Lennart Poettering
b070e7f3c9
journal: implicitly add code location to all messages logged with the native interface
...
This logic can be turned off by defining SD_JOURNAL_SUPPRESS_LOCATION
before including sd-journal.h.
This also saves/restores errno in all logging functions, in order to be
useful as logging calls without side-effects.
This also adds a couple of __unlikely__ around the early checks in the
logging calls, in order to minimize the runtime impact.
2012-04-02 19:29:48 +02:00
Lennart Poettering
1fa80181ae
journal: decrease default mmap window size to allow a bigger number of journals to be traversed in parallel
2012-04-02 19:29:47 +02:00
Kay Sievers
18b754d345
rename /etc/systemd/systemd-{login,journal}d.conf to {login,journal}d.conf
2012-03-30 23:36:44 +02:00
Lennart Poettering
6030831d5b
journal: properly handle if we interleave files with different boot ids
...
If we try to locate a monotonic time in a file that doesn't have any
entries with the matching boot id, then don't fail on it, simply
fall back to calendar time.
2012-03-27 18:50:34 +02:00
Lennart Poettering
d508ac0ba0
cat: fix priority type
...
Needs to be "int", not "char". Spotted by Frederic Crozat.
2012-03-27 00:20:48 +02:00
Lennart Poettering
2bd3c38a44
journalctl: add --local switch
2012-03-27 00:14:29 +02:00
Frederic Crozat
4fd052aede
add sparse support to detect endianness bug
...
le16/32/64_t type should be used when storing little-endian value
header to integrate with sparse from Josh Triplett <josh@joshtriplett.org>
2012-03-22 01:09:37 +01:00
Lennart Poettering
7264278fbb
journal: PAGE_SIZE is not known on ppc and other archs
...
Let's use NAME_MAX, as suggested by Dan Walsh
2012-03-21 23:47:44 +01:00
Lennart Poettering
0071d9f1db
journal: react with immediate rotation to a couple of more errors
2012-03-21 23:40:51 +01:00
Lennart Poettering
2af777ba96
man: document systemd-journalctl(1)
2012-03-16 00:50:52 +01:00
Lennart Poettering
b47ffcfdfd
man: document systemd-journald.conf(5)
2012-03-15 23:25:14 +01:00
Lennart Poettering
9aac0b2c19
man: document systemd-cat(1)
2012-03-15 22:19:36 +01:00
Frederic Crozat
ccdbaf9111
journal: only use uint8_t for state
2012-03-15 20:53:03 +01:00
Lennart Poettering
34a35eced4
a couple of fixes to make llvm-analyze quiet
2012-03-15 20:49:25 +01:00
Tero Roponen
490e567dbb
journalctl: add a missing 'break'
...
There is a 'break' missing in the -q handling
so, for example, 'systemd-journalctl --new-id128 -q'
does nothing.
This patch fixes the problem.
2012-03-15 14:12:30 +01:00
Lennart Poettering
27d1ae066c
journald: don't try to roatet corrupted files when we open read-only anyway
2012-03-15 03:01:09 +01:00
Lennart Poettering
5e62067d08
journald: adjust permissions for rotated files
2012-03-15 03:01:09 +01:00
Lennart Poettering
c042179388
journald: take corrupted files into account when calculating disk space
2012-03-15 03:01:09 +01:00
Lennart Poettering
e7bf07b3d4
journald: be a bit more verbose
2012-03-15 03:01:09 +01:00
Lennart Poettering
a3a52c0fd0
journald: fix calculation of disk space
2012-03-15 03:01:09 +01:00
Lennart Poettering
15944db871
journald: copy metrics/compression state from template when rotating
2012-03-15 03:01:09 +01:00
Lennart Poettering
71100051c5
journald: increase max file size to 128MB
2012-03-15 02:57:39 +01:00
Lennart Poettering
5c70eab445
journal: vacuum corrupted files, too
2012-03-15 01:35:03 +01:00
Lennart Poettering
9447a7f1de
journal: if we encounter a corrupted file, rotate and go on
2012-03-15 01:13:01 +01:00
Lennart Poettering
6bc1ce40e5
journald: fix typo
2012-03-15 00:44:26 +01:00
Lennart Poettering
4f4d6a7073
journalctl: suppress messages about adm group if ACL support is not enabled
2012-03-15 00:44:10 +01:00
Lennart Poettering
67aa455172
journald: set SO_PASSEC only if selinux is enabled
2012-03-14 20:07:50 +01:00
Lennart Poettering
4367379907
journalctl: warn if the user is not in the adm group
2012-03-14 19:54:22 +01:00
Lennart Poettering
071fd8c21e
journal: fix memory leak
2012-03-14 18:31:38 +01:00
Marti Raudsepp
189f6d82ee
journal: Don't hold pointers to journal while remapping
...
Hi!
I was trying out the journal and the journalctl utility sometimes
crashed on me. After some debugging, I tracked it down to the fact
that next_with_matches() holds the "c" object pointer through the
journal_file_next_entry_for_data() call -- which apparently may re-map
the journal file, invalidating the pointer.
The attached patch fixes this crash for me, but being unfamiliar with
the code, I don't know if I'm doing the right thing.
This patch is also available from my github repository:
git://github.com/intgr/systemd.git
https://github.com/intgr/systemd
Regards,
Marti
For the record, here's the original stack trace at the time of remapping:
ret=0x7fff1d5cdec0) at src/journal/journal-file.c:330
ret=0x7fff1d5cdf28) at src/journal/journal-file.c:414
ret=0x7fff1d5ce0a0, offset=0x7fff1d5ce098) at
src/journal/journal-file.c:1101
i=5705, ret=0x7fff1d5ce0a0, offset=0x7fff1d5ce098) at
src/journal/journal-file.c:1147
p=6413608, data_offset=66600, direction=DIRECTION_DOWN,
ret=0x7fff1d5ce0a0, offset=0x7fff1d5ce098) at
src/journal/journal-file.c:1626
direction=DIRECTION_DOWN, ret=0x7fff1d5ce120, offset=0x7fff1d5ce128)
at src/journal/sd-journal.c:533
direction=DIRECTION_DOWN, ret=0x7fff1d5ce170, offset=0x7fff1d5ce178)
at src/journal/sd-journal.c:595
src/journal/sd-journal.c:651
From 9266fc6a58065a7c5dab67430fd78925e519dce9 Mon Sep 17 00:00:00 2001
From: Marti Raudsepp <marti@juffo.org>
Date: Fri, 9 Mar 2012 16:23:00 +0200
Subject: [PATCH] journal: Don't hold pointers to journal while remapping
This would cause a segfault otherwise.
2012-03-14 17:55:55 +01:00
Lennart Poettering
2d44fc7ba5
journald: allocate PAGE_SIZE bytes for selinux label length
...
As suggested in https://bugzilla.redhat.com/show_bug.cgi?id=798760
2012-03-14 03:39:15 +01:00
Lennart Poettering
7f2c63cbf4
journald: use SCM_SECURITY to race-freely determine peer SELinux label
...
https://bugzilla.redhat.com/show_bug.cgi?id=798760
2012-03-13 02:29:10 +01:00
Lennart Poettering
54ecda32c6
socket: add option for SO_PASSEC
...
https://bugzilla.redhat.com/show_bug.cgi?id=798760
(Note that this work is not complete yet, as the kernel seems to send us
useless data with SCM_SECURITY enabled)
2012-03-13 00:00:27 +01:00
Lennart Poettering
48496df65c
journal: make sure to refresh window position and pointer after we linked up a data object
2012-03-06 02:42:32 +01:00
Frederic Crozat
7be3aa1732
journal: fix endianness errors
2012-03-05 14:47:18 +01:00
Dirk Eibach
8dc6b88fd2
systemd-journald: fix endianess bug
2012-02-29 14:06:33 +01:00
Lennart Poettering
803a3464ce
coredump: avoid coredump loops, divert coredump if journald itself is crashing
2012-02-02 01:22:49 +01:00
Lennart Poettering
9ba1a15985
load-fragment: properly parse size values denoted in bytes
2012-01-31 20:53:34 +01:00
Lennart Poettering
be19b7df6e
journal: increase compression threshold for objects from 64 to 512
...
Apparently the perfomance price for compression is to steep to apply it
for all objects >= 64 and < 512 in size, as measured by Arjan Van De
Ven, hence increase the threshold to 512 which yields better results.
2012-01-31 20:38:53 +01:00
Lennart Poettering
bb99a35a87
log: increase socket buffers for logging by default
2012-01-27 18:57:37 +01:00
Lennart Poettering
632117b71f
log: never delay logging if the log server is stuck, always drop messages quickly
2012-01-27 18:14:06 +01:00
Lennart Poettering
8f2d43a012
cgtop: add new cgtop tool
2012-01-22 18:22:26 +01:00
Dan Horák
ce3fd7e72a
journal: systemd v38 fails to build on big-endians
...
Hi,
during the builds for Fedora/s390x I've found that systemd v38 fails to
build on big-endian platforms.
...
make[2]: Entering directory `/root/systemd'
CC src/journal/libsystemd_journal_la-sd-journal.lo
src/journal/sd-journal.c: In function 'init_location':
src/journal/sd-journal.c:69:22: error: incompatible types when
initializing type 'long unsigned int' using type 'sd_id128_t'
src/journal/sd-journal.c:69:20: error: incompatible types when assigning
to type 'sd_id128_t' from type 'long unsigned int'
make[2]: *** [src/journal/libsystemd_journal_la-sd-journal.lo] Error 1
I see the problem in using le64toh() on the 16 bytes boot_id structure
in init_location()
Please see
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=544375 for a
full build log and attachment for a proposed fix.
With regards
Dan
2012-01-21 03:48:26 +01:00
Lennart Poettering
9058851be7
journal: when sending journal data via file, place it in /dev/shm, to allow early boot operation, even if it sucks
2012-01-18 15:40:58 +01:00
Lennart Poettering
62f21ec91a
journalctl: properly honour -n when -f is passed, too
2012-01-18 13:56:02 +01:00
Lennart Poettering
fee80f6956
journal: drop privileges when storing coredump
2012-01-14 03:37:32 +01:00
Lennart Poettering
a7bc2c2ac8
util: introduce FORMAT_BYTES_MAX
2012-01-14 03:06:57 +01:00
Lennart Poettering
de0229ca36
journal: collect coredump up to 24M in size
2012-01-14 03:05:34 +01:00
Lennart Poettering
4c7de07481
journal: handle empty syslog identifier properly
2012-01-14 01:54:33 +01:00
Lennart Poettering
5c3759bf8a
journal: fix bad memory access
2012-01-14 01:54:33 +01:00
Lennart Poettering
0dad12c190
journal: if the data to be sent is larger than the maximum datagram size resort to passing a temporary fd over native protocol
2012-01-14 01:54:33 +01:00
Lennart Poettering
f5e04665eb
journal: hook up coredumping with journal
2012-01-14 01:54:33 +01:00
Lennart Poettering
755a02c680
journal: add new system-cat tool as kind of a more powerfull BSD logger
2012-01-14 01:54:33 +01:00
Lennart Poettering
d3f2bdbfee
journal: add output mode that just prints simple messages without any decorations
2012-01-13 02:58:45 +01:00
Lennart Poettering
7c8bbccd07
journal: if the syslog forwarder socket is full, then don't block
2012-01-12 05:09:24 +01:00
Lennart Poettering
5ba081b0fb
log: make internal log api log directly to the journal
2012-01-12 04:34:31 +01:00
Lennart Poettering
8a0f04e6a2
journal: add SELinux context to all logged messages
2012-01-11 22:45:05 +01:00
Lennart Poettering
b785c858c3
journal: fix more 32/64 bit issues
2012-01-11 22:44:43 +01:00
Lennart Poettering
7f120cc6a2
journald: don't assume size_t and uint64_t are the same
2012-01-11 21:24:02 +01:00
Lennart Poettering
5e41cfec83
journald: set group ownership of journal files to 'adm' by default
2012-01-11 21:11:58 +01:00
Lennart Poettering
e6520a0fce
journal: make requirement for ACLs optional
2012-01-11 20:40:29 +01:00
Lennart Poettering
d1e44dd827
journalctl: fix --help text
2012-01-11 16:03:42 +01:00
Lennart Poettering
1921a5cb3d
journal: don't realign window twice
2012-01-11 03:55:24 +01:00
Lennart Poettering
19a2bd80c1
sd-journal: implement a number of non-implemented calls from the API for now
2012-01-11 03:23:04 +01:00
Lennart Poettering
67a122058b
journalctl: add new short-monotonic output mode
2012-01-07 04:41:30 +01:00
Lennart Poettering
6c1e6b98bd
journald: add kmsg source
2012-01-07 04:10:21 +01:00
Lennart Poettering
aaf53376aa
journald: remove inner loop debug message
2012-01-07 04:10:21 +01:00
Lennart Poettering
39f7f5c108
journalctl: rename --new-id to --new-id128 in order not to introduce yet another new name
2012-01-07 01:37:15 +01:00
Lennart Poettering
effb1102d3
journald: introduce systemd_journald.forward_to_kmsg=1 (and friends) to enable kmsg forwarding globally via kernel cmdline
2012-01-07 01:26:08 +01:00
Lennart Poettering
98736c68fe
journald: shorten the time we wait for a forwarding syslog
2012-01-06 23:11:28 +01:00
Lennart Poettering
4cd9a9d9ec
journal: rename syslog tag to identifier since that's what we call it on the server side.
2012-01-05 21:46:48 +01:00
Lennart Poettering
258cdffc2f
journal: rename priority_prefix to level_prefix, since that's how we call it in PID 1
2012-01-05 21:39:59 +01:00
Lennart Poettering
86b9b8e70d
sd-journal: close reading side of sd_journal_stream_fd() file descriptors
2012-01-05 21:39:31 +01:00
Lennart Poettering
33eb8abfa5
journal: store used transport in journal
2012-01-05 20:24:34 +01:00
Lennart Poettering
259d2e7620
journal: move sockets into their own subdir
2012-01-05 20:24:16 +01:00
Lennart Poettering
55ee336cdc
journalctl: add --new-id switch to generate a new 128Bit id
2012-01-05 16:28:17 +01:00
Lennart Poettering
81527be142
build-sys: move public header files into a dir of their own
2012-01-05 16:01:58 +01:00
Lennart Poettering
224f2ee221
journald: add configuration file options to forward all logged data to kmsg, console, syslog
2012-01-05 15:39:03 +01:00
Lennart Poettering
e6960940b6
journald: parse configuration file
2012-01-04 20:40:04 +01:00
Lennart Poettering
df50185b43
journal: beef up journal output of systemctl and journalctl
2012-01-04 18:33:36 +01:00
Lennart Poettering
fd8ee359a0
journal: it's not a problem if the realtime jumps, hence don't ensure monotonicity of realtime for entries we write
2012-01-04 18:32:50 +01:00
Lennart Poettering
94fb446e55
journald: store _SYSTEMD_UNIT= instead of _SYSTEMD_SERVICE= field, since processes might also be related to mount, swap or socket units, not just services
2012-01-04 15:35:30 +01:00
Lennart Poettering
e91af489a2
journalctl: only output 10 most recent lines in --follow mode
2012-01-04 15:27:31 +01:00
Lennart Poettering
6f003b4304
journalctl: fix counting of -n parameter
2012-01-04 04:00:14 +01:00
Lennart Poettering
cf5eb6a110
journal: fix reverse traversing of entries
2012-01-04 03:45:50 +01:00
Lennart Poettering
b4e5f92017
journal: add missing error check
2012-01-04 03:45:24 +01:00
Lennart Poettering
9c4e3f2624
journal: don't mind too much if we can't find a monotonic timestamp
2012-01-04 03:45:14 +01:00
Lennart Poettering
b1a0ab7148
journald: don't rotate on startup
2012-01-04 02:33:11 +01:00
Lennart Poettering
a99c349d0d
journal: when increasing window, make sure to use the increased window
2012-01-04 02:21:04 +01:00
Lennart Poettering
4bbdcdb301
journal: apply seek check before resizing window, and refresh stat data if necessary
2012-01-04 02:16:38 +01:00
Lennart Poettering
b788cc23aa
journal: add memory barrier before linking in newly created entries
2012-01-04 02:15:45 +01:00
Lennart Poettering
4b067dc9d2
journal: add missing error check
2012-01-04 02:15:08 +01:00
Lennart Poettering
2100675e9f
journalctl: add -n switch
2012-01-04 02:14:42 +01:00
Lennart Poettering
bad75c274a
journald: fix _SYSTEMD_CGROUP= values
2012-01-03 23:41:55 +01:00
Lennart Poettering
86aa7ba4f9
systemctl: hook up systemctl with the journal
2012-01-03 21:08:58 +01:00
Lennart Poettering
adf7d506b5
journal: never fail if we cannot access /var, just print a warning
2012-01-03 21:08:58 +01:00
Lennart Poettering
52f4f45bf4
journald: treat a read-only /var identical to an unmounted one
2012-01-03 21:08:58 +01:00
Lennart Poettering
85d83bf41c
journald: add _SYSTEMD_SESSION, _SYSTEMD_OWNER_UID, _SYSTEMD_SERVICE to all entries
2012-01-03 21:08:58 +01:00
Lennart Poettering
a5344d2c3b
journal: add _public_ to all sd-journal calls, and add parameter checks
2012-01-03 21:08:58 +01:00
Kay Sievers
d4a66a7f96
libsystemd-id128: restructure Makefile.am
2011-12-31 08:53:06 +01:00
Kay Sievers
7e8f489ad5
journal: restructure Makefile.am
2011-12-31 08:36:52 +01:00
Kay Sievers
6c8a39b883
journal: silence gcc warnings
2011-12-31 03:55:35 +01:00
Lennart Poettering
e81e801af6
journal: move symver file into subdirectory
2011-12-31 03:35:38 +01:00
Lennart Poettering
babfc09177
journal: automatically deduce journal metrics from file system sizes
2011-12-31 02:31:54 +01:00
Lennart Poettering
74ef2d16ad
journal: move max_use into metrics structure
2011-12-31 00:57:14 +01:00
Lennart Poettering
b3a0ad5ab1
journal: disable default debug logging
2011-12-30 22:29:23 +01:00
Lennart Poettering
783d2675ef
journal: fix a few bad memory accesses and leaks
2011-12-30 22:16:04 +01:00
Lennart Poettering
8b18eb674c
journald: forward all syslog messages to syslogd
2011-12-30 19:05:43 +01:00
Lennart Poettering
f39e126e99
journald: add missing header
2011-12-30 16:01:33 +01:00
Lennart Poettering
54a7b863dd
journald: don't recheck /var availability more often than 30s
2011-12-29 15:25:42 +01:00
Lennart Poettering
cf244689e9
journald: flush /run to /var as soon as it becomes available
2011-12-29 15:00:57 +01:00
Lennart Poettering
de97b26ac5
journald: increase rate limit burst rate
2011-12-29 15:00:05 +01:00
Lennart Poettering
2a59ea54f1
journal: never mmap beyond file size
2011-12-28 01:53:06 +01:00
Lennart Poettering
9cfb57c989
journald: when checking available disk space for rate limiting, cache the results temporarily
2011-12-27 23:18:09 +01:00
Lennart Poettering
85a131e8d8
journal: fix hash table lookup logic
2011-12-27 22:58:20 +01:00
Lennart Poettering
24b51289e3
journal: fix typo
2011-12-27 22:52:22 +01:00
Lennart Poettering
6e409ce10d
journald: implement sophisticated rate limiting
2011-12-27 22:51:46 +01:00
Lennart Poettering
fe6521272b
journal: implement stdout transport
2011-12-23 20:50:48 +01:00
Lennart Poettering
6ad1d1c306
journald: enforce some syntax restrictions on field names sent from the client side
2011-12-22 00:35:04 +01:00
Lennart Poettering
440ee3665e
journal: properly handle first inline bisect array entry
2011-12-21 22:32:52 +01:00
Lennart Poettering
e4e61fdbed
journal: add missing compress.[ch]
2011-12-21 19:00:10 +01:00
Lennart Poettering
0d43c6944b
journalctl: add command line parsing
2011-12-21 18:59:56 +01:00
Lennart Poettering
72f597065c
journalctl: add json, export, short and verbose output modes
2011-12-21 18:17:22 +01:00
Lennart Poettering
807e17f05e
journal: add inline compression support with XZ
2011-12-21 02:40:59 +01:00
Lennart Poettering
bc85bfee87
journal: fix space reservation limit enforcement
2011-12-20 02:38:36 +01:00
Lennart Poettering
466ccd92e2
journal: fix matches
2011-12-20 00:38:14 +01:00
Lennart Poettering
50f20cfdb0
journal: implement inotify-based live logging logic
2011-12-19 22:35:46 +01:00
Lennart Poettering
2b0ba69bb1
journald: filter fields send from client starting with underscore
2011-12-17 01:36:47 +01:00
Lennart Poettering
d0bbc21caa
journal: introduce mandatory sd_journal_printf() priority parameter
2011-12-17 01:32:49 +01:00
Lennart Poettering
cab8ac6083
journal: enforce limits on open journal files
2011-12-17 01:13:55 +01:00
Lennart Poettering
7f3e62571a
journal: add native protocol to journald, and client side API to send journal messages
2011-12-17 00:56:34 +01:00
Lennart Poettering
de190aef08
journal: implement multiple field matches
2011-11-08 18:20:03 +01:00
Lennart Poettering
8f9b6cd9eb
journal: automaticall reset location when the set of matches changes
2011-10-15 02:53:04 +02:00
Lennart Poettering
8725d60ae4
journal: implement seek to head/tail
2011-10-15 02:45:58 +02:00