Skip to content

Instantly share code, notes, and snippets.

@kuzetsa
Last active January 14, 2023 04:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuzetsa/4a64cd1a95260d0bc5cc1b8aeaba1878 to your computer and use it in GitHub Desktop.
Save kuzetsa/4a64cd1a95260d0bc5cc1b8aeaba1878 to your computer and use it in GitHub Desktop.
this configuration is what I'm using for OpenVZ
# OpenVZ is cheap, but the clock is disciplined by host
server 127.127.1.0 minpoll 3 maxpoll 3 prefer
fudge 127.127.1.0 stratum 1
# ntp_adjtime: Operation not permitted
disable kernel
rlimit memlock 128
mru maxmem 6912 maxage 32 initalloc 1 initmem 64 incalloc 256 incmem 64
discard average 2 minimum 1
restrict default limited nomodify notrap nopeer noquery
restrict -6 default limited nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
@RenatoExpert
Copy link

I didn't find anything about disable kernel in any documentation.

Man Pages:
https://linux.die.net/man/5/ntp.conf
IBM docs:
https://www.ibm.com/docs/en/aix/7.2?topic=files-ntpconf-file

Where did you get it from?

@kuzetsa
Copy link
Author

kuzetsa commented Jan 14, 2023

[quote / @RenatoExpert]

I didn't find anything about disable kernel in any documentation.

Man Pages: https://linux.die.net/man/5/ntp.conf IBM docs: https://www.ibm.com/docs/en/aix/7.2?topic=files-ntpconf-file

Where did you get it from?


[response]
it's right in the documentation:

https://linux.die.net/man/5/ntp_misc

or from the cli command:

$ man ntp.conf

ntp.conf(8)  4.2.8p15  23 Jun 2020
              calibrate
                     Enables the calibrate feature for reference clocks.   The
                     default for this flag is disable.

              kernel Enables  the  kernel  time discipline, if available.  The
                     default for this flag is enable if support is  available,
                     otherwise disable.

              mode7  Enables  processing of NTP mode 7 implementation-specific
                     requests which are used by the deprecated  ntpdc(1)  pro‐
                     gram.   The  default for this flag is disable.  This flag
                     is excluded from  runtime  configuration  using  ntpq(1).
                     The ntpq(1) program provides the same capabilities as nt‐
                     pdc(1) using standard mode 6 requests.

              monitor
                     Enables the monitoring facility.  See the  ntpdc(1)  pro‐
                     gram and the monlist command or further information.  The
                     default for this flag is enable.

              ntp    Enables time and frequency discipline.  In  effect,  this
                     switch  opens and closes the feedback loop, which is use‐
                     ful for testing.  The default for this flag is enable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment