logrotate

classic Classic list List threaded Threaded
66 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

logrotate

Peter Suetterlin

  Hi list,

looking through my disk usage I realized /var/log uses 2GB :o
and what do I see?

woodstock:/var/log # ls -lh zypper.log
-rw-r----- 1 root root 1.6G Sep 13 14:23 zypper.log

why isn't it rotated/compressed?  Ah: this is now handled by systemd instead
of cron, and disabled by default :(

woodstock:/var/log # systemctl status logrotate
● logrotate.service - Rotate log files
   Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)

Not sure if that is a sane choice for a TW system that typically has several
'zypper dup' per week.  The 1.6GB is the logs from just one year...

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Patrick Shanahan-2
* Peter Suetterlin <[hidden email]> [09-13-17 09:49]:

>
>   Hi list,
>
> looking through my disk usage I realized /var/log uses 2GB :o
> and what do I see?
>
> woodstock:/var/log # ls -lh zypper.log
> -rw-r----- 1 root root 1.6G Sep 13 14:23 zypper.log
>
> why isn't it rotated/compressed?  Ah: this is now handled by systemd instead
> of cron, and disabled by default :(
>
> woodstock:/var/log # systemctl status logrotate
> ● logrotate.service - Rotate log files
>    Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
>
> Not sure if that is a sane choice for a TW system that typically has several
> 'zypper dup' per week.  The 1.6GB is the logs from just one year...

your Tw seems different than mine.  all 5 of mine show:
  ● logrotate.service - Rotate log files
     Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
     Active: inactive (dead) since Wed 2017-09-13 00:01:22 EDT; 10h ago
     Docs: man:logrotate(8)
           man:logrotate.conf(5)
     Process: 18438 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS)
     Main PID: 18438 (code=exited, status=0/SUCCESS)
                           

logrotate is instigated by cron here.
                           
--
(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri
Registered Linux User #207535                    @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo                    paka @ IRCnet freenode

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Andrei Borzenkov
On Wed, Sep 13, 2017 at 5:15 PM, Patrick Shanahan <[hidden email]> wrote:
>
> logrotate is instigated by cron here.
>

More likely by logrotate.timer.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Patrick Shanahan-2
In reply to this post by Patrick Shanahan-2
* Patrick Shanahan <[hidden email]> [09-13-17 10:15]:

> * Peter Suetterlin <[hidden email]> [09-13-17 09:49]:
> >
> >   Hi list,
> >
> > looking through my disk usage I realized /var/log uses 2GB :o
> > and what do I see?
> >
> > woodstock:/var/log # ls -lh zypper.log
> > -rw-r----- 1 root root 1.6G Sep 13 14:23 zypper.log
> >
> > why isn't it rotated/compressed?  Ah: this is now handled by systemd instead
> > of cron, and disabled by default :(
> >
> > woodstock:/var/log # systemctl status logrotate
> > ● logrotate.service - Rotate log files
> >    Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
> >
> > Not sure if that is a sane choice for a TW system that typically has several
> > 'zypper dup' per week.  The 1.6GB is the logs from just one year...
>
> your Tw seems different than mine.  all 5 of mine show:
>   ● logrotate.service - Rotate log files
>      Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
>      Active: inactive (dead) since Wed 2017-09-13 00:01:22 EDT; 10h ago
>      Docs: man:logrotate(8)
>            man:logrotate.conf(5)
>      Process: 18438 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS)
>      Main PID: 18438 (code=exited, status=0/SUCCESS)
>                            
>
> logrotate is instigated by cron here.

or maybe systemd timers ...

--
(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri
Registered Linux User #207535                    @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo                    paka @ IRCnet freenode

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Peter Suetterlin
In reply to this post by Andrei Borzenkov
Andrei Borzenkov wrote:
> On Wed, Sep 13, 2017 at 5:15 PM, Patrick Shanahan <[hidden email]> wrote:
> >
> > logrotate is instigated by cron here.

It's not mentioned in any of the cron configs...

> More likely by logrotate.timer.

woodstock:/etc # systemctl status logrotate.timer
● logrotate.timer - Daily rotation of log files
   Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; disabled; vendor preset: enabled)
   Active: inactive (dead)

Hmm, I can't remember having disabled it.  But obviously my fault then :(

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Per Jessen
Peter Suetterlin wrote:

> Andrei Borzenkov wrote:
>> On Wed, Sep 13, 2017 at 5:15 PM, Patrick Shanahan <[hidden email]>
>> wrote:
>> >
>> > logrotate is instigated by cron here.
>
> It's not mentioned in any of the cron configs...
>
>> More likely by logrotate.timer.
>
> woodstock:/etc # systemctl status logrotate.timer
> ● logrotate.timer - Daily rotation of log files
>    Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; disabled;
>    vendor preset: enabled) Active: inactive (dead)
>
> Hmm, I can't remember having disabled it.  But obviously my fault then
> :(

I am pretty certain I've come across this too - yep:

https://bugzilla.opensuse.org/show_bug.cgi?id=1054353

 

--
Per Jessen, Zürich (19.1°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

gregfreemyer
In reply to this post by Peter Suetterlin
On Wed, Sep 13, 2017 at 9:48 AM, Peter Suetterlin
<[hidden email]> wrote:

>
>   Hi list,
>
> looking through my disk usage I realized /var/log uses 2GB :o
> and what do I see?
>
> woodstock:/var/log # ls -lh zypper.log
> -rw-r----- 1 root root 1.6G Sep 13 14:23 zypper.log
>
> why isn't it rotated/compressed?  Ah: this is now handled by systemd instead
> of cron, and disabled by default :(
>
> woodstock:/var/log # systemctl status logrotate
> ● logrotate.service - Rotate log files
>    Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
>
> Not sure if that is a sane choice for a TW system that typically has several
> 'zypper dup' per week.  The 1.6GB is the logs from just one year...

I don't think its by design.  Various bugs reported about it.

Here's mine from my 13.1 to 13.2 upgrade:

https://bugzilla.novell.com/show_bug.cgi?id=913421

I didn't look to see if there is a bug against Tumbleweed or not.

Greg

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Felix Miata-3
In reply to this post by Per Jessen
Per Jessen composed on 2017-09-13 18:30 (UTC+0200):

> https://bugzilla.opensuse.org/show_bug.cgi?id=1054353

Infuriatingly dup'd to an inaccessible bug:
https://bugzilla.opensuse.org/show_bug.cgi?id=1051019
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Per Jessen
Felix Miata wrote:

> Per Jessen composed on 2017-09-13 18:30 (UTC+0200):
>
>> https://bugzilla.opensuse.org/show_bug.cgi?id=1054353
>
> Infuriatingly dup'd to an inaccessible bug:
> https://bugzilla.opensuse.org/show_bug.cgi?id=1051019

Well, the problem is very clearly identified and also easily solved.
Dup'ing to an SLE bug is not such a big deal here, IMO.

How did you fare with the hurricane, Felix?


--
Per Jessen, Zürich (15.2°C)
http://www.hostsuisse.com/ - virtual servers, made in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Peter Suetterlin
In reply to this post by Per Jessen
Per Jessen wrote:
> Peter Suetterlin wrote:

> > woodstock:/etc # systemctl status logrotate.timer
> > ● logrotate.timer - Daily rotation of log files
> >    Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; disabled;
> >    vendor preset: enabled) Active: inactive (dead)
> >
> > Hmm, I can't remember having disabled it.  But obviously my fault then
> > :(
>
> I am pretty certain I've come across this too - yep:
>
> https://bugzilla.opensuse.org/show_bug.cgi?id=1054353

Ah.  But all those bugs are about updates.  My TW was a clean install from
scratch.  So the question would be if the timer is active on (all) other TW
installations, or not.

But I assume the (missing) activation would also fail when fresh installing?

For now I manually did the suggested
  systemctl enable logrotate.timer
  systemctl start logrotate.timer
and now get
woodstock:/var/log # systemctl list-timers
NEXT                          LEFT          LAST                          PASSED  UNIT                         ACTIVATES
Thu 2017-09-14 10:48:57 WEST  1min 46s left Wed 2017-09-13 10:48:57 WEST  23h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Fri 2017-09-15 00:00:00 WEST  13h left      n/a                           n/a     logrotate.timer              logrotate.service

2 timers listed.

Guess next night will see quite some CPU cycles burnt, xz compressing some 1.6GB...

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

gumb
In reply to this post by gregfreemyer
On 13/09/17 22:14, Greg Freemyer wrote:

> On Wed, Sep 13, 2017 at 9:48 AM, Peter Suetterlin
> <[hidden email]> wrote:
>>
>>    Hi list,
>>
>> looking through my disk usage I realized /var/log uses 2GB :o
>> and what do I see?
>>
>> woodstock:/var/log # ls -lh zypper.log
>> -rw-r----- 1 root root 1.6G Sep 13 14:23 zypper.log
>>
>> why isn't it rotated/compressed?  Ah: this is now handled by systemd instead
>> of cron, and disabled by default :(
>>
>> woodstock:/var/log # systemctl status logrotate
>> ● logrotate.service - Rotate log files
>>     Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
>>
>> Not sure if that is a sane choice for a TW system that typically has several
>> 'zypper dup' per week.  The 1.6GB is the logs from just one year...
>
> I don't think its by design.  Various bugs reported about it.
>
> Here's mine from my 13.1 to 13.2 upgrade:
>
> https://bugzilla.novell.com/show_bug.cgi?id=913421
>
> I didn't look to see if there is a bug against Tumbleweed or not.
>
> Greg
>

I'm confused. I have a fresh 42.2 installation which has systemd 228. If
this was supposed to be enabled on an upgrade from 13.1 to 13.2,
shouldn't all this be enabled by default on 42.2? I get the following:

> systemctl list-timers
> NEXT                          LEFT        LAST                          PASSED      
> Fri 2017-09-15 08:35:50 CEST  18h left    Wed 2017-09-13 12:42:59 CEST  1 day 1h ago
> Mon 2017-09-18 00:00:00 CEST  3 days left Mon 2017-09-11 00:00:01 CEST  3 days ago  
>
> 2 timers listed.
> Pass --all to see loaded but inactive timers, too.

> systemctl enable logrotate.timer
> Failed to execute operation: No such file or directory

> systemctl status logrotate.service
> ● logrotate.service
>    Loaded: not-found (Reason: No such file or directory)
>    Active: inactive (dead)

I notice /var/log/journal/{string}/ has nearly 1GB of logs in it, going
back as far as installation time.

gumb

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Per Jessen
gumb wrote:

>> systemctl enable logrotate.timer
>> Failed to execute operation: No such file or directory
>
>> systemctl status logrotate.service
>> ● logrotate.service
>>    Loaded: not-found (Reason: No such file or directory)
>>    Active: inactive (dead)
>
> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it,
> going back as far as installation time.

Do you have logrotate installed?  (it doesn't look like it).

>From a 13.2 system:

# systemctl status logrotate.service
logrotate.service - Rotate log files
   Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
   Active: inactive (dead)
     Docs: man:logrotate(8)
           man:logrotate.conf(5)



--
Per Jessen, Zürich (13.4°C)
http://www.hostsuisse.com/ - dedicated server rental in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

gumb
On 14/09/17 14:37, Per Jessen wrote:

> gumb wrote:
>
>>> systemctl enable logrotate.timer
>>> Failed to execute operation: No such file or directory
>>
>>> systemctl status logrotate.service
>>> ● logrotate.service
>>>     Loaded: not-found (Reason: No such file or directory)
>>>     Active: inactive (dead)
>>
>> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it,
>> going back as far as installation time.
>
> Do you have logrotate installed?  (it doesn't look like it).
>
>>From a 13.2 system:
>
> # systemctl status logrotate.service
> logrotate.service - Rotate log files
>     Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
>     Active: inactive (dead)
>       Docs: man:logrotate(8)
>             man:logrotate.conf(5)
>
>
>

Yes it appears to be installed.

logrotate --version
logrotate 3.8.7

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Carlos E. R.-2
In reply to this post by gumb
On 2017-09-14 14:08, gumb wrote:

> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it, going
> back as far as installation time.

That one is handled differently, not by logrotate.

/etc/systemd/journald.conf

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Carlos E. R.-2
In reply to this post by Per Jessen
On 2017-09-14 14:37, Per Jessen wrote:

> gumb wrote:
>
>>> systemctl enable logrotate.timer
>>> Failed to execute operation: No such file or directory
>>
>>> systemctl status logrotate.service
>>> ● logrotate.service
>>>    Loaded: not-found (Reason: No such file or directory)
>>>    Active: inactive (dead)
>>
>> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it,
>> going back as far as installation time.
>
> Do you have logrotate installed?  (it doesn't look like it).
Leap uses cron.

/etc/cron.daily/logrotate


--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: logrotate

gumb
On 14/09/17 15:12, Carlos E. R. wrote:

> On 2017-09-14 14:37, Per Jessen wrote:
>> gumb wrote:
>>
>>>> systemctl enable logrotate.timer
>>>> Failed to execute operation: No such file or directory
>>>
>>>> systemctl status logrotate.service
>>>> ● logrotate.service
>>>>     Loaded: not-found (Reason: No such file or directory)
>>>>     Active: inactive (dead)
>>>
>>> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it,
>>> going back as far as installation time.
>>
>> Do you have logrotate installed?  (it doesn't look like it).
>
> Leap uses cron.
>
> /etc/cron.daily/logrotate
>
>

Okay, I misunderstood. I saw the systemd journal logs building up and
assumed something wasn't running as intended, but you explained in the
other post that that's handled differently.

What is confusing is that, if I'm understanding the thread correctly,
this change to systemd logs was introduced in 13.2, and is posing
problems for those upgrading from, say, 13.1 to 13.2 or from 42.2 to
42.3, yet the new logs handling is not present in a fresh Leap 42.1 or
42.2 install. Is this one of those cases where Leap 42.1 was not a
progression from 13.2, because it went back to an old version/system so
as to align with SUSE 12?

And is it now being introduced in Leap 42.3?

gumb

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Per Jessen
gumb wrote:

> What is confusing is that, if I'm understanding the thread correctly,
> this change to systemd logs was introduced in 13.2, and is posing
> problems for those upgrading from, say, 13.1 to 13.2

It look like logrotate was upgraded to a systemd service in 13.2, as
well as equipped with a systemd timer instead of being driven by cron.

> or from 42.2 to 42.3, yet the new logs handling is not present in a
> fresh Leap 42.1 or 42.2 install.

The only thing that is missing is for the timer to be enabled.  

> Is this one of those cases where Leap 42.1 was not a progression from
> 13.2, because it went back to an old version/system so as to align
> with SUSE 12?

Quite likely yes.

> And is it now being introduced in Leap 42.3?

In Leap423, logrotate was updated to use a systemd timer instead of
cron, yes.


--
Per Jessen, Zürich (14.3°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Per Jessen
In reply to this post by Carlos E. R.-2
Carlos E. R. wrote:

> On 2017-09-14 14:37, Per Jessen wrote:
>> gumb wrote:
>>
>>>> systemctl enable logrotate.timer
>>>> Failed to execute operation: No such file or directory
>>>
>>>> systemctl status logrotate.service
>>>> ● logrotate.service
>>>>    Loaded: not-found (Reason: No such file or directory)
>>>>    Active: inactive (dead)
>>>
>>> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it,
>>> going back as far as installation time.
>>
>> Do you have logrotate installed?  (it doesn't look like it).
>
> Leap uses cron.
> /etc/cron.daily/logrotate

Ah, in Leap422 logrotate was not yet converted to systemd, okay.



--
Per Jessen, Zürich (13.8°C)
http://www.hostsuisse.com/ - virtual servers, made in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Per Jessen
In reply to this post by gumb
gumb wrote:

> On 14/09/17 14:37, Per Jessen wrote:
>> gumb wrote:
>>
>>>> systemctl enable logrotate.timer
>>>> Failed to execute operation: No such file or directory
>>>
>>>> systemctl status logrotate.service
>>>> ● logrotate.service
>>>>     Loaded: not-found (Reason: No such file or directory)
>>>>     Active: inactive (dead)
>>>
>>> I notice /var/log/journal/{string}/ has nearly 1GB of logs in it,
>>> going back as far as installation time.
>>
>> Do you have logrotate installed?  (it doesn't look like it).
>>
>>>From a 13.2 system:
>>
>> # systemctl status logrotate.service
>> logrotate.service - Rotate log files
>>     Loaded: loaded (/usr/lib/systemd/system/logrotate.service;
>>     static) Active: inactive (dead)
>>       Docs: man:logrotate(8)
>>             man:logrotate.conf(5)
>>
>>
>>
>
> Yes it appears to be installed.
>
> logrotate --version
> logrotate 3.8.7

My mistake, I thought logrotate was already a systemd service, but just
still being called with cron.  

 

--
Per Jessen, Zürich (14.1°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: logrotate

Carlos E. R.-2
In reply to this post by Per Jessen
On 2017-09-14 15:42, Per Jessen wrote:

> gumb wrote:
>
>> What is confusing is that, if I'm understanding the thread correctly,
>> this change to systemd logs was introduced in 13.2, and is posing
>> problems for those upgrading from, say, 13.1 to 13.2
>
> It look like logrotate was upgraded to a systemd service in 13.2, as
> well as equipped with a systemd timer instead of being driven by cron.
>
>> or from 42.2 to 42.3, yet the new logs handling is not present in a
>> fresh Leap 42.1 or 42.2 install.
>
> The only thing that is missing is for the timer to be enabled.  
>
>> Is this one of those cases where Leap 42.1 was not a progression from
>> 13.2, because it went back to an old version/system so as to align
>> with SUSE 12?
>
> Quite likely yes.
>
>> And is it now being introduced in Leap 42.3?
>
> In Leap423, logrotate was updated to use a systemd timer instead of
> cron, yes.
I don't like that. Less visible.


--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
1234