Страница 1 из 1

Не пишутся логи SMARTD

Добавлено: 2007-08-23 11:01:12
Daywalker
Здравствуйте

Установил smartd

Код: Выделить всё

/home/seradmin/>pkg_info
....
smartmontools-5.37_1 S.M.A.R.T. disk monitoring tools
...
--------------------------------------------------------------------------------------------------------------
ps aux | grep smartd
root       923  0,0  0,4  2512  1012  ??  S    сб17      0:00,15 /usr/local/sbin/smartd -p /var/run/smartd.pid -l local2
--------------------------------------------------------------------------------------------------------------
less /etc/rc.conf
...
# Monitoring HDD
smartd_enable="YES"
smartd_flags="-l local2"
--------------------------------------------------------------------------------------------------------------
>less /usr/local/etc/smartd.conf
# First (primary) ATA/IDE hard disk.  Monitor all attributes, enable
# automatic online data collection, automatic Attribute autosave, and
# start a short self-test every day between 2-3am, and a long self test
# Saturdays between 3-4am.
/dev/ad0 -a -o on -S on -s (S/../.././02|L/../../6/03)
--------------------------------------------------------------------------------------------------------------
smartctl -i /dev/ad0
smartctl version 5.37 [i386-portbld-freebsd6.2] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family:     IBM/Hitachi Deskstar 120GXP family
Device Model:     IC35L040AVVN07-0
Serial Number:    VNP200B2G4ZRYB
Firmware Version: VA2OAE0X
User Capacity:    41 174 138 880 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   5
ATA Standard is:  ATA/ATAPI-5 T13 1321D revision 1
Local Time is:    Thu Aug 23 11:18:17 2007 MSD
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Не пишет логи в /var/log/smartd.log. Файл есть, но он пустой

Код: Выделить всё

less /etc/syslog.conf
...
# S.M.A.R.T.
local2.*                                        /var/log/smartd.log
--------------------------------------------------------------------------------------------------------------
ll /var/log/smartd.log
-rw-r--r--  1 root  wheel  0 18 авг 15:18 /var/log/smartd.log
Перезагружал роутер, ждал целый день. Эффект один и тот же.

А теперь вопрос - Что делать? Или все нормально - нет ошибок нет и логов?

Re: Не пишутся логи SMARTD

Добавлено: 2007-08-23 11:12:30
Alex Keda
при запуске должен отписаться про запуск и число мониторенных девайсов.
дай syslog.conf целиком - может не в то место вставил

Re: Не пишутся логи SMARTD

Добавлено: 2007-08-23 11:46:11
Daywalker

Код: Выделить всё

23.08 12:41 [root:seradmin@DreamDay.gw]/home/seradmin/>less /etc/syslog.conf
# $FreeBSD: src/etc/syslog.conf,v 1.28 2005/03/12 12:31:16 glebius Exp $
#
#       Spaces ARE valid field separators in this file. However,
#       other *nix-like systems still insist on using tabs as field
#       separators. If you are sharing this file between systems, you
#       may want to use only tabs as field separators here.
#       Consult the syslog.conf(5) manpage.
*.err;kern.warning;auth.notice;mail.crit                /dev/console
*.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                                         *
# uncomment this to log all writes to /dev/console to /var/log/console.log
console.info                                    /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.*                                            @loghost
# uncomment these if you're running inn
# news.crit                                     /var/log/news/news.crit
# news.err                                      /var/log/news/news.err
# news.notice                                   /var/log/news/news.notice
!startslip
*.*                                             /var/log/slip.log
!ppp
*.*                                             /var/log/ppp.log
# S.M.A.R.T.
local2.*                                        /var/log/smartd.log



Re: Не пишутся логи SMARTD

Добавлено: 2007-08-23 20:41:15
Alex Keda
найди 10 отличий

Код: Выделить всё

# $FreeBSD: src/etc/syslog.conf,v 1.28 2005/03/12 12:31:16 glebius Exp $
#
#       Spaces ARE valid field separators in this file. However,
#       other *nix-like systems still insist on using tabs as field
#       separators. If you are sharing this file between systems, you
#       may want to use only tabs as field separators here.
#       Consult the syslog.conf(5) manpage.
*.err;kern.warning;auth.notice;mail.crit                /dev/console
*.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.*                                          /var/log/maillog
lpr.info                                        /var/log/lpd-errs
ftp.info                                        /var/log/xferlog
cron.*                                          /var/log/cron
*.=debug                                        /var/log/debug.log
*.emerg                                         *
# S.M.A.R.T.
local2.*                                        /var/log/smartd.log
# uncomment this to log all writes to /dev/console to /var/log/console.log
#console.info                                   /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.*                                            @loghost
# uncomment these if you're running inn
# news.crit                                     /var/log/news/news.crit
# news.err                                      /var/log/news/news.err
# news.notice                                   /var/log/news/news.notice
# TFTPd
!tftpd
*.*                                             /var/log/tftpd.log
!startslip
*.*                                             /var/log/slip.log
!ppp
*.*                                             /var/log/ppp.log

Re: Не пишутся логи SMARTD

Добавлено: 2007-08-24 9:36:53
Daywalker
Да, перенеся local2.* выше, как у Лиса и закомментировав строку

Код: Выделить всё

#console.info                                   /var/log/console.log
все заработало.

А что есть разница в какой последовательности стоят строчки, какие логи куда писать?
Я думал, что все равно куда воткнуть local2.*. Разъясните, пожалуйста, на пальцах, чтобы потом не ошибиться с ведением логов.

P.S. Спасибо Лис

Re: Не пишутся логи SMARTD

Добавлено: 2007-08-24 9:42:06
Alex Keda
могу тока в ман послать.
что порядок имеет значение - вычитал там.
причин - непомню.

Re: Не пишутся логи SMARTD

Добавлено: 2007-11-19 3:10:11
Петруччо
Лисяра подскажи еще по логам плз.. Удалил /var/log/ppp.log и теперь в ppp.log при соединении pppoe ничего не пишется. :(

Re: Не пишутся логи SMARTD

Добавлено: 2007-11-19 9:15:31
Alex Keda
ну если ты его удалил - вполне логично, не находишь? :)

Re: Не пишутся логи SMARTD

Добавлено: 2007-11-19 10:33:22
schizoid

Код: Выделить всё

#touch /var/log/ppp.log
#/etc/rc.d/syslogd restart

Re: Не пишутся логи SMARTD

Добавлено: 2007-11-20 22:31:39
Петруччо
) Спасибо. Только непойму, почему обычный kill syslogd и запуск вновь не заставил его писать логи как restart :?

Re: Не пишутся логи SMARTD

Добавлено: 2012-03-28 8:31:21
Vlad5503
Похожая история..
обнаружил, что перестал писаться /var/log/security.
перепробовал
1. менял ipfw_verbose и ipfw_verbose_limit,
2. сделал sysctl net.inet.ip.fw.verbose=0,
3. пробовал kill -HUP syslogd,
4. делал /etc/rc.d/syslogd restart,
5. права проверил на файл /var/log/security, стоят 600,
Но так и не пишется.