Sponsored Content
Operating Systems Linux Debian Logrotate truncated my log files to 0 bytes and no logs are written Post 302608053 by pmatsinopoulos on Friday 16th of March 2012 03:28:14 AM
Old 03-16-2012
Question Logrotate truncated my log files to 0 bytes and no logs are written

Hi,

Yesterday I installed and configured logrotate on my Debian machine. I was expecting this to run at 06:25 in the morning and it actually did. All my old logs were compressed and zipped but the new logs were all with size equal to 0 bytes. Processes, while still running ok, they were not writing any log since the time of the logrotate process finished.

My logrotate configuration was:

Code:
compress

/home/foo/production/source/log/*.log {
  rotate 7 
  daily
  dateext
  extension log
}

Any clue why this might have happened?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

restrict data from getting written to Logs

$SYBASE/bin/isql -U $DB_USERID -S $DB_SERVER << ! >> $OUTFILE `echo $DB_PASSWD` use $db go Print " The processing" go ! # Extract data to file echo $DB_PASSWD | $SYBASE/bin/bcp $WRK_DB..open out $CONV_DIR/open".csv -t\, -c -U $DB_USERID -S $DB_SERVER -b 1000 | tail -3 I am able to... (0 Replies)
Discussion started by: w020637
0 Replies

2. UNIX for Advanced & Expert Users

how to logrotate log files

Hi, I have written a script that runs every five minutes in cron schedular. The Operating system is Fedora core 9. This script generates 2 log files, these log file size is increasing as some log data is being dumped into these 2 log files every five minutes. I need to logrotate these 2 files.... (1 Reply)
Discussion started by: renuka
1 Replies

3. SuSE

Which logs to logrotate?

Hi all We've had new servers coming in and one of the requirement was to keep logs for up to 8 months. I know logrotate can do the job, but by default (on Suse Enterprise10, 11) we have these logs in /etc/logrotate.d dir as default logs which are rotated: -rw-r--r-- 1 root root 140 Jul... (0 Replies)
Discussion started by: hedkandi
0 Replies

4. Shell Programming and Scripting

Redirect all logs files contents into a single log file

Hi , I have a Data cleansing process which creates different log file for each step , when the process runs it creates following log files in below order: p1_tranfrmr_log.txt p1_tranfrmr_stats.txt p2_globrtr_log.txt p2_globrtr_stats.txt p3_cusparse_log.txt p3_cusparse_stats.txt ' '... (8 Replies)
Discussion started by: sonu_pal
8 Replies

5. Shell Programming and Scripting

Help needed on Perl Script to Handle Log files that are rotated using logrotate

Hello all, I am working on a perl script which will read weblogic logfile and send the error messages to Zenoss Monitoring tool. At present the script works and it can able to send the error messages to Zenoss. The problem comes when the logrotate has been applied to the weblogic log file. At... (3 Replies)
Discussion started by: kar_333
3 Replies

6. UNIX for Dummies Questions & Answers

X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ??

Hello guys. I really hope someone will help me with this one.. So, I have to write this script who: - creates a file home/student/vmdisk of 10 mb - formats that file to ext3 - mounts that partition to /mnt/partition - creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies

7. 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

8. Shell Programming and Scripting

How to disable cron emails, but only for logrotate only not for other logs?

Guys, is there a script or command? how to disable cron emails, but only for logrotate only not for other logs (3 Replies)
Discussion started by: kenshinhimura
3 Replies

9. Shell Programming and Scripting

To check if a file is open and in use (logs are being written to it)

Hello Experts, I need to write a shell script to check if a file is open and something is being written to it. I want to know how OS handles it. I checked with lsof command but it is not working. For a test I did this. while true; do echo `date` >>abc.txt; done then I checked lsof |... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies

10. UNIX and Linux Applications

Logrotate with catalina.out "daily compressed file is overwriting the logs"

Hi Everyone, We are trying to do a logrotate for "catalina.out" daily, So have used the "copytruncate" option in the logrotate configuration but ended up seeing there was a 0kb file touched with "catalina.out" and the other file with the current date(compressed) file created and seems the log is... (2 Replies)
Discussion started by: thiyagoo
2 Replies
BUILDSLAVE(1)							   User Commands						     BUILDSLAVE(1)

NAME
buildslave - a tool for managing buildbot slave instances SYNOPSIS
buildslave [ global options ] command [ command options ] buildslave create-slave [ -q|--quiet ] [ -f|--force ] [ -r|--relocatable ] [ -n|--no-logrotate ] [ -k|--keepalive TIME ] [ --usepty {0|1} ] [ --umask UMASK ] [ -s|--log-size SIZE ] [ -l|--log-count COUNT ] [ --verbose ] PATH MASTER USERNAME PASSWORD buildslave [ --verbose ] { start|stop|restart } [ PATH ] buildslave [ --verbose ] { --help|--version } buildslave command -h|--help DESCRIPTION
The `buildslave' command-line tool can be used to start or stop a buildslave or create a new buildslave instance. OPTIONS
Commands create-slave Create and populate a directory for a new buildslave start Start a buildslave stop Stop a buildslave restart Restart a buildslave Global options -h|--help Print the list of available commands and global options. All subsequent commands are ignored. --version Print twistd and buildslave version. All subsequent commands are ignored. --verbose Verbose output. create-slave command options -f|--force Re-use an existing directory. -h|--help Show help for current command and exit. All subsequent commands are ignored. -k|--keepalive Send keepalive requests to buildmaster every TIME seconds. Default value is 600 seconds. -l|--log-count Limit the number of kept old twisted log files to COUNT. All files are kept by default. -q|--quiet Do not emit the commands being run. -r|--relocatable Create a relocatable buildbot.tac. -n|--no-logrotate Do not permit buildslave rotate logs by itself. -s|--log-size Set size at which twisted lof file is rotated to SIZE bytes. Default value is 1000000 bytes. --umask Set umask for files created by buildslave. Default value is 077 which means only owner can access the files. See umask(2) for more details. --usepty Set wether child processes should be run in a pty (0 means do not run in a pty). Default value is 0. PATH Path to buildslave base directory. MASTER Set the host and port of buildbot master to attach to in form HOST:PORT. This should be provided by buildmaster administrator. USERNAME Buildslave name to connect with. This should be provided by buildmaster administrator. PASSWORD Buildslave password to connect with. This should be provided by buildmaster administrator. SEE ALSO
buildbot(1), umask(2), The complete documentation is available in texinfo format. To use it, run info buildbot. Buildbot August 2010 BUILDSLAVE(1)
All times are GMT -4. The time now is 04:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy