logrotate deletes all maillogs older than one day The Next CEO of Stack Overflowlogrotate problemsLogrotate Successful, original file goes back to original sizeHow do I tell logrotate what files to rotate with cron?logrotate fails to instruct Apache to reopen logs on Amazon LinuxLogrotate doesn't work from cron on CentOSHow to rotate log based on an interval unless log exceeds a certain size?logrotate cron job not rotating certain logsRsyslog stops sending data to remote server after log rotationSyslog-ng and Logrotate creating sparse filesSELinux denies “systemctl kill” when used in Anacron postrotate script on CentOS 7
Reference request: Grassmannian and Plucker coordinates in type B, C, D
Why is my new battery behaving weirdly?
Why isn't the Mueller report being released completely and unredacted?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
Powershell. How to parse gci Name?
Is wanting to ask what to write an indication that you need to change your story?
RigExpert AA-35 - Interpreting The Information
Bartok - Syncopation (1): Meaning of notes in between Grand Staff
I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin
Do I need to write [sic] when a number is less than 10 but isn't written out?
Won the lottery - how do I keep the money?
Math-accent symbol over parentheses enclosing accented symbol (amsmath)
Does soap repel water?
Method for adding error messages to a dictionary given a key
Does it make sense to invest money on space investigation?
INSERT to a table from a database to other (same SQL Server) using Dynamic SQL
How many extra stops do monopods offer for tele photographs?
Solving system of ODEs with extra parameter
Why does the flight controls check come before arming the autobrake on the A320?
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
Why did CATV standarize in 75 ohms and everyone else in 50?
How to count occurrences of text in a file?
Some questions about different axiomatic systems for neighbourhoods
Writing differences on a blackboard
logrotate deletes all maillogs older than one day
The Next CEO of Stack Overflowlogrotate problemsLogrotate Successful, original file goes back to original sizeHow do I tell logrotate what files to rotate with cron?logrotate fails to instruct Apache to reopen logs on Amazon LinuxLogrotate doesn't work from cron on CentOSHow to rotate log based on an interval unless log exceeds a certain size?logrotate cron job not rotating certain logsRsyslog stops sending data to remote server after log rotationSyslog-ng and Logrotate creating sparse filesSELinux denies “systemctl kill” when used in Anacron postrotate script on CentOS 7
I see only two files maillog and maillog.1 in /var/log.
grepping for maillog in logrotate.d directory gives three files that have a mention of maillog.
syslog
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
#/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron
syslog-ng
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/kern.log /var/log/kern
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
and maillog.
/var/log/maillog true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null
I am new to logrotate so may be I am missing something obvious. What can be the issue? The setup was already done when I started managing the server so I don't also know as do why do I have 3 mentions for maillog in logrotate.
log-files logrotate
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I see only two files maillog and maillog.1 in /var/log.
grepping for maillog in logrotate.d directory gives three files that have a mention of maillog.
syslog
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
#/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron
syslog-ng
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/kern.log /var/log/kern
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
and maillog.
/var/log/maillog true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null
I am new to logrotate so may be I am missing something obvious. What can be the issue? The setup was already done when I started managing the server so I don't also know as do why do I have 3 mentions for maillog in logrotate.
log-files logrotate
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Can you also post your default logrotate configuration /etc/logrotate.conf?
– panaroik
Sep 20 '12 at 9:55
@panaroik Please find the defaults here sprunge.us/CQFF
– Abhijeet Rastogi
Sep 20 '12 at 10:21
add a comment |
I see only two files maillog and maillog.1 in /var/log.
grepping for maillog in logrotate.d directory gives three files that have a mention of maillog.
syslog
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
#/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron
syslog-ng
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/kern.log /var/log/kern
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
and maillog.
/var/log/maillog true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null
I am new to logrotate so may be I am missing something obvious. What can be the issue? The setup was already done when I started managing the server so I don't also know as do why do I have 3 mentions for maillog in logrotate.
log-files logrotate
I see only two files maillog and maillog.1 in /var/log.
grepping for maillog in logrotate.d directory gives three files that have a mention of maillog.
syslog
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
#/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron
syslog-ng
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/kern.log /var/log/kern
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
and maillog.
/var/log/maillog true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null
I am new to logrotate so may be I am missing something obvious. What can be the issue? The setup was already done when I started managing the server so I don't also know as do why do I have 3 mentions for maillog in logrotate.
log-files logrotate
log-files logrotate
asked Sep 20 '12 at 9:16
Abhijeet RastogiAbhijeet Rastogi
167116
167116
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Can you also post your default logrotate configuration /etc/logrotate.conf?
– panaroik
Sep 20 '12 at 9:55
@panaroik Please find the defaults here sprunge.us/CQFF
– Abhijeet Rastogi
Sep 20 '12 at 10:21
add a comment |
Can you also post your default logrotate configuration /etc/logrotate.conf?
– panaroik
Sep 20 '12 at 9:55
@panaroik Please find the defaults here sprunge.us/CQFF
– Abhijeet Rastogi
Sep 20 '12 at 10:21
Can you also post your default logrotate configuration /etc/logrotate.conf?
– panaroik
Sep 20 '12 at 9:55
Can you also post your default logrotate configuration /etc/logrotate.conf?
– panaroik
Sep 20 '12 at 9:55
@panaroik Please find the defaults here sprunge.us/CQFF
– Abhijeet Rastogi
Sep 20 '12 at 10:21
@panaroik Please find the defaults here sprunge.us/CQFF
– Abhijeet Rastogi
Sep 20 '12 at 10:21
add a comment |
1 Answer
1
active
oldest
votes
- The first one is created by default.
- The second one is created when installing
syslog-ng. - The previous sysadmin creates the third one manually (maybe).
Which syslog service are you running?
ps -ef | grep syslog
UPDATE
Since you're using syslog-ng, all of the postrotate scripts are wrong, change it to something like this:
postrotate
/bin/kill -HUP `cat /opt/syslog-ng/var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
endscript
then run in debug mode (no changes will be made to the logs) to see what happens:
logrotate -d -f /etc/logrotate.d/syslog-ng
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have setrotate 14inmaillog.
– Abhijeet Rastogi
Sep 20 '12 at 9:48
ls -l /var/log/maillog.1?
– quanta
Sep 20 '12 at 14:36
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f430175%2flogrotate-deletes-all-maillogs-older-than-one-day%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
- The first one is created by default.
- The second one is created when installing
syslog-ng. - The previous sysadmin creates the third one manually (maybe).
Which syslog service are you running?
ps -ef | grep syslog
UPDATE
Since you're using syslog-ng, all of the postrotate scripts are wrong, change it to something like this:
postrotate
/bin/kill -HUP `cat /opt/syslog-ng/var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
endscript
then run in debug mode (no changes will be made to the logs) to see what happens:
logrotate -d -f /etc/logrotate.d/syslog-ng
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have setrotate 14inmaillog.
– Abhijeet Rastogi
Sep 20 '12 at 9:48
ls -l /var/log/maillog.1?
– quanta
Sep 20 '12 at 14:36
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
add a comment |
- The first one is created by default.
- The second one is created when installing
syslog-ng. - The previous sysadmin creates the third one manually (maybe).
Which syslog service are you running?
ps -ef | grep syslog
UPDATE
Since you're using syslog-ng, all of the postrotate scripts are wrong, change it to something like this:
postrotate
/bin/kill -HUP `cat /opt/syslog-ng/var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
endscript
then run in debug mode (no changes will be made to the logs) to see what happens:
logrotate -d -f /etc/logrotate.d/syslog-ng
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have setrotate 14inmaillog.
– Abhijeet Rastogi
Sep 20 '12 at 9:48
ls -l /var/log/maillog.1?
– quanta
Sep 20 '12 at 14:36
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
add a comment |
- The first one is created by default.
- The second one is created when installing
syslog-ng. - The previous sysadmin creates the third one manually (maybe).
Which syslog service are you running?
ps -ef | grep syslog
UPDATE
Since you're using syslog-ng, all of the postrotate scripts are wrong, change it to something like this:
postrotate
/bin/kill -HUP `cat /opt/syslog-ng/var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
endscript
then run in debug mode (no changes will be made to the logs) to see what happens:
logrotate -d -f /etc/logrotate.d/syslog-ng
- The first one is created by default.
- The second one is created when installing
syslog-ng. - The previous sysadmin creates the third one manually (maybe).
Which syslog service are you running?
ps -ef | grep syslog
UPDATE
Since you're using syslog-ng, all of the postrotate scripts are wrong, change it to something like this:
postrotate
/bin/kill -HUP `cat /opt/syslog-ng/var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
endscript
then run in debug mode (no changes will be made to the logs) to see what happens:
logrotate -d -f /etc/logrotate.d/syslog-ng
edited Sep 21 '12 at 6:47
answered Sep 20 '12 at 9:31
quantaquanta
43.3k15114196
43.3k15114196
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have setrotate 14inmaillog.
– Abhijeet Rastogi
Sep 20 '12 at 9:48
ls -l /var/log/maillog.1?
– quanta
Sep 20 '12 at 14:36
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
add a comment |
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have setrotate 14inmaillog.
– Abhijeet Rastogi
Sep 20 '12 at 9:48
ls -l /var/log/maillog.1?
– quanta
Sep 20 '12 at 14:36
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have set rotate 14 in maillog.– Abhijeet Rastogi
Sep 20 '12 at 9:48
/opt/syslog-ng/sbin/syslog-ng --no-caps. So, why are logs only 1 day old wven though I have set rotate 14 in maillog.– Abhijeet Rastogi
Sep 20 '12 at 9:48
ls -l /var/log/maillog.1?– quanta
Sep 20 '12 at 14:36
ls -l /var/log/maillog.1?– quanta
Sep 20 '12 at 14:36
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
sprunge.us/IfDY. I even removed the duplicate logs and still the problem persists.
– Abhijeet Rastogi
Sep 21 '12 at 5:18
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
Which part did you remove? updated my answer.
– quanta
Sep 21 '12 at 6:48
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f430175%2flogrotate-deletes-all-maillogs-older-than-one-day%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you also post your default logrotate configuration /etc/logrotate.conf?
– panaroik
Sep 20 '12 at 9:55
@panaroik Please find the defaults here sprunge.us/CQFF
– Abhijeet Rastogi
Sep 20 '12 at 10:21