b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
485fd9a7b9d59b9f2302a873f7ee5ccac256dd93 |
|
03-Feb-2016 |
Michal Sekletar <msekleta@redhat.com> |
journalctl: add match for the current boot when called with devpath |
795ab08f783e78e85f1493879f13ac44cb113b00 |
|
02-Feb-2016 |
Michal Sekletar <msekleta@redhat.com> |
journalctl: make "journalctl /dev/sda" work
Currently when journalctl is called with path to block device node we
add following match _KERNEL_DEVICE=b$MAJOR:$MINOR.
That is not sufficient to actually obtain logs about the disk because
dev_printk() kernel helper puts to /dev/kmsg information about the
device in following format, +$SUBSYSTEM:$ADDRESS,
e.g. "+pci:pci:0000:00:14.0".
Now we will walk upward the syspath and add match for every device in
format produced by dev_printk() as well as match for its device node if
it exists. |
69e714f3d8784fb0207ac9112ed1a48d4fd5e9fe |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add new --fields switch to dump all currently used field names
Fixes #2176 |
c34e939909710bf124e7741c3648592a30418ffd |
|
01-Feb-2016 |
Jan Synacek <jsynacek@redhat.com> |
journalctl: improve error messages when the specified boot is not found |
0f1a9a830c87d8accdc3a44d0a93ad343e52a7bd |
|
01-Feb-2016 |
Jan Synacek <jsynacek@redhat.com> |
journalctl: show friendly info when using -b on runtime journal only
Make it clear that specifing boot when there is actually only one has no
effect. This cosmetic patch improves user experience a bit. |
40c9fe4c0862114dab390c8ed16f78cf056b9140 |
|
20-Jan-2016 |
Jan Synacek <jsynacek@redhat.com> |
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
... to determine if color output should be enabled. If the variable is not set,
fall back to using on_tty(). Also, rewrite existing code to use
colors_enabled() where appropriate. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
bfcb7c5f5333f9c3523b7027c2ad4c99e4494fb5 |
|
17-Nov-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
journalctl: don't print -- No entries -- in quiet mode |
33d52ab92f2f0bfd706e6f343d172618d1e03f3d |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: rework --sync/--rotate logic to use CLOCK_MONOTONIC timestamp files
Previously, we'd rely on the mtime timestamps of the touch files to see
if our sync/rotation requests were already suppressed. This means we
rely on CLOCK_REALTIME timestamps. With this patch we instead store the
CLOCK_MONOTONIC timestamp *in* the touch files, and avoid relying on
mtime.
This should make things more reliable when the clock or underlying mtime
granularity is not very good.
This also adds warning messages if writing any of the flag files fails. |
a020b3b3321c2d19263ac6e163a5a5787501d823 |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: change repeated if checks into switch blocks
No functional changes. |
176ee07b690a14b7f231eb719a8baa5d568c3657 |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: refuse to --machine= in combination with --flush, --sync or --rotate |
dbd6e31cf91ab86a4a2fffeb50ccef211da3126d |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: make --rotate synchronous, too
Of course, ideally we'd just use normal synchronous bus calls, but this
is out of the question as long as we rely on dbus-daemon (which logs to
journald, and thus cannot use to avoid cyclic sync loops). Hence,
instead, reuse the wait logic already implemented for --sync, and use a
signal in one direction, and a mtime watch file for the reply. |
94b6551662e0db8eb09768ed70f77759f322b4c6 |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add new --sync switch for syncing the journal to disk
With this new "--sync" switch we add a synchronous way to sync
everything queued to disk, and return only after that's complete. This
command gives the guarantee that anything queued before has hit the disk
before the command returns.
While we are at it, also improve the man pages and help text for
journalctl a bit. |
709f6e46a35ec492b70eb92943d82a8d838ce918 |
|
05-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use the negative error codes returned by our functions
Our functions return negative error codes.
Do not rely on errno being set after calling our own functions. |
5768d2594940668506bb4cafa078f654cc20dc5a |
|
03-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: when we fail to open a journal file, print why
When we enumerate journal files and encounter an invalid one, remember
which this, and show it to the user.
Note the possibly slightly surprising logic here: we store only one path
per error code. This means we show all error kinds but not every actual
error we encounter. This has the benefit of not requiring us to keep a
potentially unbounded list of errors with their sources around, but can
still provide a pretty complete overview on the errors we encountered.
Fixes #1669. |
4f52b822b05c373f40fea1a41ae3ade5d5ff558e |
|
03-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: continue operation, even if we run into an invalid file |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
7d50b32a129e781401cf897475f388f682de1368 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out globbing related calls into glob-util.[ch] |
7ccbd1ae843d77275f2c542582a9a80e5e058a70 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out syslog-related calls into syslog-util.[ch] |
8752c5752f3b9023f9ce96a55d70c6e5fc31118f |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move more locale-related calls to locale-util.[ch] |
f4f15635ec05293ffcc83a5b39f624bbabbd8fd0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move a number of fs operations into fs-util.[ch] |
c8b3094de58e3b1e37d06f3d56c9346cffbe320a |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out file attribute calls to chattr-util.[ch] |
78f22b973fa2c9b09bd974680836df17163d9ee0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out resource limits related calls into rlimit-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out user/group/uid/gid calls into user-util.[ch] |
c004493cdefc1f43a3956ca529e8070f8d70be56 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out IO related calls to io-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
0f03c2a4c093e3d44f4072144827e943c05c8904 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
path-util: unify how we process paths specified on the command line
Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so. |
20d936ba8167f4224cd01903e97fa852c00c0988 |
|
23-Oct-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
journalctl: clarify -q option
-q suppresses info messages too |
66f529249a6b3c3391e732cba44482a498153e16 |
|
13-Oct-2015 |
Jan Synacek <jsynacek@redhat.com> |
journalctl: introduce short options for --since and --until
Fixes #1514. |
f98a41c21d80a5bc1dff40301faefb1b585767f2 |
|
13-Oct-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
journalctl: enable args for --dump-catalog and --list-catalog
`journalctl --dump-catalog ID1 ID2 ...` works fine. |
dd598123a9f9416c9b8fd5f4ef60b77574750941 |
|
13-Oct-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
journalctl: open pager for --dump-catalog and --list-catalog |
8580d1f73db36e9383e674e388b4fb55828c0c66 |
|
02-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: rework vacuuming logic
Implement a maximum limit on number of journal files to keep around.
Enforcing a limit is useful on this since our performance when viewing
pays a heavy penalty for each journal file to interleve. This setting is
turned on now by default, and set to 100.
Also, actully implement what 348ced909724a1331b85d57aede80a102a00e428
promised: use whatever we find on disk at startup as lower bound on how
much disk space we can use. That commit introduced some provisions to
implement this, but actually never did.
This also adds "journalctl --vacuum-files=" to vacuum files on disk by
their number explicitly. |
e53fc357a9bb9d0a5362ccc4246d598cb0febd5e |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: remove a number of invocations of strerror() and replace by %m
Let's clean up our tree a bit, and reduce invocations of the
thread-unsafe strerror() by replacing it with printf()'s %m specifier. |
e3fdfb491fba5f1fb69fbb287f3db1bf271bd210 |
|
30-Sep-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
journalctl: add --rotate option
shortcut for `systemctl kill --kill-who main --signal SIGUSR2 systemd-journald` |
266f3e269d173f104aa2a5e3ceac9b6979ea5039 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
bus-util: rename bus_open_transport() to bus_connect_transport()
In sd-bus, the sd_bus_open_xyz() family of calls allocates a new bus,
while sd_bus_default_xyz() family tries to reuse the thread's default
bus. bus_open_transport() sometimes internally uses the former,
sometimes the latter family, but suggests it only calls the former via
its name. Hence, let's avoid this confusion, and generically rename the
call to bus_connect_transport().
Similar for all related calls.
And while we are at it, also change cgls + cgtop to do direct systemd
connections where possible, since all they do is talk to systemd itself. |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect. |
59f448cf15f94bc5ebfd5b254de6f2441d02fbec |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: never use the off_t unless glibc makes us use it
off_t is a really weird type as it is usually 64bit these days (at least
in sane programs), but could theoretically be 32bit. We don't support
off_t as 32bit builds though, but still constantly deal with safely
converting from off_t to other types and back for no point.
Hence, never use the type anymore. Always use uint64_t instead. This has
various benefits, including that we can expose these values directly as
D-Bus properties, and also that the values parse the same in all cases. |
94c156cd452424ea59931920df2454d9da7cb774 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: make use of log_error_errno() return value in more cases
The previous coccinelle semantic patch that improved usage of
log_error_errno()'s return value, only looked for log_error_errno()
invocations with a single parameter after the error parameter. Update
the patch to handle arbitrary numbers of additional arguments. |
76ef789d264f9eb7d7624b994aa6eead1dacfac4 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: make use of log_error_errno() return value
Turns this:
r = -errno;
log_error_errno(errno, "foo");
into this:
r = log_error_errno(errno, "foo");
and this:
r = log_error_errno(errno, "foo");
return r;
into this:
return log_error_errno(errno, "foo"); |
c51e1a96359b3f4d374345593b11273df2132b93 |
|
17-Aug-2015 |
Stef Walter <stefw@redhat.com> |
journalctl: make sure 'journalctl -f -t unmatched' blocks
Previously the following command:
$ journalctl -f -t unmatchedtag12345
... would block when called with criteria that did not match any
journal lines. Once log lines appeared that matched the criteria
they were displayed.
Commit 02ab86c732576a71179ce12e97d44c289833236d broke this
behavior and the journal was not followed, but the command
exits with '-- No entries --' displayed.
This commit fixes the issue.
More information downstream:
https://bugzilla.redhat.com/show_bug.cgi?id=1253649 |
ae691c1d9382995ea7e28317f5c37023229c27ee |
|
06-Aug-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
hostname-util: get rid of unused parameter of hostname_cleanup()
All users are now setting lowercase=false. |
97b11eedff9d2e17101ad453caf9e48b73246719 |
|
31-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar); |
02ab86c732576a71179ce12e97d44c289833236d |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: properly detect empty journal files
When we encounter a journal file with exactly zero entries, print a nice
message and exit, and don't print a weird error message. |
03976f7b4a84b8b1492a549a3470b2bba8f37008 |
|
03-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: introduce new sd_bus_flush_close_unref() call
sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush()
(which writes all unwritten messages out) + sd_bus_close() (which
terminates the connection, releasing all unread messages) +
sd_bus_unref() (which frees the connection).
The combination of this call is used pretty frequently in systemd tools
right before exiting, and should also be relevant for most external
clients, and is hence useful to cover in a call of its own.
Previously the combination of the three calls was already done in the
_cleanup_bus_close_unref_ macro, but this was only available internally.
Also see #327 |
9530e0d023b0e9308f19eadf6e42cdc25bc30793 |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: unify how we free boot id lists a bit
Instead of use LIST_FOREACH_SAFE, just use the same, seperate destructor
everywhere. |
b56d608e6977f7731a6fccd593c50eec1a69f466 |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: clean up how we log errors
All functions should either log the errors they run into, or only return
them in which case the caller should log them.
Make sure this rule is followed, so that each error is logged precisely
once, and neither never, nor more than once. |
45bc27b621c51b9d0e0229835deb6d188bcd417b |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: rename boot_id_t to BootId
So far we tried to reserve the _t suffix to types we use like a value in
contrast to types we use as objects, hence let's do this in journalctl
too. |
26b9f165c3ebf513110e3de88c92fcbf3011271d |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: lstat() should suffice if we call canonicalize_file_name() first |
d52da2057f06c49d50ed99300dc407c0227b1a32 |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: free all command line argument objects
let's try to be valgrind clean |
909dea0c7ced0042fa3acd8cd05f5007a2cf2cea |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: only have a single exit path from main()
That way we can be sure we execute the destructors properly, and can be
valgrind-clean. |
596a23293d28f93843aef86721b90043e74d3081 |
|
19-May-2015 |
Jan Janssen <medhefgo@web.de> |
journalctl: Improve boot ID lookup
This method should greatly improve offset based lookup, by simply jumping
from one boot to the next boot. It starts at the journal head to get the
a boot ID, makes a _BOOT_ID match and then comes from the opposite
journal direction (tail) to get to the end that boot. After flushing the matches
and advancing the journal from that exact position, we arrive at the start
of next boot. Rinse and repeat.
This is faster than the old method of aggregating the full boot listing just
so we can jump to a specific boot, which can be a real pain on big journals
just for a mere "-b -1" case.
As an additional benefit --list-boots should improve slightly too, because
it does less seeking.
Note that there can be a change in boot order with this lookup method
because it will use the order of boots in the journal, not the realtime stamp
stored in them. That's arguably better, though.
Another deficiency is that it will get confused with boots interleaving in the
journal, therefore, it will refuse operation in --merge, --file and --directory mode.
https://bugs.freedesktop.org/show_bug.cgi?id=72601 |
958b66ea16deddd794b3a52643bd44633e165ead |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split all hostname related calls into hostname-util.c |
7410616cd9dbbec97cf98d75324da5cda2b2f7a2 |
|
06-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rework unit name validation and manipulation logic
A variety of changes:
- Make sure all our calls distuingish OOM from other errors if OOM is
not the only error possible.
- Be much stricter when parsing escaped paths, do not accept trailing or
leading escaped slashes.
- Change unit validation to take a bit mask for allowing plain names,
instance names or template names or an combination thereof.
- Refuse manipulating invalid unit name |
e346512c684e9efae84c6442f7e6a5781564ecde |
|
22-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
journalctl: rework code that checks whether we have access to /var/log/journal
- fix some memory leaks on error conditions
- handle all error cases properly, and log about failures
- move HAVE_ACL and no-HAVE_ACL code closer to each other |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
1ed8f8c16da99551c6731764759878a0bc243fde |
|
08-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
util: merge change_attr_fd() and chattr_fd() |
a7f7d1bde43fc825c49afea3f946f5b4b3d563e0 |
|
27-Mar-2015 |
Harald Hoyer <harald@redhat.com> |
fix gcc warnings about uninitialized variables
like:
src/shared/install.c: In function ‘unit_file_lookup_state’:
src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
return r < 0 ? r : state;
^
src/shared/install.c:1796:13: note: ‘r’ was declared here
int r;
^ |
15411c0cb1192799b37ec8f25d6f30e8d7292fc6 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses. |
a6dcc7e5924f9c27d3e9c6560a448b02ec28b65f |
|
10-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Introduce loop_read_exact helper
Usually when using loop_read(), we want to read the full buffer.
Add a helper that mirrors loop_write(), and returns 0 when full buffer
was read, and an error otherwise.
Use -ENODATA for the short read, to distinguish it from a read error. |
faf9da01ad93bd48523f0966646bbd3ca85a2951 |
|
10-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: unlink without checking with access first
It is more elegant to do this in one step.
Coverity complains about the TOCTOU difference, but it is not an
actual problem (CID #1237777). |
05c1853093d8c4e4aa16876b5129b65dac5abd01 |
|
08-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: update hint now that we set ACL everywhere |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
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. |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary. |
f8eeeaf9b783ebbab30672629abf3920db286811 |
|
22-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
tmpfiles: add 'a' type to set ACLs |
40f0b71b063da6a36b8d7ec75ef20103abd18243 |
|
19-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: trim --help to fit in 80 columns
Terminals tend to be 80 columns wide by default, and the help
text is only supposed to be a terse reminder anyway.
https://bugzilla.redhat.com/show_bug.cgi?id=1183771 |
de45d726034f33afdb0a185e62fc61bf10a0acd2 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)
When there are a lot of split out journal files, we might run out of fds
quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible.
Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K,
the hard at 4K by default for normal user processes, this code hence
bumps this up for users to 4K.
https://bugzilla.redhat.com/show_bug.cgi?id=1179980 |
11689d2a021d95a8447d938180e0962cd9439763 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: turn off COW for journal files on btrfs
btrfs' COW logic results in heavily fragment journal files, which is
detrimental for perfomance. Hence, turn off COW for journal files as we
create them.
Turning off COW comes at the cost of data integrity guarantees, but this
should be acceptable, given that we do our own checksumming, and
generally have a pretty conservative write pattern.
Also see discussion on linux-btrfs:
http://www.spinics.net/lists/linux-btrfs/msg41001.html |
553d2243e2a42783b8bb94addfb752b802c23311 |
|
06-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
tree-wide: remove unnecessary LOG_PRI
LOG_DEBUG is already a log level, there is no need to use LOG_PRI which
is for filtering out the facility. |
2cf4172a71860c6e44edd27a3b68047ae062d7fc |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: install sigbus handler for journal tools too
This makes them robust regarding truncation. Ideally, we'd export this
as an API, but given how messy SIGBUS handling is, and the uncertain
ownership logic of signal handlers we should not do this (unless libc
one day invents a scheme how to sanely install SIGBUS handlers for
specific memory areas only). However, for now we can still make all our
own tools robust.
Note that external tools will only have read-access to the journal
anyway, where SIGBUS is much more unlikely, given that only writes are
subject to disk full problems. |
f131770b1465fbf423881f16ba85523a05f846fe |
|
31-Dec-2014 |
Veres Lajos <vlajos@gmail.com> |
tree-wide: spelling fixes
https://github.com/vlajos/misspell_fixer
https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa
Thanks to Torstein Husebo <torstein@huseboe.net>. |
553acb7b6b8d4f16a4747b1f978e8b7888fbfb2c |
|
10-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
treewide: sanitize loop_write
loop_write() didn't follow the usual systemd rules and returned status
partially in errno and required extensive checks from callers. Some of
the callers dealt with this properly, but many did not, treating
partial writes as successful. Simplify things by conforming to usual rules. |
8ee8e53648bf45854d92b60e1e70c17a0cec3c3d |
|
09-Dec-2014 |
Wesley Dawson <whd@mozilla.com> |
journalctl: respect --after-cursor semantics with --follow in all cases
In the case where no entries have been added to the journal after the specified
cursor, set need_seek before the main loop to prevent display of the entry at
said cursor. |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno + return simplifications |
c33b329709ebe2755181980a050d02ec7c81ed87 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno() conversions, multiline calls
Basically:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \
$f; done
Plus manual indentation fixups. |
279d3c9cead3a7ffb657fedbab0e2bc90db45667 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno() conversions |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
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(). |
70af7b8ada43d15edcd16f1f5157c447c388933c |
|
27-Nov-2014 |
Andrej Manduch <amanduch@gmail.com> |
journalctl: print all possible lines immediately with --follow + --since
When I tryed to run journalctl with --follow and --since arguments it
behaved very strangely.
First It prints logs from what I specified in --since argument, then
printed 10 lines (as is default in --follow) and when app put something
new in to log journalctl printed everithing from the last printed line.
How to reproduce:
1. run: journalctl -m --since 14:00 --follow
Then you'll see 10 lines of logs since 14:00. After that wait until some
app add something in the journal or just run `systemd-cat echo test`
2. After that journalctl will print every single line since 14:00 and will
follow as expected.
As long as --since and --follow will eventually print all relevant
lines, I seen no reason why not to print them right away and not after
first new message in journal.
Relevant bugzillas:
https://bugs.freedesktop.org/show_bug.cgi?id=71546
https://bugs.freedesktop.org/show_bug.cgi?id=64291 |
dbd2a83fbf051fc51bdca3aa7536c78479488c5b |
|
03-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add new --vacuum-size= and --vacuum-time= commands to clean up journal files based on a size/time limit
This is equivalent to the effect of SystemMaxUse= and RetentionSec=,
however can be invoked directly instead of implicitly. |
7558251eef610e71595a0aa48952479906cb899a |
|
25-Oct-2014 |
Santiago Vila <sanvila@unex.es> |
journalctl: correct help text for --until
http://bugs.debian.org/766598 |
ea7061e4d431c3e03212243f65148f2e985d80b7 |
|
24-Oct-2014 |
Jan Janssen <medhefgo@web.de> |
journalctl: Unify boot id lookup into common function get_boots |
c1f906bd91c388fd84a006a56e1e6692e23f8ae3 |
|
23-Oct-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: make sd_journal::files a OrderedHashmap
Anything that uses hashmap_next() almost certainly cares about the order
and needs to be an OrderedHashmap. |
74055aa76278232ff05574fc47c4e6b3560554a7 |
|
23-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add new --flush command and make use of it in systemd-journal-flush.service
This new command will ask the journal daemon to flush all log data
stored in /run to /var, and wait for it to complete. This is useful, so
that in case of Storage=persistent we can order systemd-tmpfiles-setup
afterwards, to ensure any possibly newly created directory in /var/log
gets proper access mode and owners. |
97e1cc8b591ee508382863ae805ed89c00775cf3 |
|
22-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
journalctl: don't introduce numeric constants with special names, give them names |
cab9b000f28a940e92d1d4241d967cad94c650e3 |
|
10-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: use pager for --list-boots |
853bd5cc72a0d4cbdd07cc3cabc65bef333a0c71 |
|
10-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
sd-journal: change check to assert
As of 0f99f74a14 'sd-journal: verify that object start with the field
name' this condition should never happen. |
5ab99e076c72a44f2e174e48abd9945cd0180d76 |
|
08-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
time: functions named "internal" really shouldn't be exported
Also, let's try to make function names descriptive, instead of using
bools for flags. |
a62e83b48cda6a709a796a361abaf6b129650b3c |
|
03-Oct-2014 |
Jan Synacek <jsynacek@redhat.com> |
journalctl: make --utc work everywhere
The --utc option was introduced by commit
9fd290443f5f99fca0dcd4216b1de70f7d3b8db1.
Howerver, the implementation was incomplete. |
9fd290443f5f99fca0dcd4216b1de70f7d3b8db1 |
|
02-Oct-2014 |
Jan Synacek <jsynacek@redhat.com> |
journalctl: add --utc option
Introduce option to display time in UTC. |
4bed248505da4da94d82078fe60326a374970e97 |
|
29-Sep-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: do not output --reboot-- markers when running non-interactively
They are not legal in the export format. |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory. |
48382487666af141bb4385ceb5fb73c4147f6141 |
|
31-Aug-2014 |
Jan Janssen <medhefgo@web.de> |
journalctl: Allow to disable line cap with --lines=all |
730836403aee5f5bb998e6e3622ea7068fce0699 |
|
21-Aug-2014 |
Harald Hoyer <harald@redhat.com> |
journalctl: add "-t --identifier=STRING" option
This turns journalctl to the counterpart of systemd-cat.
Messages sent with
systemd-cat --identifier foo --prioritiy debug
can now be shown with
journalctl --identifier foo --prioritiy debug
"--identifier" is not merged with "--unit" to make a clear
distinction between syslog and systemd units.
syslog identifiers can be chosen freely by anyone. |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there. |
73f860db9893deab6aebceb53dd7d0deb662e832 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Always prefer our headers to system headers
In practice this shouldn't make much difference, but
sometimes our headers might be newer, and we want to
test them. |
0c6ea3a4e2ac3f350dcb58e8f08bb74b030cd624 |
|
26-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add utility function to append root to path |
7de80bfe2e61d5818601ccfddbadad3b7703ed70 |
|
26-Jul-2014 |
Karel Zak <kzak@redhat.com> |
Always check asprintf return code
There is a small number of the places in sources where we don't check
asprintf() return code and assume that after error the function
returns NULL pointer via the first argument. That's wrong, after
error the content of pointer is undefined. |
4e6029435111adcad71489aca2dd68bc65aeffd4 |
|
20-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl,man: allow + only between terms
https://bugzilla.redhat.com/show_bug.cgi?id=1110712 |
eacbb4d33e2bb5c54311544851140efe3dd0f774 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: use journal as the source |
a36b8debe67f3a5515200dada75cf4dbc334c7f5 |
|
05-Apr-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: free arg_file on exit |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards. |
0b6b7c2004317da48e5bbd3078c5662d8f0061b6 |
|
27-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: refuse extra arguments with --verify and similar
Positional arguments only make sense with the default action.
For other actions, complain instead of ignoring them silently. |
39883f622f392d8579f4428fc5a789a102efbb10 |
|
19-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
make gcc shut up
If -flto is used then gcc will generate a lot more warnings than before,
among them a number of use-without-initialization warnings. Most of them
without are false positives, but let's make them go away, because it
doesn't really matter. |
73e231abde39f22097df50542c745e01de879836 |
|
18-Feb-2014 |
Jan Engelhardt <jengelh@inai.de> |
doc: update punctuation
Resolve spotted issues related to missing or extraneous commas, dashes. |
2d5bdf5bc0e4714d42e5999a4e37553a6bf83575 |
|
28-Jan-2014 |
Lennart Poettering <lennart@poettering.net> |
always use the same code for creating temporary files
Let's unify our code here, and also always specifiy O_CLOEXEC. |
ea18a4b57e2bb94af7b3ecb7abdaec40e9f485f0 |
|
11-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: allow globbing in --unit and --user-unit
This is a continuation of e3e0314b systemctl: allow globbing in commands
which take multiple unit names.
Multiple patterns can be specified, as separate arguments, or as one argument
with patterns seperated by commas.
If patterns are given, at least one unit must be matched (by any of the patterns).
This is different behaviour than systemctl, but here it is necessary because
otherwise anything would be matched, which is unlikely to be the intended
behaviour.
https://bugs.freedesktop.org/show_bug.cgi?id=59336 |
f78e6385dc4cee0a1f399c4c89ebf823c108d447 |
|
26-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use enums to make it obvious what boolean params mean
Suggested-by: Russ Allbery <rra@debian.org> |
e3e0314b56012f7febc279d268f2cadc1fcc0f25 |
|
26-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: allow globbing in commands which take multiple unit names |
442e2def7938435481eed34cd7331e34ebc8d9e0 |
|
26-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journalctl: make sure -b --foobar cannot be misunderstood as --boot=--foobar |
6cebe83cfa656365348ff21f567d133c7e34a71d |
|
26-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
Revert "journalctl: remove unexpected behavior of journalctl -b"
This reverts commit cf5bccc2bb9569030cb04debbc4208aaca0fe5b4.
We should fix thinks properly if they aren't perfect, not just break
other things... |
cf5bccc2bb9569030cb04debbc4208aaca0fe5b4 |
|
25-Dec-2013 |
Dave Reisner <dreisner@archlinux.org> |
journalctl: remove unexpected behavior of journalctl -b
This flag shouldn't try and consume the following argument. It should
behave like every other flag which takes an optional argument when
parsed by getopt_long. |
c736283bfb81f5b00756e08a13946c113a41527f |
|
19-Dec-2013 |
Jason St. John <jstjohn@purdue.edu> |
journalctl,zsh-completion: fix several issues in --help message text
-- fix grammar and reword some descriptions for clarity
-- add a useful description of what --follow does
-- fix the description for --after-cursor
-- properly introduce the FSS acronym for "Forward Secure Sealing" in
both sections
-- clarify the --disk-usage command
[zj: perform similar changes to zsh completions]
squash! journalctl: fix several issues in --help message text |
faf5077f891aa249270b2a3d9f0104c3eec02da6 |
|
12-Dec-2013 |
Djalal Harouni <tixxdz@opendz.org> |
journal: pipe journalctl help output into a pager
journalctl help output might run off the screen, so be consistent
as other systemd tools do and pipe it into a pager. |
b6741478e7661c7e580e5dcfd6a6fccd1899c1d0 |
|
11-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: add ability to browse journals of running OS containers
This adds the new library call sd_journal_open_container() and a new
"-M" switch to journalctl. Particular care is taken that journalctl's
"-b" switch resolves to the current boot ID of the container, not the
host. |
2b6bf07dd23bb467099d213c97b3875c5e453491 |
|
07-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Get rid of our reimplementation of basename
The only problem is that libgen.h #defines basename to point to it's
own broken implementation instead of the GNU one. This can be fixed
by #undefining basename. |
4561be3a64534a911ee405ffb51950a624a0cd3f |
|
19-Nov-2013 |
Karel Zak <kzak@redhat.com> |
Remove duplicate includes |
eb9da376d76b48585b3b63b4f91903b54f7abd36 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: unify how we invoke getopt_long()
Among other things this makes sure we always expose a --version command
and show it in the help texts. |
f11880744c27209a42f502c690db86b38d2db14b |
|
29-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: add --list-boots to show boot IDs and times
Suggested by David Wilkins <dwilkins@maths.tcd.ie> in
https://bugzilla.redhat.com/show_bug.cgi?id=967521:
> [Specific boot ID is a] bit of a palaver to obtain. I consulted the
> verbose dump of the journal to discover the _BOOT_ID for the
> timestamp, and then generated the journal dump for that boot using
> journalctl _BOOT_ID=foo -o short-monotonic. |
7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 |
|
13-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero. |
2b8f6883a17b9386299b7690869ccd8e20fe0347 |
|
08-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: flip to --full by default
We already shew lines in full when using a pager or not on a
tty. The commit disables ellipsization in the sole remaining case,
namely when --follow is used.
This has been a popular request for a long time, and indeed, full
output seems much more useful. Old behaviour can still be requested by
using --no-full. Old options retain their behaviour for compatiblity,
but aren't advertised as much. This change applies only to jornalctl,
not to systemctl, when ellipsization is useful to keep the layout.
https://bugzilla.redhat.com/show_bug.cgi?id=984758 |
289f910e16d0a962e128979b67fed5f2ef668e00 |
|
10-Sep-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journald: be a bit more verbose when vacuuming
Vacuuming behaviour is a bit confusing, and/or we have some bugs,
so those additional messages should help to find out what's going
on. Also, rotation of journal files shouldn't be happening too
often, so the level of the messages is bumped to info, so that
they'll be logged under normal operation. |
f02d836794d519e717e51d81501557da55915ce2 |
|
21-Aug-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logs-show: add short-precise mode with us timestamps
Also, always show us timestamps in verbose mode.
https://bugzilla.redhat.com/show_bug.cgi?id=991678 |
94e0bd7db1d7ca8ab7f738cdab1d014241f5b225 |
|
12-Aug-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: show hint about --full when lines don't fit |
0b5a519c89b5fb48ec7a3cfbd9c02283ae0f23ac |
|
04-Aug-2013 |
Daniel Schaal <farbing@web.de> |
systemd-delta: Only print colors when on a tty
This make systemd-delta follow the behaviour of systemctl
and journalctl.
https://bugs.freedesktop.org/show_bug.cgi?id=67656
[zj: unify color query methods between those three programs.] |
68fee104e630eb19f04b8196a83c14c2c9c469e7 |
|
26-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: use _COMM= match for scripts
In case of scripts, _EXE is set to the interpreter name, and
_COMM is set based on the file name. Add a match for _COMM,
and _EXE if the interpreter is not a link (e.g. for yum,
the interpreter is /usr/bin/python, but it is a link to
/usr/bin/python2, which in turn is a link to /usr/bin/python2.7,
at least on Fedora, so we end up with _EXE=/usr/bin/python2.7).
I don't think that such link chasing makes sense, because
the final _EXE name is more likely to change. |
44bc6e1fe0171af19451b5586f7fdd08853ccf5b |
|
18-Jul-2013 |
Tomasz Torcz <tomek@pipebreaker.pl> |
journalctl: add ”short-iso” output format with verbose ISO8601 timestamps
Example:
2013-07-18T10:10:01+0200 sandworm CROND[20957]: (root) CMD (/usr/lib64/sa/sa1 1 1) |
a54e3b3d6a4fe28a39729f4c5ad11cd26706110c |
|
18-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: fix signedness warning and boot-id syntax check |
d121b396ccb19dc33aacfc75a7f7a719914267c8 |
|
18-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: remove ":" from the --boot syntax
Instead of :-0, :1, :5, etc., use -0, 1 or +1, 5, etc. For BOOT_ID+OFFSET,
use BOOT_ID+offset or BOOT_ID-offset (either + or - is required).
Also make error handling a bit more robust and verbose.
Modify the man page to describe the most common case (-b) first,
and the second most common case (-b -1) second. |
4ad16808c02e3eb6c1ec8500b3d086cc28e9b75a |
|
17-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl,systemctl: fix tiny memleak |
248fc619b5e3e24d78f171f95b85916eee7987bd |
|
17-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: augment short mode with a cursor at the end
Two options are added: --show-cursor to print the cursor at the end,
and --after-cursor to resume logs on the next line after the previous one. |
a331b5e6d4724365bad9edeb9420c7e26e7f50da |
|
16-Jul-2013 |
Jan Janssen <medhefgo@web.de> |
journalctl: Add support for showing messages from a previous boot
Hi,
I redid the boot ID look up to use enumerate_unique.
This is quite fast if the cache is warm but painfully slow if
it isn't. It has a slight chance of returning the wrong order if
realtime clock jumps around.
This one has to do n searches for every boot ID there is plus
a sort, so it depends heavily on cache hotness. This is in contrast
to the other way of look-up through filtering by a MESSAGE_ID,
which only needs about 1 seek + whatever amount of relative IDs
you want to walk.
I also have a linked-list + (in-place) mergesort version of this
patch, which has pretty much the same runtime. But since this one
is using libc sorting and armortized allocation, I prefer this
one.
To summarize: The MESSAGE_ID way is a *lot* faster but can be
incomplete due to rotation, while the enumerate+sort will find
every boot ID out there but will be painfully slow for large
journals and cold caches.
You choose :P
Jan |
b8547c10c82994f2b8eab4510629139439b49371 |
|
15-Jul-2013 |
Shawn Landden <shawnlandden@gmail.com> |
journalctl: add --force option to recreate FSS |
b98e3866fddf2edfa13fc1b4323aa84f89336ff2 |
|
13-Jul-2013 |
Shawn Landden <shawnlandden@gmail.com> |
journalctl: have a useful --setup-keys error message when using non-persistant logging
Generating seed...
Generating key pair...
Generating sealing key...
Failed to open /var/log/journal/33f46101703a10c5fc6fa4f451840101/fss.tmp.k2wDDU: No such file or directory |
98a6e132b5b85999f7e3dce158e826ffeecc1553 |
|
17-Jun-2013 |
Daniel Albers <daniel@lbe.rs> |
journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --full
https://bugs.freedesktop.org/show_bug.cgi?id=65850 |
8d98da3f1107529d5ba49aea1fa285f7264b7cba |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: allow the user to specify the file(s) to use
This is useful for debugging and feels pretty natural. For example
answering the question "is this big .journal file worth keeping?"
is made easier. |
3001c74580c1713bd634990a0b2ab351fdec7a98 |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: no color for --reboot-- when not on tty |
3f3a438f58d7b1d2ba2b44d6d356fb1eaa65b66a |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: add --system/--user flags
--user basically gives messages from your own systemd --user services.
--system basically gives messages from PID 1, kernel, and --system
services. Those two options are not exahustive, because a priviledged
user might be able to see messages from other users, and they will not
be shown with either or both of those flags. |
a72b63536f1da3a97677bf38590f22a962e5fe98 |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: fix verbose output when no logs are found
$ journalctl -o verbose _EXE=/quiet/binary -f
-- Logs begin at Sun 2013-03-17 17:28:22 EDT. --
Failed to get realtime timestamp: Cannot assign requested address
JOURNAL_FOREACH_DATA_RETVAL is added, which allows the caller
to get the return value from sd_journal_enumerate_data. I think
we might want to expose this macro like SD_JOURNAL_FOREACH_DATA,
but for now it is in journal-internal.h.
There's a change in behaviour for output_*, not only in
output_verbose, that errors in sd_j_enumerate_data are not silently
ignored anymore.
https://bugs.freedesktop.org/show_bug.cgi?id=56459 |
5ec76417764e19486261fb8e38e8e71b28185b37 |
|
04-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: limit logs in status to current boot
Also reworded a few debug messages for brevity, and added a log
statement which prints out the filter at debug level:
Journal filter: (((UNIT=sys-module-configfs.device AND _PID=1) OR (COREDUMP_UNIT=sys-module-configfs.device AND MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1) OR _SYSTEMD_UNIT=sys-module-configfs.device) AND _BOOT_ID=4e3c518ab0474c12ac8de7896fe6b154) |
99271804172f6ac51be9556b2bdf37d6a7e952bc |
|
15-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: add -k/--dmesg |
e724b0639c43c2821613fc4f7f755f87c49a22e8 |
|
07-May-2013 |
Lennart Poettering <lennart@poettering.net> |
hostname: only suppress setting of pretty hostname if it is non-equal to the static hostname and if the static hostname is set, too
https://bugzilla.redhat.com/show_bug.cgi?id=957814 |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
b9e405246e2f3b7149ef1f9924806441d17f004a |
|
17-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
journalctl: specify "--unit=" and "--user-unit" multiple times
Previously only one "--unit=" or "--user-unit" could be specified.
With this patch, journalcrtl can show multiple units.
$ journalctl -u systemd-udevd.service -u sshd.service -u crond.service -b
-- Logs begin at Sa 2013-03-23 11:08:45 CET, end at Fr 2013-04-12
09:10:22 CEST. --
Apr 12 08:41:37 lenovo systemd[1]: Started udev Kernel Device Manager.
Apr 12 08:41:37 lenovo systemd[1]: Stopped udev Kernel Device Manager.
Apr 12 08:41:38 lenovo systemd[1]: Started udev Kernel Device Manager.
Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (Syslog will be used
instead of sendmail.)
Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (running with inotify
support)
Apr 12 08:41:39 lenovo systemd[1]: Starting OpenSSH server daemon...
Apr 12 08:41:39 lenovo systemd[1]: Started OpenSSH server daemon.
Apr 12 08:41:39 lenovo sshd[355]: Server listening on 0.0.0.0 port 22.
Apr 12 08:41:39 lenovo sshd[355]: Server listening on :: port 22.
Apr 12 08:41:39 lenovo mtp-probe[373]: checking bus 1, device 8:
"/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6.2/1-1.5.6.2.1" |
cd34b3c6670df8a3fd49179131fe762b2dd86b01 |
|
17-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
journal: add one more level on top with AND
When using "-p" and "-b" in combination with "-u", the output is not
what you would expect. The reason is the sd_journal_add_disjunction()
call in add_matches_for_unit() and add_matches_for_user_unit(), which
adds two ORs without taking the other conditions to every OR.
Adding another level on top with AND and sd_journal_add_conjunction()
solves the problem.
Output before:
$ journalctl -o short-monotonic -ab -p 0 -u sshd.service
-- Reboot --
[ 3.216305] lenovo systemd[1]: Starting OpenSSH server daemon...
-- Reboot --
[ 3.168666] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 3.169639] lenovo systemd[1]: Started OpenSSH server daemon.
[36285.635389] lenovo systemd[1]: Stopped OpenSSH server daemon.
-- Reboot --
[ 10.838657] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 10.913698] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6881.035183] lenovo systemd[1]: Stopped OpenSSH server daemon.
-- Reboot --
[ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
[ 6.681379] lenovo sshd[397]: Server listening on :: port 22.
As we see, the output is from _every_ boot and priority 0 is not taken
into account.
Output after patch:
$ journalctl -o short-monotonic -ab -p 0 -u sshd.service
-- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:58:21 CET. --
Increasing the priority:
$ journalctl -o short-monotonic -ab -p 6 -u sshd.service
-- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:59:12 CET. --
[ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
[ 6.681379] lenovo sshd[397]: Server listening on :: port 22. |
21ae45930dab96b794f6faf027ad9ace64bc7b08 |
|
17-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: show fields requested with --field in full
I see little point in silently truncating fields when
they are explictly requested. With this change e.g.
journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART
works as expected. |
3a819b1b6289311ebf09e94c6240dfb6be7a0496 |
|
11-Apr-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
journalctl: check return of strjoin |
ee531d949c2f62374fc109252f8cbe61c2b8ee39 |
|
04-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: add public API call sd_journal_get_events()
This function should be used when filling in "struct pollfd"'s .events
field for watching the journal. It will always return POLLIN for now,
but we should keep our options open to change this later on.
This mimics libsystemd-bus' sd_bus_get_events() call with the same
purpose. |
2fa4092c2829dd14e50c430ae2f23551d23c6c1d |
|
04-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: make time formatting a bit smarter
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h
55.050003s". Also, while outputting the accuracy is configurable.
Basically we now try use "dot notation" for all time values > 1min. For
>= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and
finally 'us'.
This should give reasonably values in most cases. |
7f602784de4fd378120e8ebfe6d830862b9cae03 |
|
03-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: rename parse_usec() to parse_sec() sinds the default unit is seconds
Internally we store all time values in usec_t, however parse_usec()
actually was used mostly to parse values in seconds (unless explicit
units were specified to define a different unit). Hence, be clear about
this and name the function about what we pass into it, not what we get
out of it. |
fb93cf737549f2d5fce6cb76b1d5e8382c7537b8 |
|
01-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: reword error message
Sentence seemed to suggest that all three conditions must be true. |
0db809489fd88a320ae1023ffe36a9965e9a91b2 |
|
29-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: fix --update-catalog with not --root arg
grawity> `journalctl --update-catalog` from latest git prints:
"Recursive mkdir .: Invalid argument" and
"Failed to write : Invalid argument" |
13cbf3a5f0cf4a1d89413d0ffc4a9067b1d6d1a8 |
|
29-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: support --root for message catalogs |
844ec79b3c2f246114ea316ebe1f36044bdb688e |
|
29-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
catalog: open up catalog internals
In order to write tests for the catalog functions, they
are made non-static and start taking a 'database' parameter,
which is the name of a file with the preprocessed catalog
entries.
This makes it possible to make test-catalog part of the
normal test suite, since it now only operates on files
in /tmp.
Some more tests are added. |
3ac251b81a41295a90c89c164f0d72ce6de651aa |
|
23-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
journalctl: various fixes to the access check logic
- Reword messages a bit
- Correct check whether EACCES is in the set of errors
- Don't complain if no journal files are found
- allocate Set object for errors lazily since in the best case we don't
need it at all.
- don't consider it an error if /run/log/journal doesn't exist (because
that's the usual case actually, if storage is enabled) |
6fe391c56d3f4231576ccc9d62d2000f37640a92 |
|
22-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: be smarter about journal error checks
There are many ways in which we can get those checks wrong, so it is
better to warn and then error out on a real access failure.
The error messages are wrapped to <80 lines, because their primary
use is to be displayed in the terminal, and it is easier to read them
this way. Reading them in the journal can be a bit trickier, but
this is a bug in logs-show.c. |
478c82693c386e7a6e8e4b37cc99fb19b12e7186 |
|
22-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
build-sys: move acl searching code into libsystemd-acl
This loop over acls is a bit too much to keep inside
of another loop. |
4468addca6d01a0d2d154371dd72f54307a9c786 |
|
22-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
journalctl: give a nice hint about group membership based on ACLs of /var/log/journal
If we notice that we unprivileged and not in any of the groups which
have access to /var/log/journal, print a nice message about which groups
do.
This checks and prints all groups that are in the default ACL for
/var/log/journal, which is not necessarily correct for all journal
files, but pretty close. |
4750fade135aed733aa7a5fda7c670e6b4391538 |
|
21-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove some unused variables |
54b7254c1fa629937f92fd6fa34bdf127b696a00 |
|
20-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalct: beef up entry listing
The ability to dump catalog entries in full and by id is added. |
52aeb63cffcdb3701cdc2ca41868208de2347318 |
|
20-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: use _cleanup_ in one function |
763c7aa288485cf5ab627fe1d25ff58e76f9dacb |
|
19-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal,shared: add _cleanup_journal_close_ |
7199aa96ce19468d9ce4cb21a13e32a3792fde41 |
|
14-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: show systemd messages about unit for -u
journalctl -u unit is not very useful, because it doesn't show
systemd messages about starting, stopping, coredumps, etc,
like systemctl status unit does. Make it show the same
information using the same rules.
If somebody really want to see just messages from by the unit,
it is easy enough to use _SYSTEMD_UNIT=... |
fe59e38bef69568c385d10761132458606cdd896 |
|
07-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
journalctl: imply -n1000 when -e is used
Make sure the pager does not have to buffer an unbounded number of log
messages, by default. |
1b12a7b5896f94bdf33b3a6661ebabd761ea6adc |
|
07-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
pager: introduce "jump to end" option
$ journalctl -be
is what you want :)
https://bugzilla.redhat.com/show_bug.cgi?id=867841 |
99613ec5d7f0c6e30801457f60c2cab7d8e50d8d |
|
07-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
libsystemd-journal: return 0 on success in get_data()
The man page says so. Right now 0 would be returned if the data was encrypted,
1 otherwise. |
a24c64f03f9c5c0304451d8542fee853187a5168 |
|
05-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: introduce new "systemd-journal" group and make it own the journal files
Previously all journal files were owned by "adm". In order to allow
specific users to read the journal files without granting it access to
the full "adm" powers, introduce a new specific group for this.
"systemd-journal" has to be created by the packaging scripts manually at
installation time. It's a good idea to assign a static UID/GID to this
group, since /var/log/journal might be shared across machines via NFS.
This commit also grants read access to the journal files by default to
members of the "wheel" and "adm" groups via file system ACLs, since
these "almost-root" groups should be able to see what's going on on the
system. These ACLs are created by "make install". Packagers probably
need to duplicate this logic in their postinst scripts.
This also adds documentation how to grant access to the journal to
additional users or groups via fs ACLs. |
ffa7cd15cd2a9e802827ef0f5762de6c22933c07 |
|
01-Mar-2013 |
Daniel Wallace <danielwallace@gtmanfred.com> |
journalctl: add --user-unit= switch
Add --user-unit= to make it possible to query for user logs by the name
of the service. |
d89d6c86d9f141e0fb6939b7fc4f5ea068750690 |
|
01-Mar-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
journalctl: add --reverse option to show the newest lines first |
3ba09ee8eb9453daf9228f612c9bcd59905fcf05 |
|
24-Feb-2013 |
Paul W. Frields <stickster@gmail.com> |
journal: fix --until
https://bugs.freedesktop.org/show_bug.cgi?id=58946 |
d489071fb348cd180bc4f70e732b0e76d9804448 |
|
22-Feb-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalct: also print Python code in --new-id |
96088db02b2802049f1edbd44d5f8c2ea838f3f2 |
|
12-Feb-2013 |
Lennart Poettering <lennart@poettering.net> |
journalctl: allow both "-n 55" and "-n55" on the command line, as equivalent syntaxes
https://bugs.freedesktop.org/show_bug.cgi?id=60596 |
67e04a486b92fcb656049cb4d6b66148c7d2e61b |
|
29-Jan-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: allow --lines=0 i.e. only new
Makes it easier to watch just for new entries. Once scenario
is where the user starts 'journalctl -qfn0' to watch for changes
during some operation. |
244692cbfb46df5ff79d07da8fb848a1165bd2fb |
|
15-Jan-2013 |
David Herrmann <dh.herrmann@googlemail.com> |
journalctl: quit on I/O error
This makes journalctl quit on ferror() conditions on stdout. It fixes an
annoying bug if you pipe its output through 'less' and press 'q'. Without
this fix journalctl will continue reading all journal data until EOF which
can take quite some time. For instance on my machine:
david-nb ~ # time journalctl | wc -l
327240
real 1m13.039s
user 1m0.217s
sys 0m10.467s
However, expected behavior is journalctl to quit when its pager closed the
output pipe.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> |
bc2708414babc5c99bb8000e63c84e87606cc15d |
|
04-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore! |
e3657ecd7f9f9bd6a1719fc808639cd4b780674a |
|
17-Nov-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: add option to forgo ellipsization
Sometimes it is better to see messages in full, and the existing
set of options didn't allow this easily. E.g. now
journalctl -f --full
will behave like
tail -f /var/log/messages
of yore.
Long option only for now, since small letters are becoming
scarce, and this doesn't feel like a capital-letter-option.
'-u' would be nice, and the above command would be spelled
journalctl -fu |
83f6936a018b08880670838756e0f4e9ea98b4a7 |
|
16-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: extend catalog header to 64bit for all fields, just to be safe and follow the rest of the file formats |
d4205751d4643c272059a3728045929dd0e5e800 |
|
15-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: implement message catalog
The message catalog can be used to attach short help texts to log lines,
keyed by their MESSAGE_ID= fields. This is useful to help the
administrator understand the context and cause of a message, find
possible solutions and find further related documentation.
Since this is keyed off MESSAGE_ID= this will only work for native
journal messages.
The message catalog supports i18n, and is useful to augment english
language system messages with explanations in the local language.
This commit only includes short explanatory messages for a few example
message IDs, we'll add more complete documentation for the relevant
systemd messages later on. |
71c015969233c21ea38b1e63993d02fe171df672 |
|
15-Nov-2012 |
Lekensteyn <lekensteyn@gmail.com> |
journalctl: require argument for --priority
This fixes a segfault due to a missing value for --priority. -p is
unaffected because it is specified in the getopt_long parameter list. |
a9cdc94f7ff40f22a3cf9472f612a80730a1b010 |
|
12-Nov-2012 |
Dave Reisner <dreisner@archlinux.org> |
enable localization for common *ctl commands |
0901758558506273c0b7553dc3cae587f2b94290 |
|
02-Nov-2012 |
Michal Schmidt <mschmidt@redhat.com> |
util: add is_locale_utf8()
journalctl and vconsole-setup both implement utf8 locale detection.
Let's have a common function for it.
The next patch will add another use. |
db87a36e74ff26d1046a451ee086c9a2c4113d12 |
|
24-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: remove left-over log message |
ed757c0cb03eef50e8d9aeb4682401c3e9486f0b |
|
19-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
util: unify line caching and column caching |
8481248b9fbddc6d5e6ff26eb23505ef13dc85f7 |
|
19-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
util: unify usage of on_tty() in util.c |
f89a3b6f5bf695186e7b9e6cc63993b1272e7569 |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: unify ellipsation handling between journalctl and systemctl |
cd4b13e0bfe9281a0d2c0c3bef1c589d0684950b |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: don't ellipsize unless on a tty |
fd6e88753716d8136037277c7db2196e0f979675 |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: honour -n if -F is used |
15804cebfdf7bef91db1374967ee813cd4a93588 |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: move access check before the first access to the journal files |
15119c160268ce4ba9da4be67ed8adc412220b7d |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: implement quering field values with new -F switch
Example:
journalctl -F _SYSTEMD_UNIT
will list all units that ever logged to the journal. |
3c1668da6202f1ead3d4d3981b89e9da1a0e98e3 |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add ability to list values a specified field can take in all entries of the journal
The new 'unique' API allows listing all unique field values that a field
specified by a field name can take in all entries of the journal. This
allows answering queries such as "What units logged to the journal?",
"What hosts have logged into the journal?", "Which boot IDs have logged
into the journal?".
Ultimately this allows implementation of tools similar to lastlog based
on journal data.
Note that listing these field values will not work for journal files
created with older journald, as the field values are not indexed in
older files. |
c3f60ec54da2a5d1ba00cec6bb2c282f079aa3f6 |
|
16-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add --unit=/-u to match by unit name
This applies unit_name_mangle() to the specified unit names and hence
can handle weird characters nicely and will add unit suffixes as
necessary. |
9048b11f8b0173a3fbbbf6ce2716abba05d202ed |
|
16-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: harmonise in-stream comments
From now on, always use ANSI-SQL-style comments in log streams, i.e.
prefix with --. We also suffix things with this, just to be nice... |
edfb521a21c44f7b4c91d4ef6bffd84f2c241363 |
|
15-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: skip informational messages in export/json modes |
c3eba2ab4e70fc7aed902b1d5b1fcb978ef98dfa |
|
14-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: make --follow really work |
e3ed66c52ede243081a18f7bc99bf6ba3f885b86 |
|
13-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: make --follow work again
Stopped working after cfbc22ab 'journalctl: implement --since= and
--until for filtering by time'. |
cfbc22abd0525570a6e58968d518ea9a7d0403ba |
|
11-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: implement --since= and --until for filtering by time |
48383c251185c4596e9098878b28334c69e7bfd9 |
|
11-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: support epxorting the journal in a format suitable for text/event-stream |
ad9eafab9fb182388777bab4bc7d32fd84702198 |
|
10-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: properly parse --cursor= long getopt in addition to short -c |
7a69007a24cfff30158ea80665cb6c3c9d3251b0 |
|
09-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: implement follow mode for HTTP GET in gatewayd |
08ace05beb1d09b6ebc5e9cafc2b972b39fa2437 |
|
28-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
logs-show: various cleanups
Among other cleanups this introduces a threshold for the size of binary
blobs we serialize as integer arrays in the JSON output. THis can be
disabled via --all. |
8f14c8327b1c2b578bbf1235723a77931c3d0223 |
|
28-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add --cursor switch |
2a7b539a82a45202c0e990c45da25ccdc487d633 |
|
24-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: always pass first entry timestamp back from journal_file_verify() |
73726ac8983f46f9a39ad76c395e86d9bbfb470c |
|
24-Sep-2012 |
Mirco Tischler <mt-ml@gmx.de> |
journalctl: print correct timespan in verify
The old code used a timestamp to print a timespan for unsealed journalfiles,
incorrectly showing things like 2230 days of unsealed entries. Print the timespan
between the first and last entry instead. |
585314e84c1a2e8941309874088963985e063213 |
|
24-Sep-2012 |
Dave Reisner <dreisner@archlinux.org> |
journalctl: reset cached column count on SIGWINCH
This requires a little bit of tip-toeing around to explicitly avoid
touching the environment from a sig handler. Instead, simply create a
function to reset the var to its "unset" state, allowing the next call
to columns() to recalculate and cache the new value. |
1705594f597ed12f38bee309b3fdb3f691e2021b |
|
21-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: make the argument to -n optional |
cf5a3432117cfbe4249919d2e947295aa19879d3 |
|
12-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: print QR code only if we are running on an UTF-8 system |
a1a03e3075316e2376176fc54c74e071adc9d71a |
|
07-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add call to determine current journal file disk usage |
cd931c0a464da9d0555e6a8e83c1aba176c0971b |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: show "Reboot" markers in output only when showing local-only entries |
9e8a535faa370bab283cb2c3c52b0a0d44e9d193 |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: replace --local by --merge, i.e. don't interleave remote journals by default |
a6e87e90ede66815989ba2db92a07102a69906fe |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: rework JSON output mode
This splits the JSON output mode into different modes: json and
json-pretty. The former printing one entry per line, the latter showing
JSON objects nicely indented and in multiple lines to make it easier to
read for humans. |
99add6fd0b8f4307ed79256e25f38da318e795c4 |
|
22-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: complain if unprivileged users attempt to access the journal and persistant logging is off |
c0ca7aeec963207b6fa5ee39bd204cb26cba4023 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: be more friendly when informing about seal verification |
cedb42bb694ef866b18608b14ac269d1ef7513f8 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add a bit of color to the output |
89fef99014662a5a63e7deaedd6292b7fb4ab2f8 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: automatically evolve FSS key even when nothing is logged |
c05276f23e216a706936f1ee45a7005f86b3599c |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: reword things a bit |
adac1c93ab355b8aa45ecbcf7879ec98b44d36f8 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: rearrange QR code output a bit to fi to 80x25 terminals |
197c0da22536121acc1377525458844a5ccabb7d |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: explain QR code use |
f6a971bc0bf1252e9614919ccca0d53db5fc53d9 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: output FSS key as QR code on generating |
feb12d3ed2c7f9132c64773c7c41b9e3a608a814 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: make libgcrypt dependency optional |
f7fab8a5ae7a3b378040203821383f5a8fc91126 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix tag ordering check |
b72631e59c1b9f62bcfaf1ce3f7e72e4a3beee89 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
jounral: write bit fiddling test
This test goes through every single bit in a journal file, toggles it,
and checks if this change is detected by the verification. |
f982e6f7612401a9a789bb8f40d2adca34c85c10 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: set secure deletion flags for FSS file |
6c7be122acd666d4e93541179d89747aa12efb67 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: after verification output validated time range |
baed47c3c20512507e497058d388782400a072f6 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: rework terminology
Let's clean up our terminology a bit. New terminology:
FSS = Forward Secure Sealing
FSPRG = Forward Secure Pseudo-Random Generator
FSS is the combination of FSPRG and a HMAC.
Sealing = process of adding authentication tags to the journal.
Verification = process of checking authentication tags to the journal.
Sealing Key = The key used for adding authentication tags to the journal.
Verification Key = The key used for checking authentication tags of the journal.
Key pair = The pair of Sealing Key and Verification Key
Internally, the Sealing Key is the combination of the FSPRG State plus
change interval/start time.
Internally, the Verification Key is the combination of the FSPRG Seed
plus change interval/start time. |
14d10188de1fd58e663d73683a400d8d7dc67dba |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add FSPRG journal authentication |
56e81f7ca8276e40f8c88c4c30713a5b54009613 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: immeidately terminate on invalid seed |
4da416aa20b956571d74720bc91222881443e24b |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add --verify-seed= switch to specify seed value |
0284adc6a60ce0af1107cb0b50041a65d731f39e |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: split up journal-file.c |
beec00856158b703f2125a3d936080346a8a8de1 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: implement basic journal file verification logic |
b0af6f41ea67c97b8beb16fd1d63042379bbf103 |
|
13-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add all objects we add to HMAC |
7560fffcd2531786b9c1ca657667a43e90331326 |
|
13-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
b6a345143bf6ffdc87a7149015f75c03be440b10 |
|
09-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: support device node matches as shortcut |
941e990db1f2682abaa2966b1c48602901d0c599 |
|
27-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add --priority= switch for filtering by priority |
498261871dfa2a930ec84b13a176e3bdc43aa212 |
|
26-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: hightlight log lines by priority
warn/notice = bright white
< error = red |
0d0f0c50d3a1d90f03972a6abb82e6413daaa583 |
|
26-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
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 |
669241a076108e0483d7d8475beaa506106d077e |
|
25-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
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 |
fafb6eccc2c9e3f8d6ce0aad9cb428f8cc402b24 |
|
23-Jul-2012 |
Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> |
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." |
92a1fd9e95954a557d6fe27b56f5ef1b89fc2f5e |
|
17-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
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. |
25277cd7fbd77e4c8b20572570aa77c7da9abcc2 |
|
17-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
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. |
dca6219e04505e9fa10b32e71059ce2abfae1dad |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
cbdca8525b4f36297cb9e5cb090a9648763ed1bf |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
14a65d65a0c25ba4809b8d97f54ebf3e12eac84c |
|
11-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
a963990ff4ebc7908d3cf82bbd8cf34a42d57b7f |
|
11-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
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 |
e02d1cf72d115d1d61defdca5b551672d876c6bd |
|
10-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: introduce sd_journal_wait() to simplify writing synchronous clients |
59cea26a349cfa8db906b520dac72563dd773ff2 |
|
02-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add new switch -b to show data from current boot only |
089842938dd0f4080084044bb9a1a3b00137926a |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
e51240886f54e0128b1711c7dd0454b23e3f7d5e |
|
30-May-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: check first if match is a path name |
509407003de0c77259e5e46b567d2a464acbb6f4 |
|
30-May-2012 |
Shawn Landden <shawnlandden@gmail.com> |
journalctl: support /usr/bin/nginx, etc |
89834a7c1c5f194d072d42d1c30077f5b2c207ec |
|
21-May-2012 |
Daniel Mack <zonque@gmail.com> |
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. |
5430f7f2bc7330f3088b894166bf3524a067e3d8 |
|
12-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
2bd3c38a44c5c3acbf5afdb9c0bcbaf4a72dac3f |
|
27-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add --local switch |
2af777ba966fcaefb02e87524583917726a470a1 |
|
16-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
man: document systemd-journalctl(1) |
34a35eced40860181757abe5ec00ac0e5d8d0225 |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
a couple of fixes to make llvm-analyze quiet |
490e567dbb12928528d395d2c759b80960312e8f |
|
15-Mar-2012 |
Tero Roponen <tero.roponen@gmail.com> |
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. |
4f4d6a7073e6aa740291bbe54da809024d372955 |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: suppress messages about adm group if ACL support is not enabled |
4367379907f40cbe7df6a64e51c36f34dd854197 |
|
14-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: warn if the user is not in the adm group |
8f2d43a0121bc9a57ba8b79b33d5ac87d36ca2f2 |
|
22-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
cgtop: add new cgtop tool |
62f21ec91ad8e7e24079962f4df066b0094fe68d |
|
18-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: properly honour -n when -f is passed, too |
d3f2bdbfee94a4cd124b66e610f4b926b749e192 |
|
13-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add output mode that just prints simple messages without any decorations |
d1e44dd8271c0e1348bbdb0046f8fa2437c4a567 |
|
11-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: fix --help text |
67a122058b077efaed3b07706e91761e09de4f59 |
|
07-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add new short-monotonic output mode |
39f7f5c108a55b8f6898154d4f7702a3443ac4d0 |
|
07-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: rename --new-id to --new-id128 in order not to introduce yet another new name |
55ee336cdcb57efe2ef9a4152f5b9e1063ec1a06 |
|
05-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add --new-id switch to generate a new 128Bit id |
81527be142678057215665be66e4b3c8306a7ab3 |
|
05-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
build-sys: move public header files into a dir of their own |
df50185b43916926a72246ab3a80875eda7ad2a3 |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: beef up journal output of systemctl and journalctl |
e91af489a25e8bb65016a63f533ae28a505119ef |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: only output 10 most recent lines in --follow mode |
6f003b43043da7b57c0ebe15b86856c8248fea4a |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: fix counting of -n parameter |
2100675e9fe0707fae8cee13fbe9316e94ef98f9 |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add -n switch |
86aa7ba4f9969bbfc75ebd51f944313695f1a0a1 |
|
03-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: hook up systemctl with the journal |
b3a0ad5ab142a142ab526aeb3d0b69e98e4e523c |
|
30-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: disable default debug logging |
cf244689e9d1ab50082c9ddd0f3c4d1eb982badc |
|
29-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journald: flush /run to /var as soon as it becomes available |
0d43c6944bbca30d5692d4b02885f007a0c630c8 |
|
21-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add command line parsing |
72f597065c60fbfca501a8d8c29e9a11cb740946 |
|
21-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journalctl: add json, export, short and verbose output modes |
50f20cfdb0f127e415ab38c024d9ca7a3602f74b |
|
19-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement inotify-based live logging logic |
de190aef08bb267b645205a747762df573b36834 |
|
08-Nov-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement multiple field matches |
8725d60ae4f7a8471aa8a0207fa105e335d069a6 |
|
15-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement seek to head/tail |
de7b95cdc3228131498021c2fdcf6647004c3920 |
|
15-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: properly implement matching with multiple matches |
c2373f848dddcc1827cf715c5ef778dc8d475761 |
|
14-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: synchronize seqnum across files |
3fbf9cbb02690e40cd65802e777519f3f3c8d88a |
|
14-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement parallel file traversal |
0ac38b707212e9aa40e25d65ffbae648cc9116f5 |
|
13-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implementation rotation |
250d54b5bee6a46fe1c1626211e3a7e238eda628 |
|
12-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journalctl: find journal files in right path |
cec736d21ff86c4ac81b4d306ddba2120333818c |
|
08-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement parallel traversal in client |
260a2be45522f03ce8d8aca38e471d7b0882ff05 |
|
07-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: replace linked list by hashmap when merging files |
87d2c1ff6a7375f03476767e6f59454bcc5cd04b |
|
07-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: add preliminary incomplete implementation |