Bug 89111 - journalctl exits with nonzero exit status if no messages in time span
Summary: journalctl exits with nonzero exit status if no messages in time span
Status: NEW
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-12 22:35 UTC by Michael Herold
Modified: 2015-03-15 21:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Michael Herold 2015-02-12 22:35:08 UTC
The following command as daily cron can sometimes serve as a simple logwatch replacement:

journalctl --no-pager -q -p err -u my.service --until now --since -24h

However, if there are no warnings in the last 24h journalctl exits with nonzero exit status and prints "Failed to determine timestamp: Cannot assign requested address" to stderr.

First, it would be nice if (at least with -q) there is no output in this case and the exit status is 0. Second, I do not understand the error message.

There is a similar bug #71548, however the exit status in this case is a bit more reasonable, while the error message there is also very confusing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.