No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Huawei SAP HANA Appliance HA and DR Scheme Configuration Guide 02

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring the NTP Client

Configuring the NTP Client

To implement NTP server time synchronization, the NTP client must be configured for the DR server.

  1. Log in to the DR node as the root user and run the following command to configure the NTP service to start with the OS:

    #chkconfig ntp on

  2. Run the vi /etc/ntp.conf command to open the NTP configuration file ntp.conf.

    #vi /etc/ntp.conf

  3. Press i to switch to the insertion mode.
  4. Insert server <NTP server IP address>. This procedure uses 192.168.20.9 as an example, and you need to change the IP address to the actual NTP server IP address.

    server 192.168.20.9

  5. Press Esc to switch to the CLI mode.
  6. Press the colon (:) to go to the bottom line, enter "wq", and press Enter to save the modification and exit the vi editor.

    The following is an example of the configured ntp.conf file:

    hw00003:/hana/shared # vi /etc/ntp.conf
    # Clients from this (example!) subnet have unlimited access, but only if
    # cryptographically authenticated.
    #restrict 192.168.123.0 mask 255.255.255.0 notrust
    ##
    ## Miscellaneous stuff
    ##
    driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
    logfile /var/log/ntp          # alternate log file
    # logconfig =syncstatus + sysevents
    # logconfig =all
    # statsdir /tmp/                # directory for statistics files
    # filegen peerstats  file peerstats  type day enable
    # filegen loopstats  file loopstats  type day enable
    # filegen clockstats file clockstats type day enable
    #
    # Authentication stuff
    #
    keys /etc/ntp.keys              # path for keys file
    trustedkey 1                    # define trusted keys
    requestkey 1                    # key (7) for accessing server variables
    # controlkey 15                 # key (6) for accessing server variables
    restrict 127.0.0.1
    restrict -6 ::1
    server 192.168.20.9

  7. Run the following command to restart the NTP service:

    #service ntp restart

  8. Run the following command to check the NTP running status:

    #ntpq -p

    Example:

    hw00003: # ntpq -p
         remote           refid      st t when poll  reach delay offset  jitter
    ==============================================================================
     192.168.20.9       LOCAL(0)    11 u 53 64    7    0.141  607209. 0.296

    Main parameters in the command output are described as follows:

    • remote: indicates the name of the NTP server that responds to the request.
    • when: indicates the number of seconds since the last successful request.
    • poll: indicates the interval (in seconds) for the local host to synchronize time with the remote server.
    • offset: indicates the time offset (in milliseconds) between the local host and the time source.

  9. Configure the time synchronization interval.

    Run the crontab -e command to enter the vi editor and press i to enter the insertion mode.

    Add the following statement:

    */15 * * * * /usr/sbin/rcntp ntptimeset & > /dev/null; /sbin/hwclock -w

  10. Press Esc to switch to the CLI mode. Press the colon (:) to go to the bottom line. Enter "wq" and press Enter to save the modification and exit the vi editor.
  11. Run the following command to restart the service and end the NTP configuration on the local host.

    /etc/init.d/cron restart

Translation
Download
Updated: 2019-03-30

Document ID: EDOC1100073265

Views: 1280

Downloads: 8

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next