[Server-devel] [XSCE] Re: Weekly log rotation

Jon Nettleton jon.nettleton at gmail.com
Thu Sep 19 01:38:14 EDT 2013


What does your /etc/logrotate.conf look like?  One option for logrotate is
to only rotate if the logs have reached a certain size.

-Jon


On Thu, Sep 19, 2013 at 7:34 AM, Anna <aschoolf at gmail.com> wrote:

> On Wed, Sep 18, 2013 at 11:50 PM, James Cameron <quozl at laptop.org> wrote:
>
>> Things to check:
>>
>> - is crond running?  (it isn't present by default on OLPC OS)
>>
>
> [root at schoolserver] ~ >systemctl status crond.service
> crond.service - Command Scheduler
>    Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled)
>    Active: active (running) since Wed 2013-09-11 00:20:49 GMT; 1 weeks 1
> days ago
>  Main PID: 513 (crond)
>    CGroup: name=systemd:/system/crond.service
>            └─513 /usr/sbin/crond -n
>
> Warning: Journal has been rotated since unit was started. Log output is
> incomplete or unavailable.
>
>
>>
>> - is logrotate installed?
>>
>
> [root at schoolserver] ~ >whereis logrotate
> logrotate: /sbin/logrotate /usr/sbin/logrotate /etc/logrotate.conf
> /etc/logrotate.d
>
>  - is /etc/cron.daily/logrotate present?
>>
>
> [root at schoolserver] ~ >cat /etc/cron.daily/logrotate
> #!/bin/sh
>
> /usr/sbin/logrotate /etc/logrotate.conf
> EXITVALUE=$?
> if [ $EXITVALUE != 0 ]; then
>     /usr/bin/logger -t logrotate "ALERT exited abnormally with
> [$EXITVALUE]"
> fi
> exit 0
>
>
>> - is /etc/logrotate.d/syslog present?
>>
>
> [root at schoolserver] ~ >cat /etc/logrotate.d/syslog
> /var/log/cron
> /var/log/maillog
> /var/log/messages
> /var/log/secure
> /var/log/spooler
> {
>     sharedscripts
>     postrotate
> /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
>     endscript
> }
>
>
>
>>
>> On Wed, Sep 18, 2013 at 11:10:39PM -0500, Anna wrote:
>> > Oops, forgot to copy server-devel
>> >
>> >
>> > On Wed, Sep 18, 2013 at 10:55 PM, Anna <aschoolf at gmail.com> wrote:
>> >
>> >     Was weekly log rotation supposed to be a thing?  I thought we
>> talked about
>> >     it.
>> >
>> >     Here's the XSCE on an XO 1.5, running like a champ for this uptime
>> on
>> >     xs-config-0.8.4.260.g5388399-1.noarch
>> >
>> >     [root at schoolserver] ~ >uptime
>> >      03:43:11 up 8 days,  3:22,  2 users,  load average: 0.14, 0.24,
>> 0.27
>> >     [root at schoolserver] ~ >ls /var/log
>> >     btmp          httpd     monit.log           ppp
>>
>> >        spooler      user.log            yum.log
>> >     cron          lastlog   moodle              puppet
>>
>> >         squid        wpa_supplicant.log
>> >     dansguardian  maillog   moodle-instupg.log
>> >      pwr-SHC0050085F-130911_002052.csv  sugar-stats  wtmp
>> >     ejabberd      messages  powerd.trace        secure
>>
>> >         tallylog     xs-setup.log
>> >
>> >     I've poked into dirs in /var/log and don't see any log rotation.
>>  But
>> >     secure should be rotating, if log rotation is working.
>> >
>> >     Anna
>> >
>> >
>>
>> > _______________________________________________
>> > Server-devel mailing list
>> > Server-devel at lists.laptop.org
>> > http://lists.laptop.org/listinfo/server-devel
>>
>>
>> --
>> James Cameron
>> http://quozl.linux.org.au/
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/server-devel/attachments/20130919/1d6b8833/attachment.html>


More information about the Server-devel mailing list