LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-29-2015, 06:20 PM   #1
JKostaRibeiro
Member
 
Registered: Jul 2014
Posts: 70

Rep: Reputation: 2
Display systemd journal's archived logs


I have systemd journal's archived logs that I need to view.
How can I do it?

This command is not worthwhile:
Code:
$ journalctl --since=yesterday
It showed me today's logs.

Last edited by JKostaRibeiro; 06-29-2015 at 06:32 PM.
 
Old 06-30-2015, 11:37 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I am not quite sure what you are trying to do. If you want to look at archived log files use the -D option.
 
Old 07-01-2015, 06:19 PM   #3
JKostaRibeiro
Member
 
Registered: Jul 2014
Posts: 70

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by TobiSGD View Post
I am not quite sure what you are trying to do. If you want to look at archived log files use the -D option.
I removed my systemd journal logs at June 25.
So, I must have systemd journal logs from June 26 to July 1 but I can only see logs from June 29 to July 1.
I want to view the logs from June 26 to June 29.
They should have been archived...

Systemd journal log files:

Code:
$ ls -1s /var/log/journal/*/
total 57344
 8192 system@bcaa2f2178c7450d9ab5bb5d1c496892-000000000001c5ba-000519acc5b3571d.journal
 8192 system@bcaa2f2178c7450d9ab5bb5d1c496892-000000000001fa65-000519ad0ff00bd2.journal
 8192 system.journal
16384 user-1000@ee13e6436422421da906549125cdc0fa-000000000001c5b9-000519acc5b355e5.journal
16384 user-1000.journal
Code:
journalctl --file=system@bcaa2f2178c7450d9ab5bb5d1c496892-000000000001c5ba-000519acc5b3571d.journal
-- Logs begin at Seg 2015-06-29 20:05:25 WEST, end at Seg 2015-06-29 20:25:40 WEST. --
.......................................................................................
.......................................................................................
.......................................................................................

$ journalctl --file=system@bcaa2f2178c7450d9ab5bb5d1c496892-000000000001fa65-000519ad0ff00bd2.journal
-- Logs begin at Seg 2015-06-29 20:26:10 WEST, end at Seg 2015-06-29 23:02:30 WEST. --
.......................................................................................
.......................................................................................
.......................................................................................

$ journalctl --file=system.journal                                                                   
-- Logs begin at Seg 2015-06-29 23:04:13 WEST, end at Qua 2015-07-01 23:05:39 WEST. --
.......................................................................................
.......................................................................................
.......................................................................................

$ journalctl --file=user-1000@ee13e6436422421da906549125cdc0fa-000000000001c5b9-000519acc5b355e5.journal
-- Logs begin at Seg 2015-06-29 20:05:25 WEST, end at Seg 2015-06-29 20:25:51 WEST. --
.......................................................................................
.......................................................................................
.......................................................................................

$ journalctl --file=user-1000.journal                                                                   
-- Logs begin at Seg 2015-06-29 23:03:16 WEST, end at Qua 2015-07-01 23:11:15 WEST. --
.......................................................................................
.......................................................................................
.......................................................................................

but I think they disappeared...


Here is my journald.conf:

Code:
$ grep -v "#" /etc/systemd/journald.conf 

Storage=persistent
SystemMaxUse=50M
SystemMaxFileSize=16M
RuntimeMaxUse=32M
RuntimeMaxFileSize=12M
Another question: I set SystemMaxUse to 50M but actually systemd journal logs are occupying 57M(57344). Is it normal?
 
Old 07-01-2015, 09:11 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,287

Rep: Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165
Quote:
Originally Posted by journalctl_manpage
Output is interleaved from all accessible journal files, whether they are rotated or currently being written, and regardless of whether they belong to the system itself or are accessible user journals.
Seems to be true in my case - I have 58 files date-stamped from June last year to today. Journalctl itself shows logs from May 30 2014 to current.
 
Old 07-03-2015, 04:40 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Code:
man journalctl:
--since= --until=
you can specify the absolute dates for which you want to see journals.
relative dates are only yesterday, today and tomorrow (?).

so, if you want everything until yesterday's logs, you would use
Code:
journalctl --until=yesterday
- that would exclude today's logs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Automatically trigger actions on systemd's journal messages LXer Syndicated Linux News 0 10-08-2013 09:11 AM
Proposed System Wide Change for Fedora 20: No Default Syslog, only systemd journal jeremy Linux - News 0 07-18-2013 11:35 AM
LXer: Systemd journal provides more informative messages LXer Syndicated Linux News 0 11-19-2012 10:41 AM
archived logs exboy Linux - Newbie 3 04-20-2009 09:35 AM
What are the best utilities to look through archived logs? abefroman Linux - Security 3 04-24-2008 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration