Example usage - Two VMs to test NTP:
Configuration/steps used for the server (192.168.186.135) and client (192.168.186.132):
=========
Server Setup:
=========
Found in host directory: /target/qnx7/etc/ntp.conf (in SDP installation folder)
Save in target (server) directory: /tmp/ntp.conf:
-----------------------------------
Step 1: [ntp.conf]
-----------------------------------
Copy/paste the content below to the ntp.conf file
-----
logfile /tmp/ntp.log
logconfig=all
# public NTP servers
server 0.pool.ntp.org prefer iburst
# restrict client so it cannot modify the server but can access it
restrict 192.168.186.132 nomodify
-----
-----------------------------------
Step 2: [services]
-----------------------------------
Add /etc/services from the same host directory mentioned above (qnx710/target/qnx7/etc/services) to the server to avoid the error "servname not supported for ai_socktype"
-----------------------------------
Step 3: [commands]
-----------------------------------
Run these commands on server:
# ntpd -g -c /tmp/ntp.conf
# ntpq -pn
========
Client Setup:
========
Found in host directory: /target/qnx7/etc/ntp.conf (in SDP installation folder)
Save in target (client) directory: /etc/ntp.conf:
----------------------------------
Step 1: [ntp.conf]
----------------------------------
Copy/paste the content below to the ntp.conf file
-----
driftfile /etc/ntp/ntp.drift
logfile /tmp/ntp.log
logconfig=all
# public NTP servers (connect to IP of server)
server 192.168.186.135 iburst
-----
-----------------------------------
Step 2: [services]
-----------------------------------
Add /etc/services from the same host directory mentioned above (qnx710/target/qnx7/etc/services) to the client to avoid the error "servname not supported for ai_socktype"
-----------------------------------
Step 3: [commands]
-----------------------------------
Run these commands on client:
# ntpd -g -c /etc/ntp.conf
# ntpq -i
> peers
> sysinfo
Reference:
http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.sys_arch/topic/tcpip_NTP.html
http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.utilities/topic/n/ntpd.html
http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.utilities/topic/n/ntpq.html