JP2012202897A - Client terminal, server terminal, time synchronization method, and program - Google Patents

Client terminal, server terminal, time synchronization method, and program Download PDF

Info

Publication number
JP2012202897A
JP2012202897A JP2011069322A JP2011069322A JP2012202897A JP 2012202897 A JP2012202897 A JP 2012202897A JP 2011069322 A JP2011069322 A JP 2011069322A JP 2011069322 A JP2011069322 A JP 2011069322A JP 2012202897 A JP2012202897 A JP 2012202897A
Authority
JP
Japan
Prior art keywords
time
synchronization
information
time synchronization
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2011069322A
Other languages
Japanese (ja)
Inventor
Atsushi Sasa
篤史 佐々
tian feng Ma
天峰 馬
Atsushi Ito
淳 伊藤
Keisuke Kagawa
圭介 賀川
Sumio Midorikawa
純央 緑川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2011069322A priority Critical patent/JP2012202897A/en
Publication of JP2012202897A publication Critical patent/JP2012202897A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a client server, a server terminal, and the like capable of performing time synchronization on the basis of time information reliable in accuracy.SOLUTION: In a time synchronization system 1, an NTP server 10 and an NTP client 20 are connected with each other through a network 30. The NTP client 20 transmits a synchronization request to the NTP server 10. The NTP server 10 receives the synchronization request, and transmits time information 105 and synchronization determination information 106 which contains a previous synchronization time 161, a lag in synchronization 162, a synchronization state 163, and the like, to the NTP client 20. The NTP client 20 receives the time information 105 and the synchronization determination information 106, and determines on the basis of the synchronization information 106 whether to perform time synchronization for the time information 105.

Description

本発明は、クライアント端末、サーバ端末等に係り、詳しくは、正確であるとの信頼性の高い時刻情報に基づく時刻同期が可能な、クライアント端末、サーバ端末等に関する。   The present invention relates to a client terminal, a server terminal, and the like, and more particularly, to a client terminal, a server terminal, and the like that can perform time synchronization based on highly reliable time information that is accurate.

電子商取引等、各種サーバのログ管理において、時刻は非常に重要な情報であり、各種サーバは、常に正確な時刻を保持する必要がある。従来、サーバの多くは、NTP(Network Time Protocol)による時刻同期を実施している(例えば、特許文献1)。
すなわち、下位のサーバであるNTPクライアントが、上位のサーバであるNTPサーバから時刻情報を受け取り、この時刻情報に基づき、NTPクライアントの時刻をNTPサーバの時刻に同期させる。
In log management of various servers such as electronic commerce, time is very important information, and various servers must always keep accurate time. Conventionally, many servers perform time synchronization by NTP (Network Time Protocol) (for example, Patent Document 1).
That is, an NTP client that is a lower server receives time information from an NTP server that is an upper server, and synchronizes the time of the NTP client with the time of the NTP server based on this time information.

特開2006−322788号公報JP 2006-322788 A

しかしながら、NTPサーバの時刻情報が常に正確であるという保証はなく、正確でない場合であっても、NTPクライアントがその時刻情報に基づいた同期を実施しまうという問題がある。   However, there is no guarantee that the time information of the NTP server is always accurate, and there is a problem that even if it is not accurate, the NTP client performs synchronization based on the time information.

この問題を解消するために、NTPサーバの時刻情報を信頼させる方法が種々考えられている。例えば、NTPサーバからの時刻情報により同期を行う場合に、証明書による認証処理を行うことにより、悪意のあるNTPサーバを排除する方法がある。また、同期する時刻情報を複数得るために複数のNTPサーバを設定して、例えば自身の時刻と最もずれの少ない同期先のNTPサーバを選択する方法もある。   In order to solve this problem, various methods for trusting the time information of the NTP server have been considered. For example, when synchronization is performed based on time information from an NTP server, there is a method of eliminating a malicious NTP server by performing authentication processing using a certificate. There is also a method of setting a plurality of NTP servers in order to obtain a plurality of pieces of time information to be synchronized, and selecting, for example, a synchronization destination NTP server having the least deviation from its own time.

しかしながら、これらの方法では、悪意のあるNTPサーバを排除したり、自身の時刻と大きく異なる時刻情報による同期を行わないようにすることができるが、NTPサーバが提供する時刻情報そのものが正確であるかを判断することはできない。悪意のないサーバであっても、時刻情報は正確でない場合もあり、また、自身の時刻と近い時刻情報であっても、これが正確でない場合も考えられる。   However, with these methods, it is possible to eliminate malicious NTP servers or prevent synchronization with time information that is significantly different from the own time, but the time information itself provided by the NTP server is accurate. I can't judge. Even if it is a non-malicious server, the time information may not be accurate, and even if the time information is close to its own time, this may not be accurate.

本発明は、上記の問題を鑑みてなされたものであり、その目的は、正確であるとの信頼性の高い時刻情報に基づき時刻同期を行うことが可能なクライアント端末やサーバ端末等を提供することである。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a client terminal, a server terminal, or the like that can perform time synchronization based on highly reliable time information that is accurate. That is.

前述した目的を達するために第1の発明は、サーバ端末とネットワークにより接続されたクライアント端末であって、前記サーバ端末に時刻同期要求を送信する送信手段と、前記サーバ端末から、当該サーバ端末が前回時刻同期を実施した時刻、前回時刻同期の時刻のずれ、前回時刻同期の状況を含む同期判定情報と時刻情報を受信する受信手段と、前記同期判定情報を元に、前記サーバ端末が時刻同期を実施していない場合、もしくは、前記サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合、前記時刻情報について、前記クライアント端末の時刻同期を実施しないと判定する判定手段と、前記時刻情報について時刻同期を実施しないと判定されない場合に、前記時刻情報に基づき、時刻同期を実施する時刻同期手段と、を具備することを特徴とするクライアント端末である。   In order to achieve the above-mentioned object, a first invention is a client terminal connected to a server terminal via a network, wherein the server terminal transmits a time synchronization request to the server terminal, and the server terminal Based on the synchronization determination information, the server terminal synchronizes the time based on the synchronization determination information including the time at which the previous time synchronization was performed, the time lag of the previous time synchronization, the synchronization determination information including the status of the previous time synchronization and the time information. If the server terminal is adjusting the previous time synchronization and the time lag during the previous time synchronization is equal to or greater than a predetermined time, the time synchronization of the client terminal is performed for the time information. A determination means for determining that the time synchronization is not performed, and time synchronization based on the time information when it is not determined that the time synchronization is not performed on the time information. A client terminal, characterized by comprising the Hodokosuru time synchronization means.

前記同期判定情報は、前記サーバ端末における所定のイベントの発生状況を含み、前記判定手段は、前記同期判定情報を元に、さらに、所定のイベントの発生後に前記サーバ端末が時刻同期を行っていない場合、前記クライアント端末の時刻同期を実施しないと判定する。   The synchronization determination information includes a state of occurrence of a predetermined event in the server terminal, and the determination unit further performs time synchronization of the server terminal after the generation of the predetermined event based on the synchronization determination information. In this case, it is determined that the time synchronization of the client terminal is not performed.

また、前記判定手段は、さらに、前記サーバ端末から受信した時刻情報と、前記クライアント端末の時刻情報とのずれが、前記クライアント端末の前回時刻同期の際の時刻のずれより所定の時間大きい場合、前記クライアント端末の時刻同期を実施しないと判定する。   In addition, the determination means, further, when the time information received from the server terminal and the time information of the client terminal is larger than the time difference at the time of the previous time synchronization of the client terminal, a predetermined time, It is determined that time synchronization of the client terminal is not performed.

加えて、前記クライアント端末を複数の前記サーバ端末と接続し、前記判定手段は、さらに、複数の前記サーバ端末から受信し、時刻同期を実施しないと判定されなかった時刻情報のいずれか2つに、所定の時間以上のずれがある場合に、前記クライアント端末の時刻同期を実施しないと判定してもよい。   In addition, the client terminal is connected to a plurality of the server terminals, and the determination means further receives any two of the time information received from the plurality of server terminals and determined not to perform time synchronization. When there is a difference of a predetermined time or more, it may be determined that the time synchronization of the client terminal is not performed.

第1の発明により、クライアント端末が、時刻情報の信頼性を示し、時刻同期を行うか否かを判定可能な同期判定情報を時刻情報とともにサーバ端末から受け取る。クライアント端末は、この同期判定情報を元に同期をするか否かを判定し、信頼に足りうる時刻情報に基づく同期を実施することが可能になる。
例えば、サーバ端末が前回時刻同期を実施した時刻や、前回時刻同期の際の時刻のずれ、前回時刻同期の状況などを用いて、サーバ端末が時刻同期を実施していない場合や、サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合には時刻同期を行わないことで、信頼性の低い時刻情報に基づき時刻同期を行う可能性が低くなる。
According to the first aspect of the invention, the client terminal receives the synchronization determination information indicating the reliability of the time information and capable of determining whether to perform the time synchronization from the server terminal together with the time information. The client terminal can determine whether or not to synchronize based on this synchronization determination information, and can perform synchronization based on reliable time information.
For example, when the server terminal is not performing time synchronization using the time when the server terminal performed the previous time synchronization, the time lag during the previous time synchronization, the status of the previous time synchronization, etc. When the time synchronization during the previous time synchronization is being adjusted and the time lag during the previous time synchronization is greater than or equal to a predetermined time, the time synchronization is not performed, thereby reducing the possibility of performing time synchronization based on time information with low reliability. .

さらに、リブートや、ハードウエア障害、手動による時刻変更などのイベント後に時刻同期を行っていないサーバ端末からの時刻情報に基づく時刻同期を排除することで、より信頼性の高い時刻情報に基づく時刻同期が可能になる。   In addition, time synchronization based on more reliable time information is eliminated by eliminating time synchronization based on time information from server terminals that have not performed time synchronization after an event such as reboot, hardware failure, or manual time change. Is possible.

また、クライアント端末の前回時刻同期の際の時刻のずれを用いて同期するか否かの判定を行ったり、複数のサーバ端末から受け取った時刻情報同士のずれを判定に用いることもできる。このように、クライアント端末側の情報や、複数のサーバ端末からの時刻情報同士のずれも判定に利用することで、さらに信頼性の高い時刻情報により時刻同期を行うことが可能になる。   It is also possible to determine whether to synchronize using the time lag at the time of the previous time synchronization of the client terminal, or to use time lags received from a plurality of server terminals for determination. In this way, by using information on the client terminal side and deviation of time information from a plurality of server terminals for determination, time synchronization can be performed with more reliable time information.

第2の発明は、クライアント端末とネットワークにより接続されたサーバ端末であって、当該サーバ端末が前回時刻同期を実施した時刻、前回時刻同期の際の時刻のずれ、前回時刻同期の状況を含む同期判定情報を記憶する記憶手段と、前記クライアント端末からの時刻同期要求を受けて、前記記憶手段により記憶されている前記同期判定情報と時刻情報を前記クライアント端末に送信する送信手段と、を具備し、前記同期判定情報は、前記クライアント端末で、前記サーバ端末が時刻同期を実施していない場合、もしくは、前記サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合、前記時刻情報について、前記クライアント端末の時刻同期を実施しないと判定する際に用いられることを特徴とするサーバ端末である。   A second invention is a server terminal connected to a client terminal via a network, and includes a time at which the server terminal has performed the previous time synchronization, a time lag at the time of the previous time synchronization, and a status of the previous time synchronization. Storage means for storing determination information, and transmission means for receiving the time synchronization request from the client terminal and transmitting the synchronization determination information and time information stored in the storage means to the client terminal. The synchronization determination information is determined when the client terminal is not performing time synchronization or when the server terminal is adjusting the previous time synchronization and the time difference during the previous time synchronization is predetermined. When it is over time, the time information is used when it is determined that time synchronization of the client terminal is not performed. It is a server terminal.

第3の発明は、サーバ端末とクライアント端末がネットワークにより接続されてなる時刻同期システムにおいて時刻同期を行う時刻同期方法であって、前記サーバ端末は、当該サーバ端末が前回時刻同期を実施した時刻、前回時刻同期の際の時刻のずれ、前回時刻同期の状況を含む同期判定情報を記憶する記憶手段を有し、前記クライアント端末からの時刻同期要求を受けて、前記記憶手段で記憶されている前記同期判定情報と時刻情報を送信するステップを実行し、前記クライアント端末は、前記サーバに時刻同期要求を送信するステップと、前記サーバ端末から前記同期判定情報と前記時刻情報を受信するステップと、前記同期判定情報を元に、前記サーバ端末が時刻同期を実施していない場合、もしくは、前記サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合、前記時刻情報について、前記クライアント端末の時刻同期を実施しないと判定するステップと、前記時刻情報について時刻同期を実施しないと判定されない場合に、前記時刻情報に基づき、時刻同期を実施するステップと、を実行することを特徴とする時刻同期方法である。   A third invention is a time synchronization method for performing time synchronization in a time synchronization system in which a server terminal and a client terminal are connected by a network, wherein the server terminal is a time at which the server terminal has performed a previous time synchronization, The storage unit stores synchronization determination information including a time lag at the time of the previous time synchronization and the status of the previous time synchronization, and receives the time synchronization request from the client terminal, and is stored in the storage unit. Transmitting synchronization determination information and time information, wherein the client terminal transmits a time synchronization request to the server, receiving the synchronization determination information and the time information from the server terminal, Based on the synchronization determination information, when the server terminal does not perform time synchronization, or the server terminal Determining that the time synchronization of the client terminal is not performed with respect to the time information, and the time synchronization is not performed with respect to the time information when the time difference during the previous time synchronization is equal to or greater than a predetermined time If it is not determined, the step of performing time synchronization based on the time information is executed.

第4の発明は、コンピュータを、第1の発明のクライアント端末として機能させるためのプログラムである。   A fourth invention is a program for causing a computer to function as the client terminal of the first invention.

本発明により、正確であるとの信頼性の高い時刻情報に基づき時刻同期を行うことが可能なクライアント端末やサーバ端末等を提供することが可能になる。   According to the present invention, it is possible to provide a client terminal, a server terminal, or the like that can perform time synchronization based on highly reliable time information that is accurate.

本発明の実施形態に係る時刻同期システム1の構成を示す図The figure which shows the structure of the time synchronization system 1 which concerns on embodiment of this invention. NTPサーバ10およびNTPクライアント20のハードウエア構成を示す図The figure which shows the hardware constitutions of the NTP server 10 and the NTP client 20 本発明の実施形態に係る時刻同期システム1の機能構成を示す図The figure which shows the function structure of the time synchronization system 1 which concerns on embodiment of this invention. 時刻同期システム1の処理の流れを示すフローチャートThe flowchart which shows the flow of a process of the time synchronization system 1. NTPサーバ10のデータを説明する図The figure explaining the data of the NTP server 10 NTPクライアント20のデータを説明する図The figure explaining the data of the NTP client 20 判定処理(S303)の流れを示すフローチャートFlowchart showing the flow of determination processing (S303) 時刻同期システム500の構成を示す図The figure which shows the structure of the time synchronization system 500.

以下、図面に基づいて本発明の実施形態について説明する。
図1は、本実施形態に係る時刻同期システム1の構成を示す図である。図1に示すように、時刻同期システム1では、NTPサーバ10(サーバ端末)と、NTPクライアント20(クライアント端末)とがネットワーク30で接続される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram illustrating a configuration of a time synchronization system 1 according to the present embodiment. As shown in FIG. 1, in the time synchronization system 1, an NTP server 10 (server terminal) and an NTP client 20 (client terminal) are connected via a network 30.

NTPサーバ10とNTPクライアント20は、時刻情報等の授受に関する2者間の相対的な上位・下位関係を示すものであり、NTPサーバ10はNTPクライアント20に時刻情報等を送信する側、NTPクライアント20はNTPサーバ10から時刻情報等を受信し、当該時刻情報に基づき自身の時刻情報をこれにあわせるように時刻同期を行う側を指す。   The NTP server 10 and the NTP client 20 indicate a relative upper / lower relationship between two parties related to the exchange of time information and the like. The NTP server 10 transmits the time information and the like to the NTP client 20. Reference numeral 20 denotes a side which receives time information and the like from the NTP server 10 and performs time synchronization so as to match its own time information based on the time information.

図2は、NTPサーバ10およびNTPクライアント20のハードウエア構成を示す図である。
図2に示すように、NTPサーバ10およびNTPクライアント20は、制御部11、記憶部12、メディア入出力部13、通信制御部14、入力部15、表示部16、周辺機器I/F部17等が、バス18を介して接続された構成である。
FIG. 2 is a diagram illustrating a hardware configuration of the NTP server 10 and the NTP client 20.
As shown in FIG. 2, the NTP server 10 and the NTP client 20 include a control unit 11, a storage unit 12, a media input / output unit 13, a communication control unit 14, an input unit 15, a display unit 16, and a peripheral device I / F unit 17. And the like are connected via the bus 18.

制御部11は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等で構成される。
CPUは、記憶部12、ROM、記録媒体等に格納されるプログラムをRAM上のワークメモリ領域に呼び出して実行し、バス18を介して接続された各装置を駆動制御し、時刻同期システム1が行う後述する処理を実現する。ROMは、不揮発性メモリであり、ブートプログラムやBIOS等のプログラム、データ等を恒久的に保持している。RAMは、揮発性メモリであり、記憶部12、ROM、記録媒体等からロードしたプログラム、データ等を一時的に保持するとともに、制御部11が各種処理を行う為に使用するワークエリアを備える。
The control unit 11 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.
The CPU calls a program stored in the storage unit 12, ROM, recording medium, etc. to a work memory area on the RAM and executes it, drives and controls each device connected via the bus 18, and the time synchronization system 1 The process to be described later is realized. The ROM is a non-volatile memory and permanently holds programs such as a boot program and BIOS, data, and the like. The RAM is a volatile memory, and temporarily stores programs, data, and the like loaded from the storage unit 12, ROM, recording medium, and the like, and includes a work area used by the control unit 11 for performing various processes.

記憶部12は、HDD(ハードディスクドライブ)等であり、制御部11が実行するプログラム、プログラム実行に必要なデータ、OS(オペレーティングシステム)等が格納される。プログラムに関しては、OS(オペレーティングシステム)に相当する制御プログラムや、後述する処理をコンピュータに実行させるためのアプリケーションプログラムが格納されている。
これらの各プログラムコードは、制御部11により必要に応じて読み出されてRAMに移され、CPUに読み出されて各種の手段として実行される。
The storage unit 12 is an HDD (hard disk drive) or the like, and stores a program executed by the control unit 11, data necessary for program execution, an OS (operating system), and the like. With respect to the program, a control program corresponding to an OS (operating system) and an application program for causing a computer to execute processing described later are stored.
Each of these program codes is read by the control unit 11 as necessary, transferred to the RAM, read by the CPU, and executed as various means.

メディア入出力部13(ドライブ装置)は、データの入出力を行い、例えば、CDドライブ(−ROM、−R、−RW等)、DVDドライブ(−ROM、−R、−RW等)等のメディア入出力装置を有する。
通信制御部14は、通信制御装置、通信ポート等を有し、他のサーバ等の装置との通信を媒介する通信インタフェースであり、ネットワークを介して他の装置との通信制御を行う。ネットワークは、有線、無線を問わない。
The media input / output unit 13 (drive device) inputs / outputs data, for example, media such as a CD drive (-ROM, -R, -RW, etc.), DVD drive (-ROM, -R, -RW, etc.) Has input / output devices.
The communication control unit 14 includes a communication control device, a communication port, and the like, and is a communication interface that mediates communication with devices such as other servers, and performs communication control with other devices via a network. The network may be wired or wireless.

入力部15は、データの入力を行い、例えば、キーボード、マウス等のポインティングデバイス、テンキー等の入力装置を有する。
表示部16は、CRTモニタ、液晶パネル等のディスプレイ装置、およびディスプレイ装置と連携して表示機能を実現するための論理回路等を有する。
The input unit 15 inputs data and includes, for example, a keyboard, a pointing device such as a mouse, and an input device such as a numeric keypad.
The display unit 16 includes a display device such as a CRT monitor and a liquid crystal panel, and a logic circuit for realizing a display function in cooperation with the display device.

周辺機器I/F(インタフェース)部17は、周辺機器を接続させるためのポートであり、周辺機器I/F部17を介して周辺機器とのデータの送受信を行う。周辺機器I/F部17は、USB等で構成されており、通常複数の周辺機器I/Fを有する。周辺機器との接続形態は有線、無線を問わない。
バス18は、各装置間の制御信号、データ信号等の授受を媒介する経路である。
The peripheral device I / F (interface) unit 17 is a port for connecting a peripheral device, and transmits and receives data to and from the peripheral device via the peripheral device I / F unit 17. The peripheral device I / F unit 17 is configured by a USB or the like, and usually includes a plurality of peripheral devices I / F. The connection form with the peripheral device may be wired or wireless.
The bus 18 is a path that mediates transmission / reception of control signals, data signals, and the like between the devices.

図3は、本実施形態の時刻同期システム1における機能構成を示す図である。
図3に示すように、NTPサーバ10は、同期要求受信部101、時刻情報/同期判定情報送信部103、ログ情報記録部104を有し、記憶部12に時刻情報105、同期判定情報106、ログ情報107等を記憶する。
FIG. 3 is a diagram showing a functional configuration in the time synchronization system 1 of the present embodiment.
As illustrated in FIG. 3, the NTP server 10 includes a synchronization request receiving unit 101, a time information / synchronization determination information transmission unit 103, and a log information recording unit 104. The storage unit 12 includes time information 105, synchronization determination information 106, Log information 107 and the like are stored.

同期要求受信部101は、NTPサーバ10の制御部11が、NTPクライアント20からの同期要求を受信するものである。
時刻情報/同期判定情報送信部103は、NTPサーバ10の制御部11が、NTPサーバ10が有する時刻情報105と、同期判定情報106を、NTPクライアント20に送信するものである。
ログ情報記録部104は、NTPサーバ10の制御部11が、NTPクライアント20から受信した情報を元に、ログ情報107を作成し記憶部12へ記憶するものである。
The synchronization request receiving unit 101 is for the control unit 11 of the NTP server 10 to receive a synchronization request from the NTP client 20.
The time information / synchronization determination information transmission unit 103 is for the control unit 11 of the NTP server 10 to transmit the time information 105 and synchronization determination information 106 of the NTP server 10 to the NTP client 20.
The log information recording unit 104 creates log information 107 based on information received from the NTP client 20 by the control unit 11 of the NTP server 10 and stores the log information 107 in the storage unit 12.

時刻情報105は、NTPサーバ10の内部時計の情報である。
同期判定情報106は、NTPクライアント20が同期判定に使用するための情報である。
ログ情報107は、NTPクライアント20の同期状況を管理するための情報である。
時刻情報105、同期判定情報106、ログ情報107の詳細は後述する。
The time information 105 is information on the internal clock of the NTP server 10.
The synchronization determination information 106 is information that the NTP client 20 uses for synchronization determination.
The log information 107 is information for managing the synchronization status of the NTP client 20.
Details of the time information 105, the synchronization determination information 106, and the log information 107 will be described later.

また、NTPクライアント20は、同期要求送信部201、時刻情報/同期判定情報受信部202、同期判定部203、同期処理部205を有し、記憶部12に時刻情報207、同期判定情報208、同期情報209等を記憶する。   The NTP client 20 includes a synchronization request transmission unit 201, a time information / synchronization determination information reception unit 202, a synchronization determination unit 203, and a synchronization processing unit 205. The storage unit 12 stores time information 207, synchronization determination information 208, and synchronization information. Information 209 and the like are stored.

同期要求送信部201は、NTPクライアント20の制御部11が、時刻同期を行うための同期要求をNTPサーバ10へ送信するものである。
時刻情報/同期判定情報受信部202は、NTPクライアント20の制御部11が、時刻情報105と、同期判定情報106を、NTPサーバ10から受信するものである。
同期判定部203は、NTPクライアント20の制御部11が、同期判定情報106等に基づき、時刻同期を実施するか否かを判定するものである。
同期処理部205は、NTPクライアント20の制御部11が、同期判定部203が時刻同期を実施すると判定した場合に、時刻情報207を時刻情報105に基づいて同期させるとともに、NTPクライアント20の同期情報209を記録してNTPサーバ10に送信するものである。
The synchronization request transmission unit 201 is for the control unit 11 of the NTP client 20 to transmit a synchronization request for performing time synchronization to the NTP server 10.
In the time information / synchronization determination information receiving unit 202, the control unit 11 of the NTP client 20 receives the time information 105 and the synchronization determination information 106 from the NTP server 10.
The synchronization determination unit 203 determines whether or not the control unit 11 of the NTP client 20 performs time synchronization based on the synchronization determination information 106 and the like.
The synchronization processing unit 205 synchronizes the time information 207 based on the time information 105 when the control unit 11 of the NTP client 20 determines that the synchronization determination unit 203 performs time synchronization, and also synchronizes the synchronization information of the NTP client 20. 209 is recorded and transmitted to the NTP server 10.

時刻情報207は、NTPクライアント20の内部時計の情報である。
同期判定情報208は、NTPクライアント20が同期判定に使用するための情報である。
同期情報209は、NTPクライアント20の同期状況を示す情報である。
時刻情報207、同期判定情報208、同期情報209の詳細は後述する。
The time information 207 is information on the internal clock of the NTP client 20.
The synchronization determination information 208 is information that the NTP client 20 uses for synchronization determination.
The synchronization information 209 is information indicating the synchronization status of the NTP client 20.
Details of the time information 207, the synchronization determination information 208, and the synchronization information 209 will be described later.

次に、図4〜図7に沿って、時刻同期システム1の処理の流れについて説明する。
図4は、時刻同期システム1の処理の流れを示すフローチャートである。
また、図5は、NTPサーバ10のデータである、時刻情報105、同期判定情報106、ログ情報107を説明する図、図6は、NTPクライアント20のデータである、時刻情報207、同期判定情報208、同期情報209を説明する図である。
また、図7は、同期判定処理の流れを示すフローチャートである。
Next, the flow of processing of the time synchronization system 1 will be described with reference to FIGS.
FIG. 4 is a flowchart showing a processing flow of the time synchronization system 1.
5 is a diagram for explaining time information 105, synchronization determination information 106, and log information 107, which are data of the NTP server 10. FIG. 6 is a diagram for explaining time information 207, synchronization determination information, which is data of the NTP client 20. 208 is a diagram illustrating synchronization information 209. FIG.
FIG. 7 is a flowchart showing the flow of the synchronization determination process.

図4に示すように、まず、NTPクライアント20の制御部11は、NTPサーバ10にNTPクライアント20のIPアドレスを含む時刻同期要求を送信する(S301)。
NTPサーバ10の制御部11は、時刻同期要求を受信し、時刻情報105と、同期判定情報106をNTPクライアント20に送信する(S302)。また、NTPサーバ10は、ログ情報107としてNTPクライアント20のIPアドレスと同期要求時刻を記録する。
As shown in FIG. 4, first, the control unit 11 of the NTP client 20 transmits a time synchronization request including the IP address of the NTP client 20 to the NTP server 10 (S301).
The control unit 11 of the NTP server 10 receives the time synchronization request, and transmits the time information 105 and the synchronization determination information 106 to the NTP client 20 (S302). Further, the NTP server 10 records the IP address of the NTP client 20 and the synchronization request time as log information 107.

ここで、図5(a)、(b)、(c)に沿って、時刻情報105、同期判定情報106、ログ情報107について説明する。   Here, the time information 105, the synchronization determination information 106, and the log information 107 will be described with reference to FIGS. 5 (a), (b), and (c).

図5(a)に示すように、時刻情報105は、NTPサーバ10の内部時計の日付と時刻より成る。   As shown in FIG. 5A, the time information 105 includes the date and time of the internal clock of the NTP server 10.

図5(b)に示すように、同期判定情報106は、前回の同期時刻161、同期時のずれ162、同期状況163、前回のリブート時刻164、ハードウエア障害状況165、前回の手動時刻変更時刻166等からなる。   As shown in FIG. 5B, the synchronization determination information 106 includes the previous synchronization time 161, the synchronization shift 162, the synchronization status 163, the previous reboot time 164, the hardware failure status 165, and the previous manual time change time. 166 etc.

前回の同期時刻161(前回時刻同期を実施した時刻)は、NTPサーバ10が前回、時刻同期を実施(開始)した日付、日時である。NTPサーバ10は、さらに上位のサーバに対してNTPクライアントとして時刻同期を行う。前回の同期時刻161は、この時刻同期を実施した時刻である。   The previous synchronization time 161 (the time when the previous time synchronization was performed) is the date and time when the NTP server 10 performed (started) the time synchronization last time. The NTP server 10 synchronizes time with an upper server as an NTP client. The previous synchronization time 161 is the time when this time synchronization is performed.

同期時のずれ162(前回時刻同期の際の時刻のずれ)は、前回の時刻同期時の、それまでのNTPサーバ10自身の時刻情報105と、上位のサーバから受信した時刻情報のずれを示す。   The time difference 162 at the time of synchronization (time difference at the time of the previous time synchronization) indicates a time difference between the time information 105 of the NTP server 10 itself and the time information received from the host server at the time of the previous time synchronization. .

同期状況163(前回時刻同期の状況)は、前回の時刻同期の実施状況を示す情報であり、時刻調整中であるか、時刻同期が完了しているか、を示す情報である。時刻同期は、ある期間にわたって行われる。例えば、1分のずれを1時間かけて徐々に修正するといったことが行われる。時刻調整中とは、この時刻同期が行われている期間にあることを示す。この期間を過ぎて、時刻同期が終了すれば、時刻同期が完了したことになる。   The synchronization status 163 (the status of the previous time synchronization) is information indicating the implementation status of the previous time synchronization, and is information indicating whether the time is being adjusted or whether the time synchronization is completed. Time synchronization is performed over a period of time. For example, the deviation of 1 minute is gradually corrected over 1 hour. “Time adjustment in progress” indicates that the time synchronization is in progress. If the time synchronization is over after this period, the time synchronization is complete.

前回のリブート時刻164は、NTPサーバ10が前回、リブートを行った時刻であり、制御部11は、リブート時に、その時刻を記憶部12に記憶しておく。   The previous reboot time 164 is the time when the NTP server 10 last rebooted, and the control unit 11 stores the time in the storage unit 12 at the time of reboot.

ハードウエア障害状況165は、NTPサーバ10のハードウエア障害が発生した時刻、およびハードウエア障害が復旧したか、を示す情報であり、制御部11は、例えばマザーボード交換時など、ハードウエア障害が発生した場合に、その時刻を記憶部12に記憶するとともに、ハードウェア障害の復旧時に、復旧したことを示す情報を記憶部12に記憶する。   The hardware failure status 165 is information indicating the time when the hardware failure of the NTP server 10 occurred and whether the hardware failure has been recovered. The control unit 11 generates a hardware failure, for example, when replacing the motherboard. In such a case, the time is stored in the storage unit 12, and information indicating the recovery is stored in the storage unit 12 when the hardware failure is recovered.

前回の手動時刻変更時刻166は、手動で時刻の変更を実施した時刻であり、制御部11は、手動の時刻変更が実施された時刻を記憶部12に記憶する。   The previous manual time change time 166 is a time at which the time is manually changed, and the control unit 11 stores the time at which the manual time change is performed in the storage unit 12.

以上に説明したNTPサーバ10のリブート、ハードウエア障害、手動時刻変更は、NTPサーバ10に生じるイベントの例であり、NTPサーバ10の制御部11は、これらサーバの時刻が変化する可能性のあるイベントについて、その発生時刻等をイベント発生状況として記憶部12に記憶する。なお、本実施形態では、リブート、ハードウエア障害、手動時刻変更の発生状況を同期判定情報106として記憶するが、サーバの時刻が変化する可能性のあるイベントであれば、その他のイベントの発生状況を同期判定情報106として記憶することができる。   The reboot, hardware failure, and manual time change of the NTP server 10 described above are examples of events that occur in the NTP server 10, and the control unit 11 of the NTP server 10 may change the time of these servers. About the event, the generation time etc. are memorize | stored in the memory | storage part 12 as an event occurrence condition. In the present embodiment, the occurrence status of reboot, hardware failure, and manual time change is stored as the synchronization determination information 106. However, if the event may change the server time, the occurrence status of other events Can be stored as the synchronization determination information 106.

図5(c)に示すように、ログ情報107は、NTPクライアント20のIPアドレス171、同期要求時刻172、時刻同期の有無173、同期無の場合の判定理由174、同期時刻175、同期時のずれ176を含む。   As shown in FIG. 5C, the log information 107 includes the IP address 171 of the NTP client 20, the synchronization request time 172, the presence / absence of time synchronization 173, the determination reason 174 when there is no synchronization, the synchronization time 175, and the synchronization time. Includes a displacement 176.

NTPクライアント20のIPアドレス171は、時刻同期を行うNTPクライアント20のIPアドレスである。   The IP address 171 of the NTP client 20 is the IP address of the NTP client 20 that performs time synchronization.

同期要求時刻172は、NTPクライアント20から時刻同期要求を受信した時刻である。   The synchronization request time 172 is the time when the time synchronization request is received from the NTP client 20.

時刻同期の有無173は、NTPクライアント20が後述する処理において時刻同期処理を実施するか/実施しなかったかの情報である。   The presence / absence 173 of time synchronization is information indicating whether or not the NTP client 20 has performed / not performed the time synchronization processing in the processing described later.

同期無の場合の判定理由174は、NTPクライアント20が時刻同期処理を実施しなかった場合の理由を示す情報であり、NTPクライアント20が時刻同期処理を実施しなかった場合に、後述するS401〜S405のいずれかの判定理由が書き込まれる。   The determination reason 174 in the case of no synchronization is information indicating the reason why the NTP client 20 has not performed the time synchronization process. When the NTP client 20 has not performed the time synchronization process, S401 to be described later One of the determination reasons in S405 is written.

同期時刻175は、NTPクライアント20が時刻同期を実施(開始)した時刻である。NTPクライアント20が時刻同期を実施した場合に書き込まれる。   The synchronization time 175 is the time when the NTP client 20 performs (starts) time synchronization. It is written when the NTP client 20 performs time synchronization.

同期時のずれ176は、NTPクライアント20の時刻同期時の、それまでのNTPクライアント20自身の時刻情報207と、NTPサーバ10から受信した時刻情報105との差である。NTPクライアント20が時刻同期を実施した場合に書き込まれる。   The synchronization deviation 176 is a difference between the time information 207 of the NTP client 20 itself until the time synchronization of the NTP client 20 and the time information 105 received from the NTP server 10. It is written when the NTP client 20 performs time synchronization.

図4の説明に戻る。NTPクライアント20の制御部11は、時刻情報105および同期判定情報106を受信し、サーバ側の同期判定情報106等を元に同期を実施するか否かの判定処理を実施する(S303)。   Returning to the description of FIG. The control unit 11 of the NTP client 20 receives the time information 105 and the synchronization determination information 106, and determines whether to perform synchronization based on the synchronization determination information 106 on the server side (S303).

図7は、判定処理(S303)の流れを示すフローチャートである。
判定処理として、NTPクライアント20の制御部11は、受信した同期判定情報106の前回の同期時刻161を参照して、NTPサーバ10で同期が行われているか否かを判定する(S401)。
NTPサーバ10で同期が行われていない場合(S401のNo)、NTPクライアント20の時刻同期は行わないと判定する(S407)。同期が行われていないNTPサーバ10の時刻情報105は、信頼性が低いためである。例えば、前回の同期時刻161が空欄であれば、NTPサーバ10で同期が行われていないと判定する。
FIG. 7 is a flowchart showing the flow of the determination process (S303).
As a determination process, the control unit 11 of the NTP client 20 refers to the previous synchronization time 161 of the received synchronization determination information 106 to determine whether the NTP server 10 is synchronized (S401).
When synchronization is not performed in the NTP server 10 (No in S401), it is determined that time synchronization of the NTP client 20 is not performed (S407). This is because the time information 105 of the NTP server 10 that is not synchronized is low in reliability. For example, if the previous synchronization time 161 is blank, it is determined that the NTP server 10 is not synchronized.

また、NTPクライアント20の制御部11は、同期状況163と同期時のずれ162を参照し、NTPサーバ10が時刻同期の調整中であり、かつ、同期時のずれ162が所定の時間T1(例えば、T1=4分)以上か否かを判定する(S402)。
NTPサーバ10が時刻同期の調整中であり、かつ、同期時のずれ162が所定の時間T1以上の場合(S402のYes)、NTPクライアント20の時刻同期は行わないと判定する(S407)。大きなずれのある時刻情報に同期している最中のNTPサーバ10の時刻情報105は、正確な時刻とのずれが大きい可能性があるためである。
Further, the control unit 11 of the NTP client 20 refers to the synchronization status 163 and the synchronization shift 162, the NTP server 10 is adjusting the time synchronization, and the synchronization shift 162 is a predetermined time T1 (for example, , T1 = 4 minutes) or more is determined (S402).
When the NTP server 10 is adjusting the time synchronization and the synchronization shift 162 is equal to or longer than the predetermined time T1 (Yes in S402), it is determined that the time synchronization of the NTP client 20 is not performed (S407). This is because there is a possibility that the time information 105 of the NTP server 10 in the middle of synchronization with the time information having a large time deviation is large from the accurate time.

さらに、NTPクライアント20の制御部11は、前回のリブート時刻164、ハードウエア障害状況165の障害発生時刻、前回の手動時刻変更時刻166、および、前回の同期時刻161を参照して、NTPサーバ10における所定のイベント(リブート、ハードウエア障害、手動時刻変更等)後にNTPサーバ10が時刻同期を実施しているか否かを判定する(S403)。すなわち、各イベントの時刻(前回のリブート時刻164、ハードウエア障害状況165の障害発生時刻、前回の手動時刻変更時刻166)と前回の同期時刻161を比較し、前回の同期時刻161がいずれかのイベントの時刻より以前である場合(S403のNo)、NTPクライアント20の時刻同期は行わないと判定する(S407)。これらのイベント後に時刻同期を行っていない場合、NTPサーバ10の時刻が正確な時刻とずれている可能性があるためである。   Further, the control unit 11 of the NTP client 20 refers to the previous reboot time 164, the failure occurrence time of the hardware failure status 165, the previous manual time change time 166, and the previous synchronization time 161, and the NTP server 10 It is determined whether or not the NTP server 10 is performing time synchronization after a predetermined event (reboot, hardware failure, manual time change, etc.) (S403). That is, the time of each event (the previous reboot time 164, the failure occurrence time of the hardware failure status 165, the previous manual time change time 166) is compared with the previous synchronization time 161, and the previous synchronization time 161 is When it is before the event time (No in S403), it is determined that the time synchronization of the NTP client 20 is not performed (S407). This is because when the time synchronization is not performed after these events, the time of the NTP server 10 may deviate from the accurate time.

図7の判定処理の流れでは、更に、後述するS404、S405において、NTPクライアント20の時刻情報207や同期判定情報208も用いた時刻同期実施の判定処理を行う。   In the determination process flow of FIG. 7, the time synchronization execution determination process using the time information 207 and the synchronization determination information 208 of the NTP client 20 is further performed in S404 and S405 described later.

図6(a)、(b)に沿って、NTPクライアント20の時刻情報207、同期判定情報208について説明する。   The time information 207 and the synchronization determination information 208 of the NTP client 20 will be described along FIGS. 6 (a) and 6 (b).

図6(a)に示すように、時刻情報207は、時刻情報105と同様、NTPクライアント20の内部時計の日付と時刻より成る。   As shown in FIG. 6A, the time information 207 includes the date and time of the internal clock of the NTP client 20, similar to the time information 105.

また、図6(b)に示すように、NTPクライアント20の同期判定情報208は、NTPサーバ10の同期判定情報106と同様に、前回の同期時刻281、同期時のずれ282、同期状況283、前回のリブート時刻284、ハードウエア障害状況285、前回の手動時刻変更時刻286等からなる。   Further, as shown in FIG. 6B, the synchronization determination information 208 of the NTP client 20 is similar to the synchronization determination information 106 of the NTP server 10 in that the previous synchronization time 281, the synchronization deviation 282, the synchronization status 283, It includes a previous reboot time 284, a hardware failure status 285, a previous manual time change time 286, and the like.

前回の同期時刻281、同期時のずれ282、同期状況283、前回のリブート時刻284、ハードウエア障害状況285、前回の手動時刻変更時刻286は、それぞれ、前述した前回の同期時刻161、同期時のずれ162、同期状況163、前回のリブート時刻164、ハードウエア障害状況165、前回の手動時刻変更時刻166と同様の情報である。   The previous synchronization time 281, the synchronization deviation 282, the synchronization status 283, the previous reboot time 284, the hardware failure status 285, and the previous manual time change time 286 are respectively the previous synchronization time 161 and the synchronization time described above. The information is the same as the deviation 162, the synchronization status 163, the previous reboot time 164, the hardware failure status 165, and the previous manual time change time 166.

図7の説明に戻る。S404では、NTPクライアント20の制御部11が、クライアント側の同期判定情報208のハードウエア障害状況285を参照し、NTPクライアント20がハードウエア障害を起こしているか判定し、ハードウエア障害を起こしている場合には(S404のYes)、NTPクライアント20の時刻同期は行わないと判定する(S407)。例えば、ハードウエア障害状況285が、障害発生時刻に発生したハードウェア障害が復旧していることを示すものでなければ、ハードウエア障害を起こしていると判定する。   Returning to the description of FIG. In S404, the control unit 11 of the NTP client 20 refers to the hardware failure status 285 of the synchronization determination information 208 on the client side, determines whether the NTP client 20 has caused a hardware failure, and has caused the hardware failure. In this case (Yes in S404), it is determined that the time synchronization of the NTP client 20 is not performed (S407). For example, if the hardware failure status 285 does not indicate that the hardware failure that occurred at the failure occurrence time has been recovered, it is determined that a hardware failure has occurred.

また、NTPクライアント20の制御部11は、クライアント側の同期判定情報208の同期時のずれ282を参照して、NTPサーバ10の時刻情報105とNTPクライアント20の時刻情報207のずれが、同期時のずれ282より所定の時間T2大きいか否かを判定する(S405)。NTPサーバ10の時刻情報105とNTPクライアント20の時刻情報207のずれが、同期時のずれ282より所定の時間T2大きい場合(S405のYes)、NTPクライアント20の時刻同期は行わないと判定する(S407)。NTPクライアント20が前回時刻同期を行った際の同期時のずれ282に対し、新たに時刻同期を行う際のずれがある程度大きい場合、NTPサーバ10の時刻の進行に何らかの異常があった可能性があるためである。   Further, the control unit 11 of the NTP client 20 refers to the synchronization time difference 282 of the synchronization determination information 208 on the client side, and the difference between the time information 105 of the NTP server 10 and the time information 207 of the NTP client 20 indicates the synchronization time. It is determined whether or not a predetermined time T2 is greater than the deviation 282 (S405). When the difference between the time information 105 of the NTP server 10 and the time information 207 of the NTP client 20 is larger than the synchronization difference 282 by a predetermined time T2 (Yes in S405), it is determined that the time synchronization of the NTP client 20 is not performed ( S407). If the NTP client 20 performs a new time synchronization to some extent with respect to the synchronization time 282 when the NTP client 20 performed the previous time synchronization, there may be some abnormality in the time progress of the NTP server 10. Because there is.

以上のS401〜S405の全てで、時刻同期を実施しないと判定されない場合に、NTPクライアント20の制御部11は、NTPクライアント20の時刻同期を行うと判定する(S406)。   When it is not determined that time synchronization is not performed in all of the above S401 to S405, the control unit 11 of the NTP client 20 determines to perform time synchronization of the NTP client 20 (S406).

図4の説明に戻る。以上の判定処理で時刻同期を行うと判定された場合(S304のYes)、NTPクライアント20の制御部11は、NTPサーバ10から受信した時刻情報105に基づき、時刻同期を実施(開始)し(S305)、S306の処理へ移る。一方、時刻同期を行わないと判定された場合(S304のNo)、時刻同期は行わず、S306の処理へ移行する。   Returning to the description of FIG. When it is determined that time synchronization is performed in the above determination process (Yes in S304), the control unit 11 of the NTP client 20 performs (starts) time synchronization based on the time information 105 received from the NTP server 10 ( The process proceeds to S305) and S306. On the other hand, when it is determined not to perform time synchronization (No in S304), time synchronization is not performed, and the process proceeds to S306.

S306で、NTPクライアント20の制御部11は、今回行った処理について、同期情報209の記録を行い、当該同期情報209をNTPクライアント20のIPアドレスとともにNTPサーバ10に送信する(S306)。   In S306, the control unit 11 of the NTP client 20 records the synchronization information 209 for the processing performed this time, and transmits the synchronization information 209 to the NTP server 10 together with the IP address of the NTP client 20 (S306).

図6(c)に沿って、NTPクライアント20の同期情報209について説明する。
図6(c)に示すように、同期情報209は、時刻同期の有無291、同期無の場合の判定理由292、同期時刻293、同期時のずれ294等より成る。
The synchronization information 209 of the NTP client 20 will be described with reference to FIG.
As shown in FIG. 6C, the synchronization information 209 includes time synchronization presence / absence 291, determination reason 292 when there is no synchronization, synchronization time 293, synchronization time deviation 294, and the like.

時刻同期の有無291、同期無の場合の判定理由292、同期時刻293、同期時のずれ294は、それぞれ、前述した時刻同期の有無173、同期無の場合の判定理由174、同期時刻175、同期時のずれ176と同様である。   Presence / absence of time synchronization 291, determination reason 292 when there is no synchronization, synchronization time 293, and synchronization time deviation 294 are the above described presence / absence 173 of time synchronization, determination reason 174 when there is no synchronization, synchronization time 175, synchronization This is the same as the time shift 176.

図6(c)は、S401で時刻同期を行わないと判定された場合の同期情報209の例である。時刻同期の有無291について、「無」が記録され、同期無の場合の判定理由292として、S401の判定理由「NTPサーバの時刻同期未実施」が記録される。時刻同期が行われなかったので、同期時刻293、同期時のずれ294は空欄である。一方、時刻同期を行った場合には、時刻同期の有無291について、「有」が記録され、同期時刻293、同期時のずれ294として、それぞれNTPクライアント20が同期を実施(開始)した時刻と、NTPクライアント20の時刻同期時の、それまでのNTPクライアント20自身の時刻情報207と、NTPサーバ10から受信した時刻情報105との差が書き込まれる。   FIG. 6C is an example of the synchronization information 209 when it is determined in S401 that time synchronization is not performed. “None” is recorded for the presence / absence 291 of the time synchronization, and the determination reason “NTP server time synchronization not performed” in S401 is recorded as the determination reason 292 in the case of no synchronization. Since time synchronization was not performed, the synchronization time 293 and the synchronization deviation 294 are blank. On the other hand, when time synchronization is performed, “presence” is recorded for the presence / absence 291 of the time synchronization, and the time when the NTP client 20 performs (starts) synchronization as the synchronization time 293 and the synchronization deviation 294, respectively. The difference between the time information 207 of the NTP client 20 so far and the time information 105 received from the NTP server 10 at the time synchronization of the NTP client 20 is written.

なお、NTPクライアント20の制御部11は、S306において、同期判定情報208の、前回の同期時刻281、同期時のずれ282、同期状況283のデータも更新しておく。   In S306, the control unit 11 of the NTP client 20 also updates the data of the previous synchronization time 281, the synchronization deviation 282, and the synchronization status 283 in the synchronization determination information 208.

図4の説明に戻る。NTPサーバ10は、NTPクライアント20のIPアドレスと同期情報209を受信し、IPアドレスの対応するログ情報107の時刻同期の有無173、同期無の場合の判定理由174、同期時刻175、同期時のずれ176に、同期情報209の時刻同期の有無291、同期無の場合の判定理由292、同期時刻293、同期時のずれ294を書き込んで記憶部12に記憶する(S308)。
ログ情報107により、NTPサーバ10は、NTPクライアント20の時刻同期状況を管理することが可能になる。適宜管理サーバ(不図示)にこのログ情報107を送信するなどして、システムの管理のため用いることもできる。
Returning to the description of FIG. The NTP server 10 receives the IP address of the NTP client 20 and the synchronization information 209, and the log information 107 corresponding to the IP address has a time synchronization presence / absence 173, a determination reason 174 in the absence of synchronization, a synchronization time 175, In the deviation 176, the presence / absence 291 of time synchronization in the synchronization information 209, the determination reason 292 in the absence of synchronization, the synchronization time 293, and the deviation 294 at the time of synchronization are written and stored in the storage unit 12 (S308).
The log information 107 enables the NTP server 10 to manage the time synchronization status of the NTP client 20. The log information 107 can be appropriately transmitted to a management server (not shown) and used for system management.

以上説明したように、本発明の実施形態によれば、NTPクライアント20が、NTPサーバ10から、時刻同期を行うか否かを判定可能な同期判定情報106を時刻情報105とともに受け取る。NTPクライアント20は、この同期判定情報106を元に同期をするか否かを判定し、信頼に足りうる時刻情報105に基づく同期を実施することが可能になる。例えば、NTPサーバ10が前回時刻同期を実施した時刻や、前回時刻同期の際の時刻のずれ、前回時刻同期の状況などを用いて、NTPサーバ10が時刻同期を実施していない場合や、NTPサーバ10が時刻同期の調整中かつ時刻のずれが所定の時間以上の場合には時刻同期を行わないことで、信頼性の低い時刻情報105に基づき時刻同期を行う可能性が低くなる。
さらに、リブートや、ハードウエア障害、手動による時刻変更などのイベント後に時刻同期を行っていないNTPサーバ10からの時刻情報105に基づく時刻同期を排除することで、より信頼性の高い時刻情報105に基づく時刻同期が可能になる。
加えて、NTPクライアント20の前回時刻同期の際の時刻のずれを用いて同期するか否かの判定を行うこともでき、自身の時刻情報207とNTPサーバ10から受信した時刻情報105のずれをこれと比較し判定を行うことで、さらに信頼性の高い時刻同期を行うことが可能になる。
As described above, according to the embodiment of the present invention, the NTP client 20 receives from the NTP server 10 the synchronization determination information 106 that can determine whether or not to perform time synchronization together with the time information 105. The NTP client 20 determines whether or not to synchronize based on the synchronization determination information 106, and can perform synchronization based on the reliable time information 105. For example, when the NTP server 10 has not performed time synchronization using the time at which the NTP server 10 performed the previous time synchronization, the time lag at the time of the previous time synchronization, the status of the previous time synchronization, or the like, By not performing time synchronization when the server 10 is adjusting the time synchronization and the time difference is equal to or greater than a predetermined time, the possibility of performing time synchronization based on the time information 105 with low reliability is reduced.
Furthermore, by eliminating time synchronization based on the time information 105 from the NTP server 10 that has not performed time synchronization after an event such as a reboot, hardware failure, or manual time change, the time information 105 can be made more reliable. Based on time synchronization.
In addition, it is possible to determine whether or not to synchronize using the time lag at the time of the previous time synchronization of the NTP client 20, and to determine the time lag between the own time information 207 and the time information 105 received from the NTP server 10. By making a determination in comparison with this, it becomes possible to perform more reliable time synchronization.

なお、判定の方法は上記したものに限らない。例えば、複数のNTPサーバ10から受け取った時刻情報105を元に、時刻同期を実施するか否かの判定を行うこともできる。これを以下説明する。
図8は、このような時刻同期システム500の構成を示す図である。時刻同期システム500は、NTPクライアント20が、複数のNTPサーバ10−1、10−2、…とネットワーク30を介して接続された構成である。
The determination method is not limited to the above. For example, based on the time information 105 received from a plurality of NTP servers 10, it can be determined whether or not to perform time synchronization. This will be described below.
FIG. 8 is a diagram showing the configuration of such a time synchronization system 500. The time synchronization system 500 has a configuration in which the NTP client 20 is connected to a plurality of NTP servers 10-1, 10-2,.

NTPクライアント20は、複数のNTPサーバ10−1、10−2、…に前記のS301と同様に時刻同期要求を送信し、これに応じて受信した複数のNTPサーバ10−1、10−2、…の同期判定情報106等を元に、それぞれのNTPサーバ10の時刻情報105について、S303と同様の判定処理を実施し、同期を実施して問題ないかを判定する。
これに加えて、NTPクライアント20の制御部11は、同期を実施しないと判定されない(S304のYes)時刻情報105のうち、ある任意の2つの時刻情報105同士のずれが所定の時間T3以上か否かも判定する。そして、これが所定の時間T3以上の場合に、同期処理を行わないようにしておく。適正と判定される時刻情報105であっても、相互に大きく異なる時刻を示す場合には、その信頼性に疑問があるためである。このように、複数のNTPサーバ10による時刻情報105同士の比較も行うことで、信頼性の低い時刻情報105に基づき時刻同期を行う可能性はさらに低くなる。
The NTP client 20 transmits a time synchronization request to the plurality of NTP servers 10-1, 10-2,... In the same manner as S301 described above, and the plurality of NTP servers 10-1, 10-2,. Based on the synchronization determination information 106 and so on, the time information 105 of each NTP server 10 is subjected to determination processing similar to S303, and synchronization is determined to determine whether there is no problem.
In addition to this, the control unit 11 of the NTP client 20 is not determined not to perform synchronization (Yes in S304). Among the time information 105, is the deviation between any two pieces of time information 105 greater than or equal to a predetermined time T3? Also determine whether or not. Then, when this is equal to or longer than the predetermined time T3, the synchronization process is not performed. This is because even if the time information 105 is determined to be appropriate, the reliability of the time information 105 is questionable if the time information 105 shows significantly different times. Thus, by comparing the time information 105 by the plurality of NTP servers 10, the possibility of performing time synchronization based on the time information 105 with low reliability is further reduced.

なお、以上の同期処理実施の判定処理で使用する所定の時間T1〜T3は、予め所定値を定めて、NTPクライアント20の記憶部12に格納しておけばよい。   It should be noted that the predetermined times T1 to T3 used in the determination process for performing the synchronization process described above may be determined in advance and stored in the storage unit 12 of the NTP client 20.

以上、添付図面を参照しながら本発明の実施形態について説明したが、本発明はかかる例に限定されない。当業者であれば、特許請求の範囲に記載された技術的思想の範疇内において各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although embodiment of this invention was described referring an accompanying drawing, this invention is not limited to this example. It is obvious for those skilled in the art that various modifications or modifications can be conceived within the scope of the technical idea described in the claims, and these are naturally within the technical scope of the present invention. It is understood that it belongs.

1………時刻同期システム
10………NTPサーバ
20………NTPクライアント
105、207………時刻情報
106、208………同期判定情報
107………ログ情報
209………同期情報
1 ......... Time synchronization system 10 ......... NTP server 20 ......... NTP client 105, 207 ......... Time information 106, 208 ......... Synchronization determination information 107 ......... Log information 209 ......... Synchronization information

Claims (7)

サーバ端末とネットワークにより接続されたクライアント端末であって、
前記サーバ端末に時刻同期要求を送信する送信手段と、
前記サーバ端末から、当該サーバ端末が前回時刻同期を実施した時刻、前回時刻同期の際の時刻のずれ、前回時刻同期の状況を含む同期判定情報と時刻情報を受信する受信手段と、
前記同期判定情報を元に、前記サーバ端末が時刻同期を実施していない場合、もしくは、前記サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合、前記時刻情報について、前記クライアント端末の時刻同期を実施しないと判定する判定手段と、
前記時刻情報について時刻同期を実施しないと判定されない場合に、前記時刻情報に基づき、時刻同期を実施する時刻同期手段と、
を具備することを特徴とするクライアント端末。
A client terminal connected to a server terminal via a network,
Transmitting means for transmitting a time synchronization request to the server terminal;
Receiving means for receiving from the server terminal the time at which the server terminal performed the previous time synchronization, the time lag at the time of the previous time synchronization, the synchronization determination information including the status of the previous time synchronization, and the time information;
When the server terminal is not performing time synchronization based on the synchronization determination information, or when the server terminal is adjusting the previous time synchronization and the time lag during the previous time synchronization is a predetermined time or more Determining means for determining that the time synchronization of the client terminal is not performed for the time information;
If it is not determined that time synchronization is not performed for the time information, time synchronization means for performing time synchronization based on the time information;
A client terminal comprising:
前記同期判定情報は、前記サーバ端末における所定のイベントの発生状況を含み、
前記判定手段は、前記同期判定情報を元に、さらに、所定のイベントの発生後に前記サーバ端末が時刻同期を行っていない場合、前記クライアント端末の時刻同期を実施しないと判定することを特徴とする請求項1記載のクライアント端末。
The synchronization determination information includes an occurrence status of a predetermined event in the server terminal,
The determination means further determines, based on the synchronization determination information, that the time synchronization of the client terminal is not performed when the server terminal does not perform time synchronization after occurrence of a predetermined event. The client terminal according to claim 1.
前記判定手段は、さらに、前記サーバ端末から受信した時刻情報と、前記クライアント端末の時刻情報とのずれが、前記クライアント端末の前回時刻同期の際の時刻のずれより所定の時間大きい場合、前記クライアント端末の時刻同期を実施しないと判定することを特徴とする請求項1または請求項2に記載のクライアント端末。   The determination means may further include the client when the difference between the time information received from the server terminal and the time information of the client terminal is larger than a time difference during the previous time synchronization of the client terminal by a predetermined time. The client terminal according to claim 1 or 2, wherein it is determined that the time synchronization of the terminal is not performed. 複数の前記サーバ端末と接続され、
前記判定手段は、さらに、複数の前記サーバ端末から受信し、時刻同期を実施しないと判定されなかった時刻情報のいずれか2つに、所定の時間以上のずれがある場合に、前記クライアント端末の時刻同期を実施しないと判定することを特徴とする請求項1から請求項3のいずれかに記載のクライアント端末。
Connected to a plurality of the server terminals,
The determination unit is further configured to receive the client terminal from the plurality of server terminals when there is a deviation of a predetermined time or more in any two of the time information that has not been determined not to perform time synchronization. The client terminal according to any one of claims 1 to 3, wherein it is determined that time synchronization is not performed.
クライアント端末とネットワークにより接続されたサーバ端末であって、
当該サーバ端末が前回時刻同期を実施した時刻、前回時刻同期の際の時刻のずれ、前回時刻同期の状況を含む同期判定情報を記憶する記憶手段と、
前記クライアント端末からの時刻同期要求を受けて、前記記憶手段により記憶されている前記同期判定情報と時刻情報を前記クライアント端末に送信する送信手段と、
を具備し、
前記同期判定情報は、前記クライアント端末で、前記サーバ端末が時刻同期を実施していない場合、もしくは、前記サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合、前記時刻情報について、前記クライアント端末の時刻同期を実施しないと判定する際に用いられることを特徴とするサーバ端末。
A server terminal connected to a client terminal via a network,
Storage means for storing synchronization determination information including the time at which the server terminal performed the previous time synchronization, the time lag during the previous time synchronization, and the status of the previous time synchronization;
A transmission unit that receives a time synchronization request from the client terminal and transmits the synchronization determination information and time information stored in the storage unit to the client terminal;
Comprising
The synchronization determination information is a predetermined time when the server terminal is not performing time synchronization at the client terminal, or when the server terminal is adjusting the previous time synchronization and the time difference during the previous time synchronization is a predetermined time. In the above case, the server terminal is used when determining that the time synchronization of the client terminal is not performed for the time information.
サーバ端末とクライアント端末がネットワークにより接続されてなる時刻同期システムにおいて時刻同期を行う時刻同期方法であって、
前記サーバ端末は、
当該サーバ端末が前回時刻同期を実施した時刻、前回時刻同期の際の時刻のずれ、前回時刻同期の状況を含む同期判定情報を記憶する記憶手段を有し、
前記クライアント端末からの時刻同期要求を受けて、前記記憶手段で記憶されている前記同期判定情報と時刻情報を送信するステップを実行し、
前記クライアント端末は、
前記サーバに時刻同期要求を送信するステップと、
前記サーバ端末から前記同期判定情報と前記時刻情報を受信するステップと、
前記同期判定情報を元に、前記サーバ端末が時刻同期を実施していない場合、もしくは、前記サーバ端末が前回時刻同期の調整中かつ前回時刻同期の際の時刻のずれが所定の時間以上の場合、前記時刻情報について、前記クライアント端末の時刻同期を実施しないと判定するステップと、
前記時刻情報について時刻同期を実施しないと判定されない場合に、前記時刻情報に基づき、時刻同期を実施するステップと、
を実行することを特徴とする時刻同期方法。
A time synchronization method for performing time synchronization in a time synchronization system in which a server terminal and a client terminal are connected by a network,
The server terminal is
A storage means for storing synchronization determination information including the time at which the server terminal performed the previous time synchronization, the time lag during the previous time synchronization, and the status of the previous time synchronization;
Receiving the time synchronization request from the client terminal, and executing the step of transmitting the synchronization determination information and time information stored in the storage means;
The client terminal is
Sending a time synchronization request to the server;
Receiving the synchronization determination information and the time information from the server terminal;
When the server terminal is not performing time synchronization based on the synchronization determination information, or when the server terminal is adjusting the previous time synchronization and the time lag during the previous time synchronization is a predetermined time or more Determining that the time synchronization of the client terminal is not performed for the time information;
If it is not determined that time synchronization is not performed for the time information, performing time synchronization based on the time information;
The time synchronization method characterized by performing.
コンピュータを、請求項1から請求項4のいずれかに記載のクライアント端末として機能させるためのプログラム。   The program for functioning a computer as a client terminal in any one of Claims 1-4.
JP2011069322A 2011-03-28 2011-03-28 Client terminal, server terminal, time synchronization method, and program Withdrawn JP2012202897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011069322A JP2012202897A (en) 2011-03-28 2011-03-28 Client terminal, server terminal, time synchronization method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011069322A JP2012202897A (en) 2011-03-28 2011-03-28 Client terminal, server terminal, time synchronization method, and program

Publications (1)

Publication Number Publication Date
JP2012202897A true JP2012202897A (en) 2012-10-22

Family

ID=47184051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011069322A Withdrawn JP2012202897A (en) 2011-03-28 2011-03-28 Client terminal, server terminal, time synchronization method, and program

Country Status (1)

Country Link
JP (1) JP2012202897A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014199729A1 (en) 2013-06-12 2014-12-18 富士電機株式会社 Distribution device, distribution system, and distribution method
CN109257133A (en) * 2018-09-14 2019-01-22 武汉虹信通信技术有限责任公司 A kind of the whole network clock synchronizing method and device applied to LTE rail transit network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014199729A1 (en) 2013-06-12 2014-12-18 富士電機株式会社 Distribution device, distribution system, and distribution method
US9519306B2 (en) 2013-06-12 2016-12-13 Fuji Electric Co., Ltd. Distribution device, distribution system, and distribution method
CN109257133A (en) * 2018-09-14 2019-01-22 武汉虹信通信技术有限责任公司 A kind of the whole network clock synchronizing method and device applied to LTE rail transit network

Similar Documents

Publication Publication Date Title
US10162951B2 (en) Non-intrusive background synchronization when authentication is required
US9798632B2 (en) Providing boot data in a cluster network environment
US20190073276A1 (en) System and method for datacenter recovery
US9311199B2 (en) Replaying jobs at a secondary location of a service
US7062676B2 (en) Method and system for installing program in multiple system
JP5120860B2 (en) Method, system, and computer program for facilitating recovery within an agreement timing network
EP3766203B1 (en) Autonomous secrets renewal and distribution
JP5042318B2 (en) Method, system, and computer program for defining a tier 1 configuration in an agreement timing network
EP3624426B1 (en) Binding crud-type protocols in distributed agreement protocols
US20060224723A1 (en) Data updating system and method
US20100318610A1 (en) Method and system for a weak membership tie-break
US11531604B2 (en) Methods and systems for data resynchronization in a replication environment
US20090049329A1 (en) Reducing likelihood of data loss during failovers in high-availability systems
WO2012111112A1 (en) Information processing device, time setting method, and time setting program
CN106331081A (en) Information synchronization method and device
JP2012202897A (en) Client terminal, server terminal, time synchronization method, and program
US20120191645A1 (en) Information processing apparatus and database system
CN115758447A (en) Information security service processing and cluster generating method, electronic device and storage medium
EP3884648B1 (en) Geo-replicated iot hub
US20080148023A1 (en) Method and system for synchronous operation of an application by a purality of processing units
US20220327030A1 (en) System and method for restoration using micro-backups
US20130246832A1 (en) Information processing device, computer-readable recording medium having stored therein program for setting time of information processing device, monitor, and method for setting time of information processing device
JP6773533B2 (en) Operating environment synchronization device, operating environment synchronization system, operating environment synchronization method, and operating environment synchronization program
TWI400600B (en) Method for recovering system setting and computer system
JP3726043B2 (en) Clock information synchronization method, duplexing device and synchronization program in duplexing device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140603