Avto-profi-evakuator.ru

Авто Профи
0 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

Ubuntu внутри виртуальной машины: ntpd или ntpdate или? чтобы избежать смещения часов

Ubuntu внутри виртуальной машины: ntpd или ntpdate или . чтобы избежать смещения часов

Проблема: ntpd , когда она установлена ​​на виртуальной машине с Ubuntu (у меня это было на хостах с различными гипервизорами, такими как KVM и VMware ESX), похоже, подвержены серьезным нагрузкам дрейфовать. Я не нашел ни одного хорошего метода, и не все, кажется, испытывают это.

Вопрос: Как я могу предотвратить это? Есть ли какие-либо настройки в /etc/ntp.conf , чтобы заставить ntpd быть более агрессивным в синхронизации времени внутри виртуальной машины, или я должен использовать ntpdate -b timeserver вместо этого в cron задании, которое выполняется так часто?

Какие Рекомендуется ли избегать скачков при использовании ntpdate -b или смещения тактовой частоты в виртуальной машине Ubuntu?

Примечание: я видел аналогичные эффекты на ведомых устройствах vios (гипервизор IBM), работающих под управлением AIX как и на солярисе. Таким образом, проблема очень реальна и, по-видимому, связана с гипервизорами в целом.

How to Set Date, Time and Timezone in RHEL 8

When it comes to Date and Time configurations, all operating systems are familiar with two types of clocks; real-time clock (RTC) and system clock.

RTC/hardware clock is tied to the computer’s integrated circuit, which remains active even when the computer is not running. On the other hand, the operability of the system/software clock depends on the system kernel. The system clock takes the hardware clock’s value as its initial value.

When an operating system is brought to life for the first time, the software clock value becomes independent of the hardware clock value making it possible for a user to set this value to a new one based on their preferred Coordinated Universal Time (UTC) or local time. However, most operating systems like RHEL 8 recommend users to go with UTC.

Читайте так же:
Чистка и регулировка карбюратора мопеда альфа

Set Date and Time in RHEL 8

There are several Date and Time configuration approaches supported by RHEL 8. All these system Date and Time configuration approaches are accessible from the command line.

For this article guide, we are going to look at the timedatectl command.

timedatectl Command

The systemd system and service manager are responsible for this Date and Time command-line utility. This command is used to alter the system/software clock values.

The timedatectl command achieves the following functionalities:

  • Synchronizing the system clock of a local server/machine with that of a remote server/machine.
  • Editing the currently set timezone.
  • Configuring the current date and time.

Check Date and Time in RHEL

To display the current date and time setting on your RHEL 8 system, execute the following command on your terminal:

Check Time in RHEL

Check Time in RHEL

The command outputs the Local time, Universal time, RTC time, and associated Time zone.

Change Time in RHEL

Before you can change the date and time settings on your RHEL system, you need to temporarily disable the NTP service.

To change the current local time, we must adhere to the following syntax rule:

Where HH is for hours, MM for minutes, and SS for seconds.

An example implementation is as follows:

Confirm that the set time:

Confirm Time in RHEL

Confirm Time in RHEL

As you can see, the Universal time and the RTC time were also automatically adjusted.

Change Date in RHEL

To change the current date, adhere to the following command syntax:

Where YYYY is for a year, MM for a month, and DD for a day.

Читайте так же:
Карбюратор озон регулировка качества смеси

A practical implementation of the above command is as follows:

Confirm Date in RHEL

Confirm Date in RHEL

While changing the current date, the current time might be altered. To avoid such inconvenience, first, change the date and then the local time.

Change Timezone in RHEL

To change/edit the Time Zone you are under, adhere to the following command syntax:

However, it is advisable to get a sneak peek of available and supported timezones under RHEL 8 using the following command.

List Timezone in RHEL

List Timezone in RHEL

From here, you can implement the timezone of your choice:

Confirm that the timezone was successfully added.

Check Timezone in RHEL

Check Timezone in RHEL

These date and time configuration changes you have made on your local rhel system can also be automatically synchronized with remote machines and servers you might be using.

Since remote servers and machines understand the NTP protocol, you only need to enable it for your remote servers/machines to be in-sync with your system/software clock.

The timedatectl command is flexible enough to meet all your RHEL 8 date and time configuration needs. It is easy to memorize and implement making your date and time associated system tasks manageable.

голоса
Рейтинг статьи
Ссылка на основную публикацию
Adblock
detector