Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If there are errors in the postrotate script block, where are they logged in Ubuntu?

share|improve this question
If the answer helped you, please consider marking it as accepted. If it hasn't helped, leave a comment and I can follow up. – Aaron Copley Dec 11 '12 at 12:50
up vote 1 down vote accepted

I am pretty sure any errors are just dumped to stderr. You should be able to redirect your postrotate to a file with basic I/O redirection. I'm not sure if Ubuntu has the same file, but there should be an equivalent to the following;

Looking in my /etc/logrotate.d/syslog, I see that the /bin/kill command's stderr is redirected to /dev/null. There's no reason this couldn't be changed to a regular file descriptor.

/bin/kill -HUP `cat /var/run/ 2> /dev/null` 2> /dev/null || true
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.