<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - journalctl exits with nonzero exit status if no messages in time span"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89111">89111</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>journalctl exits with nonzero exit status if no messages in time span
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>quabla@hemio.de
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>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 <a class="bz_bug_link
bz_status_NEW "
title="NEW - journalctl fails with no matches"
href="show_bug.cgi?id=71548">bug #71548</a>, however the exit status in this case is a bit
more reasonable, while the error message there is also very confusing.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>