Mathew Snyder wrote:
> A friend asked an interesting question. He was telling me about how
> his Apache logs are nailing his hard drive and was wondering if there
> is a way for syslog to cache log data before writing it to disk. There
> are methods such as ramlog which will create a ramdisk at startup and
> then mount it at /var/log only writing to disk at system shutdown.
> This would be a kludgy solution as it would require a cron job to shut
> down the service before it became full forcing it to write the log
> data to disk and then restarting it. There are too many variables in
> that solution.
>
> Does syslog or syslog-ng have such an option? I Googled around but
> came up empty.
>
> -Mathew
for syslog, prefix the log file with "-" to disable fsync for every log
entry.
see "man syslog.conf"
syslog-ng has a similar flag, but I don't run syslog-ng currently.
As for Apache, you sure you are writing through syslog?
access_log and error_log are usually written directly by the httpd
process. There might be a flag in apache, but I haven't researched it.
Just remember that upon server crash, you most likely will not have
anything to refer to about the crash, as it would have been wiped from
memory.
--
END OF LINE
--MCP
_______________________________________________
Tech mailing list
[email protected]
http://lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/