summaryrefslogtreecommitdiff
path: root/src/journal
AgeCommit message (Collapse)Author
2014-07-06coredumpctl: show a useful error on permission problemsZbigniew Jędrzejewski-Szmek
2014-07-06compress: add benchmark-style testZbigniew Jędrzejewski-Szmek
This is useful to test the behaviour of the compressor for various buffer sizes. Time is limited to a minute per compression, since otherwise, when LZ4 takes more than a second which is necessary to reduce the noise, XZ takes more than 10 minutes. % build/test-compress-benchmark (without time limit) XZ: compressed & decompressed 2535300963 bytes in 794.57s (3.04MiB/s), mean compresion 99.95%, skipped 3570 bytes LZ4: compressed & decompressed 2535303543 bytes in 1.56s (1550.07MiB/s), mean compresion 99.60%, skipped 990 bytes % build/test-compress-benchmark (with time limit) XZ: compressed & decompressed 174321481 bytes in 60.02s (2.77MiB/s), mean compresion 99.76%, skipped 3570 bytes LZ4: compressed & decompressed 2535303543 bytes in 1.63s (1480.83MiB/s), mean compresion 99.60%, skipped 990 bytes It appears that there's a bug in lzma_end where it leaks 32 bytes.
2014-07-06journal: add LZ4 as optional compressorZbigniew Jędrzejewski-Szmek
Add liblz4 as an optional dependency when requested with --enable-lz4, and use it in preference to liblzma for journal blob and coredump compression. To retain backwards compatibility, XZ is used to decompress old blobs. Things will function correctly only with lz4-119. Based on the benchmarks found on the web, lz4 seems to be the best choice for "quick" compressors atm. For pkg-config status, see http://code.google.com/p/lz4/issues/detail?id=135.
2014-07-06journal/compress: return early in uncompress_startswithZbigniew Jędrzejewski-Szmek
uncompress_startswith would always decode the whole stream, even if it did not start with the given prefix. Reallocation policy was also strange.
2014-07-01coredump: vacuum - fix calculation of 10% of fs size for MaxUseThomas Hindoe Paaboel Andersen
2014-06-27journald: make MaxFileSec really default to 1monthMichał Bartoszkiewicz
journald.conf(5) states that the default for MaxFileSec is one month, but the code didn't respect that.
2014-06-27coredump: simplify compression logic a bitLennart Poettering
This also make sure we remove the original coredump temporary file if we successfully managed to compress the coredump.
2014-06-27coredump: replace Compression= setting by simpler Compress= boolean settingLennart Poettering
Let's move things closer to journald's configuration settings, which knows Compress= already, as a boolean. This makes things more uniform, but also gives us more freedom to possibly swap out the used compression algorithm one day.
2014-06-27coredump: don't expose the compression level as configuration optionLennart Poettering
This sounds overly low-level and implementation-detaily. Let's just use the default level XZ suggests. This gives us more room to possibly swap out the compression algorithm used, as the compression level range will not leak into user configuration.
2014-06-27journald: invoking fstatvfs() is now redundant in the vacuuming codeLennart Poettering
2014-06-27coredump: don't be annoyed if another coredump hook removes our coredump ↵Lennart Poettering
while we work on it
2014-06-27coredump: fix how the compression level is verifiedLennart Poettering
2014-06-27coredump: add simple coredump vacuumingLennart Poettering
When disk space taken up by coredumps grows beyond a configured limit start removing the oldest coredump of the user with the most coredumps, until we get below the limit again.
2014-06-27coredumpctl: fix potential deref of null pointerThomas Hindoe Paaboel Andersen
2014-06-27coredump: make sure variable is set if uncompressedThomas Hindoe Paaboel Andersen
reorder the code so the fstat is done before we can jump to uncompressed
2014-06-26coredumpctl: remove unused variableThomas Hindoe Paaboel Andersen
2014-06-26coredump: fix debug messageThomas Hindoe Paaboel Andersen
typo from 347272731e15d3c4a70fad7ccd7185e8e8059d01
2014-06-26coredumpctl: fix HAVE_XZ checkDaniel Mack
2014-06-26coredumpctl: fix build with !HAVE_XZDaniel Mack
Fixes the following build error: CCLD coredumpctl src/journal/coredumpctl.o: In function `save_core': /src/systemd-master/src/journal/coredumpctl.c:656: undefined reference to `decompress_stream' collect2: error: ld returned 1 exit status make[2]: *** [coredumpctl] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
2014-06-26man: add coredump.conf(5)Zbigniew Jędrzejewski-Szmek
2014-06-26coredump+coredumpctl: add COREDUMP_FILENAME, use in coredumpctlZbigniew Jędrzejewski-Szmek
2014-06-26coredump: make compression configurableZbigniew Jędrzejewski-Szmek
Add Compression={none,xz} and CompressionLevel=0-9 settings. Defaults are xz/6. Compression=filesystem may be added later. I picked "xz" for the compression "type", since we might want to add different compressors later on. XZ is fairly memory and CPU intensive, and embedded users will likely want to use LZO or some other lightweight compression mechanism.
2014-06-26coredump: compress core filesZbigniew Jędrzejewski-Szmek
Unfortunately the core is first written uncompressed, then compressed by reading from disk and writing to the output file. This is ugly and slow, but I don't see a way around, if we want to get the backtrace without keeping everything in memory.
2014-06-26journal/compress: add stream compression/decompression functionsZbigniew Jędrzejewski-Szmek
2014-06-26journal/compress: simplify compress_blobZbigniew Jędrzejewski-Szmek
2014-06-25tests: add test-compressRonny Chevalier
2014-06-23coredump: log coredump even if core dumping failsZbigniew Jędrzejewski-Szmek
Journal might be functional even if we cannot write to /var/lib/systemd/coredump.
2014-06-23coredump: retrieve comm information from /procZbigniew Jędrzejewski-Szmek
Kernel mangles comm information in an irreversible way when comm constains repeated spaces. Retrieve comm information from /proc, and only fallback to the information provided on the commandline when retrieving information from /proc fails. Add exe information to the list of saved xattr. https://bugs.freedesktop.org/show_bug.cgi?id=62043
2014-06-23coredump: never write more than the configured processing size limit to diskLennart Poettering
2014-06-23coredumpctl: show comm name next to PIDLennart Poettering
2014-06-23coredump: quit early if we cannot store ay coredump to diskLennart Poettering
2014-06-23coredumpctl: include timestamp information in "coredumpctl info" outputLennart Poettering
2014-06-23coredump: also escape spaces in comm fields when formatting file namesLennart Poettering
2014-06-22consistently order cleanup attribute before typeThomas Hindoe Paaboel Andersen
2014-06-20coredump: fix include of xattr.hFilipe Brandenburger
The correct path is now <sys/xattr.h> (from glibc-headers) and no longer <attr/xattr.h> (from libattr-devel.) Fixes: 34c10968cbe3b5591b3c0ce225b8694edd9709d0
2014-06-19coredumpctl: add missing entries to --helpLennart Poettering
2014-06-19coredumpctl: fix columns sizing for timestampLennart Poettering
2014-06-19journal-send.c: use automatic cleanupZbigniew Jędrzejewski-Szmek
2014-06-19journald: make SplitMode=uid the defaultLennart Poettering
Now that we actually can distuingish system and normal users there's no point in taking session information into account anymore when splitting up logs. This has the beenfit with that coredump information will actually end up in each user's own journal.
2014-06-19coredumpctl: introduce new -1 switch for showing a single, most recent entry ↵Lennart Poettering
only "coredumpctl info -1" is now incredibly useful for showing the most recent stacktrace.
2014-06-19coredump: simplify how we apply extended attributes to coredumpsLennart Poettering
2014-06-19coredump: include stacktrace of coredumps in the log messageLennart Poettering
elfutils' libdw is maintained, can read DWARF debug data and appears to be the library of choice for generating backtraces today.
2014-06-19coredump: add 3 more metadata fields to coredump entriesLennart Poettering
2014-06-19coredump: add new "info" verb to coredumpctl showing detailed information ↵Lennart Poettering
about a coredump
2014-06-19coredump: make sure coredumpctl can handle externally stored coredumpsLennart Poettering
2014-06-19coredump: optionally store coredumps on disk, not in the journalLennart Poettering
Introduce a new configuration file /etc/systemd/coredump.conf to configure when to place coredumps in the journal and when on disk. Since the coredumps are quite large, default to storing them only on disk.
2014-06-16journal-remote: fix memleakThomas Hindoe Paaboel Andersen
2014-06-13os-release: define /usr/lib/os-release as fallback for /etc/os-releaseLennart Poettering
The file should have been in /usr/lib/ in the first place, since it describes the OS container in /usr (and not the configuration in /etc), hence, let's support os-release files in /usr/lib as fallback if no version in /etc exists, following the usual override logic. A prior commit already enabled tmpfiles to create /etc/os-release as a symlink to /usr/lib/os-release should it be missing, thus providing nice compatibility with applications only checking in /etc. While it's probably a good idea if all apps check both locations via a fallback logic, it is only necessary in the early boot process, as long as the /etc/os-release symlink has not been restored, in case we boot with an empty /etc.
2014-06-11journald: create /run/log/journal with the correct access modesLennart Poettering
2014-06-10tmpfiles: get rid of "m" lines, make them redundant by "z"Lennart Poettering
"m" so far has been a non-globbing version of "z". Since this makes it quite redundant, let's get rid of it. Remove "m" from the man pages, beef up "z" docs instead, and make "m" nothing more than a compatibility alias for "z".