
Версии FreeBSD 7.0-RELEASE-p9 и FreeBSD 6.3-RELEASE
newsyslog.conf
Код: Выделить всё
/var/log/ntp.log 644 5 100 * JC /var/run/ntpd.pid
Модератор: terminus
Код: Выделить всё
/var/log/ntp.log 644 5 100 * JC /var/run/ntpd.pid
Код: Выделить всё
# /etc/rc.d/ntpd status
ntpd is running as pid 72480.
# newsyslog -v
/var/log/auth.log <7J>: size (Kb): 2 [100] --> skipping
/var/log/console.log <5J>: does not exist, skipped.
/var/log/cron <3J>: size (Kb): 30 [100] --> skipping
/var/log/daily.log <7J>: does not exist, skipped.
/var/log/debug.log <7J>: size (Kb): 116 [100] --> trimming log....
/var/log/kerberos.log <7J>: does not exist, skipped.
/var/log/lpd-errs <7J>: size (Kb): 2 [100] --> skipping
/var/log/maillog <7J>: --> will trim at Thu Aug 20 00:00:00 2009
/var/log/messages <5J>: size (Kb): 22 [100] --> skipping
/var/log/monthly.log <12J>: does not exist, skipped.
/var/log/pflog <3J>: does not exist, skipped.
/var/log/ppp.log <3J>: size (Kb): 2 [100] --> skipping
/var/log/security <10J>: size (Kb): 116 [100] --> trimming log....
/var/log/sendmail.st <10>: age (hr): 123 [168] --> skipping
/var/log/slip.log <3J>: size (Kb): 2 [100] --> skipping
/var/log/weekly.log <5J>: does not exist, skipped.
/var/log/wtmp <3>: --> will trim at Tue Sep 1 05:00:00 2009
/var/log/xferlog <7J>: size (Kb): 2 [100] --> skipping
/var/log/ntp.log <5J>: size (Kb): 100 [100] --> trimming log....
Signal all daemon process(es)...
Notified daemon pid 589 = /var/run/syslog.pid
Pause 1 second(s) between signals
Notified daemon pid 72480 = /var/run/ntpd.pid
Pause 10 seconds to allow daemon(s) to close log file(s)
Compress all rotated log file(s)...
# /etc/rc.d/ntpd status
ntpd is not running.
Код: Выделить всё
# bzcat ntp.log.0.bz2 | tail
19 Aug 12:46:15 ntpd[72480]: synchronized to 80.68.242.188, stratum=3
19 Aug 12:46:15 ntpd[72480]: time reset -0.495656 s
19 Aug 12:46:15 ntpd[72480]: kernel time sync disabled 2041
Aug 19 12:46:33 mail newsyslog[72561]: logfile turned over due to size>100K
19 Aug 12:46:34 ntpd[72480]: ntpd exiting on signal 1
# cat ntp.log
Aug 19 12:46:33 mail newsyslog[72561]: logfile turned over due to size>100K
Пробовал. Работает, но в лог больше не пишет...terminus писал(а): а там в настройках newsyslog.conf кажется была фищка указывающая не посылать HUP процессу (или когда путь к pid не указан). короче ксли не hup-ать ntpd он дальше нормально не работает сам?
2 gralex
/var/log/ntpd.log 644 5 100 * ZC /var/run/ntpd.pid
ротация идет и все поднимается..
FreeBSD 7.1-STABLE
Код: Выделить всё
# grep ntp /etc/syslog.conf
ntp.* /var/log/ntp.log
Код: Выделить всё
# cat /etc/syslog.conf
*.err;kern.warning;auth.notice;mail.crit /dev/console
ntp.* /var/log/ntp.log
*.notice;ntp.none;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
security.* /var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
ftp.info /var/log/xferlog
cron.* /var/log/cron
Код: Выделить всё
# cat /etc/syslog.conf
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
security.* /var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
ftp.info /var/log/xferlog
cron.* /var/log/cron
*.=debug /var/log/debug.log
*.emerg *
!ntpd
*.* /var/log/ntp.log
Код: Выделить всё
# cat /var/log/ntp.log
Aug 21 11:22:54 ntpd[74988]: ntpd 4.2.0-a Fri Jan 30 14:18:09 MSK 2009 (1)
Aug 21 11:22:54 ntpd[74988]: precision = 1.676 usec
Aug 21 11:22:54 ntpd[74988]: kernel time sync status 2040
Aug 21 11:22:54 ntpd[74988]: frequency initialized -36.323 PPM from /var/db/ntpd.drift
Aug 21 11:22:54 ntpd[74988]: frequency initialized -35.495 PPM from /etc/ntp.drift
Aug 21 11:27:10 ntpd[74988]: synchronized to 89.111.168.177, stratum=3
Aug 21 11:27:10 ntpd[74988]: kernel time sync disabled 2041
Aug 21 11:27:18 ntpd[74988]: synchronized to 80.93.56.210, stratum=2
Код: Выделить всё
# grep ntp /var/log/messages
Aug 21 11:22:54 ntpd[74988]: ntpd 4.2.0-a Fri Jan 30 14:18:09 MSK 2009 (1)
Aug 21 11:27:10 ntpd[74988]: kernel time sync disabled 2041
Aug 21 11:33:45 ntpd[74988]: kernel time sync enabled 2001