JP6040894B2 - Log generation apparatus and log generation method - Google Patents
Log generation apparatus and log generation method Download PDFInfo
- Publication number
- JP6040894B2 JP6040894B2 JP2013180873A JP2013180873A JP6040894B2 JP 6040894 B2 JP6040894 B2 JP 6040894B2 JP 2013180873 A JP2013180873 A JP 2013180873A JP 2013180873 A JP2013180873 A JP 2013180873A JP 6040894 B2 JP6040894 B2 JP 6040894B2
- Authority
- JP
- Japan
- Prior art keywords
- identifier
- log
- guest
- unit
- host
- 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.)
- Active
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、ネットワークシステムやプログラムの処理中に発生したイベントを、ログとして生成するログ生成装置に関するものである。 The present invention relates to a log generation device that generates, as a log, an event that occurs during processing of a network system or a program.
ネットワークシステムやプログラムのイベントトレース等において、処理中に発生したイベントをログとして生成・取得することは、処理状況の確認や障害解析等のために一般的に利用されている。ログは、複数の計算機の環境上で個別の時間管理のもと生成される場合もあり、処理状況の確認や障害解析等のために複数の環境で発生したイベントの関係性を把握する必要がある。この場合、複数の環境で生成されたログを、イベントの発生順を維持しつつ、一つのログにまとめる必要がある。しかし、複数の環境で計測される時刻は、個々の環境毎に異なっていることから、単純に時刻をもとにログをまとめたとしても、実際に発生したイベント順にログが並んでいないという課題がある。 In a network system or program event trace, etc., generating and acquiring events generated during processing as a log is generally used for processing status confirmation, failure analysis, and the like. Logs may be generated under individual time management in the environment of multiple computers, and it is necessary to grasp the relationship between events that occurred in multiple environments in order to check the processing status and analyze the failure. is there. In this case, it is necessary to combine logs generated in a plurality of environments into one log while maintaining the order of event occurrence. However, the time measured in multiple environments differs for each environment, so even if the logs are simply compiled based on the time, the logs are not arranged in the order in which they actually occurred. There is.
上記の課題に対して、イベント発生順にログをまとめる方法が開示されており、例えば、特許文献1、特許文献2では、同期する処理により、複数の環境で生成されたログの時刻を補正し、補正した時刻をもとにログをまとめている。また、特許文献3では、複数の環境で生成されたログに対して、全ての環境で統一したシーケンス番号を割り当て、このシーケンス番号をもとにログを並べ替え、ログをまとめている。 For the above problem, a method of collecting logs in the order of event occurrence is disclosed. For example, in Patent Document 1 and Patent Document 2, the time of logs generated in a plurality of environments is corrected by a synchronized process, Logs are compiled based on the corrected time. Further, in Patent Document 3, sequence numbers that are unified in all environments are assigned to logs generated in a plurality of environments, and the logs are rearranged based on the sequence numbers to collect the logs.
従来のログ生成装置は、複数の環境で生成されたログをまとめる際に、特許文献1、特許文献2では、異なる環境で生成したログを転送する必要があった。また、転送したログの時刻補正をする必要があった。このため、ログの発生間隔が短くなるとログの転送の負荷が大きく、また、時刻補正の精度の問題から、イベントのログが発生順に並ばないという課題があった。特許文献3では、ログのソートなどの処理が必要であり、ソートするデータ数が多くなると負荷が大きくなるという課題があった。 In the conventional log generation apparatus, when logs generated in a plurality of environments are collected, in Patent Document 1 and Patent Document 2, it is necessary to transfer logs generated in different environments. In addition, it was necessary to correct the time of the transferred log. For this reason, when the log generation interval is shortened, there is a problem that the log transfer load is large, and the event logs are not arranged in the order of occurrence due to the problem of time correction accuracy. In Patent Document 3, processing such as log sorting is necessary, and there is a problem that the load increases as the number of data to be sorted increases.
本発明は、上記のような課題を解決するためになされたもので、複数の環境で生成されたログをまとめる処理の負荷を抑えつつ、イベントのログを発生順に並べることを目的とする。 The present invention has been made to solve the above-described problems, and an object of the present invention is to arrange event logs in order of occurrence while suppressing the processing load of collecting logs generated in a plurality of environments.
上記で述べた課題を解決するため、本発明のログ生成装置は、ゲストOSのログを一意に識別する識別子を生成する識別子生成部と、前記識別子生成部により生成された前記識別子をゲストOSのログと対応付けてゲストOSログに記録するゲストOSログ生成部と、前記識別子生成部により生成された前記識別子を通知する識別子通知部と、前記識別子通知部により通知された前記識別子をホストOSログに記録するホストOSログ生成部と、前記ホストOSログ生成部により前記ホストOSログに記録された前記識別子に対応するログを前記ゲストOSログ生成部により記録された前記ゲストOSログから抽出して前記識別子と置換するマージ部とを備えることとしたものである。 In order to solve the above-described problem, a log generation device according to the present invention includes an identifier generation unit that generates an identifier for uniquely identifying a log of a guest OS, and the identifier generated by the identifier generation unit A guest OS log generation unit that records the guest OS log in association with a log, an identifier notification unit that notifies the identifier generated by the identifier generation unit, and the identifier notified by the identifier notification unit as a host OS log A host OS log generation unit to be recorded on the host OS log, and a log corresponding to the identifier recorded in the host OS log by the host OS log generation unit is extracted from the guest OS log recorded by the guest OS log generation unit A merge unit that replaces the identifier is provided.
また、本発明のログ生成方法は、識別子生成部によりゲストOSのログを一意に識別する識別子を生成する識別子生成ステップと、ゲストOSログ生成部により前記識別子生成ステップにより生成された前記識別子をゲストOSのログと対応付けてゲストOSログに記録するゲストOSログ生成ステップと、識別子通知部により前記識別子生成ステップにより生成された前記識別子を通知する識別子通知ステップと、ホストOSログ生成部により前記識別子通知ステップにより通知された前記識別子をホストOSログに記録するホストOSログ生成ステップと、マージ部により前記ホストOSログ生成ステップにより前記ホストOSログに記録された前記識別子に対応するログを前記ゲストOSログ生成ステップにより記録された前記ゲストOSログから抽出して前記識別子と置換するマージステップとを備えることとしたものである。 The log generation method of the present invention includes an identifier generation step for generating an identifier for uniquely identifying a guest OS log by an identifier generation unit, and the identifier generated by the identifier generation step by a guest OS log generation unit as a guest A guest OS log generation step of recording in the guest OS log in association with an OS log; an identifier notification step of notifying the identifier generated by the identifier generation step by an identifier notification unit; and the identifier by the host OS log generation unit A host OS log generation step for recording the identifier notified in the notification step in a host OS log, and a log corresponding to the identifier recorded in the host OS log by the host OS log generation step by a merge unit The guest recorded by the log generation step Extracts from S log is obtained by a further comprising a merging step of replacing said identifier.
本発明によれば、マージ部で、ホストOSログに記録された識別子をもとに、ゲストOSログを参照するのみで、イベントのログを発生順に並べて、まとめ上げることができる。これにより、ログのデータの転送の負荷を軽減して、ログをまとめ上げる際にもソートなどの処理が不要になり、複数の環境で生成されたログをまとめる処理の負荷を抑えつつ、イベントのログを発生順に並べることができるようになるという効果がある。 According to the present invention, the event log can be arranged in the order of occurrence and collected only by referring to the guest OS log based on the identifier recorded in the host OS log in the merge unit. This reduces the load of log data transfer and eliminates the need for processing such as sorting when collecting logs, reducing the processing load of collecting logs generated in multiple environments, There is an effect that logs can be arranged in the order of occurrence.
実施の形態1.
図1は、実施の形態1に係るログ生成装置の一実施例を示す情報処理装置の構成図である。
図1において、情報処理装置は、計算機1上でホストOS2が動作し、ゲストOS3、仮想マシンモニタ(VMM: Virtual Machine Monitor)4、ホストOSログ生成部5がホストOS2上で動作し、ゲストOSログ生成部7がゲストOS3上で動作する構成とする。また、仮想マシンモニタ(VMM)4は、ホストOS2上で動作するイベント生成部8を備え、さらに、ホストOS2には、マージ部6を備えている。
Embodiment 1 FIG.
FIG. 1 is a configuration diagram of an information processing apparatus showing an example of a log generation apparatus according to the first embodiment.
In FIG. 1, the information processing apparatus has a host OS 2 running on a computer 1, a guest OS 3, a virtual machine monitor (VMM) 4, and a host OS log generation unit 5 running on the host OS 2. The
ホストOS2は、計算機上に別の計算機環境を構築する仮想マシンにおいて、仮想マシンのプログラムを動作させている基盤となるOSである。また、ゲストOS3は、ホストOS2上で動作している仮想マシンのOSである。ゲストOS3は、仮想マシンを実現するソフトウェアである仮想マシンモニタ(VMM)4により動作している。ホストOS2、ゲストOS3共に、実行経路や各処理のイベントを追跡してログを生成するホストOSログ生成部5, ゲストOSログ生成部7を備えている。なお、ここで言うイベントは、ホストOS2、ゲストOS3で発生した処理を示しており、ホストOSログ生成部5、ゲストOSログ生成部7によって出力する。また、ホストOSログ生成部2, ゲストOSログ生成部7は、各OSで発生した処理についてのみ追跡することができる。つまり、ホストOS2上のホストOSログ生成部5により、ゲストOS3内で発生した処理について追跡することができない。
The host OS 2 is an OS serving as a base on which a virtual machine program is operated in a virtual machine that constructs another computer environment on the computer. The guest OS 3 is an OS of a virtual machine operating on the host OS 2. The guest OS 3 is operated by a virtual machine monitor (VMM) 4 which is software for realizing a virtual machine. Both the host OS 2 and the guest OS 3 include a host OS log generation unit 5 and a guest OS
図2は、実施の形態1に係るログ生成装置の一構成例を示す図である。
図2において、ゲストOSログ生成部7は、発生したログに対して識別子を生成して付与する識別子生成部10と、仮想マシンモニタ(VMM)4に識別子を通知するための識別子通知部11を備えている。また、ゲストOSログ生成部7は、識別子が付与されたログをゲストOSログ12に記録する。
FIG. 2 is a diagram illustrating a configuration example of the log generation device according to the first embodiment.
In FIG. 2, the guest OS
仮想マシンモニタ(VMM)4は、イベント生成部8を備えており、ゲストOSログ生成部7の識別子通知部11により識別子の通知を受けた際、イベント生成部8を用いて、ホストOSログ生成部5に、識別子付きのイベント通知を行なう。
The virtual machine monitor (VMM) 4 includes an
ホストOSログ生成部5は、ホストOS2上で発生するイベントを、ホストOSログ13に記録する。また、ホストOSログ生成部5は、仮想マシンモニタ(VMM)4のイベント生成部8からの識別子付きイベント通知をもとに、識別子を埋め込んだログを、ホストOSログ13に記録する。
The host OS log generation unit 5 records events that occur on the host OS 2 in the
マージ部6は、ホストOSログ13に埋め込まれた識別子に対応するログを、ゲストOSログ12から抽出し、ホストOSログ13に埋め込まれた識別子を、ゲストOSログ12から抽出したログに置換し、ゲストOS3とホストOS2のログがマージされたマージログ14を生成する。
The merge unit 6 extracts the log corresponding to the identifier embedded in the
図3は、ゲストOSログ12、ホストOSログ13、マージログ14の一例を示す図である。
図3において、ゲストOSログ12は、各イベントを一意に識別するための識別子と、イベントが発生した時刻、及びイベントの情報が記録されている。なお、本例では、識別子として、イベント発生毎に数字をインクリメントするようなシーケンス番号の数字を用いているが、一意に識別できるものであれば何でもよく、例えば、識別子に文字列を用いてもよい。ただし、この識別子は、ゲストOS3からホストOS2へ通知を行なうため、識別子の長さが短く、データ量が少ないことが望ましい。また、ホストOSログ13には、イベントが発生した時刻と、イベント、または仮想マシンモニタ(VMM)4のイベント生成部8から通知された識別子が記録されている。これらのゲストOSログ12とホストOSログ13がマージされて、マージログが生成される。
FIG. 3 is a diagram illustrating an example of the
In FIG. 3, the guest OS log 12 records an identifier for uniquely identifying each event, the time when the event occurred, and event information. In this example, the identifier is a sequence number that increments the number every time an event occurs. However, any identifier that can be uniquely identified may be used. For example, a character string may be used as the identifier. Good. However, since this identifier is notified from the guest OS 3 to the host OS 2, it is desirable that the identifier has a short length and a small amount of data. Further, the
次に、実施の形態1におけるログ生成装置の動作について、図4、図5を参照して説明する。
図4は、実施の形態1におけるゲストOS3側の処理の流れを示すフローチャートである。
図5は、実施の形態1におけるホストOS2側の処理の流れを示すフローチャートである。
Next, the operation of the log generation device according to the first embodiment will be described with reference to FIGS.
FIG. 4 is a flowchart showing the flow of processing on the guest OS 3 side in the first embodiment.
FIG. 5 is a flowchart showing the flow of processing on the host OS 2 side in the first embodiment.
以下、図4を用いて、ゲストOS3側の処理の流れを説明する。
まず、ステップS101において、ゲストOSログ生成部7は、ログ生成の準備をする。ログ生成の準備では、ログの取得条件の設定を行なう。例えば、ログの取得対象として、どのCPUコアを指定するか、あるいは、ログを取得する処理単位として、イベント単位とするか、関数単位とするかなどを設定する。さらにオプション機能として、関数呼び出し関係をトレースできる表示形式で出力するように指定することもできる。
次に、ステップS102において、ゲストOSログ生成部7は、ログを発生するイベントが来るまで待機し、ログを発生するイベントが発生したときに、S103の分岐に進む。
次に、ステップS103において、ゲストOSログ生成部7は、識別子生成部10により、発生したログに対して識別子を付与するとともに、その識別子を、ホストOS2上で動作する仮想マシンモニタ(VMM)4に通知する。
次に、ステップS104において、ゲストOSログ生成部7は、識別子が付与されたログをゲストOSログ12に出力する。ゲストOSログ12への出力書式例は、図3に示す通りである。
次に、ステップS105において、ゲストOSログ生成部7は、ログの生成の終了条件を満たすまで、ステップS102からステップS105までを繰り返す。ログの生成の終了条件は、例えば、予め設定されたログの取得期間を満たした場合や、ログ取得の終了のシグナルが発生した場合などである。
Hereinafter, the flow of processing on the guest OS 3 side will be described with reference to FIG.
First, in step S101, the guest OS
Next, in step S102, the guest OS
Next, in step S103, the guest OS
Next, in step S <b> 104, the guest OS
Next, in step S105, the guest OS
次に、図5を用いて、ホストOS2側の処理の流れを説明する。
まず、ステップS201において、ホストOSログ生成部5は、ログ生成の準備をする。ログ生成の準備は、ゲストOS3側のステップS101の処理と同様に、ログの取得条件の設定を行なう。
次に、ステップS202において、ホストOSログ生成部5は、ログを発生するイベントか、仮想マシンモニタ(VMM)4からの識別子付きイベント通知が発生するまで待機する。仮想マシンモニタ(VMM)4からの識別子付きイベント通知の処理は、ゲストOSログ生成部7から仮想マシンモニタ(VMM)4に識別子が通知されると、仮想マシンモニタ(VMM)4のイベント生成部8により識別子付きイベントが生成され、ホストOSログ生成部5に通知される。ホストOSログ生成部5は、上記のように待機し、ログを発生するイベントが発生した場合、ステップS203の分岐に進み、識別子付きイベント通知が発生した場合、ステップS204の分岐に進む。
次に、ステップS202でログを発生するイベントが発生した場合、ステップS203において、ホストOSログ生成部5は、発生したログをホストOSログ13に出力する。ホストOSログ13への出力書式例は、図3に示す通りである。
一方、ステップS202で識別子付きイベント通知が発生した場合は、ステップS204において、ホストOSログ生成部5は、識別子をホストOSログ13に出力する。識別子は、重複なく一意に識別可能なものであればよく、例えばイベント発生毎に数字をインクリメントするようなシーケンス番号でもよい。
次に、ステップS205において、ホストOSログ生成部5は、ログの生成の終了条件を満たすまで、ステップS202からステップS205までを繰り返す。ログの生成の終了条件は、例えば、予め設定されたログの取得期間を満たした場合や、ログ取得の終了のシグナルが発生した場合などである。
次に、ステップS206において、マージ部6は、ゲストOS3のゲストOSログ12と、ホストOS2のホストOSログ13を収集する。
最後に、ステップS206において、マージ部6は、
ホストOSログ13に挿入されている識別子に対応するログを、ホストOSログ13に埋め込まれた識別子に対応するログを、ゲストOSログ12から抽出し、ホストOSログ13に埋め込まれた識別子を、ゲストOSログ12から抽出したログに置換し、ゲストOS3とホストOS2のログがマージされたマージログ14を生成する。
Next, the flow of processing on the host OS 2 side will be described with reference to FIG.
First, in step S201, the host OS log generation unit 5 prepares for log generation. In preparation for log generation, a log acquisition condition is set in the same manner as in step S101 on the guest OS3 side.
Next, in step S202, the host OS log generation unit 5 stands by until an event that generates a log or an event notification with an identifier from the virtual machine monitor (VMM) 4 occurs. In the event notification processing with an identifier from the virtual machine monitor (VMM) 4, when the identifier is notified from the guest OS
Next, when an event for generating a log occurs in step S202, the host OS log generation unit 5 outputs the generated log to the
On the other hand, if an event notification with an identifier occurs in step S202, the host OS log generation unit 5 outputs the identifier to the
Next, in step S205, the host OS log generation unit 5 repeats steps S202 to S205 until a log generation end condition is satisfied. The log generation end condition is, for example, when a preset log acquisition period is satisfied, or when a log acquisition end signal is generated.
Next, in step S206, the merging unit 6 collects the
Finally, in step S206, the merge unit 6
A log corresponding to the identifier inserted in the
以上のように、本実施の形態1の発明は、ゲストOSログ生成部7が識別子生成部10と識別子通知部11を備え、識別子通知部11によって、ゲストOSログ12が生成されたタイミングで、識別子が、仮想マシンモニタ(VMM)4を経由して、ホストOSログ生成部5に通知され、ホストOSログ13と共に記録されることにより、マージ部6で、ホストOSログ13に記録された識別子をもとに、ゲストOSログ12を参照するのみで、イベントのログを発生順に並べて、まとめ上げることができる。これにより、ログのデータの転送の負荷を軽減して、ログをまとめ上げる際にもソートなどの処理が不要になり、複数の環境で生成されたログをまとめる処理の負荷を抑えつつ、イベントのログを発生順に並べることができるようになる。
As described above, in the invention of the first embodiment, the guest OS
さらに、識別子のみの通知を行なっているため、ログデータの出力書式が変更された場合でも、出力書式のインタフェース変更を考慮する必要なく動作させることができる。 Furthermore, since only the identifier is notified, even if the output format of the log data is changed, the operation can be performed without considering the interface change of the output format.
実施の形態2.
以上の実施の形態1では、ゲストOS3のイベントが発生するタイミングごとに識別子を通知し、発生順にイベントが並ぶようにしたものであるが、本実施の形態2では、識別子通知による負荷を下げたい場合に、周期的なタイミングで識別子を通知するようにした実施の形態を示す。以下、図6、図7を用いて、実施の形態2のログ生成装置9の構成と、ログ生成の処理フローについて説明する。
Embodiment 2. FIG.
In the first embodiment, identifiers are notified at each timing when an event of the guest OS 3 occurs, and the events are arranged in the order of occurrence. In the second embodiment, it is desired to reduce the load due to identifier notification. In this case, an embodiment is shown in which identifiers are notified at periodic timing. Hereinafter, the configuration of the
図6は、実施の形態2に係るログ生成装置の一構成例を示す図である。
図6において、ホストOS2に関わる構成は、実施の形態1の図2と同様であるが、ゲストOS3に関わる構成が異なり、ゲストOS3に周期タイマ部15を追加する。また、ゲストOS3に対して周期割込みを通知する周期割込み発生部18を設ける。さらに、実施の形態1の図1に記載した識別子生成部10と識別子通知部11をゲストOSログ生成部7に備える代わりに、周期タイマ部15に識別子生成部16と識別子通知部17を備える。
FIG. 6 is a diagram illustrating a configuration example of a log generation device according to the second embodiment.
6, the configuration related to the host OS 2 is the same as that in FIG. 2 of the first embodiment, but the configuration related to the guest OS 3 is different, and a
周期タイマ部15は、周期割込み発生部18からの割込み通知を受け、周期的に、識別子生成部16と識別子通知部17を実行する。識別子生成部16は、実行される度に識別子を生成し、識別子通知部17が、ゲストOSログ生成部7と、ホストOS2上の仮想マシンモニタ(VMM)4に識別子を通知する。識別子通知部17から識別子の通知を受けたゲストOSログ生成部7は、その識別子をゲストOSログ12に記録する。一方、識別子通知部17から識別子の通知を受けたときのホストOS2側の識別子の記録は、実施の形態1の処理と同様である。マージ部6は、ホストOSログ13に記録された識別子から、ゲストOSログ12に記録された識別子を参照し、次の識別子までのログをまとめ上げて、マージログ14を生成する。
The
本実施の形態2では、ゲストOSログ生成部7が、ゲストOSログ12に識別子を記録するようにしたが、周期タイマ部15の起床タイミングと識別子とが、ログ上で結び付けられればよいため、識別子はゲストOSログ12に記録することに限られない。例えば、タイマの起床タイミングをログとして記録できるゲストOSログ生成部7を用いている場合、そのタイマの起床タイミングのログに識別子を記録する方法でも実現可能である。
In the second embodiment, the guest OS
なお、周期割込み発生部18は、周期的に割込みを発生させることができればよいため、ソフトウェア、または、ハードウェアのどちらで実現してもよい。
Note that the periodic interrupt
次に、実施の形態2におけるログ生成装置の動作について、図7を参照して説明する。
図7は、実施の形態2におけるゲストOS3側の処理の流れを示すフローチャートである。
なお、ホストOS2側の処理フローは、実施の形態1と同様であるため、説明を省略する。
Next, the operation of the log generation device according to Embodiment 2 will be described with reference to FIG.
FIG. 7 is a flowchart showing the flow of processing on the guest OS 3 side in the second embodiment.
Note that the processing flow on the host OS 2 side is the same as that of the first embodiment, and thus the description thereof is omitted.
まず、ステップS301において、周期タイマ部15は、タイマを設定する。タイマの設定では、ログの取得期間の設定を行なう。
次に、ステップS302において、周期タイマ部15は、周期割込み発生部18により起床させられるまで待機し、起床したとき、ステップS303の分岐に進む。
次に、ステップS303において、周期タイマ部15は、ゲストOSログ生成部7と、ホストOS2の仮想マシンモニタ(VMM)4に識別子を通知する。
次に、ステップS304において、周期タイマ部15は、ログの生成の終了条件を満たすまで、ステップS402からステップS403までを繰り返す。ログの生成の終了条件は、例えば、予め設定されたログの取得期間を満たした場合や、ログ取得の終了のシグナルが発生した場合などである。
First, in step S301, the
Next, in step S302, the
Next, in step S303, the
Next, in step S304, the
次に、ゲストOSログ生成部7の処理の流れを説明する。
まず、ステップS401において、ゲストOSログ生成部7は、ログ生成の準備をする。ログ生成の準備は、実施の形態1と同様の処理である。
次に、ステップS402において、ゲストOSログ生成部7は、ログを発生するイベントか、周期タイマ部15からの識別子通知が来るまで待機する。ログを発生するイベントが発生した場合、ステップS403の分岐へ進む。また、周期タイマ部15から識別子通知を受けた場合、ステップS404の分岐へ進む。
次に、ステップS402でログを発生するイベントが発生した場合、ステップS403において、ゲストOSログ生成部7は、発生したログをゲストOSログ12に出力する。ゲストOSログ12への出力書式例は、図3に示す通りである。
次に、ステップS402で周期タイマ部15から識別子通知を受けた場合、ステップS404において、ゲストOSログ生成部7は、通知を受けた識別子が付与されたログをゲストOSログ12に出力する。
次に、ステップS405において、ゲストOSログ生成部7は、ログの生成の終了条件を満たすまで、ステップS402からステップS405までを繰り返す。ログの生成の終了条件は、例えば、予め設定されたログの取得期間を満たした場合や、ログ取得の終了のシグナルが発生した場合などである。
Next, the process flow of the guest OS
First, in step S401, the guest OS
Next, in step S <b> 402, the guest OS
Next, when an event that generates a log occurs in step S <b> 402, the guest OS
Next, when an identifier notification is received from the
Next, in step S405, the guest OS
なお、本実施の形態2において、ログのイベント発生順を保証できる精度は、周期タイマ部15が実行される割込み発生間隔によって異なる。例えば、1秒間隔で周期タイマ部15を起動するとしたとき、1秒間隔でイベントが発生した前後関係は保証できるが、1秒間隔以内のイベント発生順については保証することができない。この周期間隔をイベントの発生間隔に近づけた場合、実施の形態1とほぼ同様の処理の負荷となり、また、イベント発生順を保証できる精度も実施の形態1とほぼ同様となる。
In the second embodiment, the accuracy with which the log event generation order can be guaranteed varies depending on the interrupt generation interval at which the
以上のように、本実施の形態2の発明は、イベント発生毎に識別子通知を行なうのではなく、周期タイマによって識別子を通知し、イベント発生毎よりも識別子の通知頻度を下げることにより、識別子の生成・通知・記録の処理の負荷が軽減されるという効果がある。 As described above, according to the second embodiment, the identifier is not notified every time the event occurs, but the identifier is notified by the periodic timer, and the notification frequency of the identifier is lower than that at every event occurrence. There is an effect that the load of processing of generation / notification / recording is reduced.
実施の形態3.
以上の実施の形態1、2では、イベント発生毎に識別子を通知するか、一定周期ごとに識別子を通知するか、で異なる実施形態を示したが、本実施の形態3では、実施の形態1、2を併用することで、処理に要する負荷と、イベント発生順を保証する精度との調整が可能となることを示す。例えば、実施の形態1を用いて発生頻度が稀なイベントに対して、イベント発生毎に識別子を通知させた場合、負荷は非常に低くなるが、識別子を通知しないイベントの発生順を保証する精度が低くなる。このイベント発生毎に識別子を通知する設定に加え、実施の形態2を用いて、発生頻度が稀なイベントより短い間隔で識別子を通知することで、発生頻度が稀なイベントが発生していない場合には、一定周期ごとの識別子を元にイベント発生順の精度を保証することができるようになる。
Embodiment 3 FIG.
In the first and second embodiments described above, different embodiments have been shown depending on whether an identifier is notified every time an event occurs or an identifier is notified every fixed period. In the third embodiment, the first embodiment is different from the first embodiment. By using 2 together, it is possible to adjust the load required for processing and the accuracy for guaranteeing the order of event occurrence. For example, when an identifier is notified for each event occurrence with respect to an event with a rare occurrence frequency using the first embodiment, the load is very low, but the accuracy of guaranteeing the order of occurrence of events that do not notify the identifier Becomes lower. In addition to the setting for notifying an identifier for each occurrence of an event, by using the second embodiment, by notifying an identifier at an interval shorter than an event with a rare occurrence frequency, an event with a rare occurrence frequency has not occurred. Therefore, it is possible to guarantee the accuracy of the order of event occurrence based on the identifier for each fixed period.
また、実施の形態1では、ゲストOS3で発生する全てのログに対して識別子を生成し、割り当て、通知する必要があったが、実施の形態1、2を併用することで、特定のイベントだけを通知するだけでもログの収集が可能であり、イベントの種類別に発生順を保証する精度を変えることができるようになる。例えば、ディスクにアクセスするイベントとネットワーク通信のイベントを取得しているときに、ディスクにアクセスするイベントのみ識別子を割り当て、通知するようにしたとする。この場合、ディスクにアクセスするイベントは、実施の形態1と同様のイベント毎単位の精度でゲストOSとのログを発生順に並べることができる。一方、ネットワーク通信のイベントは、実施の形態2と同様の精度で、イベント発生順に並べることができる。これにより、ディスクアクセス時にホストOSのログとの時系列を正確に取りつつ、そのときにネットワーク通信が行なわれていたかどうかを判断することができる。 In the first embodiment, it is necessary to generate, assign, and notify identifiers for all logs generated in the guest OS 3. However, by using the first and second embodiments together, only specific events are generated. Logs can be collected just by notifying the event, and the accuracy of guaranteeing the order of occurrence can be changed for each event type. For example, when an event for accessing a disk and an event for network communication are acquired, an identifier is assigned and notified only for the event for accessing the disk. In this case, for the event accessing the disk, the logs with the guest OS can be arranged in the order of occurrence with the same accuracy for each event as in the first embodiment. On the other hand, events of network communication can be arranged in the order of event occurrence with the same accuracy as in the second embodiment. As a result, it is possible to accurately determine the time series with the log of the host OS at the time of disk access, and to determine whether network communication has been performed at that time.
以下、図8、図9を用いて、実施の形態3のログ生成装置9の構成と、ログ生成の処理フローについて説明する。
図8は、実施の形態3に係るログ生成装置の一構成例を示す図である。
図8において、ホストOS2に関わる構成は、実施の形態1の図2と同様であるが、ゲストOS3に関わる構成が異なり、ゲストOS3に、識別子調停部19を追加する。
Hereinafter, the configuration of the
FIG. 8 is a diagram illustrating a configuration example of a log generation device according to the third embodiment.
In FIG. 8, the configuration related to the host OS 2 is the same as that of FIG. 2 of the first embodiment, but the configuration related to the guest OS 3 is different, and an
識別子調停部19は、識別子を生成すべきタイミングにおいて、周期タイマ部15により周期的に識別子を生成・通知するか、または、ゲストOSログ生成部7によりイベント発生毎に識別子を生成・通知するかの判断を行なう。例えば、ゲストOSログ生成部7が、高頻度で識別子を通知している場合には、識別子調停部19が周期タイマ部15で生成した識別子を通知しないようにして、ゲストOSログ生成部7によりイベント発生毎に識別子を生成・通知すると判断する。一方、ゲストOSログ生成部7が、識別子を通知する頻度が低い場合には、ゲストOSログ生成部7で生成した識別子を通知しないようにして、周期タイマ部15により周期的に生成した識別子を生成・通知すると判断する。
Whether the
次に、本実施の形態3におけるログ生成装置の動作について、図9を参照して説明する。
図9は、実施の形態3におけるゲストOS3側の処理の流れを示すフローチャートである。
なお、ホストOS2側の処理フローは、実施の形態1と同様であるため、説明を省略する。
Next, the operation of the log generation device according to the third embodiment will be described with reference to FIG.
FIG. 9 is a flowchart showing the flow of processing on the guest OS 3 side in the third embodiment.
Note that the processing flow on the host OS 2 side is the same as that of the first embodiment, and thus the description thereof is omitted.
まず、ステップS501において、周期タイマ部15は、タイマを設定する。タイマの設定では、ログの取得期間の設定を行なう。
次に、ステップS502において、周期タイマ部15は、周期割込み発生部18により起床させられるまで待機し、起床したとき、ステップS503の分岐に進む。
次に、ステップS503において、識別子調停部19は、周期タイマ部15により周期的に識別子の通知をするか否かを決定する。周期タイマ部15により周期的に識別子の通知をする場合は、ステップS504に進み、周期タイマ部15により周期的に識別子の通知をしない場合は、ステップS504をスキップしてステップS505に進む。
次に、ステップS504において、周期タイマ部15は、ゲストOSログ生成部7と、ホストOS2の仮想マシンモニタ(VMM)4に識別子を通知する。
次に、ステップS505において、周期タイマ部15は、ログの生成の終了条件を満たすまで、ステップS402からステップS403までを繰り返す。ログの生成の終了条件は、例えば、予め設定されたログの取得期間を満たした場合や、ログ取得の終了のシグナルが発生した場合などである。
First, in step S501, the
Next, in step S502, the
Next, in step S <b> 503, the
Next, in step S504, the
Next, in step S505, the
次に、ゲストOSログ生成部7の処理の流れを説明する。
まず、ステップS601において、ゲストOSログ生成部7は、ログ生成の準備をする。ログ生成の準備は、実施の形態1と同様の処理である。
次に、ステップS602において、ゲストOSログ生成部7は、ログを発生するイベントか、周期タイマ部15からの識別子通知が来るまで待機する。ログを発生するイベントが発生した場合、ステップS603の分岐へ進む。また、周期タイマ部15から識別子通知を受けた場合、ステップS606の分岐へ進む。
次に、ステップS603において、識別子調停部19は、ゲストOSログ生成部7によりイベント発生毎に識別子を通知するか否かを決定する。ゲストOSログ生成部7によりイベント発生毎に識別子を通知する場合は、ステップS604に進み、ゲストOSログ生成部7によりイベント発生毎に識別子を通知しない場合は、ステップS605に進む。
次に、ステップS604において、ゲストOSログ生成部7は、識別子通知部11により、イベント毎に生成した識別子を、ホストOS2の仮想マシンモニタ(VMM)4に通知する。
次に、ステップS605において、ゲストOSログ生成部7は、ステップS603で識別子を通知すると決定した場合、通知した識別子とログをゲストOSログ12に出力する。一方、ステップS603で識別子を通知しないと決定した場合、識別子を付与していないログをゲストOSログ12に出力する。
次に、ステップS602で周期タイマ部15から識別子通知を受けた場合、ステップS606において、ゲストOSログ生成部7は、識別子が付与されたログをゲストOSログ12に出力する。
次に、ステップS607において、ゲストOSログ生成部7は、ログの生成の終了条件を満たすまで、ステップS602からステップS607までを繰り返す。ログの生成の終了条件は、例えば、予め設定されたログの取得期間を満たした場合や、ログ取得の終了のシグナルが発生した場合などである。
Next, the process flow of the guest OS
First, in step S601, the guest OS
Next, in step S <b> 602, the guest OS
Next, in step S <b> 603, the
In step S604, the guest OS
Next, in step S605, when the guest OS
Next, when an identifier notification is received from the
Next, in step S607, the guest OS
以上のように、本実施の形態3の発明は、実施の形態1、2のログ生成装置を単体で用いた場合よりも、識別子調停部19を用いて実施の形態1、2のログ生成装置を併用することにより、ログ生成処理に要する負荷と、イベント発生順を保証する精度の調整が細かく行なえるようになるという効果がある。
As described above, the invention according to the third embodiment uses the
実施の形態4.
以上の実施の形態1〜3では、ゲストOS3を1つとしたものであるが、次に、本実施の形態4では、ゲストOS3が複数台ある場合の実施の形態を示す。
In the above first to third embodiments, the guest OS 3 is single. Next, the fourth embodiment shows an embodiment in which there are a plurality of guest OSs 3.
図10は、実施の形態4に係るログ生成装置の一実施例を示す情報処理装置の構成図である。
図10では、実施の形態1に対して、ゲストOS20と、それを動作させている仮想マシンモニタ(VMM)22を追加で1台、配置する。なお、本実施の形態4では、追加で1台配置した例を示したが、2台以上の複数台を配置することもでき、配置できる最大台数は計算機の性能により異なる。また、本実施の形態4では、実施の形態1をもとに示したが、実施の形態2または3においても、ゲストOSと、それを動作させている仮想マシンモニタ(VMM)を複数配置することが可能である。さらに、複数のゲストOSの種類は、異なる種類を用いていてもよい。
FIG. 10 is a configuration diagram of an information processing apparatus showing an example of the log generation apparatus according to the fourth embodiment.
In FIG. 10, a
図11は、実施の形態4に係るログ生成装置の一構成例を示す図である。
図11において、実施の形態4における各構成要素の関係は、ゲストOS3とゲストOS20の2つが動作していることを除き、実施の形態1とほぼ同様である。実施の形態1との相違点は、2台を同時に動作させるために、識別子生成部28が、ゲストOS3とゲストOS20とで重複することなく一意の識別子を生成する必要がある点である。また、ゲストOSが、2台に限らず複数台ある場合には、全てのゲストOSに対して一意の識別子を生成する必要がある。この複数台で一意の識別子は、例えば、計算機名+各計算機内の時刻と組み合わせることで生成することができる。
FIG. 11 is a diagram illustrating a configuration example of a log generation device according to the fourth embodiment.
In FIG. 11, the relationship between the components in the fourth embodiment is substantially the same as that in the first embodiment except that the guest OS 3 and the
マージ部6は、ホストOSログ13に埋め込まれた識別子を参照する際に、ゲストOSログ12と、ゲストOSログ26の2つから識別子を検索する。その他の各ゲストOSと仮想マシンモニタ(VMM)の個々の動作は、実施の形態1の図4、図5と同様である。
When referring to the identifier embedded in the
以上のように、本実施の形態4の発明は、実施の形態1〜3に加え、識別子が全てのゲストOSで一意となるようにすることで、複数台のゲストOSと複数台の仮想マシンモニタ(VMM)を動作させた場合でも、イベントのログを発生順に並べて、まとめ上げることができるようになる。 As described above, in addition to the first to third embodiments, the invention of the fourth embodiment is configured such that an identifier is unique among all guest OSes, whereby a plurality of guest OSs and a plurality of virtual machines are provided. Even when the monitor (VMM) is operated, event logs can be arranged in order of occurrence and collected.
1 計算機、2 ホストOS、3 ゲストOS、4 仮想マシンモニタ(VMM)、5 ホストOSログ生成部、6 マージ部、7 ゲストOSログ生成部、8 イベント生成部、9 ログ生成装置、10 識別子生成部、11 識別子通知部、12 ゲストOSログ、13 ホストOSログ、14 マージログ、15 周期タイマ部、16 識別子生成部、17 識別子通知部、18 周期割込み発生部、19 識別子調停部、20 ゲストOS、21 ゲストOSログ生成部、22 仮想マシンモニタ(VMM)、23 イベント生成部、24 識別子生成部、25 識別子通知部、26 ゲストOSログ。
1 computer, 2 host OS, 3 guest OS, 4 virtual machine monitor (VMM), 5 host OS log generation unit, 6 merge unit, 7 guest OS log generation unit, 8 event generation unit, 9 log generation device, 10
Claims (7)
前記識別子生成部により生成された前記識別子をゲストOSのログと対応付けてゲストOSログに記録するゲストOSログ生成部と、
前記識別子生成部により生成された前記識別子を通知する識別子通知部と、
前記識別子通知部により通知された前記識別子をホストOSログに記録するホストOSログ生成部と、
前記ホストOSログ生成部により前記ホストOSログに記録された前記識別子に対応するログを前記ゲストOSログ生成部により記録された前記ゲストOSログから抽出して前記識別子と置換するマージ部と
を備えたログ生成装置。 An identifier generating unit that generates an identifier for uniquely identifying the log of the guest OS;
A guest OS log generation unit that records the identifier generated by the identifier generation unit in a guest OS log in association with a guest OS log;
An identifier notifying unit for notifying the identifier generated by the identifier generating unit;
A host OS log generation unit that records the identifier notified by the identifier notification unit in a host OS log;
A merge unit that extracts a log corresponding to the identifier recorded in the host OS log by the host OS log generation unit from the guest OS log recorded by the guest OS log generation unit and replaces the identifier with the identifier; Log generator.
一定周期毎に第2の識別子を生成する第2の識別子生成部と、
前記イベントの発生頻度に応じて、前記第1の識別子または前記第2の識別子のどちらを通知するかを決定する識別子調停部と
を備えた請求項1記載のログ生成装置。 A first identifier generation unit that generates a first identifier each time an event occurs in the guest OS;
A second identifier generation unit that generates a second identifier at regular intervals;
The log generation device according to claim 1, further comprising: an identifier arbitration unit that determines whether to notify the first identifier or the second identifier according to the occurrence frequency of the event.
一定周期毎に第2の識別子を生成する第2の識別子生成部と、
前記イベントの種類に応じて、前記第1の識別子または前記第2の識別子のどちらを通知するかを決定する識別子調停部と
を備えた請求項1記載のログ生成装置。 A first identifier generation unit that generates a first identifier each time an event occurs in the guest OS;
A second identifier generation unit that generates a second identifier at regular intervals;
The log generation device according to claim 1, further comprising: an identifier arbitration unit that determines whether to notify the first identifier or the second identifier according to a type of the event.
前記識別子生成部は、前記複数のゲストOSのログを一意に識別する識別子を生成する請求項1記載のログ生成装置。 With multiple guest OSes,
The log generation device according to claim 1, wherein the identifier generation unit generates an identifier for uniquely identifying the logs of the plurality of guest OSs.
ゲストOSログ生成部により前記識別子生成ステップにより生成された前記識別子をゲストOSのログと対応付けてゲストOSログに記録するゲストOSログ生成ステップと、
識別子通知部により前記識別子生成ステップにより生成された前記識別子を通知する識別子通知ステップと、
ホストOSログ生成部により前記識別子通知ステップにより通知された前記識別子をホストOSログに記録するホストOSログ生成ステップと、
マージ部により前記ホストOSログ生成ステップにより前記ホストOSログに記録された前記識別子に対応するログを前記ゲストOSログ生成ステップにより記録された前記ゲストOSログから抽出して前記識別子と置換するマージステップと
を備えたログ生成方法。 An identifier generating step for generating an identifier for uniquely identifying the log of the guest OS by the identifier generating unit;
A guest OS log generation step of recording the identifier generated by the identifier generation step by the guest OS log generation unit in a guest OS log in association with a log of the guest OS;
An identifier notifying step for notifying the identifier generated by the identifier generating step by an identifier notifying unit;
A host OS log generation step of recording the identifier notified by the identifier notification step by the host OS log generation unit in a host OS log;
A merge step of extracting a log corresponding to the identifier recorded in the host OS log by the host OS log generation step by the merge unit from the guest OS log recorded by the guest OS log generation step and replacing the identifier with the identifier And a log generation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013180873A JP6040894B2 (en) | 2013-09-02 | 2013-09-02 | Log generation apparatus and log generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013180873A JP6040894B2 (en) | 2013-09-02 | 2013-09-02 | Log generation apparatus and log generation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015049705A JP2015049705A (en) | 2015-03-16 |
JP6040894B2 true JP6040894B2 (en) | 2016-12-07 |
Family
ID=52699670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013180873A Active JP6040894B2 (en) | 2013-09-02 | 2013-09-02 | Log generation apparatus and log generation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6040894B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6510430B2 (en) * | 2016-01-18 | 2019-05-08 | 株式会社日立製作所 | Trace data editing apparatus and method |
JP6658093B2 (en) * | 2016-02-29 | 2020-03-04 | 株式会社リコー | Information processing system and program |
JP6953748B2 (en) * | 2016-08-18 | 2021-10-27 | 富士電機株式会社 | Control equipment and control method |
CN106658463A (en) * | 2016-09-30 | 2017-05-10 | 宇龙计算机通信科技(深圳)有限公司 | Operating system login method, device and terminal |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001020456A1 (en) * | 1999-09-10 | 2001-03-22 | Hitachi, Ltd. | Operating system managing system and method |
JP2006018701A (en) * | 2004-07-05 | 2006-01-19 | Ricoh Co Ltd | Log output system, method, program, and recording medium |
JP4473766B2 (en) * | 2005-04-04 | 2010-06-02 | 株式会社日立製作所 | Computer system, log collection method, and computer program |
JP2009042815A (en) * | 2007-08-06 | 2009-02-26 | Renesas Technology Corp | Semiconductor integrated circuit and debugging system |
-
2013
- 2013-09-02 JP JP2013180873A patent/JP6040894B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015049705A (en) | 2015-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10133619B1 (en) | Cluster-wide virtual machine health monitoring | |
US10212120B2 (en) | Distributed message queue stream verification | |
CN110865867B (en) | Method, device and system for discovering application topological relation | |
Lu et al. | Log-based abnormal task detection and root cause analysis for spark | |
Oliner et al. | What supercomputers say: A study of five system logs | |
US8381033B2 (en) | Fault management in virtual computing environments | |
US11544137B2 (en) | Data processing platform monitoring | |
US20100223446A1 (en) | Contextual tracing | |
CN103455368B (en) | A kind of deadlock detection method, node and system | |
JP6160064B2 (en) | Application determination program, failure detection apparatus, and application determination method | |
CN102567185B (en) | Monitoring method of application server | |
US9342390B2 (en) | Cluster management in a shared nothing cluster | |
JP6040894B2 (en) | Log generation apparatus and log generation method | |
CN102929769B (en) | Virtual machine internal-data acquisition method based on agency service | |
CN103516802A (en) | Method and device for achieving seamless transference of across heterogeneous virtual switch | |
US9690576B2 (en) | Selective data collection using a management system | |
CN105760240A (en) | Distributed task processing method and device | |
CN110750592A (en) | Data synchronization method, device and terminal equipment | |
CN103678024A (en) | Fault tolerant system and method for performing fault tolerant | |
WO2017181430A1 (en) | Method and device for duplicating database in distributed system | |
CN104298601A (en) | Software system testing method based on Hadoop platform | |
CN114064217B (en) | OpenStack-based node virtual machine migration method and device | |
CN110659147B (en) | Self-repairing method and system based on module self-checking behavior | |
JP2013206368A (en) | Virtual environment operation support system | |
JP5642725B2 (en) | Performance analysis apparatus, performance analysis method, and performance analysis program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20151216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160930 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20161011 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161024 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6040894 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |