# ntp logging with syslog



## sniper007 (Mar 30, 2010)

Hi!

what's wrong with this settings ?

syslog.conf


```
ntp.*                    /var/log/ntpd.log
```



```
--$ ls -alt /var/log/ntpd.log
-rw-r--r--  1 root  wheel  0 Mar 30 13:33 /var/log/ntpd.log
```


```
--$ ps aux | grep [n]tp
root      36373  0.0  0.4  4672  1864  ??  Ss    1:45PM   0:07.21 /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift
```


i'd like to setup syslog to log ntpd, but ntpd.log file is empty. I try to restart syslogd but doesn't works


----------



## SirDice (Mar 30, 2010)

Make sure ntp is actually using syslog.


----------



## sniper007 (Mar 30, 2010)

hm, is this not enable by default ?


----------



## jalla (Mar 30, 2010)

You can try running in debug mode to see what's happening `syslogd -d`
To generate test data use `logger -t ntp.notice Test`


----------



## sniper007 (Mar 30, 2010)

Thanks jalla for advice, i figured out the problem. I used spaces instead tabs as separators in syslog.conf 
Now works fine,



also, you probably mean to use `logger -p ntp.notice Test`


----------



## jalla (Mar 30, 2010)

sniper007 said:
			
		

> Thanks jalla for advice, i figured out the problem. I used spaces instead tabs as separators in syslog.conf
> Now works fine,
> 
> 
> ...



Exactly.

For the record, space as separator in syslog.conf has been acceptable in FreeBSD for ages.


----------



## sniper007 (Mar 30, 2010)

jalla said:
			
		

> Exactly.
> 
> For the record, space as separator in syslog.conf has been acceptable in FreeBSD for ages.





i also set ntp.* in last line in syslog.conf....this was probably main problem


----------

