Por que o Postfix no Linux requer um caractere “-” antes do nome do caminho do arquivo de log?

3

Encontrei o seguinte aqui :

IMPORTANT: on Linux you need to put a "-" character before the pathname, e.g., -/var/log/maillog, otherwise the syslogd process will use more system resources than Postfix.

Mas a documentação não fornece nenhum motivo para isso. Então, por que esse "-" é necessário?

    
por Metalcoder 10.04.2013 / 14:18

1 resposta

7

isso só é necessário se você ainda usar o syslogd ou versões mais antigas do rsyslog

do link , seção "Sincronização de arquivos de saída"

Rsyslogd tries to keep as compatible to stock syslogd as possible. As such, it retained stock syslogd's default of syncing every file write if not specified otherwise (by placing a dash in front of the output file name). While this was a useful feature in past days where hardware was much less reliable and UPS seldom, this no longer is useful in today's worl. Instead, the syncing is a high performace hit. With it, rsyslogd writes files around 50 times slower than without it. It also affects overall system performance due to the high IO activity. In rsyslog v3, syncing has been turned off by default. This is done via a specific configuration directive "$ActionFileEnableSync on/off" which is off by default. So even if rsyslogd finds sync selector lines, it ignores them by default. In order to enable file syncing, the administrator must specify "$ActionFileEnableSync on" at the top of rsyslog.conf. This ensures that syncing only happens in some installations where the administrator actually wanted that (performance-intense) feature. In the fast majority of cases (if not all), this dramatically increases rsyslogd performance without any negative effects.

    
por 10.04.2013 / 14:28