2

I have this vague recollection of there being a switch you can configure syslog with which would force it to flush logs to disk right away so when your system hung you might be able to get some useful information out of it. Right now I'm getting a block full of zeroes '\0' where the block for the file was allocated but the log data never actually made it to disk. Did I dream that or am I just having a bad google day? (ubuntu 14.04)

  • Another idea is to let syslog write the log over the network to a remote server. – ott-- Jul 9 '15 at 19:04
  • Which syslog? Sending a HUP will usually cause log files to be opened and closed and executing sync after that should do the trick. – Mark Wagner Jul 9 '15 at 19:21
  • the problem is the machine is freezing up, I need it to write to disk so when I reboot after it seizes up there's still something to look at. – stu Jul 9 '15 at 19:23
2

I'm not familiar with a syslog implementation that has a command line option to flush logs to disk. Many syslog implementations flush logs to disk by default, but do not flush if the name of the log file in the syslog configuration file (e.g. /etc/syslog.conf) is preceded by a - (dash). This may be what you remember.

| improve this answer | |
  • I guess I dream things I want rather than what exists. Thanks. – stu Jul 10 '15 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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