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

2013-09-19 Thread Jon Nettleton
Had to take a look at my server to evaluate.  The problem is that in
/etc/logrotate.d/ there is a symlink '*' pointing to /usr/share/xs


On Thu, Sep 19, 2013 at 7:56 AM, Anna ascho...@gmail.com wrote:

 On Thu, Sep 19, 2013 at 12:48 AM, Jon Nettleton 
 jon.nettle...@gmail.comwrote:

 Does it work if you run /etc/cron.daily/logrotate by hand as root?


 Nope:

 [root@schoolserver] ~ cd /etc/cron.daily/
 [root@schoolserver] cron.daily ./logrotate
 error: failed to open config file *: No such file or directory
 error: found error in file *, skipping

 So this is weird to see this in there:
 [root@schoolserver] ~ ls /etc/cron.daily/
 etckeeper  logrotate  man-db.cron  mlocate.cron

 [root@schoolserver] cron.daily cat 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
 [root@schoolserver] cron.daily whereis logger
 logger: /bin/logger /usr/bin/logger /usr/share/man/man1p/logger.1p.gz

 And there's nothing here:

 [root@schoolserver] ~ ls /etc/cron.weekly/
 [root@schoolserver] ~ 






 On Thu, Sep 19, 2013 at 7:40 AM, Anna ascho...@gmail.com wrote:

 On Thu, Sep 19, 2013 at 12:38 AM, Jon Nettleton jon.nettle...@gmail.com
  wrote:

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


 My understanding was it was supposed to rotate weekly no matter what.

 [root@schoolserver] ~ cat /etc/logrotate.conf
 # see man logrotate for details
 # rotate log files weekly
 weekly

 # keep 4 weeks worth of backlogs
 rotate 4

 # create new (empty) log files after rotating old ones
 create

 # use date as a suffix of the rotated file
 dateext

 # uncomment this if you want your log files compressed
 #compress

 # RPM packages drop log rotation information into this directory
 include /etc/logrotate.d

 # no packages own wtmp and btmp -- we'll rotate them here
 /var/log/wtmp {
 monthly
 create 0664 root utmp
 minsize 1M
 rotate 1
 }

 /var/log/btmp {
 missingok
 monthly
 create 0600 root utmp
 rotate 1
 }

 # system-specific logs may be also be configured here.





___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


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

2013-09-19 Thread Jon Nettleton
sorry cramped typing space.  There is a symlink of '*' pointing to
/usr/share/xs-config/cfg/etc/logrotate.d/*  This must be an error in the
image generation script.

-Jon


On Thu, Sep 19, 2013 at 8:37 AM, Jon Nettleton jon.nettle...@gmail.comwrote:

 Had to take a look at my server to evaluate.  The problem is that in
 /etc/logrotate.d/ there is a symlink '*' pointing to /usr/share/xs


 On Thu, Sep 19, 2013 at 7:56 AM, Anna ascho...@gmail.com wrote:

 On Thu, Sep 19, 2013 at 12:48 AM, Jon Nettleton 
 jon.nettle...@gmail.comwrote:

 Does it work if you run /etc/cron.daily/logrotate by hand as root?


 Nope:

 [root@schoolserver] ~ cd /etc/cron.daily/
 [root@schoolserver] cron.daily ./logrotate
 error: failed to open config file *: No such file or directory
 error: found error in file *, skipping

 So this is weird to see this in there:
 [root@schoolserver] ~ ls /etc/cron.daily/
 etckeeper  logrotate  man-db.cron  mlocate.cron

 [root@schoolserver] cron.daily cat 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
 [root@schoolserver] cron.daily whereis logger
 logger: /bin/logger /usr/bin/logger /usr/share/man/man1p/logger.1p.gz

 And there's nothing here:

 [root@schoolserver] ~ ls /etc/cron.weekly/
 [root@schoolserver] ~ 






 On Thu, Sep 19, 2013 at 7:40 AM, Anna ascho...@gmail.com wrote:

 On Thu, Sep 19, 2013 at 12:38 AM, Jon Nettleton 
 jon.nettle...@gmail.com wrote:

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


 My understanding was it was supposed to rotate weekly no matter what.

 [root@schoolserver] ~ cat /etc/logrotate.conf
 # see man logrotate for details
 # rotate log files weekly
 weekly

 # keep 4 weeks worth of backlogs
 rotate 4

 # create new (empty) log files after rotating old ones
 create

 # use date as a suffix of the rotated file
 dateext

 # uncomment this if you want your log files compressed
 #compress

 # RPM packages drop log rotation information into this directory
 include /etc/logrotate.d

 # no packages own wtmp and btmp -- we'll rotate them here
 /var/log/wtmp {
 monthly
 create 0664 root utmp
 minsize 1M
 rotate 1
 }

 /var/log/btmp {
 missingok
 monthly
 create 0600 root utmp
 rotate 1
 }

 # system-specific logs may be also be configured here.






___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


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

2013-09-19 Thread James Cameron
Ouch.

I was looking at what might go into /etc/logrotate.d but had neglected
to consider a symlink '*'.

On Thu, Sep 19, 2013 at 08:37:31AM +0200, Jon Nettleton wrote:
 Had to take a look at my server to evaluate.  The problem is that in /etc/
 logrotate.d/ there is a symlink '*' pointing to /usr/share/xs
 
 
 On Thu, Sep 19, 2013 at 7:56 AM, Anna ascho...@gmail.com wrote:
 
 On Thu, Sep 19, 2013 at 12:48 AM, Jon Nettleton jon.nettle...@gmail.com
 wrote:
 
 Does it work if you run /etc/cron.daily/logrotate by hand as root?
 
 
 Nope:
 
 [root@schoolserver] ~ cd /etc/cron.daily/
 [root@schoolserver] cron.daily ./logrotate 
 error: failed to open config file *: No such file or directory
 error: found error in file *, skipping
 
 So this is weird to see this in there:
 [root@schoolserver] ~ ls /etc/cron.daily/
 etckeeper  logrotate  man-db.cron  mlocate.cron
 
 [root@schoolserver] cron.daily cat 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
 [root@schoolserver] cron.daily whereis logger
 logger: /bin/logger /usr/bin/logger /usr/share/man/man1p/logger.1p.gz
 
 And there's nothing here:
 
 [root@schoolserver] ~ ls /etc/cron.weekly/
 [root@schoolserver] ~ 
 
 
  
 
 
 
 On Thu, Sep 19, 2013 at 7:40 AM, Anna ascho...@gmail.com wrote:
 
 On Thu, Sep 19, 2013 at 12:38 AM, Jon Nettleton 
 jon.nettle...@gmail.com wrote:
 
 What does your /etc/logrotate.conf look like?  One option for
 logrotate is to only rotate if the logs have reached a certain
 size.
 

 
 My understanding was it was supposed to rotate weekly no matter
 what.
 
 [root@schoolserver] ~ cat /etc/logrotate.conf 
 # see man logrotate for details
 # rotate log files weekly
 weekly
 
 # keep 4 weeks worth of backlogs
 rotate 4
 
 # create new (empty) log files after rotating old ones
 create
 
 # use date as a suffix of the rotated file
 dateext
 
 # uncomment this if you want your log files compressed
 #compress
 
 # RPM packages drop log rotation information into this directory
 include /etc/logrotate.d
 
 # no packages own wtmp and btmp -- we'll rotate them here
 /var/log/wtmp {
     monthly
     create 0664 root utmp
 minsize 1M
     rotate 1
 }
 
 /var/log/btmp {
     missingok
     monthly
     create 0600 root utmp
     rotate 1
 }
 
 # system-specific logs may be also be configured here.
  
 
 
 
 
 
 

-- 
James Cameron
http://quozl.linux.org.au/
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


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

2013-09-18 Thread Jon Nettleton
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 ascho...@gmail.com wrote:

 On Wed, Sep 18, 2013 at 11:50 PM, James Cameron qu...@laptop.org wrote:

 Things to check:

 - is crond running?  (it isn't present by default on OLPC OS)


 [root@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@schoolserver] ~ whereis logrotate
 logrotate: /sbin/logrotate /usr/sbin/logrotate /etc/logrotate.conf
 /etc/logrotate.d

  - is /etc/cron.daily/logrotate present?


 [root@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@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 ascho...@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@schoolserver] ~ uptime
   03:43:11 up 8 days,  3:22,  2 users,  load average: 0.14, 0.24,
 0.27
  [root@schoolserver] ~ ls /var/log
  btmp  httpd monit.log   ppp

 spooler  user.logyum.log
  cron  lastlog   moodle  puppet

  squidwpa_supplicant.log
  dansguardian  maillog   moodle-instupg.log
   pwr-SHC0050085F-130911_002052.csv  sugar-stats  wtmp
  ejabberd  messages  powerd.tracesecure

  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@lists.laptop.org
  http://lists.laptop.org/listinfo/server-devel


 --
 James Cameron
 http://quozl.linux.org.au/



___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


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

2013-09-18 Thread Anna
On Thu, Sep 19, 2013 at 12:38 AM, Jon Nettleton jon.nettle...@gmail.comwrote:

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


My understanding was it was supposed to rotate weekly no matter what.

[root@schoolserver] ~ cat /etc/logrotate.conf
# see man logrotate for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}

/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}

# system-specific logs may be also be configured here.
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel