summaryrefslogtreecommitdiff
path: root/src/journal
AgeCommit message (Collapse)Author
2015-10-27util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch]Lennart Poettering
2015-10-27src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → ↵Lennart Poettering
capability-util.[ch] The files are named too generically, so that they might conflict with the upstream project headers. Hence, let's add a "-util" suffix, to clarify that this are just our utility headers and not any official upstream headers.
2015-10-27util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering
2015-10-27util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering
2015-10-27util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering
2015-10-27util-lib: split out file attribute calls to chattr-util.[ch]Lennart Poettering
2015-10-27util-lib: split xattr-related calls into xattr-util.[ch]Lennart Poettering
2015-10-27util-lib: introduce dirent-util.[ch] for directory entry callsLennart Poettering
Also, move a couple of more path-related functions to path-util.c.
2015-10-27util-lib: split out resource limits related calls into rlimit-util.[ch]Lennart Poettering
2015-10-27util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering
2015-10-27util: remove path_get_parent(), in favour of dirname_malloc()Lennart Poettering
We don't need two functions that do essentialy the same, hence drop path_get_parent(), and stick to dirname_malloc(), but move it to path-util.[ch].
2015-10-27util-lib: split out hex/dec/oct encoding/decoding into its own fileLennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-26Merge pull request #1676 from poettering/util-lib-2Tom Gundersen
split up util.[ch] into more pieces, and other stuff
2015-10-26journal: add missing includeTom Gundersen
2015-10-26Merge pull request #1681 from ssahani/journalLennart Poettering
journald-server: port to extract_first_word
2015-10-26journald-server: port to extract_first_wordSusant Sahani
2015-10-26util-lib: split out user/group/uid/gid calls into user-util.[ch]Lennart Poettering
2015-10-26util-lib: split out IO related calls to io-util.[ch]Lennart Poettering
2015-10-25Merge pull request #1654 from poettering/util-libTom Gundersen
Various changes to src/basic/
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-25Merge pull request #1663 from poettering/journal-compress-fixZbigniew Jędrzejewski-Szmek
journal: fix error handling when compressing journal objects
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-24util: split out escaping code into escape.[ch]Lennart Poettering
This really deserves its own file, given how much code this is now.
2015-10-24path-util: unify how we process paths specified on the command lineLennart Poettering
Let's introduce a common function that makes relative paths absolute and warns about any errors while doing so.
2015-10-24util-lib: get_current_dir_name() can return errors other than ENOMEMLennart Poettering
get_current_dir_name() can return a variety of errors, not just ENOMEM, hence don't blindly turn its errors to ENOMEM, but return correct errors in path_make_absolute_cwd(). This trickles down into a couple of other functions, some of which receive unrelated minor fixes too with this commit.
2015-10-24journal: irrelevant coding style fixesLennart Poettering
2015-10-24journal: fix error handling when compressing journal objectsLennart Poettering
Let's make sure we handle compression errors properly, and don't misunderstand an error for success. Also, let's actually compress things if lz4 is enabled. Fixes #1662.
2015-10-24Merge pull request #1659 from vcaputo/journal_verify_envalidLennart Poettering
journal: s/Envalid/Invalid/
2015-10-23journal: s/Envalid/Invalid/Vito Caputo
2015-10-23Merge pull request #1653 from keszybz/lz4-compress-timeLennart Poettering
Limit test-compress-benchmark to approx. 12 s of runtime
2015-10-23test-compress-benchmark: properly initialize bufferZbigniew Jędrzejewski-Szmek
We were compressing unitialized memory, which should not result in any problems, but is inelegant.
2015-10-23test-compress-benchmark: limit default runtime to 2 seconds per subtestZbigniew Jędrzejewski-Szmek
If both lz4 and xz are enabled, this results in a limit of 2×3×2 s ~= 12 s runtime. Previous implementation started with really small buffer sizes. When combined with a short time limit this resulteded in abysmal results for xz. It seems that the initialization overead is really significant for small buffers. Since xz will not be used by default anymore, this does not seem worth fixing. Instead buffer sizes are changed to run a pseudo-random non-repeating pattern. This should allow reasonable testing for all buffer sizes. For testing, both runtime and the buffer size seed can be specified on the command line. Sufficiently large runtime allows all buffer sizes up to 1MB to be tested.
2015-10-22journalctl: clarify -q optionEvgeny Vereshchagin
-q suppresses info messages too
2015-10-19journald: make sure r is always initializedLennart Poettering
2015-10-19journal: fix bad memory freeingLennart Poettering
2015-10-19tree-wide: add more void casts for various syscall invocationsLennart Poettering
2015-10-15Merge pull request #1527 from keszybz/lz4Lennart Poettering
Using lz4 frame api for coredump files
2015-10-14compress: return errors without logging, do not fake errnoZbigniew Jędrzejewski-Szmek
Logging for compression and decompression is assymetrical on purpose: if compiled without some type of compression, those compression code paths should never be invoked. OTOH, it is possible to encounter unsupported format on decompression, so leave those log_debug statements in, to make it easier to diagnose stuff.
2015-10-14compress: fix mmap error handlingZbigniew Jędrzejewski-Szmek
2015-10-13Merge pull request #1548 from evverx/journalctl-catalog-ops-fixesLennart Poettering
Fix journalctl --dump-catalog, journalctl --list-catalog
2015-10-13Merge pull request #1542 from keszybz/journal-audit-optionalLennart Poettering
Make journald audit socket maskable
2015-10-13journalctl: introduce short options for --since and --untilJan Synacek
Fixes #1514.
2015-10-13journalctl: enable args for --dump-catalog and --list-catalogEvgeny Vereshchagin
`journalctl --dump-catalog ID1 ID2 ...` works fine.
2015-10-13journalctl: open pager for --dump-catalog and --list-catalogEvgeny Vereshchagin
2015-10-12Document journald sockets paths a bit moreZbigniew Jędrzejewski-Szmek
Adding them to the documentation makes it easier to find the right man page for people who are trying to understand where some socket in the filesystem is coming from.
2015-10-12journald: make audit socket optionalZbigniew Jędrzejewski-Szmek
If we were given some sockets through socket activation, and audit socket is not among them, do not try to open it. This way, if the socket unit is disabled, we will not receive audit events. https://bugzilla.redhat.com/show_bug.cgi?id=1227379
2015-10-10test-compress-benchmark: test three cases (zeros, simple, semi-random)Zbigniew Jędrzejewski-Szmek
Existing test would use highly-compressible repeatable input. Two types of input are added: - zeros - random blocks interspersed with zeros The idea is to get more information about behaviour in various cases. On Intel Xeon the results are: % ./test-compress-benchmark XZ/zeros: compressed & decompressed 2535301373 bytes in 32.56s (74.26MiB/s), mean compresion 99.96%, skipped 3160 bytes LZ4/zeros: compressed & decompressed 2535304362 bytes in 1.16s (2088.69MiB/s), mean compresion 99.60%, skipped 171 bytes XZ/simple: compressed & decompressed 2535300963 bytes in 30.42s (79.48MiB/s), mean compresion 99.95%, skipped 3570 bytes LZ4/simple: compressed & decompressed 2535303543 bytes in 1.22s (1978.86MiB/s), mean compresion 99.60%, skipped 990 bytes XZ/random: compressed & decompressed 381756649 bytes in 60.02s (6.07MiB/s), mean compresion 39.64%, skipped 27813723 bytes LZ4/random: compressed & decompressed 2507385036 bytes in 0.97s (2477.52MiB/s), mean compresion 54.77%, skipped 27919497 bytes If someone has ideas for more realistic test cases, they can be easily added to this framework.
2015-10-10coredump: use lz4frame api to compress coredumpsZbigniew Jędrzejewski-Szmek
This converts the stream compression to use the new lz4frame api, compatible with lz4cat. Previous code used custom headers, so the compressed file was not compatible with lz4 command line tools. I considered this the last blocker to using lz4 by default. Speed seems to be reasonable, although a bit (a few percent) slower than the lz4 binary, even though compression is the same. I don't consider this important. It could be caused by the overhead of library calls, but is probably caused by slightly different buffer sizes or such. The code in this patch uses mmap, since since this allows the buffer to be reused while not making the code more complicated at all. In my testing, this version is noticably faster (~20%) than a naive single-buffered version. mmap can cause the program to be killed with SIGBUS, if the underlying file is truncated or a disk error occurs. We only use this from within coredump and coredumpctl, so I don't consider this an issue. Old decompression code is retained and is used if the new code fails indicating a format error. There have been reports of various smaller distributions using previous lz4 code, i.e. the old format, and it is nice to provide backwards compatibility. We can remove the legacy code in a few versions. The way that blobs are compressed in the journal is not affected.
2015-10-06siphash24: unify APITom Gundersen
Make the API of the new helpers more similar to the old wrapper. In particular we now return the hash as a byte string to avoid any endianness problems.