Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Implementing NTP in BS2000

&pagelevel(4)&pagelevel

BS2000 can use the NTP functionality both as a client and as a server.

The adjtime function, which is offered as a POSIX interface and as a privileged TPR interface, enables the system time in BS2000 to be modified by a specific value.

The system time is available to the user via the following interfaces:

  • GTIME (both in TU and in TPR)

  • GDATE

  • via the runtime routines of high-level languages

The time-of-day register (TODR) is not adapted as part of one of these synchronizations.

The actual adaptation of the system time is carried out asynchronously with the adjtime call in small steps. The change is made by accelerating or delaying the system clock for a certain time, depending on whether the correction value is positive or negative. The technique involved ensures that two consecutive calls for the current time still receive monotonous time values and not jumps in time.

The process of synchronizing the system time by an absolute value of n seconds lasts 4*n seconds. NTP performs its synchronization in BS2000 every 64 seconds with the current offset value.

The time of the adjtime call is determined by the following factors:

  • Current deviation between the time shown on the own system and the accurate NTP server time. If the deviation is small, the polling interval is increased, thus reducing the synchronization frequency.

  • The set minpoll value, which specifies the minimum polling interval. The memory requirements of the adjtime call must be taken into account here.

  • For each adjtime call, 8 KB of class-4 memory and KB of class-3 memory are required. The memory areas involved are occupied for 15 minutes each.

    This results in the following requirement for class-4 memory:

    Requirement = (900 / sync_interval) * 8 KB

    where sync_interval specifies the interval (in seconds) between two synchronizationoperations initiated by NTP.

When adjtime is called, it terminates any previous adjtime call that may be running. The functionality of adjtime can be requested by several privileged users in BS2000. An internal system of preferences establishes whose synchronization jobs are executed, and whose are not. The priority remains in effect throughout the existence of a higher-priority instance.

The NTP server logs in with its first adjtime call and is implicitly logged off by terminating its execution task.

Details on the priority rules are provided in the BS2000 manual " System Administration", chapter "System time administration".

The time server with the highest priority is preferred by BS2000; all other time servers are then ignored. Since this is not checked by BS2000, the system administrator must make suitable organizational arrangements.

By default the /var/adm/ntp.log and /var/adm/syslog files are used for logging.

NTP can remain in use even during seasonal time switchovers.


NTP programs

The table below contains an overview of the programs used for starting the NTP daemon and for controlling the NTP functionality:

Program

Function

Refer to

ntpd

NTP daemon

"Startup and shutdown of NTP"

ntpq

Querying NTP status

"Administration and operation"

ntpdate

Setting date and time

"Setting the date and time via NTP with the ntpdate program"

ntptrace

Tracing NTP servers

"Trace functionality of NTP"

ntpdc

Querying NTP status (specifically)


sntp

Client for simplified (SNTP)
protocol


ntp-keygen

Generating public and private
keys

"Generating cryptographic files for NTPv4 authentication using the ntp- keygen program"