summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
AgeCommit message (Collapse)AuthorFilesLines
2015-04-10shared: add formats-util.hRonny Chevalier1-0/+1
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen1-4/+0
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-01-05journald: process SIGBUS for the memory maps we set upLennart Poettering1-0/+4
Even though we use fallocate() it appears that file systems like btrfs will trigger SIGBUS on certain low-disk-space situation. We should handle that, hence catch the signal, add it to a list of invalidated pages, and replace the page with an empty memory area. After each write check if SIGBUS was triggered, and consider the write invalid if it was. This should make journald a lot more robust with file systems where fallocate() is not reliable, for example all CoW file systems (btrfs...), where changing written data can fail with disk full errors. https://bugzilla.redhat.com/show_bug.cgi?id=1045810
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt1-1/+1
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt1-1/+1
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-08-21notify: send STOPPING=1 from our daemonsLennart Poettering1-1/+3
2014-07-31Always prefer our headers to system headersZbigniew Jędrzejewski-Szmek1-3/+3
In practice this shouldn't make much difference, but sometimes our headers might be newer, and we want to test them.
2014-07-29time-util: add and use USEC/NSEC_INFINIYKay Sievers1-1/+1
2014-05-15Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek1-2/+2
No functional change expected :)
2014-05-06journald: remove some dead codeLennart Poettering1-5/+0
2014-03-17journald: remove stray reset of error return valueZbigniew Jędrzejewski-Szmek1-1/+0
Notes: Backport: bugfix
2013-12-22journal: when we shall go down do so cleanlyLennart Poettering1-0/+6
2013-12-11journald: port to sd-event and enable watchdog supportLennart Poettering1-21/+6
2013-03-23journald: remove unconditional log_*() use in the main loopKay Sievers1-1/+0
Setting MaxRetentionSec= caused the kernel log to overflow and the journal daemon to enter an endless loop. Logging from the journald main loop gets directed to /dev/kmsg, which wakes up journald again. We skip the import of this message by checking for our own PID, but this still causes the main loop to never go to sleep again because we never stopped logging from there.
2012-11-14build-sys: store journald code in a noinst libraryZbigniew Jędrzejewski-Szmek1-1475/+1
The point is to allow the use of journald functions by other binaries. Before, journald code was split into multiple files (journald-*.[ch]), but all those files all required functions from journald.c. And journald.c has its own main(). Now, it is possible to link against those functions, e.g. from test binaries. This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638. The patch does the following: 1. rename journald.h to journald-server.h and move corresponding code to journald-server.c. 2. add journald-server.c and other journald-*.c parts to libsystemd-journal-internal. 3. remove journald-syslog.c from test_journal_syslog_SOURCES, since it is now contained in libsystemd-journal-internal. There are no code changes, apart from the removal of a few static's, to allow function calls between files.
2012-10-16journal: implement time-based rotation/vacuumingLennart Poettering1-16/+32
This also enables time-based rotation (but not vacuuming) after 1month, so that not more one month of journal is lost at a time per vacuuming.
2012-10-13log: introduce a macro to format message idZbigniew Jędrzejewski-Szmek1-1/+1
The MESSAGE_ID=... stanza will appear in countless number of places. It is just too long to write it out in full each time. Incidentally, this also fixes a typo of MESSSAGE is three places.
2012-09-28journald: rework auto-rotation logicLennart Poettering1-43/+56
2012-09-28journald: close sd_journal context after flushing to /varLennart Poettering1-2/+5
2012-09-21journald: log how big the journal files may growLennart Poettering1-6/+18
2012-09-19util: define union dirent_storage and make use of it everywhereLennart Poettering1-2/+3
Make sure to allocate enough space for readdir_r(). https://bugzilla.redhat.com/show_bug.cgi?id=858754
2012-09-17journald: log when we fail to forward messages to syslogLennart Poettering1-0/+1
https://bugzilla.redhat.com/show_bug.cgi?id=847207
2012-09-17journald: properly update perms on freshly rotate user journalsLennart Poettering1-1/+1
2012-09-10journald: don't do debug logging by defaultLennart Poettering1-1/+0
2012-09-07journald: make splitting up of journal files per-user configurableLennart Poettering1-1/+13
2012-09-06journald: avoid logging to kmsg in the normal pathsLennart Poettering1-13/+13
2012-08-22journalctl: complain if unprivileged users attempt to access the journal and ↵Lennart Poettering1-4/+6
persistant logging is off
2012-08-22journal: the ratelimiter is part of journaldLennart Poettering1-1/+1
2012-08-22journald: split off native protocol support into its own .c fileLennart Poettering1-356/+4
2012-08-22journald: split console transport stuff into its own fileLennart Poettering1-55/+1
2012-08-22journald: move stream protocol into its own .c fileLennart Poettering1-422/+2
2012-08-22journald: splitt of syslog protocol support into its own fileLennart Poettering1-330/+11
2012-08-22journald: split /dev/kmsg related stuff into its own .c fileLennart Poettering1-438/+37
2012-08-22journald: write tags also to user journal filesLennart Poettering1-5/+18
2012-08-22journald: augment journal entries from the kernel with data from udevLennart Poettering1-1/+62
2012-08-21journal: properly handle EPIPE from /dev/kmsgLennart Poettering1-1/+1
2012-08-21journal: automatically evolve FSS key even when nothing is loggedLennart Poettering1-8/+33
2012-08-20journald: add new Seal= configuration optionLennart Poettering1-4/+5
2012-08-18mmap: resize arrays dynamicallyLennart Poettering1-1/+1
2012-08-16journal: split up journal-file.cLennart Poettering1-0/+1
2012-08-16journal: add superficial structure verifierLennart Poettering1-0/+1
2012-08-16journal: implement generic sharable mmap caching logicLennart Poettering1-4/+11
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-13journald: initial version of FSPRG hookupLennart Poettering1-17/+12
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-09journald: never read the same kernel msg twice, and generate message when we ↵Lennart Poettering1-0/+61
lose one
2012-08-09journald: properly unescape messages from /dev/kmsgLennart Poettering1-8/+6
2012-08-09journald: also parse kernel key/value fields and store them prefixed with ↵Lennart Poettering1-4/+42
_KERNEL_ as journal fields
2012-08-09journald: basic support for /dev/kmsg parsingLennart Poettering1-143/+99
2012-07-31journald: fixed memory leakArtur Zaprzala1-0/+1
2012-07-26journald: log driver messages at LOG_INFOLennart Poettering1-1/+1
2012-07-26log.h: new log_oom() -> int -ENOMEM, use itShawn Landden1-19/+12
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