Changing the NTP server in Solaris or Linux.

Here is how you can change the NTP server’s information on your Solaris server.

Edit /etc/inet/ntp.conf

add the below line

server ntp.paris.hilton.com

You will now need to restart the NTP service.

/etc/init.d/xntpd stop
/etc/init.d/xntpd start

The last thing you need to do is to check to see if the client is communicating with the NTP server. The ntpq command is very useful for this purpose. Below is a snapshot.

# ntpq
ntpq> peer
remote refid st t when poll reach delay offset disp
==============================================================================
*ntp.paris.hilton.com 10.20.30.40 5 u 35 64 377 0.69 -0.541 0.23
ntpq> exit

After the ntpq command is issued the promtp will change to ntpq>. entering peer will display all the remote servers the client is sychronized with. To exit the ntpq shell simply enter exit.

In Linux the ntp.conf file is located in /etc/ntp.conf, and the command to restart the ntp service is service ntpd restart.

About Andrew Lin

Hi,
I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects.

Andrew Lin

View all posts by Andrew Lin →

Leave a Reply

Your email address will not be published. Required fields are marked *