Reload и логер

Questions related to general functionality
Post Reply
circul
Posts: 1
Joined: 23 Aug 2016, 18:16

Reload и логер

Post by circul »

Привет :)

Есть пара вопросов, явных ответов на которые не нашёл.
1: как рботает команда reload, что именно можно перегрузить с её помощью ?
2: как работает логер ?

Касаемо второго вопроса есть следующая ситуация: в конфиге прописано писать лог в файл и в syslog. Основным по задумке должен быть syslog, и некоторые особенности выводить в файлы (log-emerg и log-fail-file). Итоговая конфигурация выглядит так:
Спойлер

Code: Select all

[modules]

log_file
# log_tcp
# log_pgsql
log_syslog
pptp
pppoe
#ipoe
#l2tp
# auth_pap
auth_mschap_v2
auth_mschap_v1
auth_chap_md5
#chap-secrets
radius
ippool
# ipv6pool
sigchld
pppd_compat
shaper
# net-snmp
# logwtmp
# connlimit

[core]

#  Path to file for core module error logging
log-error=/var/log/accel-ppp/error.log

# Number of working threads, optimal - number of processors/cores
thread-count=4

[log]

# Path to file to write general log
log-file=/var/log/accel-ppp/general.log

#  Path to file to write emergency messages
log-emerg=/var/log/accel-ppp/emerg.log

# Path to file to write authentication failed session log
log-fail-file=/var/log/accel-ppp/auth.log

#  Send logs to specified host
# log-tcp=x.x.x.x:port

# Send logs to system logger. Facility may be: daemon, local0-local7 or numeric value
syslog=accel-pppd,daemon

# If this options is given and greater then zero logging engine will duplicate session log in general log.
#   (Useful when per-session/per-user logs are not used)
#copy=1

# Directory for session logs. If specified each session will be logged separately to file which name is unique session identifier
# per-session-dir=dir

#  Directory for user logs. If specified all sessions of same user will be logged to file which name is user name
# per-user-dir=dir

#  If specified and n is greater then zero each session of same user will be logger separately to directory specified
#   by "per-user-dir" and subdirectory which name is user name and to file which name os unique session identifier
# per-session=n

#  Specifies log level which values are:
#       0 turn off all logging
#       1 log only error messages
#       2 log error and warning messages
#       3 log error, warning and minimum information messages (use this level in conjuction with verbose option of other modules if you need
#          verbose logging)
#       4 log error, warning and full information messages (use this level in conjuction with verbose option of other modules if you need
#          verbose logging)
#       5 log all messages including debug messages
level=3
Теперь о "ньюансе" - как я уже говорил выше, основная информация должна направляться в syslog и некоторая дополнительная в файлы. Следовательно опция log-file была закоментирована. Команда reload не помогла, пришлось перестартовать сервис целиком. И пришлось наблюдать следующее:

Code: Select all

Aug 23 20:40:45 obl kernel: [36070.034467] accel-pppd[5534]: segfault at 20 ip 00007f2f78ef0bd0 sp 00007fff928a5098 error 6 in libpthread-2.19.so[7f2f78ee400
Отсюда и вопрос - это баг или так и задумано ?
P.S. Версия accel-я

Code: Select all

Aug 23 20:51:41 obl accel-pppd: accel-ppp version 810d23477a9ca33dfa2379c3fc742c3c56df3a9d
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Reload и логер

Post by dimka88 »

Все что приводит к сигфолт - это баг.
Команду reload отладить бы не помешало, думаю из за гибкости в конфигурации это будет не быстрый процесс.
Как минимум с помощью reload можно безболезненно уровень логов менять, но люди жаловались, что пропадают сессии, которые обрабатывал vlan_mon.
С core damp и accel-ppp собранного с debug думаю Дмитрию будет проще находить ошибки в коде.
Post Reply