Страница 1 из 1
smartmontools не пишет в лог.
Добавлено: 2006-08-11 10:41:40
Dromok
Пытаюсь по статье -
http://www.lissyara.su/?id=1163 прикрутить smartmontools на FreeBSd 5.4 , все работает, по команде
исправно выдает информацию.
Вот только
Дальше рихтуем /etc/syslogd.conf, вносим такие строки:
# S.M.A.R.T.
local2.* /var/log/smartd.log
у меня не
/etc/syslogd.conf а
/etc/syslog.conf
Из-за этого может быть проблема?
Дальше все по статье
Код: Выделить всё
/home/pol/>ps -ax | grep smart
61837 ?? I 0:00,21 /usr/local/sbin/smartd -p /var/run/smartd.pid -l local2 --interval=300
60204 p0 S+ 0:00,01 grep smart
/home/pol/>
однако /var/log/smartd.log пустой.
Re: smartmontools не пишет в лог.
Добавлено: 2006-08-11 10:53:35
Alex Keda
Dromok писал(а):Дальше рихтуем /etc/syslogd.conf, вносим такие строки:
# S.M.A.R.T.
local2.* /var/log/smartd.log
у меня не
/etc/syslogd.conf а
/etc/syslog.conf
это в статье ошибка. ща поправлю.
делал?
Добавлено: 2006-08-11 10:55:20
Dromok
да делал.
Добавлено: 2006-08-11 10:58:03
Alex Keda
перезапусти smartd
Добавлено: 2006-08-11 11:03:57
Dromok
сделал. он сразу должен в лог писать?
Добавлено: 2006-08-11 11:07:12
Alex Keda
ну да ,при запуске, типа такого:
Код: Выделить всё
Jul 31 22:59:09 mx smartd[29811]: smartd version 5.36 [i386-portbld-freebsd6.1] Copyright (C) 2002-6 Bruce Allen
Jul 31 22:59:09 mx smartd[29811]: Home page is http://smartmontools.sourceforge.net/
Jul 31 22:59:09 mx smartd[29811]: Opened configuration file /usr/local/etc/smartd.conf
Jul 31 22:59:09 mx smartd[29811]: Configuration file /usr/local/etc/smartd.conf parsed.
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_00], opened
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_00], not found in smartd database.
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_00], enabled SMART Attribute Autosave.
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_00], enabled SMART Automatic Offline Testing.
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_00], is SMART capable. Adding to "monitor" list.
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_01], opened
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_01], not found in smartd database.
Jul 31 22:59:09 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_01], enabled SMART Attribute Autosave.
Jul 31 22:59:10 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_01], enabled SMART Automatic Offline Testing.
Jul 31 22:59:10 mx smartd[29811]: Device: /dev/twe0 [3ware_disk_01], is SMART capable. Adding to "monitor" list.
Jul 31 22:59:10 mx smartd[29811]: Monitoring 2 ATA and 0 SCSI devices
Добавлено: 2006-08-11 11:10:50
Dromok
нет ничего. пусто.
Добавлено: 2006-08-17 10:10:12
ikush
Добрый день, хотелось бы узнать, нашли причину такого поведения smartmontools? У меня такая же ситуация, OC 5.4 что только не пробовал, ничего не выходит. Не пишет лог и все. Такое ощущение что процесс висит, и ничего не делает. А ручками все отдает...
Добавлено: 2006-08-17 10:47:01
Alex Keda
не люблю пятую ветку...
глюкава...
===
обновись до 6-ки, или хотябы до текущей пятёрки (5.5 вроде)
Добавлено: 2006-08-17 12:30:32
ikush
Ну глюки есть в каждой ветке, и в каждом софте... особых пока не замечал. А все дело в том, что на 6.1 совершенно идентичная картина, если бы все, ну или почти все не перепробовал, наверное и не написал бы. Просто уже, это стало делом принципа, докопаться до сути, ну и сам сервис мониторинга как бы, тоже не лишний...
Добавлено: 2006-08-17 12:47:46
Alex Keda
вчера подымал по своей же статье...
всё пашет. 6.1
Добавлено: 2006-08-17 14:03:17
ikush
Жаль, будем копать дальше. Я уже неделю бьюсь, вот нашел так сказать родственные души... и увы..., ладно, как пойдет, обязательно напишу в чем была проблемма, что бы потом другие голову не ломали.
Добавлено: 2006-08-17 14:19:58
Alex Keda
чё-то вы не так делаете...
syslogd перезапускали?
в каком месте стоит правило по логированию?
Добавлено: 2006-08-17 14:20:14
Dromok
Ну хотя бы каким-нибудь образом отследить почему не пишет в лог.
вот мой syslog.conf
Код: Выделить всё
# $FreeBSD: src/etc/syslog.conf,v 1.26.6.2 2005/03/16 13:39:59 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
Добавлено: 2006-08-17 14:31:08
Alex Keda
Код: Выделить всё
/usr/home/lissyara/>cat /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.* /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
/usr/home/lissyara/>
выше нада...
Добавлено: 2006-08-17 15:01:49
Dromok
Блин, заработало!
Добавлено: 2006-08-18 2:21:29
ikush
Нашел причину, но, увы тут уже смотрю разобрались. На самом деле, просто строчку которая прописана в syslogd.conf local0.* нужно не оставлять последней а передвинуть выше. А вот насчет логов по умолчанию, так пока и не выяснил. Согласно документации они все равно должны писаться в /var/log/messages, но не пишуться...
Добавлено: 2006-08-18 8:08:57
Alex Keda
чё-то и тут неправильно у вас
Добавлено: 2006-08-19 19:05:27
Baneff
А у меня вот так работает (6.1).
В syslog.conf эти две строки:
!smartd
*.* /var/log/smartd.log
Для ротации логов в newsyslog.conf вот такую примерно строку:
/var/log/smartd.log 644 10 1000 * JC
Добавлено: 2006-12-13 1:01:00
jeweller
а у меня var/log/maillog не пишется.
все остальное пишется а майл лог нет....
конфы в сислоге прописаны...прост ов оин прекрасный момент перестло писаться..
Добавлено: 2006-12-13 1:14:48
Alex Keda
у syslog бывают такие приколы... в 4.11 если добавить на 1 строку комментов больше в начале, то логи вообще не пишутся. никакие...
бери оригинальный и правь потихоньку...
Re: smartmontools не пишет в лог.
Добавлено: 2009-03-25 18:31:17
lykich
Подскажите пожалуста как включить SMART ?
lykich# atacontrol cap ad0
Protocol ATA/ATAPI revision 6
device model SAMSUNG SV2011H
serial number 0454J1FT609582
firmware revision RL100-08
cylinders 16383
heads 16
sectors/track 63
lba supported 39179952 sectors
lba48 not supported
dma supported
overlap not supported
Feature Support Enable Value Vendor
write cache yes yes
read ahead yes yes
Tagged Command Queuing (TCQ) no no 0/0x00
SMART yes no
microcode download yes yes
security yes no
power management yes yes
advanced power management no no 0/0x00
automatic acoustic management yes no 0/0x00 128/0x80
Re: smartmontools не пишет в лог.
Добавлено: 2010-08-24 13:40:42
Imperiuz
В логе у трёх винтов увидел
Код: Выделить всё
FAILED SMART self-check. BACK UP DATA NOW!
Currently unreadable (pending) sectors
Offline uncorrectable sectors
Failed SMART usage Attribute: 5 Reallocated_Sector_Ct.
Это значит, что все печально? Бэкапить и гонять dd ?
Re: smartmontools не пишет в лог.
Добавлено: 2010-08-24 14:44:34
manefesto
сначала бэкапь, потом гоняй
Re: smartmontools не пишет в лог.
Добавлено: 2011-04-06 16:34:36
Cancer
Ребята подскажите на что в первую очередь стоит обращать внимание и какие параметры критичны ?
Код: Выделить всё
//>/usr/local/sbin/smartctl -a /dev/ad6
smartctl 5.39 2009-12-09 r2995 [FreeBSD 6.4-RELEASE i386] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.7 and 7200.7 Plus family
Device Model: ST380817AS
Serial Number: 4MR509J7
Firmware Version: 3.42
User Capacity: 80 026 361 856 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 6
ATA Standard is: ATA/ATAPI-6 T13 1410D revision 2
Local Time is: Wed Apr 6 17:23:04 2011 MSD
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 430) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
No General Purpose Logging support.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 47) minutes.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 054 045 006 Pre-fail Always - 110652
3 Spin_Up_Time 0x0003 098 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 2012
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 083 060 030 Pre-fail Always - 9005839158
9 Power_On_Hours 0x0032 073 073 000 Old_age Always - 24042
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 293
194 Temperature_Celsius 0x0022 038 052 000 Old_age Always - 38 (0 17 0 0)
195 Hardware_ECC_Recovered 0x001a 054 045 000 Old_age Always - 110652
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 001 000 Old_age Always - 20846
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 Data_Address_Mark_Errs 0x0032 100 253 000 Old_age Always - 0
SMART Error Log Version: 1
ATA Error Count: 17668 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 17668 occurred at disk power-on lifetime: 23716 hours (988 days + 4 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
84 51 2f 90 33 34 e1 Error: ICRC, ABRT 47 sectors at LBA = 0x01343390 = 20198288
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c8 00 80 3f 33 34 e1 00 01:57:41.937 READ DMA
c8 00 80 bf 32 34 e1 00 01:57:41.935 READ DMA
c8 00 80 3f 32 34 e1 00 01:57:41.934 READ DMA
c8 00 80 bf 31 34 e1 00 01:57:41.951 READ DMA
c8 00 80 3f 31 34 e1 00 01:57:41.950 READ DMA
Error 17667 occurred at disk power-on lifetime: 23714 hours (988 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
84 51 4f 58 25 5a e0 Error: ICRC, ABRT 79 sectors at LBA = 0x005a2558 = 5907800
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c8 00 80 27 25 5a e0 00 00:12:14.540 READ DMA
c8 00 80 a7 24 5a e0 00 00:12:14.538 READ DMA
c8 00 80 27 24 5a e0 00 00:12:14.536 READ DMA
c8 00 80 a7 23 5a e0 00 00:12:14.533 READ DMA
c8 00 80 27 23 5a e0 00 00:12:14.548 READ DMA
Error 17666 occurred at disk power-on lifetime: 23714 hours (988 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
84 51 02 85 8d c9 e3 Error: ABRT at LBA = 0x03c98d85 = 63540613
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
20 00 08 7f 8d c9 e3 00 00:16:23.864 READ SECTOR(S)
20 00 18 bf ad af e3 00 00:16:23.854 READ SECTOR(S)
20 00 08 85 fe 24 e6 00 00:16:23.837 READ SECTOR(S)
20 00 08 65 d9 35 e5 00 00:16:23.752 READ SECTOR(S)
20 00 08 75 f4 f0 e3 00 00:16:23.737 READ SECTOR(S)
Error 17665 occurred at disk power-on lifetime: 23714 hours (988 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
84 51 1b 7d 6d 0b e0 Error: ABRT at LBA = 0x000b6d7d = 748925
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
20 00 21 77 6d 0b e0 00 00:15:08.540 READ SECTOR(S)
20 00 40 37 6d 0b e0 00 00:15:08.528 READ SECTOR(S)
20 00 40 f7 6c 0b e0 00 00:15:08.522 READ SECTOR(S)
20 00 40 b7 6c 0b e0 00 00:15:08.511 READ SECTOR(S)
20 00 40 77 6c 0b e0 00 00:15:08.506 READ SECTOR(S)
Error 17664 occurred at disk power-on lifetime: 23714 hours (988 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
84 51 16 c9 22 c5 e3 Error: ABRT at LBA = 0x03c522c9 = 63251145
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
20 00 20 bf 22 c5 e3 00 00:09:43.062 READ SECTOR(S)
30 00 08 2d 40 d2 e2 00 00:09:43.052 WRITE SECTOR(S)
20 00 08 d5 e3 d1 e2 00 00:09:43.043 READ SECTOR(S)
20 00 0c c9 0d b5 e2 00 00:09:43.027 READ SECTOR(S)
30 00 08 3d 9a f1 e5 00 00:09:43.002 WRITE SECTOR(S)
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.