Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Replace time journald message for a fixed tail
Browse files Browse the repository at this point in the history
If the clock of the device is with a wrong data, systemd will not send
the output of 15 minutes ago. journalctl will return that the timestamp is
invalid. Since this patch replaces the use of the time by a fixed number
this problem will not occur anymore.

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
  • Loading branch information
Bruno Bottazzini committed Nov 4, 2015
1 parent 6f88cff commit 22a6afb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/journalctl-unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

SYSTEMD_UNIT="fbp-runner@$(systemd-escape $1).service"
journalctl -o json-pretty --since="15 min ago" --no-pager -u "$SYSTEMD_UNIT"
journalctl -o json-pretty -n 100 --no-pager -u "$SYSTEMD_UNIT"
2 changes: 1 addition & 1 deletion server/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
var child;
if (!unit_name) {
child = spawn('journalctl',
['-o', 'json-pretty', '--since=15 min ago', '--no-pager']);
['-o', 'json-pretty', '-n', '100', '--no-pager']);

child.on('error', function(err) {
error = true;
Expand Down

0 comments on commit 22a6afb

Please sign in to comment.