Logrotate issue on SUSE 10


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Logrotate issue on SUSE 10
# 1  
Old 04-07-2010
Logrotate issue on SUSE 10

I'm stumped. Can anyone spot the issue? I'm running logrotate with a conf file that points to a single file. The output from logrotate indicates it copied the file and is going to truncate the file, but then the original file exists unchanged, and the copied file doesn't exist.


My shell session as root:
Code:
beta1linux:# dir /var/log/zmd-messages.*
-rw-r----- 1 root root 5247015 Apr 7 13:46 /var/log/zmd-messages.log
 
beta1linux:# logrotate -d -f /etc/logrotate.conf
reading config file /etc/logrotate.conf
compress_prog is now /usr/bin/bzip2
compress_ext was changed to .bz2
uncompress_prog is now /usr/bin/bunzip2
including /etc/logrotate.fed.d
reading config file zmd-messages
reading config info for /var/log/zmd-messages.log
Handling 1 logs
rotating pattern: /var/log/zmd-messages.log forced from command line (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/zmd-messages.log
log needs rotating
rotating log /var/log/zmd-messages.log, log->rotateCount is 2
glob finding old rotated logs failed
copying /var/log/zmd-messages.log to /var/log/zmd-messages.log-20100407
truncating /var/log/zmd-messages.log
 
beta1linux:# dir /var/log/zmd-messages.*
-rw-r----- 1 root root 5247015 Apr 7 13:46 /var/log/zmd-messages.log

And the conf files involved:
Code:
beta1linux:# 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
# uncomment this if you want your log files compressed
#compress
# uncomment these to switch compression to bzip2
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2
# former versions had to have the compresscommand set accordingly
#compressext .bz2
# RPM packages drop log rotation information into this directory
include /etc/logrotate.fed.d
# no packages own wtmp -- we'll rotate them here
#/var/log/wtmp {
# monthly
# create 0664 root utmp
# rotate 1
#}
# system-specific logs may be also be configured here.
 
beta1linux:# dir /etc/logrotate.fed.d
total 4
-rwxrwxr-x 1 root root 138 Apr 7 15:23 zmd-messages
 
beta1linux:/etc/logrotate.fed.d # cat /etc/logrotate.fed.d/zmd-messages
/var/log/zmd-messages.log {
nocompress
dateext
daily
rotate 2
size 1M
notifempty
missingok
copytruncate
}

In this case, that process was already shut down, nothing should have that file allocated. But this same symptom with logrotate doing nothing seems to happen with any file I try to rotate.

In case this is a security issue, the permission bits of /var/log are 755

Any help appreciated!

Last edited by pludi; 04-07-2010 at 05:46 PM.. Reason: code, not quote
# 2  
Old 04-07-2010
Check the man page of logrotate again (emphasis added):
Quote:
-d
Turns on debug mode and implies -v. In debug mode, no changes will be made to the logs or to the logrotate state file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Pro*c file Compiling Issue in suse Linux

The existing .pc (pro *C) file is running successfully in UNIX. But when Iam trying to compile this same file in LINUX using proc iname filename.pc, Iam getting an error, proc file not recognized. Could someone help how to generate execute file from the proc*c file. what are the prerequisites... (2 Replies)
Discussion started by: vikrambharat
2 Replies

2. Linux

Issue with vsftpd in Suse

Hi, I have SUSE LINUX Enterprise Server 9. One of (non-root) user ia facing very strange issue and I am not able to fix it. He is able to cd into a directory when he logged in through OS ssh, but can not do so when he do ftp. I am using vsftpd. root@prod_ftp_ser03:/> su - don prod_ftp_ser03:... (4 Replies)
Discussion started by: solaris_1977
4 Replies

3. AIX

Logrotate - /etc/logrotate.conf does't exist

Hi Admins. I have installed logrotate rpm on Aix 6.1. After the installation of rpm, I don't find /etc/logrotate.conf file and /etc/logrotate.d dir . The config file is located in /opt/freeware/etc/logrotate.conf. When I ran logrotate -v /opt/freeware/etc/logrotate.conf I get below... (2 Replies)
Discussion started by: snchaudhari2
2 Replies

4. Red Hat

Logrotate issue in RHEL

Hi, I have a requirement to compress logs that generate daily. Below is the logrotate configuration for this But for some kind of reason the logs are not getting compressed daily. When tried to execute the logrotate manually with -d it says "log does not need rotating." The path... (0 Replies)
Discussion started by: EmbedUX
0 Replies

5. Shell Programming and Scripting

Logrotate - I am not able to rotate files using logrotate

I have written script which is working in Home directory perfectly and also compressing log files and rotating correctly. But, when i try to run script for /var/log/ i am able to get compressed log files but not able to get rotation of compressed log files. Please suggest. I am using below command... (5 Replies)
Discussion started by: VSom007
5 Replies

6. Shell Programming and Scripting

Facing Issue after configuring logrotate

Hi, I have a logrotate configuration which rotates a log every night 1 min before midnight, but somehow its not working and unfortunately not showing any error message as well. Sharing the code for the cron job as well as the conf file, I am using, if some one coule help me..whats wrong with... (2 Replies)
Discussion started by: Neeryan
2 Replies

7. SuSE

named service issue on Suse

Hi Experts, I have a virtual server of SUSE Linux Enterprise Server 10 (x86_64). I am having strange issue of Naming services. Every 1 or 2 hours, named service stops working on this server and then I have to start it from "/etc/init./named start" I am not getting clue, where should I start... (0 Replies)
Discussion started by: solaris_1977
0 Replies

8. SuSE

Installin Suse 11 - Mouse issue using Remote Control

hi guys I want to exhaust all the possibilities so I'm going to ask this here I am installing a Suse 11 on IBM Blade Center using Remote Control. when using this is impossible to use the mouse I see the mouse but I have no control over it I try to move it but no way it moves to fast s no... (3 Replies)
Discussion started by: kopper
3 Replies

9. UNIX for Advanced & Expert Users

logrotate with /etc/logrotate.conf file

Hi there, I want to rotate the logfiles which are located in /var/log/jboss/tomcat* so I have created a file named as 'tomat' in /etc/logrotate.d/tomcat with the following content. # cat /etc/logrotate.d/tomcat /var/log/jboss/tomcat_access_log*.log { daily nocreate ... (2 Replies)
Discussion started by: skmdu
2 Replies

10. Filesystems, Disks and Memory

IDE controlled / RAID card issue Suse 9.2

I just built a new box to run Suse, and I guess I shoud have spent more time researching the HCL. Anyway, the Promise RAID card I have will not work, and I am unable to install the OS. The only other IDE devide in the box is a DVDOM. I can only think of 2 options, but would appreciate some... (1 Reply)
Discussion started by: 98_1LE
1 Replies
Login or Register to Ask a Question