[syslog-ng] Trying to let my harddrive spin down once in a while

Lars Stokholm lars.stokholm at gmail.com
Mon Jul 11 22:02:57 CEST 2011


What do you mean by it's internal log messages? These?
destination d_syslog { file("/var/log/syslog.log"); };

flush_timeout worked perfectly. I tried to set it to 10 minutes and
that's exactly how long my harddrive was allowed to stay spun down.
But on the other hand I have a guarantee that it'll spin up every 10
minutes, forever, although there's absolutely no reason for it.

I didn't try removing all the log paths, since I was not sure exactly
how I was supposed to do it and since it's not really clear to me what
I'll gain from it. :)

I did, on the other hand, try running strace on syslog-ng and this is
was I got just before my harddrive would wake up, every time:
http://pastebin.com/raw.php?i=hFZVurBP

What can you make from this strace output? The same pattern was
repeated again and again. I guess "/usr/sbin/cr" is the cut-off path
to crond.

On Mon, Jul 11, 2011 at 8:49 PM, Paul Krizak <paul.krizak at amd.com> wrote:
> Are you doing anything with syslog-ng's internal log messages?  It's
> maintaining counters and such internally that I believe get written out
> to disk by default once per minute.
>
> But since that's a normal log path, that should be controlled by
> flush_timeout() as well.
>
> Start by trying the flush_timeout() setting, and if that works, then at
> least you know that is something in a log path somewhere causing the
> trouble.
>
> Another thing you could try is removing all of your log paths (not just
> routing them to /dev/null) and see how syslog-ng behaves.
>
> Finally, if you still can't nail it down, use strace to trace syslog-ng
> during a period where it causes the disks to spin up.  You should be
> able to at least see the file it's trying to write.  For example, it
> might be updating its pid file in /var/run once per minute.
>
> Paul Krizak                         7171 Southwest Pkwy MS B200.3A
> MTS Systems Engineer                Austin, TX  78735
> Advanced Micro Devices              Desk:  (512) 602-8775
> Linux/Unix Systems Engineering      Cell:  (512) 791-0686
> Global IT Infrastructure            Fax:   (512) 602-0468
>
> On 07/11/2011 11:33 AM, Lars Stokholm wrote:
>> And I forgot to add to that, that killing syslog-ng, but keeping crond
>> alive, will also allow my harddrive to stay spinned down, so this is
>> not crond's fault. As soon as I start syslog-ng I see log entries in
>> trace_pipe and my disk starts to wake up a lot.
>>
>> On Mon, Jul 11, 2011 at 8:28 PM, Lars Stokholm<lars.stokholm at gmail.com>  wrote:
>>> I see, that makes sense. Thanks. I would also like to avoid it if
>>> possible. But in order to avoid it, I have to find out why this is
>>> happening:
>>>
>>>>>>>>> As you can probably see, syslog-ng writes every minute at least. I guess
>>>>>>>>> that's because my user crontab has a command that gets run every minute.
>>>>>>>>> What I don't get is why syslog-ng writes to the disk, even though I'm
>>>>>>>>> telling it not to log crond's output.
>>>
>>> Any ideas? As you can see from my syslog-ng.conf, everything that has
>>> to do with crond is sent to /dev/null. So crond output shouldn't cause
>>> a spin-up of my harddrive, but it does. Killing crond or removing the
>>> once-per-minute-command from my user crontab will allow my harddrive
>>> to stay spinned down for a long period of time. But I would rather not
>>> do either.
>>>
>> ______________________________________________________________________________
>> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
>> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
>> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>>
>>
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>


More information about the syslog-ng mailing list