JP2009069892A - Log time adjustment method, server and information processing system - Google Patents
Log time adjustment method, server and information processing system Download PDFInfo
- Publication number
- JP2009069892A JP2009069892A JP2007234492A JP2007234492A JP2009069892A JP 2009069892 A JP2009069892 A JP 2009069892A JP 2007234492 A JP2007234492 A JP 2007234492A JP 2007234492 A JP2007234492 A JP 2007234492A JP 2009069892 A JP2009069892 A JP 2009069892A
- Authority
- JP
- Japan
- Prior art keywords
- log
- time
- information
- server
- event
- 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.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、クライアント側で発生したイベントのログをサーバが記録するシステムにおいて、クライアントとサーバの時刻の差異を吸収してログを記録する場合のログ時刻調整方法、これを実現するサーバおよび情報処理システムに関する。 The present invention relates to a log time adjustment method for recording a log by absorbing a difference in time between the client and the server in a system in which a server records a log of an event that has occurred on the client side, and a server and information processing for realizing the method About the system.
情報処理装置で発生したイベントは、一般にログとして記録される。また、クライアントサーバシステムでは、クライアントで発生したイベントのログをサーバに集約し、監査の利便性を向上させる仕組みも存在する。 An event that occurs in an information processing apparatus is generally recorded as a log. In addition, in the client server system, there is a mechanism for collecting the logs of events generated in the client to the server and improving the convenience of auditing.
このようなシステムでは、クライアントとサーバとの時刻が異なる蓋然性があるので、イベント発生時刻を、いずれか一方の時刻に揃えて記録する必要がある。ここで、発生したイベントのログをクライアントからサーバへリアルタイムで送る場合には、たとえばサーバ側の時刻(ログの受信時刻)を採用することで、一貫した前後関係を維持できる。しかし、ログをクライアント側で一定期間蓄積しておき、まとめてサーバへ送る場合には、サーバ側の時刻を採用するようにすると同じタイミングで送信されたログは全て同時刻に記録されてしまうので、各イベントの前後関係が維持できない。すなわち、ログを一まとめにしてサーバへ送るシステムでは、クライアント側の時刻を採用する必要がある。この場合、上述したように、クライアントとサーバとの時刻が異なる蓋然性があるので、たとえば、下記特許文献1に記載の技術を用いてクライアントのシステム時刻を信頼できるものにする。なお、下記特許文献1に記載の技術では、NTP(Network Time Protocol)サーバと電波時計を併用することにより、サーバ側の時刻とクライアント側の時刻を同期させている。
In such a system, there is a possibility that the time of the client and the server are different, and therefore it is necessary to record the event occurrence time so as to be aligned with any one of the times. Here, when a log of an event that has occurred is sent from the client to the server in real time, a consistent context can be maintained by adopting, for example, the server time (log reception time). However, if logs are accumulated on the client side for a certain period and sent to the server in a batch, if the server time is adopted, all logs sent at the same timing will be recorded at the same time. The context of each event cannot be maintained. In other words, in a system in which logs are sent together to a server, it is necessary to employ the time on the client side. In this case, as described above, since there is a possibility that the time of the client and the server are different, for example, the system time of the client is made reliable by using the technique described in
また、単にサーバ側の時刻とクライアント側の時刻を同期させたい場合には、NTPサーバや電波時計を用いなくてもサーバとクライアントが定期的に通信を行うことにより実現可能である。 In addition, when it is desired to simply synchronize the time on the server side and the time on the client side, it can be realized by periodically communicating between the server and the client without using an NTP server or a radio clock.
しかし、ログをクライアント側で一定期間蓄積しておき、まとめてサーバへ送るシステムにおいて、上記特許文献1に示した方法で時刻の同期を図るためには、サーバとクライアントが電波時計を備える必要があり、装置規模の増大やコストアップを招来する、という問題があった。
However, in a system in which logs are accumulated on the client side for a certain period and sent to the server collectively, in order to synchronize the time using the method described in
また、従来のサーバとクライアントが定期的に通信を行って同期の維持を図る方法では、たとえば、クライアント上でユーザが意図的に時刻を修正した場合、その修正内容がサーバ側に反映されず、各イベントの前後関係が維持できなくなる、という問題があった。 In addition, in the conventional method of maintaining synchronization by periodically communicating between the server and the client, for example, when the user intentionally corrects the time on the client, the correction content is not reflected on the server side, There was a problem that the context of each event could not be maintained.
本発明は、上記に鑑みてなされたものであって、クライアントサーバシステムにおいて、電波時計のような装置規模やコストに影響を与える構成要素を利用することなく、サーバが、各クライアントで発生したイベントのログを発生した順番通りに、正しく記録するために使用するログ時刻調整方法、サーバおよび情報処理システムを得ることを目的とする。 The present invention has been made in view of the above, and in a client-server system, an event generated by each server by a server without using a component such as a radio timepiece that affects the device scale and cost. It is an object of the present invention to obtain a log time adjustment method, a server, and an information processing system that are used for correctly recording logs in the order in which they are generated.
上述した課題を解決し、目的を達成するために、請求項1にかかる発明は、複数のクライアントおよび各クライアントから通知されたイベントのログを管理するサーバを備える情報処理システムにおいて、サーバが、通知されたログに含まれるイベント発生時刻の情報であるログ時刻を調整する場合のログ時刻調整方法であって、前記クライアントが、イベントの発生を検知する毎に、ログ時刻を含んだ当該イベントのログを記憶するログ記憶工程と、前記クライアントが、所定のログ送信条件を満たした際に、その時点で保持しているログを、現在時刻の情報とともに前記サーバへ送信するログ送信工程と、前記サーバが、前記ログ送信工程で送信された、ログおよび現在時刻の情報を受信し、さらに、当該情報の受信時刻の情報を取得する情報取得工程と、前記サーバが、前記現在時刻情報および前記受信時刻情報に基づいて、前記受信したログに含まれているログ時刻を調整するログ時刻調整工程と、を含むことを特徴とする。
In order to solve the above-described problems and achieve the object, the invention according to
また、請求項2にかかる発明は、請求項1に記載のログ時刻調整方法において、前記ログ記憶工程では、システム時刻の修正イベントを検知した場合、修正後の時刻と修正前の時刻との差である修正時間差情報を含めてシステム時刻修正イベントのログを記憶し、前記ログ時刻調整工程では、前記ログがシステム時刻修正イベントのログを含んでいる場合、その中に含まれる前記修正時間差情報に基づいて、前記調整後のログ時刻をさらに調整することを特徴とする。
The invention according to
また、請求項3にかかる発明は、自身に接続されたクライアントで発生したイベントのログを管理するサーバであって、前記クライアントから、当該クライアントで発生したイベントのログおよび当該ログの送信時刻の情報を取得する情報取得手段と、前記情報を取得した時点の時刻の情報および前記取得した送信時刻の情報に基づいて、前記取得したログに含まれるイベント発生時刻の情報であるログ時刻を調整するログ時刻調整手段と、を備えることを特徴とする。 According to a third aspect of the present invention, there is provided a server for managing a log of an event that has occurred in a client connected to the server, wherein the event log that has occurred in the client and information on the transmission time of the log from the client. And a log for adjusting a log time, which is information on an event occurrence time included in the acquired log, based on information on a time when the information is acquired and information on the acquired transmission time And a time adjustment means.
また、請求項4にかかる発明は、請求項3に記載のサーバにおいて、前記取得したログにシステム時刻の修正イベントのログが含まれている場合、前記ログ時刻調整手段は、前記時刻修正イベントログに含まれる、時刻修正後の時刻と時刻修正前の時刻との差である修正時間差情報に基づいて、前記調整後のログ時刻をさらに調整することを特徴とする。 According to a fourth aspect of the present invention, in the server according to the third aspect, when the acquired log includes a log of a correction event of a system time, the log time adjustment means includes the time correction event log. The adjusted log time is further adjusted on the basis of correction time difference information that is a difference between the time after the time correction and the time before the time correction included.
また、請求項5にかかる発明は、複数のクライアントおよび各クライアントから通知されたイベントのログを管理するサーバを備える情報処理システムであって、前記クライアントは、イベントの発生を検知する毎に、イベント発生時刻の情報であるログ時刻を含んだ当該イベントのログを記憶するログ記憶手段と、所定のログ送信条件を満たした際に、その時点で保持しているログを、現在時刻の情報とともに前記サーバへ送信するログ送信手段と、を備え、前記サーバは、前記ログ送信手段により送信された、ログおよび現在時刻の情報を受信し、さらに、当該情報の受信時刻の情報を取得する情報取得手段と、前記現在時刻情報および前記受信時刻情報に基づいて、前記受信したログに含まれているログ時刻を調整するログ時刻調整手段と、を備えることを特徴とする。
The invention according to
また、請求項6にかかる発明は、請求項5に記載の情報処理システムにおいて、前記ログ記憶手段は、システム時刻の修正イベントを検知した場合、修正後の時刻と修正前の時刻との差である修正時間差情報を含めてシステム時刻修正イベントのログを記憶し、前記ログ時刻調整手段は、前記ログがシステム時刻修正イベントのログを含んでいる場合、その中に含まれる前記修正時間差情報に基づいて、前記調整後のログ時刻をさらに調整することを特徴とする。 According to a sixth aspect of the present invention, in the information processing system according to the fifth aspect, when the log storage unit detects a correction event of the system time, the difference between the time after correction and the time before correction is calculated. A log of a system time correction event including a certain correction time difference information is stored, and when the log includes a log of a system time correction event, the log time adjustment means is based on the correction time difference information included therein. The log time after the adjustment is further adjusted.
請求項1にかかる発明によれば、クライアントは、イベントの発生を検知する毎に、ログ時刻を含んだ当該イベントのログを記憶し、所定のログ送信条件を満たした際に、その時点で保持しているログを、現在時刻の情報とともに前記サーバへ送信する。一方、サーバは、クライアントからログおよび現在時刻の情報を受信し、さらに、当該情報の受信時刻の情報を取得し、またさらに、前記現在時刻情報および前記受信時刻情報に基づいて、前記受信したログに含まれているログ時刻を調整するので、ログをクライアント側で一定期間蓄積しておき、まとめてサーバへ送る場合であっても、サーバ上で一貫した前後関係を維持した状態でログを管理できる、という効果を奏する。 According to the first aspect of the present invention, each time an occurrence of an event is detected, the client stores a log of the event including the log time, and retains the log at the time when a predetermined log transmission condition is satisfied. The log is sent to the server together with the current time information. On the other hand, the server receives the log and current time information from the client, further acquires the reception time information of the information, and further, based on the current time information and the reception time information, the received log The log time included in the log is adjusted, so even if the log is accumulated for a certain period on the client side and sent to the server in a batch, the log is managed in a state that maintains a consistent context on the server There is an effect that it is possible.
また、請求項2にかかる発明によれば、クライアントは、システム時刻の修正イベントを検知した場合、修正後の時刻と修正前の時刻との差である修正時間差情報を含めてシステム時刻修正イベントのログを記憶しておき、サーバは、システム時刻修正イベントのログを受信した場合、その中に含まれる修正時間差情報に基づいて、ログ時刻をさらに調整するので、クライアント側で時刻調整イベントが発生した場合であっても、サーバ上で一貫した前後関係を維持した状態でログを管理できる、という効果を奏する。
According to the invention of
また、請求項3にかかる発明によれば、サーバの情報取得手段が、クライアントで発生したイベントのログおよびログの送信時刻の情報を取得し、ログ時刻調整手段が、前記情報を取得した時点の時刻の情報および前記取得した送信時刻の情報に基づいて、ログに含まれるイベント発生時刻の情報であるログ時刻を調整するので、ログをクライアント側で一定期間蓄積しておき、まとめてサーバへ送る場合であっても、サーバ上で一貫した前後関係を維持した状態でログを管理できる、という効果を奏する。
According to the invention of
また、請求項4にかかる発明によれば、取得したログにシステム時刻の修正イベントのログが含まれている場合、ログ時刻調整手段は、時刻修正イベントログに含まれる、時刻修正後の時刻と時刻修正前の時刻との差である修正時間差情報に基づいて、ログ時刻をさらに調整するので、クライアント側で時刻調整イベントが発生した場合であっても、サーバ上で一貫した前後関係を維持した状態でログを管理できる、という効果を奏する。 According to the fourth aspect of the present invention, when the acquired log includes a log of the system time correction event, the log time adjustment means includes the time after the time correction included in the time correction event log. The log time is further adjusted based on the correction time difference information, which is the difference from the time before the time correction, so even if a time adjustment event occurs on the client side, a consistent context on the server was maintained. The log can be managed in the state.
また、請求項5にかかる発明によれば、クライアントは、イベントの発生を検知する毎に、ログ時刻を含んだ当該イベントのログを記憶し、所定のログ送信条件を満たした際に、その時点で保持しているログを、現在時刻の情報とともに前記サーバへ送信する。また、サーバは、クライアントからログおよび現在時刻の情報を受信し、さらに、当該情報の受信時刻の情報を取得し、またさらに、前記現在時刻情報および前記受信時刻情報に基づいて、前記受信したログに含まれているログ時刻を調整するので、ログをクライアント側で一定期間蓄積しておき、まとめてサーバへ送る場合であっても、サーバ上で一貫した前後関係を維持した状態でログを管理できる、という効果を奏する。
According to the invention of
また、請求項6にかかる発明によれば、クライアントは、システム時刻の修正イベントを検知した場合、修正後の時刻と修正前の時刻との差である修正時間差情報を含めてシステム時刻修正イベントのログを記憶しておき、サーバは、システム時刻修正イベントのログを受信した場合、その中に含まれる修正時間差情報に基づいて、ログ時刻をさらに調整するので、クライアント側で時刻調整イベントが発生した場合であっても、サーバ上で一貫した前後関係を維持した状態でログを管理できる、という効果を奏する。
According to the invention of
以下に添付図面を参照して、この発明にかかるログ時刻調整方法の最良な実施の形態を詳細に説明する。なお、本発明は以下の実施の形態に限定されるものではない。 Exemplary embodiments of a log time adjustment method according to the present invention will be explained below in detail with reference to the accompanying drawings. Note that the present invention is not limited to the following embodiments.
(第1の実施の形態)
図1は、本発明の第1の実施の形態にかかるログ時刻調整方法を適用する情報処理システムの構成例を示す図である。この情報処理システムでは、オフィスで一般ユーザが使用するような機器であるクライアントが、ログサーバに接続されている。図1では、クライアントの例として、複合機と、PCと、プリンタとが示されている。
(First embodiment)
FIG. 1 is a diagram illustrating a configuration example of an information processing system to which a log time adjustment method according to a first embodiment of the present invention is applied. In this information processing system, a client, which is a device used by a general user in an office, is connected to a log server. In FIG. 1, a multifunction peripheral, a PC, and a printer are shown as examples of clients.
ログサーバには、各クライアントで発生したイベント(ユーザの操作内容である電子ファイルのコピー、印刷、用紙のコピー等)についてのログが、各クライアントから送られてきて集約される。ここで、各クライアントの時刻は特に調整されておらず、ログサーバとの同期機能も持たないものとする。 In the log server, logs about events (e.g., electronic file copy, printing, paper copy, etc., which are user operation contents) generated by each client are sent from each client and aggregated. Here, it is assumed that the time of each client is not particularly adjusted and does not have a synchronization function with the log server.
図2は、図1のクライアントおよびログサーバの機能ブロックの一例を示す図である。図2では、クライアントの一例である複合機10およびログサーバ20を示している。なお、他のクライアントも全て、複合機10と同様の機能ブロックを備えている。
FIG. 2 is a diagram illustrating an example of functional blocks of the client and the log server in FIG. FIG. 2 shows a
複合機10(クライアント)は、ログ生成部11と、ログ一時蓄積部12と、ログ送信部13とを備えている。
The multifunction machine 10 (client) includes a
ログサーバ20は、ログ受信部21と、解析・修正部22と、ログ蓄積部23とを備えている。
The
クライアントが備えるログ生成部11は、所定のイベントについてのログを生成する。ログ一時蓄積部12は、ログ生成部11から受け取ったログを一時的に保存しておく。ログ送信部13は、所定条件が満たされた場合に、ログ一時蓄積部12が保持しているログをすべて取得し、ログサーバ20へ送信する。
The
ログサーバが備えるログ受信部21は、クライアント(たとえば複合機10)から送信されたログ(ログデータ)を受信する。解析・修正部22は、受信ログデータの解析を行い、必要に応じてその内容を修正する。ログ蓄積部23は、解析・修正部22経由で受け取ったログデータを保存しておく。
The
以上のような構成のクライアントおよびログサーバにおいて、クライアント側で発生したイベントについてのログをログサーバが集約して保存(管理)する場合の動作について図3および4を参照しながら説明する。ここでは、一例として、複合機10が検知したイベントについてのログデータをログサーバ20へ送信する場合の動作を説明する。
With reference to FIGS. 3 and 4, the operation when the log server collects and stores (manages) logs regarding events that have occurred on the client side in the client and log server configured as described above will be described. Here, as an example, an operation in the case of transmitting log data about an event detected by the
クライアントである複合機10のログ生成部11は、イベントが発生したかどうかを監視しており、ログ対象のイベントを検知すると、記録すべき情報を収集し、1件のログを生成する。ここで、記録すべき情報とは、イベント発生時刻(イベント検知時刻)、ユーザID、操作内容等である。なお、イベント発生時刻は必須情報とする。また、操作内容とは、「印刷」や「スキャン」といったものである。イベント発生時刻以外は、仕様により変更され得る。
The
ログ一時蓄積部12は、ログ生成部11により生成されたログデータを受け取り、ログサーバへ送信するまでの間、保持しておく。
The log
ここで、ログデータについて説明する。図3は、クライアントに蓄積されるログのデータ構造の一例を示す図であり、ログデータは、イベント発生時刻(ログ生成部11がイベントを検知した時刻)であるクライアント時刻30−1と、ログ項目30−2〜30−nと、を含んでいる(n=1,2…)。この例では、ログ項目は、「イベント名」(30−2),「ユーザID」(30−3),「結果」(30−4),…などを含んでいる。図3からも明らかなように、ログ一時蓄積部12には、複数件のログが蓄積される場合がある。なお、図3をみると、イベントは「9:00」以降ログが蓄積されており、イベントは1分おきに生じたことになっているが、特段の理由はない。
Here, the log data will be described. FIG. 3 is a diagram illustrating an example of a data structure of a log accumulated in the client. The log data includes a client time 30-1 which is an event occurrence time (a time when the
ログ送信部13は、ログサーバに対してログデータを送信する所定の条件が満たされるかどうかを監視する。そして、所定の条件が満たされた場合、ログ一時蓄積部12から蓄積されているすべてのデータを受け取り、ログサーバ20に対して送信する。ここでは、所定の条件の一例として、「前回の送信時からの1時間の経過」を採用する。
The
なお、上記所定条件として使用する経過時間は他の値であってもよいし、経過時間ではなくデータ容量やイベント数等を基準にしてもよい。また、複数の条件の中のいずれか一つが満たされたことをログデータ送信のトリガとしてもよい。また、ネットワーク障害等が発生しオフラインになった際には回復するまでログをクライアントに蓄積しておき、オンラインとなった時点でまとめて送信し、通常オンライン時はイベント毎にログサーバへログデータを送る、といった設定であってもよい。また、ログサーバからの要求に応じてログデータを送信するようにしてもよい。 The elapsed time used as the predetermined condition may be another value, or may be based on the data capacity, the number of events, etc. instead of the elapsed time. Moreover, it is good also as a trigger of log data transmission that any one of several conditions was satisfy | filled. In addition, when a network failure occurs and the system goes offline, logs are accumulated on the client until recovery, and are sent together when online. Normally, log data is sent to the log server for each event when online. May be set to send. Further, log data may be transmitted in response to a request from the log server.
また、ログ送信部13は、ログデータ送信の際には、ログデータとともに、送信しようとするときの時刻(複合機10のローカルな時刻)を「送信時刻」として送信する。ログサーバ20のログ受信部21は、これらを受信し、受信時点のログサーバ20の時刻である「受信時刻」とともに、解析・修正部22へ送る。
In addition, when transmitting log data, the
解析・修正部22は、ログの「イベント発生時刻」を、ログデータとともに送られてきた「受信時刻」と「送信時刻」とに基づいて修正する。図4は、図3に示したログの「イベント発生時刻」を、サーバ側で修正する場合の動作を説明するための図である。
The analysis /
具体的な動作を示すと、解析・修正部22は、ログ受信部21からログ等(ログデータ,送信時刻データ,受信時刻データ)を受け取ると、まず、「受信時刻」と「送信時刻」との差分を計算する。そして、全ての「イベント発生時刻」にこの差分を反映させる。このようにして修正されたログデータは、ログ蓄積部23に送られ、正式なログデータとして最終的に保存される。
Specifically, when the analysis /
図4の例では、複合機10がログを送信した「送信時刻」が「9:10」であり、ログサーバ20がログを取得した「受信時刻」が「10:00」となっている。つまり、複合機10の時刻がログサーバ20の時刻よりも50分遅れていたことになる。したがって、複合機10から受け取った全ての「イベント発生時刻」に50分を加える。このようにすることで、複合機10とログサーバ20の間の時刻の差を調整し、ログサーバの時刻に統一してログを管理することができる。
In the example of FIG. 4, the “transmission time” at which the
ここで、ログサーバ20に対して唯一つのクライアントが接続させている場合であれば、各イベントが発生した順番自体が入れ替わることはないため、クライアントとサーバの間の時刻のずれは大きな問題とはならないが、複数のクライアントが接続されている場合には、異なるクライアントにおいてほぼ同じ時刻に発生した各イベントの前後関係をログサーバが認識できなくなり、問題となる。したがって、ログサーバ20は、各クライアントとの時刻のずれを調整した上でイベントについてのログデータを保存する必要がある。
Here, if only one client is connected to the
以上説明したように、本実施の形態では、ログデータをサーバで記録管理するにあたって、ログデータのサーバでの「受信時刻」と、ログデータのクライアントからの「送信時刻」との差分を、全ての「イベント発生時刻」(図3に示したクライアント時刻に相当)に反映させることとした。このようにすることで、時刻の同期を取っていない複数のクライアントを備えるシステムにおいて、ログをクライアント側で一定期間蓄積しておき、まとめてサーバへ送る場合であっても、ログサーバ上で一貫した前後関係を維持した状態でログを管理できる。 As described above, in the present embodiment, when the log data is recorded and managed by the server, the difference between the “reception time” at the log data server and the “transmission time” from the log data client is all The “event occurrence time” (corresponding to the client time shown in FIG. 3) is reflected. In this way, in a system with multiple clients that are not synchronized in time, even if logs are accumulated for a certain period on the client side and sent to the server collectively, they are consistent on the log server. Log can be managed while maintaining the same context.
(第2の実施の形態)
第1の実施の形態では、ログをサーバに記録するにあたり、クライアントとサーバの時刻の差をログのイベント発生時刻に反映させることとした。第2の実施の形態では、クライアントで時刻修正イベントが発生した場合には、当該イベントもログとして蓄積し、ログをサーバに記録する際に、さらに時刻修正について反映させる場合を説明する。なお、本実施の形態では、第1の実施の形態と異なる構成および動作について説明する。
(Second Embodiment)
In the first embodiment, when the log is recorded on the server, the time difference between the client and the server is reflected in the event occurrence time of the log. In the second embodiment, when a time correction event occurs in the client, the event is also accumulated as a log, and a case where the time correction is further reflected when the log is recorded in the server will be described. In the present embodiment, a configuration and operation different from those of the first embodiment will be described.
第2の実施の形態の構成は、第1の実施の形態の構成と比べると、ログ生成部11が時刻修正イベントも記録する点、および、解析・修正部22が時刻修正イベントにより生じた時間差も考慮する点が異なる。時刻修正イベントとは、たとえば、ユーザによるクライアントのシステム時刻の変更、NTPサービスによる時刻修正等を指す。
The configuration of the second embodiment is different from the configuration of the first embodiment in that the
図5は、クライアントに蓄積されるログのデータ構造の一例を示す図である。ログデータは、クライアント時刻(40−1)kと、ログ項目(40−2)k〜(40−n)kと、を含んでいる(n=1,2…)、(k=1,2…)。この例では、ログ項目は、「イベント名」(40−2)k、「ユーザID」(40−3)k、「結果」(40−4)k、「修正による時間差」(40−5)k…などを含んでいる。ここで、時刻修正イベントの場合は、「クライアント時刻」(40−1)kとしては時刻修正前のクライアントの時刻が記録される。そして、修正が行われた結果、元のクライアント時刻(イベント発生時刻)を基準にどれだけの差分が生じたかが、「修正による時間差」(40−5)kとして記録される。図5からも明らかなように、ログ一時蓄積部12には、複数件のログが蓄積される場合がある。
FIG. 5 is a diagram illustrating an example of a data structure of a log accumulated in the client. The log data includes client time (40-1) k and log items (40-2) k to (40-n) k (n = 1, 2,...), (K = 1, 2). …). In this example, the log items are “event name” (40-2) k , “user ID” (40-3) k , “result” (40-4) k , “time difference due to correction” (40-5). k ... etc. are included. Here, in the case of a time adjustment event, the time of the client before the time adjustment is recorded as “client time” (40-1) k . As a result of the correction, how much difference has occurred based on the original client time (event occurrence time) is recorded as “time difference due to correction” (40-5) k . As is clear from FIG. 5, the log
次に、以上のように構成された情報処理システムの動作について、前述した図5に加えて図6を用いて説明する。図6は、図5に示したログの「イベント発生時刻」をサーバ側で修正する場合の動作を説明するための図である。前提として、図5に示すようなログが既に生成され、ログ一時蓄積部12に蓄積されているとする。
Next, the operation of the information processing system configured as described above will be described with reference to FIG. 6 in addition to FIG. 5 described above. FIG. 6 is a diagram for explaining the operation when the “event occurrence time” of the log shown in FIG. 5 is corrected on the server side. As a premise, it is assumed that a log as shown in FIG. 5 has already been generated and stored in the temporary
ログ送信部13は、上述した実施の形態1と同様に、「前回の送信時からの1時間の経過」を検出した場合、ログ一時蓄積部12よりログデータを読み出し、ログデータとともに、送信しようとするときの時刻(複合機10のローカルな時刻)を「送信時刻」として、ログサーバ20へ送信する。ログサーバ20のログ受信部21は、これらを受信し、受信時点のログサーバ20の時刻である「受信時刻」とともに、解析・修正部22へ送る。
Similarly to the first embodiment, when the
解析・修正部22は、受信したログデータの中に時刻修正イベントについてのログが含まれている場合、各ログの「イベント発生時刻」を、ログデータとともに送られてきた「受信時刻」および「送信時刻」とログ中の「修正による時間差」に基づいて修正する。なお、受信したログデータの中に時刻修正イベントについてのログが含まれていない場合には、上述した実施の形態1の場合と同様に、「イベント発生時刻」を「受信時刻」および「送信時刻」に基づいて修正する。
When the log data about the time correction event is included in the received log data, the analysis /
受信したログデータの中に時刻修正イベントについてのログが含まれている場合の具体的な動作例を示すと、解析・修正部22は、ログ受信部21からログ等(ログデータ,送信時刻データ,受信時刻データ)を受け取ると、まず、上述した実施の形態1の場合と同様に、「受信時刻」と「送信時刻」との差分を計算する。そして、全ての「イベント発生時刻」にこの差分を反映させる。さらに、時刻修正イベントのログに含まれている「修正による時間差」に基づいて、1件目の(最も古い)ログから当該時刻修正イベントのログを対象として、それらのログに含まれる「イベント発生時刻」を修正する。時刻修正イベントのログが複数存在する場合には、各時刻修正イベントのログに含まれている「修正による時間差」に基づいて「イベント発生時刻」を修正する処理を複数回実行する。このようにして修正されたログデータは、ログ蓄積部23に送られ、正式なログデータとして最終的に保存される。
An example of a specific operation when the received log data includes a log regarding a time correction event will be described. The analysis /
図6の例では、クライアントがk個のイベントについてのログをまとめてサーバへ送信し、このとき最も古いものから数えて3件目および6件目のログが時刻修正イベントのログとなっている。また、複合機10がログを送信した「送信時刻」が「8:20」であり、ログサーバ20がログを取得した「受信時刻」が「10:00」である。つまり、複合機10の時刻がログサーバ20の時刻よりも1時間40分遅れていたことになる。したがって、解析・修正部22は、まず、全ての「イベント発生時刻」に1時間40分を加える。次に、k件目からエントリを遡り、6件目のログ(時刻修正イベントのログ)を検出すると、その中に含まれている「修正による時間差」に基づいて、1件目から6件目までのログに含まれる「イベント発生時刻」を修正する。この例では、時刻修正イベントで時刻が1時間戻されているので、1〜6件目までのログに含まれる各「イベント発生時刻」に「−1時間」を加える。同様に、3件目のログを検出すると、その中に含まれている「修正による時間差」に基づいて、1件目から3件目までのログに含まれる「イベント発生時刻」を修正する。具体的には、1〜3件目までのログに含まれる各「イベント発生時刻」に「+10分」を加える。このようにすることで、クライアント(複合機10)とログサーバ20の間の時刻の差を調整し、ログサーバの時刻に統一してログを管理することができる。
In the example of FIG. 6, the client collects logs about k events and sends them to the server. At this time, the third and sixth logs counted from the oldest are time correction event logs. . Further, the “transmission time” at which the
以上説明したように、本実施の形態では、時刻修正イベントにより生じた時間差も「イベント発生時刻」に反映させることとした。これにより、第1の実施の形態の効果に加えて、クライアント側で時刻調整イベントが発生した場合にも、ログサーバ上で一貫した前後関係を維持した状態でログを管理できる。 As described above, in this embodiment, the time difference caused by the time adjustment event is also reflected in the “event occurrence time”. As a result, in addition to the effects of the first embodiment, even when a time adjustment event occurs on the client side, the log can be managed in a state where a consistent context is maintained on the log server.
このように、本発明にかかるログ時刻調整方法は、クライアントサーバシステムにおいてクライアントで発生したイベントのログをサーバ側で管理する場合のイベント発生時刻の管理に有用であり、特に、クライアントが一定期間内に発生したイベントのログをまとめて送信するシステムでのイベント発生時刻の管理に適している。 As described above, the log time adjustment method according to the present invention is useful for managing the event occurrence time when managing the log of the event that has occurred in the client on the server side in the client-server system. It is suitable for managing the event occurrence time in a system that sends a log of events that occurred in a batch.
10 複合機
11 ログ生成部
12 ログ一時蓄積部
13 ログ送信部
20 ログサーバ
21 ログ受信部
22 解析・修正部
23 ログ蓄積部
30−1 イベント時刻
30−2 操作
30−3 ユーザID
30−4 結果
(40−1)k イベント時刻
(40−2)k 操作
(40−3)k ユーザID
(40−4)k 結果
(40−5)k 修正による時間差
10
30-4 result (40-1) k event time (40-2) k operation (40-3) k user ID
(40-4) k result (40-5) Time difference by k correction
Claims (6)
前記クライアントが、イベントの発生を検知する毎に、ログ時刻を含んだ当該イベントのログを記憶するログ記憶工程と、
前記クライアントが、所定のログ送信条件を満たした際に、その時点で保持しているログを、現在時刻の情報とともに前記サーバへ送信するログ送信工程と、
前記サーバが、前記ログ送信工程で送信された、ログおよび現在時刻の情報を受信し、さらに、当該情報の受信時刻の情報を取得する情報取得工程と、
前記サーバが、前記現在時刻情報および前記受信時刻情報に基づいて、前記受信したログに含まれているログ時刻を調整するログ時刻調整工程と、
を含むことを特徴とするログ時刻調整方法。 Log time when the server adjusts the log time, which is information about the event occurrence time included in the notified log, in an information processing system comprising a plurality of clients and a server that manages the log of events notified from each client An adjustment method,
Each time the client detects the occurrence of an event, a log storage step for storing a log of the event including the log time;
When the client satisfies a predetermined log transmission condition, a log transmission step of transmitting a log held at that time together with information on a current time to the server;
The server receives the information of the log and the current time transmitted in the log transmission step, and further acquires the information of the reception time of the information,
A log time adjustment step in which the server adjusts a log time included in the received log based on the current time information and the reception time information;
A log time adjustment method comprising:
システム時刻の修正イベントを検知した場合、修正後の時刻と修正前の時刻との差である修正時間差情報を含めてシステム時刻修正イベントのログを記憶し、
前記ログ時刻調整工程では、
前記ログがシステム時刻修正イベントのログを含んでいる場合、その中に含まれる前記修正時間差情報に基づいて、前記調整後のログ時刻をさらに調整することを特徴とする請求項1に記載のログ時刻調整方法。 In the log storage step,
When a system time correction event is detected, a system time correction event log including the correction time difference information that is the difference between the time after correction and the time before correction is stored.
In the log time adjustment step,
The log according to claim 1, wherein when the log includes a log of a system time correction event, the adjusted log time is further adjusted based on the correction time difference information included therein. Time adjustment method.
前記クライアントから、当該クライアントで発生したイベントのログおよび当該ログの送信時刻の情報を取得する情報取得手段と、
前記情報を取得した時点の時刻の情報および前記取得した送信時刻の情報に基づいて、前記取得したログに含まれるイベント発生時刻の情報であるログ時刻を調整するログ時刻調整手段と、
を備えることを特徴とするサーバ。 A server that manages a log of events that occur on clients connected to itself,
Information acquisition means for acquiring a log of an event that has occurred in the client and information on the transmission time of the log from the client;
Log time adjusting means for adjusting a log time, which is information on an event occurrence time included in the acquired log, based on the information on the time when the information is acquired and the information on the acquired transmission time;
A server comprising:
前記ログ時刻調整手段は、前記時刻修正イベントログに含まれる、時刻修正後の時刻と時刻修正前の時刻との差である修正時間差情報に基づいて、前記調整後のログ時刻をさらに調整することを特徴とする請求項3に記載のサーバ。 If the acquired log contains a log of system time correction events,
The log time adjusting means further adjusts the adjusted log time based on correction time difference information that is a difference between the time after the time correction and the time before the time correction included in the time correction event log. The server according to claim 3.
前記クライアントは、
イベントの発生を検知する毎に、イベント発生時刻の情報であるログ時刻を含んだ当該イベントのログを記憶するログ記憶手段と、
所定のログ送信条件を満たした際に、その時点で保持しているログを、現在時刻の情報とともに前記サーバへ送信するログ送信手段と、
を備え、
前記サーバは、
前記ログ送信手段により送信された、ログおよび現在時刻の情報を受信し、さらに、当該情報の受信時刻の情報を取得する情報取得手段と、
前記現在時刻情報および前記受信時刻情報に基づいて、前記受信したログに含まれているログ時刻を調整するログ時刻調整手段と、
を備えることを特徴とする情報処理システム。 An information processing system comprising a plurality of clients and a server for managing a log of events notified from each client,
The client
Log storage means for storing a log of the event including a log time which is information of the event occurrence time each time the occurrence of the event is detected;
Log transmission means for transmitting a log held at that time together with information on the current time to the server when a predetermined log transmission condition is satisfied,
With
The server
Receiving the log and current time information transmitted by the log transmission means, and further acquiring information on the reception time of the information;
Log time adjusting means for adjusting a log time included in the received log based on the current time information and the reception time information;
An information processing system comprising:
システム時刻の修正イベントを検知した場合、修正後の時刻と修正前の時刻との差である修正時間差情報を含めてシステム時刻修正イベントのログを記憶し、
前記ログ時刻調整手段は、
前記ログがシステム時刻修正イベントのログを含んでいる場合、その中に含まれる前記修正時間差情報に基づいて、前記調整後のログ時刻をさらに調整することを特徴とする請求項5に記載の情報処理システム。 The log storage means
When a system time correction event is detected, a system time correction event log including the correction time difference information that is the difference between the time after correction and the time before correction is stored.
The log time adjusting means includes
6. The information according to claim 5, wherein, when the log includes a log of a system time correction event, the adjusted log time is further adjusted based on the correction time difference information included therein. Processing system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007234492A JP2009069892A (en) | 2007-09-10 | 2007-09-10 | Log time adjustment method, server and information processing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007234492A JP2009069892A (en) | 2007-09-10 | 2007-09-10 | Log time adjustment method, server and information processing system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009069892A true JP2009069892A (en) | 2009-04-02 |
Family
ID=40606117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007234492A Pending JP2009069892A (en) | 2007-09-10 | 2007-09-10 | Log time adjustment method, server and information processing system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009069892A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010257397A (en) * | 2009-04-28 | 2010-11-11 | Ntt Docomo Inc | Log management system, mobile unit, and log management method |
JP2012216040A (en) * | 2011-03-31 | 2012-11-08 | Nec Corp | Log management system, log analysis device, log analysis method and log analysis program |
KR101319290B1 (en) * | 2012-05-31 | 2013-10-18 | 에스코어 주식회사 | Method for compensating for time difference between server and logging device, and logging device therefor |
JP2016224685A (en) * | 2015-05-29 | 2016-12-28 | キヤノン株式会社 | Information processing device, and method and program thereof |
CN110442770A (en) * | 2019-08-08 | 2019-11-12 | 深圳市今天国际物流技术股份有限公司 | A kind of data grabber and store method, device, computer equipment and storage medium |
WO2020010718A1 (en) * | 2018-07-09 | 2020-01-16 | 平安科技(深圳)有限公司 | Sip-based log time correction method and device, and storage medium |
US11388154B2 (en) | 2018-11-21 | 2022-07-12 | Canon Kabushiki Kaisha | Information processing apparatus, system, and non-transitory computer-readable storage medium |
-
2007
- 2007-09-10 JP JP2007234492A patent/JP2009069892A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010257397A (en) * | 2009-04-28 | 2010-11-11 | Ntt Docomo Inc | Log management system, mobile unit, and log management method |
JP2012216040A (en) * | 2011-03-31 | 2012-11-08 | Nec Corp | Log management system, log analysis device, log analysis method and log analysis program |
KR101319290B1 (en) * | 2012-05-31 | 2013-10-18 | 에스코어 주식회사 | Method for compensating for time difference between server and logging device, and logging device therefor |
JP2016224685A (en) * | 2015-05-29 | 2016-12-28 | キヤノン株式会社 | Information processing device, and method and program thereof |
WO2020010718A1 (en) * | 2018-07-09 | 2020-01-16 | 平安科技(深圳)有限公司 | Sip-based log time correction method and device, and storage medium |
US11388154B2 (en) | 2018-11-21 | 2022-07-12 | Canon Kabushiki Kaisha | Information processing apparatus, system, and non-transitory computer-readable storage medium |
CN110442770A (en) * | 2019-08-08 | 2019-11-12 | 深圳市今天国际物流技术股份有限公司 | A kind of data grabber and store method, device, computer equipment and storage medium |
CN110442770B (en) * | 2019-08-08 | 2023-06-20 | 深圳市今天国际物流技术股份有限公司 | Data grabbing and storing method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2009069892A (en) | Log time adjustment method, server and information processing system | |
US7603590B2 (en) | Information processing apparatus and notification method therefor, program for implementing the method, and storage medium storing the program | |
CN104981742B (en) | Dispensing device, dissemination system and distribution method | |
EP3291551B1 (en) | Image delay detection method and system | |
JP5436311B2 (en) | Information display system, information content distribution server, and display device | |
US7251748B2 (en) | System and method for determining a global ordering of events using timestamps | |
US9047033B2 (en) | Image processing device, method and computer readable medium for transmitting management information | |
EP2355481B1 (en) | Management system, monitoring apparatus and method thereof | |
US8713396B2 (en) | Transmission apparatus, receiving apparatus, method, and storage medium | |
JP2008146594A5 (en) | ||
CN1782981A (en) | Data processing device and method | |
US20070177463A1 (en) | Network terminal device, and timestamp correcting method of the same | |
US20130117412A1 (en) | Management Device, Management Method, And Recording Medium | |
JP5768448B2 (en) | Log management system, log analysis device, log analysis method, and log analysis program | |
US20090077264A1 (en) | Resource information managing device, system, method, and program | |
EP1894332B1 (en) | Generic radar architecture | |
JP2008217118A (en) | Log file management device, log file transmission device, log file management method, log file transmission method and program | |
WO2012070341A1 (en) | Communication terminal, method for controlling communication terminal, and program | |
JP6307862B2 (en) | Information processing system, information processing method, and program | |
JP4662842B2 (en) | Time correction system | |
JP2012070339A (en) | Communication apparatus | |
KR101319290B1 (en) | Method for compensating for time difference between server and logging device, and logging device therefor | |
JP2004234628A (en) | Information processor, management method of counter information for the device, and program | |
JP5506362B2 (en) | Transmission device and transmission method | |
JP4296776B2 (en) | Printer and printing system |