Operating System - HP-UX
1834461 Members
3219 Online
110067 Solutions
New Discussion

Another Network Time Protocol daemon other than xntpd

 
SOLVED
Go to solution
Rodney Hills
Honored Contributor

Another Network Time Protocol daemon other than xntpd

I am running xntpd on hpux 10.20 and everytime xntpd adjusts the time, it logs that to /var/adm/syslog such that syslog is full of these messages.

I know I could use /etc/syslog.conf to filter some messages, but I would have to filter all "daemons".

If another program existed that had the option to NOT log these events, I would appreciate somebody letting me know.

(I also have the same issue with ftpd)

-- Rod Hills
There be dragons...
13 REPLIES 13
Sanjay_6
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

Hi rodney,

you can use a different log file to log ntp messages. To do this you have to start the xntpd daemon with a "-l log_file" option. you can edit the /sbin/init.d/xntpd file and make the change permanent, so that the ntp daemon will start using the log_file to log ntp messages in place of the syslog.log file.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

Hi Rodney,

to remove ftp/ftpd logging to syslog file, edit the file /etc/inetd.conf and remove the "-l" option after ftpd in the ftp configuration line. The ftpd daemon will then stop logging the ftp messages to the syslog.log file.

Hope this helps.

Regds
Rodney Hills
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

I saw the -l option, but the man page says it is used to write loop statistics. I thought that was something different...

I tried to add -l /var/adm/syslog/xntpd.log, but when I started xntpd I got the message-

./xntpd[36]: /var/adm/syslog/xntpd.log: This is not an identifier.

-- Rod Hills

There be dragons...
Sanjay_6
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

Hi Rodney,

I'm sorry.

you have to export the XNTPD arguments in the file /etc/rc.config.d/netdaemons . you'll find an option "export XNTPD_ARGS =" you have to mention the -l option and the log file name over here and not in /sbin/init.d/xntpd file.

Hope this helps.

Regds
Jeff Machols
Esteemed Contributor

Re: Another Network Time Protocol daemon other than xntpd

unfortunaly you cannot control where the output of ftp and those daemons go. It always goes to syslog
Rodney Hills
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

I did use /etc/rc.config.d/netdaemon to set the argument.

-- Rod Hills
There be dragons...
Jeff Machols
Esteemed Contributor

Re: Another Network Time Protocol daemon other than xntpd

in the /etc/syslog.conf you should be able to add an entry

*.info;xntpd /var/adm/syslog/xntpd.log
Jeff Machols
Esteemed Contributor

Re: Another Network Time Protocol daemon other than xntpd

oops, I think my syntax is off, you get the idea. You can redirect only that daemon by modifing the syslog.conf.
Sanjay_6
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

Hi Rodney,

To configure a seperate lof file for xntpd, do this.

Stop the xntpd daemon
/sbin/init.d/xntpd stop

modify the /etc/rc.config.d/netdaemons file and put

export XNTPD_ARGS="-l /tmp/xntpd.log"

now start the xntpd daemon,
/sbin/init.d/xntpd start

check the file /tmp/xntpd.log and see if the ntp nessages are logged over there.

Hope this helps.

Regds
Rodney Hills
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

Jeff,

As I understand syslog.conf, you can only filter on the following facilities-

KERN Messages generated by the kernel.
USER Messages generated by random user processes.
MAIL The mail system.
DAEMON System daemons,
AUTH The authorization system.
LPR The line printer spooling

xntpd is not one of them. I checked this out in the man page for syslog.

Thanks anyway.

-- Rod Hills
There be dragons...
Rodney Hills
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

Sanjay,

I modified netdaemon as you showed, and tried to start xntpd. One adjust message is displayed and apparently xntpd exits.

I removed "-l /tmp/xntpd.log" from netdaemon and xntpd starts ok and remains in the system.

I don't know what to make of it...

-- Rod Hills
There be dragons...
Sanjay_6
Honored Contributor
Solution

Re: Another Network Time Protocol daemon other than xntpd

Hi Rodney,

I just configured the xntpd to log to /tmp/xntpd.log as suggested above and it is working. I have set a tail -f on /tmp/xntpd.log and it is getting updated. Also the ps -ef |grep xntpd output shown the xntpd daemon logging to /tmp/xntpd.log . If you are having problem on your system check your patch level.

The "what /usr/sbin/xntpd" command output is,

xntpd version 3.5f: Sat Apr 14 ... PHNE_23697
copyright .....

Hope this helps.

Regds

Rodney Hills
Honored Contributor

Re: Another Network Time Protocol daemon other than xntpd

The system says.
xntpd 3.4 #Revision 1.1.110.2: Thu May 9 21:27:00 GMT 1996

Also if I try to run xntpd with bad argument from command line, I get the following message-
usage: /usr/sbin/xntpd [ -bd ] [ -c config_file ]

It looks like the version I have doesn't have very many options on the command line.

I'll see if a patch has a newer version.

Thanks for your help...

-- Rod Hills
There be dragons...