Bug 64293

Summary: journalctl -n wrong output
Product: systemd Reporter: Jonas H. <jonas>
Component: generalAssignee: systemd-bugs
Status: RESOLVED WONTFIX QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: jonas
Version: unspecified   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=64296
https://bugs.freedesktop.org/show_bug.cgi?id=59856
https://bugs.freedesktop.org/show_bug.cgi?id=64291
Whiteboard:
i915 platform: i915 features:

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.