![](https://seccdn.libravatar.org/avatar/5531927e326335f027cc6ce7bd3e2bb7.jpg?s=120&d=mm&r=g)
Hi all! I have just noticed a problem with my logs files. Usually they are automatically compressed (gziped) regularly (usually every second day) depending on how large they are. However I have just noticed that they have stopped being compressed, so my logs are HUGE. The last time they were compressed was on the November 23. My /var/log/mail is now 58 mbs my /var/log/httpd/access_log is a whopping 1168 mbs my /var/log/httpd/error_log is a huge 768 mbs. The problem is that I don't know much about this process at all. I assume that it is a cronjob that automatically compresses the logs. How do I restart the compressing process? Thanks in advance, and regards from Denmark! Dan Eskildsen
![](https://seccdn.libravatar.org/avatar/7574aaee71d8971a36f4283a7cad6b2c.jpg?s=120&d=mm&r=g)
* Dan <dan-suselist@execit.dk> [01-07-05 07:48]:
I have just noticed a problem with my logs files. Usually they are automatically compressed (gziped) regularly (usually every second day) depending on how large they are. However I have just noticed that they have stopped being compressed, so my logs are HUGE.
Have you modified one of the xxxx.local files under /etc/logdigest reciently (after Nov 23, last observed compression)? If so, there is a problem (or was) with logdigest where it chokes on *extra* empty lines at bottom of the file. I said xxxx.local files as you should modify them rather than the defaults provided. If you modified one of the defaults, the same conditions (choking) apply. gud luk, -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
![](https://seccdn.libravatar.org/avatar/b12cfb65ca4faebc3e3aac17838e8f8d.jpg?s=120&d=mm&r=g)
Patrick, Dan, On Friday 07 January 2005 05:58, Patrick Shanahan wrote:
* Dan <dan-suselist@execit.dk> [01-07-05 07:48]:
I have just noticed a problem with my logs files. Usually they are automatically compressed (gziped) regularly (usually every second day) depending on how large they are. However I have just noticed that they have stopped being compressed, so my logs are HUGE.
Have you modified one of the xxxx.local files under /etc/logdigest reciently (after Nov 23, last observed compression)? If so, there is a problem (or was) with logdigest where it chokes on *extra* empty lines at bottom of the file.
On my 9.1 Pro system, overall log rotation and compression appear to be configured in "/etc/logrotate.conf". Package-specific configuration is configured in files in "/etc/lograte.d". There is no "/etc/logdigest" (either directory or file).
...
Patrick Shanahan
Randall Schulz
![](https://seccdn.libravatar.org/avatar/5fc4263126ee8d050aec45e780375c6e.jpg?s=120&d=mm&r=g)
On Friday 07 January 2005 5:22 am, Dan wrote:
The problem is that I don't know much about this process at all. I assume that it is a cronjob that automatically compresses the logs. How do I restart the compressing process?
The one who compress/rotates logs is the logrotate program which is invoked daily by cron. Make sure you have /etc/cron.daily/logrotate. Also, check the logrotate config files in /etc/logrotate.d/ HTH, Jorge
![](https://seccdn.libravatar.org/avatar/861b5545c111d2257fa12e533e723110.jpg?s=120&d=mm&r=g)
The Friday 2005-01-07 at 10:02 -0400, Jorge Fábregas wrote:
The one who compress/rotates logs is the logrotate program which is invoked daily by cron. Make sure you have /etc/cron.daily/logrotate.
Also, check the logrotate config files in /etc/logrotate.d/
And don't forget to check that "cron" itself is running... once I had a system where it stopped suddenly for no known reason. Also, there might be a clue on the /var/log/messages file. -- Cheers, Carlos Robinson
![](https://seccdn.libravatar.org/avatar/5531927e326335f027cc6ce7bd3e2bb7.jpg?s=120&d=mm&r=g)
Thanks for all the replies. They have been helpful. I just manually ran /etc/cron.daily/logrotate and that rotated (compressed) my logs. So for some funny reason I think that cron has stopped running the above command even though it is in /etc/cron.daily/ Where can I find the instructions for cron to run the cron.daily commands? My etc/crontab file contains the following commands: 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly I have other commands in crontab that run daily so I know that etc/crontab is running. Sorry for being a newbie ;-) Regards, Dan
![](https://seccdn.libravatar.org/avatar/861b5545c111d2257fa12e533e723110.jpg?s=120&d=mm&r=g)
The Monday 2005-01-10 at 12:11 +0100, Dan wrote:
Thanks for all the replies. They have been helpful. I just manually ran
/etc/cron.daily/logrotate and that rotated (compressed) my logs.
So for some funny reason I think that cron has stopped running the above command even though it is in /etc/cron.daily/
Mmmm. Check to see if it is executable; mine has this permissions: -rwxr-xr-x 1 root root 176 2004-04-06 03:26 /etc/cron.daily/logrotate*
Where can I find the instructions for cron to run the cron.daily commands?
My etc/crontab file contains the following commands: 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
It should also contain this line before those: -*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 The script run-crons is the master one.
I have other commands in crontab that run daily so I know that etc/crontab is running.
Have a look at the logs (/var/log/messages). Also errors in cron are mailed to root.
Sorry for being a newbie ;-)
Please don't :-) -- Cheers, Carlos Robinson
![](https://seccdn.libravatar.org/avatar/5531927e326335f027cc6ce7bd3e2bb7.jpg?s=120&d=mm&r=g)
Carlos E. R. wrote:
The Monday 2005-01-10 at 12:11 +0100, Dan wrote:
Thanks for all the replies. They have been helpful. I just manually ran
/etc/cron.daily/logrotate and that rotated (compressed) my logs.
So for some funny reason I think that cron has stopped running the above command even though it is in /etc/cron.daily/
Mmmm. Check to see if it is executable; mine has this permissions:
-rwxr-xr-x 1 root root 176 2004-04-06 03:26 /etc/cron.daily/logrotate*
Where can I find the instructions for cron to run the cron.daily commands?
My etc/crontab file contains the following commands: 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
It should also contain this line before those:
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
The script run-crons is the master one.
Well, we're getting closer. I remmed out this line in my crontab: -*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 because it was generating errors in my root mailbox. I put it back and get errors again in root mailbox. Here is the error: Subject:Cron <root@linux> root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 Body: /bin/sh: line 1: root: command not found Any ideas why my master cron script isn't running? I haven't edited it or anything.
I have other commands in crontab that run daily so I know that etc/crontab is running.
Have a look at the logs (/var/log/messages). Also errors in cron are mailed to root.
Sorry for being a newbie ;-)
Please don't :-)
:-)
![](https://seccdn.libravatar.org/avatar/861b5545c111d2257fa12e533e723110.jpg?s=120&d=mm&r=g)
The Wednesday 2005-01-12 at 13:24 +0100, Dan wrote:
I put it back and get errors again in root mailbox. Here is the error:
Subject:Cron <root@linux> root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 Body: /bin/sh: line 1: root: command not found
Any ideas why my master cron script isn't running? I haven't edited it or anything.
Then we need to have a look at the /usr/lib/cron/run-crons file, the first few lines. Mine (SuSE 9.1) goes like this: #!/bin/bash # # /usr/lib/cron/run-crons # # Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany. All rights reserved. # # this script looks into /etc/cron.{hourly,daily,weekly,monthly} for # scripts to be executed. The info about last run is stored in # /var/spool/cron/lastrun # Watch that the first line must be comented out, and exactly like that, because althoug it seems a coment, it is interpreted, telling the system what program should interpret the script. (In SuSE systems, /bin/sh is a symlink to bash) and, after a bunch of comments, the script continues like this - for SuSE 9.1, I don't know what you have: # set to "true" to send a mail even if all scripts returned OK SEND_MAIL_ON_NO_ERROR=false BASENAME=`/usr/bin/basename $0` LOGGER="/bin/logger -t $BASENAME[$$]" export LC_TIME=POSIX TMPDIR=`mktemp -d /tmp/run-crons.XXXXXX` trap "rm -rf $TMPDIR" 0 1 2 3 13 15 # Priority change for sub scripts. # If the file is broken, replace it from the original, in cron-...rpm on your dvd or whatever. You do not need to reinstall the rpm completely if you do not want to: you can simply use "mc", [enter] on the rpm file, browse to the script and copy. Midnight Comander, mc for short, is a magnific text based file browser, and much more. It is a Norton Comander for MsDOS look alike. It is very fast, feature full (edit, open/create compressed archives or rpm packages, ftp...), and can be used remotely, even over a modem link. It is text based, but the mouse works, and it has menues. The only thing it doesn't have is graphics :-) If you are sure you did not modify the script yourself (check the timestamp), check your filesystem for errors (fsck from the rescue system). -- Cheers, Carlos Robinson
![](https://seccdn.libravatar.org/avatar/d911986e93693cbc1755e241daffa996.jpg?s=120&d=mm&r=g)
On 13:24 Wed 12 Jan , Dan wrote:
Carlos E. R. wrote:
The Monday 2005-01-10 at 12:11 +0100, Dan wrote:
Thanks for all the replies. They have been helpful. I just manually ran
/etc/cron.daily/logrotate and that rotated (compressed) my logs.
So for some funny reason I think that cron has stopped running the above command even though it is in /etc/cron.daily/
Mmmm. Check to see if it is executable; mine has this permissions:
-rwxr-xr-x 1 root root 176 2004-04-06 03:26 /etc/cron.daily/logrotate*
Where can I find the instructions for cron to run the cron.daily commands?
My etc/crontab file contains the following commands: 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
It should also contain this line before those:
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
The script run-crons is the master one.
Well, we're getting closer. I remmed out this line in my crontab:
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
because it was generating errors in my root mailbox.
I put it back and get errors again in root mailbox. Here is the error:
Subject:Cron <root@linux> root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 Body: /bin/sh: line 1: root: command not found
Any ideas why my master cron script isn't running? I haven't edited it or anything.
I have other commands in crontab that run daily so I know that etc/crontab is running.
Have a look at the logs (/var/log/messages). Also errors in cron are mailed to root.
Sorry for being a newbie ;-)
Please don't :-)
:-)
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
FTR: I have *always* had to set the logrotate to --force, or it does nothing. This has been true for me on v9, 9.1, 9.2. If I open the /etc/cron.daily/logrotate file & add that '--force' option it never fails to run. -- ..."Yogi" CH Namasté Yoga Studio
![](https://seccdn.libravatar.org/avatar/883152d8d9e454f0f55d50f2f82a687f.jpg?s=120&d=mm&r=g)
Dan wrote:
Hi all! I have just noticed a problem with my logs files. Usually they are automatically compressed (gziped) regularly (usually every second day) depending on how large they are. However I have just noticed that they have stopped being compressed, so my logs are HUGE. The last time they were compressed was on the November 23. My /var/log/mail is now 58 mbs my /var/log/httpd/access_log is a whopping 1168 mbs my /var/log/httpd/error_log is a huge 768 mbs.
The problem is that I don't know much about this process at all. I assume that it is a cronjob that automatically compresses the logs. How do I restart the compressing process?
Thanks in advance, and regards from Denmark! Dan Eskildsen
I have a similar problem, but is no deleting the old files I have rotate 5 and i have 40 or 50 files Why is no deleting it? I don't have nothing in the logs. Is compressing good, after +10000k, but is no delenting!!!! -- ------------------------------------------------------ Una prensa libre es el gran enemigo de los dictadores. Independientemente de sus abusos, sus debilidades, sus errores. Una prensa libre es la gran aliada y defensora de la democracia. Charlos S. Shapiro Embajador de USA en la Rep. de Venezuela Martes, 20 de Mayo 2003
participants (7)
-
C Hamel
-
Carlos E. R.
-
Dan
-
Hipolito A. Gonzalez M.
-
Jorge Fábregas
-
Patrick Shanahan
-
Randall R Schulz