Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: What runs logrotate in OpenSUSE 13.2?

  1. #1
    Join Date
    Jun 2008
    Location
    Kirkland WA
    Posts
    24

    Default What runs logrotate in OpenSUSE 13.2?

    Hi, where is the code that starts logrotate in OpenSUSE 13.2? I can't find it anywhere. It's not started by cron in /etc/cron.daily, /etc/cron.weekly, /etc/crontab, /etc/cron.d, or any other place associated with cron that I can find.

    Thanks!

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,703

    Default Re: What runs logrotate in OpenSUSE 13.2?

    13.2 uses a different systemd logging system. If you need the old logs you will need to install one of the older logging systems

  3. #3

    Default Re: What runs logrotate in OpenSUSE 13.2?

    logrotate is a systemd service in 13.2 (/usr/lib/systemd/system/logrotate.service) and it is run periodically by a systemd timer (not cron).
    Have a look at /usr/lib/systemd/system/logrotate.timer and "man systemd.timer".

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,673
    Blog Entries
    15

    Default Re: What runs logrotate in OpenSUSE 13.2?

    Quote Originally Posted by bls View Post
    Hi, where is the code that starts logrotate in OpenSUSE 13.2? I can't find it anywhere. It's not started by cron in /etc/cron.daily, /etc/cron.weekly, /etc/crontab, /etc/cron.d, or any other place associated with cron that I can find.

    Thanks!
    Hi
    Probably /etc/logrotated.conf and the files in /etc/logrotate.d/ along with the static systemd service logrotate.service The status can be seen via /var/lib/logrotate.status
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jun 2008
    Location
    Kirkland WA
    Posts
    24

    Default Re: What runs logrotate in OpenSUSE 13.2?

    @gogalthorp: Yes, I know that. Even if I wasn't running syslog-ng, there are still services that write their own logs.

    @wolfi323: Thank you! I was going crazy, and obviously I haven't fully synced with all of the new features in systemd.

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: What runs logrotate in OpenSUSE 13.2?

    On 2014-12-29 18:16, wolfi323 wrote:

    > Have a look at /usr/lib/systemd/system/logrotate.timer and "man
    > systemd.timer".


    Code:
    oS-13-2:~ # rpm -qf /usr/lib/systemd/system/logrotate.timer
    logrotate-3.8.7-6.1.2.x86_64
    oS-13-2:~ #
    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  7. #7

    Lightbulb Re: What runs logrotate in OpenSUSE 13.2?

    This is a severe bug, imo. The above answers are somewhat correct, but a better explanation of the problem & solution is under this bug report:
    https://bugzilla.novell.com/show_bug.cgi?id=913421
    ("logrotate not running after update from 13.1 to 13.2")

    Posted for those seeking help in the future, because it seems a lot of people suffer from this problem (but rarely notice, because who checks log sizes until it's too late?)

  8. #8
    Join Date
    Jun 2008
    Location
    Florida, USA
    Posts
    970

    Default Re: What runs logrotate in OpenSUSE 13.2?

    I have been tracking the referenced bug report and see no solutions for my problem - I sleep my machine most every night, so an "OnBoot" derived timer won't help.

    Until
    Code:
    Comment 4:
    That would be solved by Persistent=true in the logrotate.timer.
    (it triggers immediately if it would run when it was inactive)
    Unfortunately the systemd in 13.2 doesn't support that.
    Gets resolved (works again), it seems my best options are to change the timer to run daily at an hour the computer is likely to be on.
    Or, set a reminder for myself and run logratate manually, I suppose.

    Any better thoughts?
    Desk: i7-4790K Leap 15.1(x86_64)4.12.14-lp151.28.7-default KF5 59.0 Plasma 5.14.4 Qt 5.13.0
    Lap: HPDV7T i7 Leap 15.0(x86_64)4.12.14-lp151.28.7-default KF5 59.0 Plasma 5.14.4 Qt 5.13.0

  9. #9

    Default Re: What runs logrotate in OpenSUSE 13.2?

    It's running on my wife's 13.2 box -- systemctl list-timers shows it. And I know I didn't start it...

  10. #10
    Join Date
    Jun 2008
    Location
    Florida, USA
    Posts
    970

    Default Re: What runs logrotate in OpenSUSE 13.2?

    Thanks for the observations, susesteve.

    logrotate.timer is running on my machine as well, but logs are not being rotated because I am seldom running at 12AM (midnight when the timer is set to run (the default - daily).

    My observations, and understanding of the issue in the bug report, is that unlike cron (13.1 and prior), is that logrotate will only be run if the system is UP when. the timer is set to be triggered (exactly, plus minus accuracy). cron timers would catchup if a timer was set for 12:00AM but the system was DOWN (e.g. suspended)

    The terminology is that Persistent=true is not functional with the 13.2 systemd setup.

    Are logs on your wife's machine being rotated? By default, they should rotate weekly.
    Is her computer 'UP' at 12AM?
    Desk: i7-4790K Leap 15.1(x86_64)4.12.14-lp151.28.7-default KF5 59.0 Plasma 5.14.4 Qt 5.13.0
    Lap: HPDV7T i7 Leap 15.0(x86_64)4.12.14-lp151.28.7-default KF5 59.0 Plasma 5.14.4 Qt 5.13.0

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •