The role of ntp timing server (hospital clock system) in the network

The role of ntp time service server (hospital clock system) in the network The role of
ntp time service server (hospital clock system) in the network

introduction

"Ms. Huang, do you think there must be a clock server in the hospital network?!" A message came from WeChat. That’s right. I used to have this idea. Since the timers in our computers are all crystals for timing, the crystals are theoretically very accurate. Why do we need to spend money to build a clock server? Not to mention the need to buy GPS or The time calibration server of Beidou Satellite. So today we will talk about the importance of the clock server through a few cases.

[Case 1] The database server is down

In 2007, the original database server of the hospital could no longer support the efficient operation of the business. At that time, I happened to come into contact with ORACLE 10g and I had a certain understanding of the RAC model. So attracted by its high availability, the core server of HIS was built with two servers in accordance with the RAC mode. At the beginning, the system was running very stable, and the effect of load balancing was good. About a year later, the database suddenly went down one night. Even if it restarts, the system will go down immediately, and I am puzzled. Later, when I checked the clocks of the two servers carefully, I found that there was a time difference of nearly 20 minutes between them. It turned out that the server time was out of sync which caused the RAC failure. This was the first time I was hit by a clock problem.

[Case 2] Disputes caused by time

A few years ago, a critically ill patient was admitted to the emergency department of a hospital. The patient was in critical condition, and the hospital opened a green channel for it. Emergency department, inspection, examination, surgery and other relevant departments were involved in the rescue work. But unfortunately, the patient still died. The family members of the patient found in the collation of relevant medical documents that the time records in them could not form a chain of evidence. This filed a lawsuit to the court, and the hospital eventually paid for it. The reason for the contradiction in time records is that computers in different links do not have a unified clock server for time proofreading, resulting in contradictory records of time.

The lessons of these two cases tell us that although the unified clock is a very small content in information construction, it must be paid attention to, otherwise it will also lead to big mistakes.

Principle of computer clock

In the computer, the chip itself does not usually have a clock signal source, so a dedicated clock circuit must provide the clock signal. Quartz Crystal OSC is one of the most commonly used clock signal oscillation sources. The reason why a quartz wafer can be used as an oscillator is based on its piezoelectric effect: adding an electric field to the two poles of the wafer will cause the crystal to be mechanically deformed; when an alternating voltage is applied to the quartz wafer, the crystal will be Produce mechanical vibration, while mechanical deformation vibration will produce alternating electric field. Although the voltage of this alternating electric field is extremely weak, its vibration frequency is very stable.

Since the birth of the PC, a 14.318MHz quartz crystal oscillator has been used as a reference frequency source on the motherboard. In addition to this 14.318MHz crystal on the motherboard, you can also find a 32.768MHz crystal, which is used in the real-time clock (RTC) circuit to display accurate time and date. After initialization, pulses are sent out approximately 18.2 times per second, and these pulses are calculated by the operating system to form the BIOS time-of-day count. By being powered by the BIOS battery, it still runs normally after shutdown. This is why we turned off the power, and the correct time will still be displayed when it is turned on the next day.

Network clock synchronization

Each computer has its own clock, but once they are connected to the Internet, another problem arises: how to solve the accumulated errors of each other's computer clocks. This is the emergence of the Network Time Protocol NTP, which is one of the standards used for time synchronization in the Internet. Its purpose is to synchronize the computer's clock to UTC, and its accuracy can reach 0.lms in the local area network. In the Internet The accuracy can reach 1-50ms in most places above.

NTP provides accurate time, first of all there must be an accurate time source, this time should be standard time. In order to prevent malicious damage to the time server, NTP uses an authentication mechanism to check whether the information coming to the time is really from the claimed server and check the return path of the data to provide a protection mechanism against interference. As the network topology becomes more and more complex, the clock synchronization of devices in the entire network will become very important. The emergence of NTP is to solve the problem of synchronization of system clocks of devices in the network.

NTP provides consistency guarantees for the following applications:

When performing incremental backups between the backup server and the client, the clocks between the two systems must be synchronized.
Complex things often need to be subdivided. When processed by multiple systems, to ensure the correct sequence of events, multiple systems must refer to the same clock.
Ensure that RPC (Remote System Call) between systems can be performed normally. In order to ensure that a system call will not be repeated, a call is only valid in a time interval. If the clocks between the systems are not synchronized, a call may not be made due to a timeout before it occurs.
Some applications need to accurately record the time a user logs in to the system; or modify the access time of a file.
In a network, there are many cases where the clocks of the terminals differ by one minute or less. It is impossible to rely on the system administrator to manually input the date (time setting command) command to adjust the clock of each system.
Debugging and event time stamps: The debugging and event time stamps collected from different ME60s are meaningless, unless these ME60s are referenced to the same common time.
The goal of NTP is to synchronize the clocks of all devices with clocks in the network, so that the clock times of all devices in the network are basically the same, so that the devices can provide multiple applications based on uniform time. For a local system running NTP, it can not only receive synchronization from other clock sources, but also can be used as a clock source to synchronize other clocks, and can synchronize with each other by exchanging time information, and finally make the system clocks of all devices in the entire network reach Basically the same.

Build a unified clock

Now that the necessity of a unified clock is explained, the following lessons may be useful when considering and deploying a clock server.

1. When purchasing a clock server, it is recommended to use the GPS+Beidou satellite mode for time correction, and synchronize all computers in the entire network with this clock server to realize the unification of internal and external computer clocks. This type of server can also provide multiple ports of different network segments to unify the time of the equipment we need time management.

2. Not all medical equipment will allow us to perform clock correction for the school time of various medical equipment. Some large-scale medical equipment or logistical equipment is not even in the hands of the hospital, but managed by the maintenance company. Therefore, the hospital should sort out and formulate a clock proofreading system, requiring equipment managers and maintenance personnel to incorporate time proofreading into daily monitoring to ensure that the clock is accurate.

3. Check all kinds of application software and confirm with R&D personnel that when the system needs to obtain the time, it should obtain the server clock and avoid obtaining the local computer clock to avoid clock inconsistencies.

4. Ensure that the time of non-information equipment such as video surveillance equipment and wall clocks in various departments is accurate. Nowadays, every hospital generally installs a video surveillance network, and during installation, it should also ensure that the storage and control server is consistent with the standard time. Hospitals with conditions can replace the original mechanical clocks scattered everywhere with electronic clocks with a unified clock source to avoid the inconsistency of information systems and paper records.

Time is an important content in medical records, so the unified clock is an important factor that cannot be ignored in the informatization construction of our hospital. Only in this way can we ensure the orderly and coordinated work of all links in the hospital and ensure medical safety.

Guess you like

Origin blog.csdn.net/weixin_44990608/article/details/107442796