Announcement

Collapse
No announcement yet.

[Answered] A question about log files

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Answered] A question about log files

    Greetings all,

    I have been wondering about this for quite some time, now, and decided that this was as good a time as any to ask this.

    I am assuming that it would be fine to delete old log files such as "syslog.X.gz" since they are old and zipped and I believe of no intrinsic value. The only real value I can see would be to back track to see when something happens to cause a PC to get flaky. My one concern would be that the logging program renames each file as a new zipped file is created. Would this program keep a record of the files it has gzipped? And, if so, would deleting the oldest files mess with it in an adverse fashion?

    Would it be okay to delete all but one (1) of the zipped log files and continue this, perhaps, on a weekly basis?

    A bit of wondering in the Mid-West, U.S.A.

    Rick
    "Without rules, there would be chaos and with chaos, there would be no peace." - Me

    #2
    Re: A question about log files

    The log files are "maintained" by the logrotate.

    man logrotate
    NAME
    logrotate - rotates, compresses, and mails system logs

    SYNOPSIS
    logrotate [-dv] [-f|--force] [-s|--state file] config_file ..

    DESCRIPTION

    logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large...
    The default logrotate configuration file is: /etc/logrotate.conf.

    Here it has:
    # keep 4 weeks worth of backlogs
    rotate 4
    You could try smaller value (1) if you want faster rotation. "on a weekly basis" as you wrote.


    More:

    > HOWTO find Kubuntu's manual / reference / guide / documentation / help
    > Rotating Linux Log Files
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Re: A question about log files

      Originally posted by Rog131
      The log files are "maintained" by the logrotate.

      -[ snip ]-

      The default logrotate configuration file is: /etc/logrotate.conf.

      Here it has:
      # keep 4 weeks worth of backlogs
      rotate 4
      You could try smaller value (1) if you want faster rotation. "on a weekly basis" as you wrote.


      More:

      > HOWTO find Kubuntu's manual / reference / guide / documentation / help
      > Rotating Linux Log Files
      Greetings Rog131,

      Thank you so much for the reply. I shall look into the logrotate program and see about configuring it to my liking. This is great! Just what I was seeking!

      Thanks again!

      Learning more in the Mid-West, U.S.A.

      Rick
      "Without rules, there would be chaos and with chaos, there would be no peace." - Me

      Comment

      Working...
      X