# smartmontools problem



## yhq_34 (May 22, 2016)

Hi ALL;

my version is 10.3, I have installed smartmontools, in the manual it shows:

```
To include drive health information in your daily status reports,

add a line like the following to /etc/periodic.conf:

    daily_status_smart_devices="/dev/ad0 /dev/da0"
```
But I didn't find /etc/periodic.conf file, what should I do to make it work?


----------



## Abriel (May 22, 2016)

Hi, an example you have in /etc/defaults/periodic.conf
Just create it


----------



## yhq_34 (May 22, 2016)

So I just need copy /etc/defaults/periodic.conf to /etc/, and add  daily_status_smart_devices="/dev/ad0 /dev/da0"
Where can I find the disk status logs?


----------



## Abriel (May 22, 2016)

`touch /etc/periodic.conf` and paste there want you want.
Logs will be in /var/log/messages


----------



## wblock@ (May 22, 2016)

Do not edit or copy the defaults files.  They are read, then any additional settings made by the user are added (from a new /etc/periodic.conf, in this case), then the result is executed.


----------



## yhq_34 (May 23, 2016)

Yes, I just use `touch /etc/periodic.conf` and add 
	
	



```
daily_status_smart_devices="/dev/ada0 /dev/ada1"
```
 to the file.
Then I add 
	
	



```
smartd_enable="YES"
```
 in rc.conf
But now 
	
	



```
/etc/rc: WARNING: /usr/local/etc/smartd.conf is not readable.
```
 log "message", what should I do?


----------



## SirDice (May 23, 2016)

Make sure /usr/local/etc/smartd.conf actually exists.


----------



## wblock@ (May 23, 2016)

```
# cd /usr/local/etc
# cp smartd.conf.sample smartd.conf
```
Then edit smartd.conf.


----------



## yhq_34 (May 24, 2016)

What should I change smartd.conf? Now I just left it default settings, but no smart logs in messages.


----------



## wblock@ (May 24, 2016)

As it says at the top of the file: see `man smartd.conf`.


----------



## SirDice (May 24, 2016)

It's slightly hidden and easily overlooked but the bottom of smartd.conf:

```
# If the test string DEVICESCAN is the first uncommented text
# then smartd will scan for devices /dev/hd[a-l] and /dev/sd[a-z]
# DEVICESCAN may be followed by any desired Directives.
```
FreeBSD uses a different naming convention, so DEVICESCAN will never find any drives.


----------



## yhq_34 (May 29, 2016)

DEVICESCAN? what should I change it to ?


----------



## icecoke (Jun 1, 2016)

You need to name the devices on your machine. no automatic mechs available.
So if you have one device ada0 with two partitions ada0p1/ada0p2 than write e.g. this into the conf:


```
/dev/ada0 -m admin@example.com -M test
```


----------



## priyadarshan (Oct 30, 2016)

On one of our machine we have just this line (email address redacted):

```
DEVICESCAN -a -o on -S on -n standby,q -s (S/../.././02|L/../../6/03) -W 4,50,50 -m mail@domain.com
```

-a (monitor all attributes)
-o on (enable automatic online data collection)
-S on (enable automatic attribute autosave)
-n standby,q (do not check if disk is in standby, and suppress log message to that effect so as not to cause a write to disk)
-s ... (schedule short and long self-tests)
-W ... (monitor temperature)
-m ... (mail alerts)

It works fine for us.


----------

