Bug 64293 - journalctl -n wrong output
Summary: journalctl -n wrong output
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 21:08 UTC by Jonas H.
Modified: 2018-03-09 08:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jonas H. 2013-05-06 21:08:38 UTC
Weird behavior regarding journalctl -n: Increasing the -n argument by 1 changes the output completely

$ journalctl -n 1002 | head
-- Logs begin at Tue 2013-04-09 12:08:24 CEST, end at Sun 2060-02-15 19:22:01 CET. --
May 06 22:15:06 x201 ...
May 06 22:15:06 x201 ...
May 06 22:15:06 x201 ...

$ journalctl -n 1003 | head                                                                                                                                                                             23:05 
-- Logs begin at Tue 2013-04-09 12:08:24 CEST, end at Sun 2060-02-15 19:22:01 CET. --
May 06 13:01:29 x201 ...
-- Reboot --
May 06 13:40:09 x201 ...
May 06 13:40:09 x201 ...

Just look at the time stamps. Doesn't make too much sense if -n should behave similar to head/tail's -n.
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-06-10 14:53:12 UTC
Can you check if http://cgit.freedesktop.org/systemd/systemd/commit/?id=87011c25d9 fixes things for you? Also,
http://cgit.freedesktop.org/systemd/systemd/commit/?id=cbd671772 should fix one the ways that looped journals are produced, but it won't immediately help if you have such journals currently.
Comment 2 Jonas H. 2013-06-12 07:59:33 UTC
Can't reproduce it in the old version right now so I really can't say anything.

I'll try again in a few days.
Comment 3 Zbigniew Jedrzejewski-Szmek 2018-03-09 08:00:45 UTC
Closing all stale bugs with NEEDINFO. Please open a new bug at https://github.com/systemd/issues if the problem still occurs.


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.