Author Topic: [How-to] Limit the size of .log files & the journal:  (Read 7441 times)

0 Members and 1 Guest are viewing this topic.

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-to] Limit the size of .log files & the journal:
« Reply #30 on: 12. February 2014, 02:34:44 »
I've cleaned up the wiki page in the journal section some. Added a few more helpful points that are easy to do. They make it easier to use the journalctl command & also show how to pipe (send) its ouput to Less, so that any of us who due to our display hardware & settings that were getting truncated output, no longer have to worry about that.

Using the following command & pasting its output into the forum when required, is much easier than wrestling with .log files to find all of the errors or worse, since the last boot:

Code: [Select]
journalctl -b -p err|less
Check out this section down to the .log file section if you want to take advantage of the "easy" way: ;)

The Jouralctl command - a quick reference:


[edit:] 31-8-15 - corrected the above wiki url.
« Last Edit: 31. August 2015, 08:11:25 by handy »
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline tibi

  • Vollwertiges Mitglied
  • ***
  • Posts: 101
  • Branch: ManjaroLinux 0.8.9 Ascella
  • Desktop: Xfce
  • GPU Card: Intel HD3000 i7 integrated
  • GPU driver: free
  • Kernel: linux310-x64
  • Skill: Novice
Re: [How-to] Limit the size of .log files & the journal:
« Reply #31 on: 19. June 2014, 23:07:20 »
I was just checking the space usage and I see that /var/log is 1.5Gb which I thinks is a little to much with atop ~175Mb and journal ~ 1.3Gb. I would like to keep journal size in a reasonable size. How I do that?

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-to] Limit the size of .log files & the journal:
« Reply #32 on: 20. June 2014, 01:49:00 »
You don't have to manage the journal size, it manages its size on its own, relating to how much free space there is on the partition, it deletes the older records as & when it needs to so as to maintain plenty of free space on the drive. You can set a maximum for it, though don't expect to see radical changes in its size in a hurry, it has its own inbuilt system for reducing its size which is somewhat dynamic.

I was concerned about the journal size thing a long time ago now. It is what started my delving into how the journal works which bought about this thread & the wiki page.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline aaditya

  • OpenRC Team
  • ****
  • Posts: 2844
    • My Website
  • Branch: Testing
  • Desktop: Xfce, Openbox
  • GPU Card: Intel HD 4000
  • Kernel: Linux 4.4 x86_64
  • Skill: Intermediate
Re: [How-to] Limit the size of .log files & the journal:
« Reply #33 on: 20. June 2014, 05:12:12 »
I was just checking the space usage and I see that /var/log is 1.5Gb which I thinks is a little to much with atop ~175Mb and journal ~ 1.3Gb. I would like to keep journal size in a reasonable size. How I do that?
I think its possible..
Here is a forum topic and a wiki article.
(The wiki article is shorter and more precise)

Offline tibi

  • Vollwertiges Mitglied
  • ***
  • Posts: 101
  • Branch: ManjaroLinux 0.8.9 Ascella
  • Desktop: Xfce
  • GPU Card: Intel HD3000 i7 integrated
  • GPU driver: free
  • Kernel: linux310-x64
  • Skill: Novice
Re: [How-to] Limit the size of .log files & the journal:
« Reply #34 on: 20. June 2014, 08:38:43 »
@additya
Worked like a charm

@handy
Thanks for the wiki.

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-to] Limit the size of .log files & the journal:
« Reply #35 on: 31. August 2015, 08:12:41 »
Gone through this thread & fixed the 2 or 3 bad wiki page url's that existed.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak