System Administration
Showing results for 
Search instead for 
Did you mean: 

Unable to set NTP server in hp-ux 11.31

Trusted Contributor

Unable to set NTP server in hp-ux 11.31

Hello Expert,


I am trying to configure NTP server in hp-ux 11.31 by using following steps:


Modify the

/etc/rc.config.d/netdaemons file.


export XNTPD=1

export XNTPD_ARGS=

2. Modify the

/etc/TIMEZONE file as appropriate.

3. Modify

/etc/ntp.conf as

To configure an NTP server to use its own system clock as an authoritative time source, I added

the following lines to the server's

/etc/ntp.conf file:

server prefer

fudge stratum 10


4. Run the

/sbin/init.d/xntpd startup script.

5. Wait for NTP to establish associations with servers and peers. Be patient!

6. Run

ntpq -p to check associations.

aps39-50-root# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
*LOCAL(1)        LOCAL(1)        10 l   18   64  377     0.00    0.000   10.01         16 -    -   64    0     0.00    0.000 16000.0


from the refid I can see NTP server is showing down.


Also when i check

ps -ef |grep xntpd

no xntpd process shows running.

Can anybody please explain me where I am missing.




Honored Contributor

Re: Unable to set NTP server in hp-ux 11.31

If "ntpq -p" does not display an error message like:

# ntpq -p
ntpq: read: Connection refused

 ...then ntpq is talking with the local NTP server process, so the process must be running.


But if your HP-UX 11.31 has the updated NTP server version installed, the process name might be ntpd instead of xntpd.


Most versions of HP-UX have used NTP software versions 3.x, which had xntpd as the NTP server process name. But recently HP ported an updated version 4.x for HP-UX 11.31: it might even be installed by default with latest releases of 11.31. In versions 4.x of the NTP software, the name of the NTP server process is "ntpd": the "x" in the beginning has been omitted.


The ntp.conf configuration suggested in your steps will make the system use only its own system clock as its primary time source, and is used as a broadcast address: the system will send out time messages to the 128.1.*.* network segment, but will ignore any time broadcasts it may receive. So the refid of for the broadcast address is expected.


If you have other NTP servers available to you, you should probably add them to your configuration; if your system can access the Internet, see for lists of public time servers around the world. You should probably find at least two or three reliable time servers that are near enough to your site, network-wise. ("Near enough" is when the "disp" value in the ntpq -p output stays consistently below 100 or so for that server - the smaller the number, the better.)

Honored Contributor

Re: Unable to set NTP server in hp-ux 11.31

There are several steps that are missing, most especially the NTP server where you obtain the time of day.

The first place to look for system problems is syslog, specifically, /var/adm/syslog/syslog.log


Start here:

Go to this website to locate the NTP pool to use for your country:



Then determine if your computer can actually reach an NTP pool:


# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
*time-01.texas.r clock-01.southe  2 u  259  512  377     0.76   -0.262   18.05
+time-02.texas.r rdcoh-ntp.ohior  2 u  397 1024  377     1.36   -0.315    0.47
 LOCAL(0)        LOCAL(0)        10 l   40   64  377     0.00    0.000   10.01


Note that some network administrators may have blocked port 123 for access to external NTP servers. If the above doesn't return results similar to the above, talk to your network administrator about opening port 123 or providing NTP service from your firewall.


Here are the steps for North America.


Edit /etc/rc.config.d/netdaemons file:

export XNTPD=1
export XNTPD_ARGS="-l /var/adm/syslog/xntpd.log"


Note the server name and also the ARGS which will move the xntpd logs to a separate file.


For /etc/ntp.conf, you need at least one, preferably 3 NTP sources, especially if your system is to used as a local source. The localhost entry just tells the ntp daemon to use itself as the the reference. 


fudge stratum 10    # localhost if NTP servers fail
driftfile /etc/ntp.drift


Now before you start xntpd, make sure that none of your programs will be adversely affected if the time changes forward or backward. The /sbin/init.d script will jump the time to the correct value.


Now start xntpd:


/sbin/init.d/xntpd start
Starting /sbin/init.d/xntpd...
25 May 18:06:20 ntpdate[22898]: step time server offset -0.004626 sec


Once you start xntpd, the time will be within 1 second accuracy -- no need to wait.

You can monitor xntpd message in the /var/adm/syslog/ntp.log file and also use ntpq -p 



Bill Hassell, sysadmin