How to Set/Check the Arguments Used with “ntpd” Service

On RHEL, OEL, CentOS and various other Linux distribution the Network Time Protocol (NTP) daemon can be run with various options. As the daemon is usually defined as a service where managed by:

  • /etc/init.d/ntpd <…>
  • service ntpd <…>

commands, it is better to use the configuration file


to set the arguments. The file looks like:

# Drop root to id ‘ntp:ntp’ by default.
OPTIONS=”-x -u ntp:ntp -p /var/run/”

# Set to ‘yes’ to sync hw clock after successful ntpdate

# Additional options for ntpdate

Above you can see that the command line arguments are setup by the OPTIONS configuration variable.

You can check the settings from that /etc/sysconfig/ntpd file but it will not be reliable if the ntpd process is started manually for some reason. To check the arguments you can use command line:

ps -o args -p `cat /var/run/`

and the output will look like:

# ps -o args -p `cat /var/run/`
ntpd -x -u ntp:ntp -p /var/run/

Written by in: linux | Tweet This

1 Comment »

RSS feed for comments on this post. TrackBack URL

Leave a Reply

Powered by WordPress | Theme: Aeros 2.0 by