FastNetMon

Wednesday 19 May 2010

Что за черточки перед файлами в rsyslog.conf?

Пример черточек:
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err


I assume that the hyphens in rsyslog.conf in front of some filenames
indicate that these files aren't synced after every message, but
there's no information about this in the manpage.


По логике в принципе это согласуется с тем, что я вижу в конфиге.

http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/f48a038c0b502814

6 comments :

  1. это значит, что демон не будет сразу же делать flush (синхронизировать) данные в файл на диск - уменьшается загрузка диска - увеличивается вероятность потери логов.

    ReplyDelete
  2. Ага, спасибо. А первоисточник есть? Нигде в манах не нашел просто.

    ReplyDelete
  3. случайно нашел где-то на opennet
    а так наверное только на англоязычных ресурсах разработчиков, увы.

    ReplyDelete
  4. Или как всегда - в коде.

    ReplyDelete
  5. http://www.rsyslog.com/doc/rsyslog_conf_actions.html

    You may prefix each entry with the minus "-'' sign to omit syncing the file after every logging. Note that you might lose information if the system crashes right behind a write attempt. Nevertheless this might give you back some performance, especially if you run programs that use logging in a very verbose manner.

    ReplyDelete

Note: only a member of this blog may post a comment.