JP7073737B2 - Communication log recording device, communication log recording method, and communication log recording program - Google Patents
Communication log recording device, communication log recording method, and communication log recording program Download PDFInfo
- Publication number
- JP7073737B2 JP7073737B2 JP2018007465A JP2018007465A JP7073737B2 JP 7073737 B2 JP7073737 B2 JP 7073737B2 JP 2018007465 A JP2018007465 A JP 2018007465A JP 2018007465 A JP2018007465 A JP 2018007465A JP 7073737 B2 JP7073737 B2 JP 7073737B2
- Authority
- JP
- Japan
- Prior art keywords
- log
- storage means
- reception
- communication
- temporary storage
- 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 communication log recording device, a communication log recording method, and a communication log recording program, particularly a device for efficiently recording a communication log including the order of reception requests issued by an application and received data.
アプリケーションが発行した受信要求の順序と受信データを含む通信ログは、有用なデータであり、例えば、データ記録型再演法での利用に適している。 The communication log containing the order of the reception request issued by the application and the reception data is useful data, and is suitable for use in, for example, a data recording type replay method.
プログラムのデバッグは問題の状態を再現する必要がある。プロセス間で通信して処理を進めるプログラム、例えばメッセージパッシング型・分散並列プログラムは、プロセス間で通信して処理を進めるため、状態の再現に通信結果が必要となる。この問題の解決法の一つに、データ記録型再演法がある(非特許文献1)。これは、デバッグ対象プロセスが行った通信結果を記録し、デバッグ実行(再演)時は、通信の代わりに以前に記録した通信結果を参照する。これにより、実際の通信が不要となり、デバッグ対象プロセスのみの実行でデバッグが可能となる。 Program debugging needs to reproduce the state of the problem. A program that communicates between processes and proceeds with processing, for example, a message passing type / distributed parallel program, communicates between processes and proceeds with processing, so that a communication result is required to reproduce the state. One of the solutions to this problem is a data recording type replay method (Non-Patent Document 1). This records the communication result performed by the debuggee process, and when debugging is executed (replay), the previously recorded communication result is referred to instead of the communication. This eliminates the need for actual communication and enables debugging by executing only the process to be debugged.
特許文献1は、並列プログラムの実行再現方法を開示する。この方法は、モニタモードで実行中の並列プログラムが主記憶上の共有データにアクセスした記録を、主記憶上におかれたシステム履歴テープに書き込む。この方法は、再演モードにおいて、システム履歴テープに書き込まれている記録を用いて、並列プログラムの実行を再現する。
特許文献2は、連続性があるとみなされた通信ログを一次保存領域にバッファリングしておき、バッファリング期間が満了すると、一次保存領域に保存されていた通信ログを二次保存領域に保存する情報処理装置を開示する。
In
データ受信を伴うプログラムのデータ記録型再演法に用いられるような通信ログは、受信データを含むため、データ量が多いという特徴がある。このような多くの通信ログを、特許文献1が開示するように主記憶上に置いておくことは出来ない。揮発性が問題となる場合もある。
Communication logs such as those used in the data recording type replay method of programs that involve data reception are characterized by a large amount of data because they include received data. Many such communication logs cannot be stored in the main memory as disclosed in
一方、特許文献2が開示するように、通信ログを主記憶等の一次保存領域にバッファリングしておき、後で、当該通信ログをハードディスク等の二次保存領域に格納し直す場合は、この為の入出力が他の処理に悪影響を及ぼす可能性がある。すなわち他の処理が通信ログの入出力終了を待ち合わせる場合、この入出力は、当該他の処理の実行を遅延させる。非同期型入出力等により通信ログの入出力と当該他の処理を例列して実行した場合でも、この入出力は当該他の処理環境に以下のような悪影響を与える。
On the other hand, as disclosed in
問題(a) 再演されるプログラムが非同期型入出力を使用しない場合でも、DMA(Direct Memory Access)エンジンなどの特別なハードウェアが必要となる。 Problem (a) Special hardware such as a DMA (Direct Memory Access) engine is required even if the program being replayed does not use asynchronous I / O.
問題(b) 非同期型入出力処理のプロセス・スレッドの為の仕組みと資源が必要となる。 Problem (b) A mechanism and resources for the process thread of asynchronous I / O processing are required.
問題(c) 非同期型入出力処理のため、プログラムで利用できるCPU(Central Processing Unit)コアが減少する。
問題(d) 非同期型入出力処理のプロセス・スレッドとプログラムがCPUコアを共用する場合、コンテキストスイッチのオーバヘッドがかかる。また、計算中のプログラムと非同期型入出力処理が切り替わる場合、計算のCPUコア使用率が低下する
本発明は、通信ログを主記憶等にバッファリングしておき、後で当該通信ログをハードディスク等に格納し直す場合に、格納し直し時の入出力が他の処理に及ぼす影響を抑制できる通信ログ記録装置等を提供することを目的とする。
Problem (c) Due to asynchronous input / output processing, the number of CPU (Central Processing Unit) cores that can be used by the program decreases.
Problem (d) Context switch overhead occurs when a process thread and program for asynchronous I / O processing share a CPU core. In addition, when the program being calculated and asynchronous I / O processing are switched, the CPU core usage rate of the calculation decreases. In the present invention, the communication log is buffered in the main memory, etc., and the communication log is later stored in the hard disk, etc. It is an object of the present invention to provide a communication log recording device or the like that can suppress the influence of the input / output at the time of re-storing on other processes when re-storing.
本発明の一つの実施の形態の通信ログ記録装置は、ログ記憶手段と、前記ログ記憶手段より高速なログ一時記憶手段と、受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取手段と、要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直すログ保存手段と、を備える。 The communication log recording device according to the embodiment of the present invention has a log storage means, a log temporary storage means faster than the log storage means, and a log ID indicating the issuing order of the reception request when the reception request is received. The log collection means that starts generation and reception and stores the log information including the log ID and the read reception data in the log temporary storage means at the end of the reception, and the requested transmission or reception is started. After that, the log storage means for re-storing the log information stored in the log temporary storage means in the log storage means is provided.
本発明の一つの実施の形態の通信ログ記録方法は、受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報をログ記憶手段より高速なログ一時記憶手段に格納し、要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直す。 In the communication log recording method of one embodiment of the present invention, when a reception request is received, a log ID indicating the issuing order of the reception request is generated and reception is started, and the log ID and the reception are read at the end of the reception. The log information including the received data is stored in the log temporary storage means faster than the log storage means, and the log information stored in the log temporary storage means after the requested transmission or the reception is started. Is stored back in the log storage means.
本発明の一つの実施の形態の通信ログ記録プログラムは、ログ記憶手段と、前記ログ記憶手段より高速なログ一時記憶手段と、を備えるコンピュータに、受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取処理と、要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直すログ保存処理と、を実行させる。 When a reception request is received by a computer including a log storage means and a log temporary storage means faster than the log storage means, the communication log recording program according to the embodiment of the present invention receives the reception request in the order of issuance of the reception request. The log collection process that generates the log ID indicating the above and starts reception, and stores the log information including the log ID and the read received data in the log temporary storage means at the end of the reception, and the requested transmission or After the reception is started, the log storage process of re-storing the log information stored in the log temporary storage means in the log storage means is executed.
本発明にかかる通信ログ記録装置等は、通信ログを主記憶等にバッファリングしておき、後で当該通信ログをハードディスク等に格納し直す場合に、格納し直しの為の入出力が、他の処理に及ぼす影響を抑制できる。 In the communication log recording device or the like according to the present invention, when the communication log is buffered in the main memory or the like and the communication log is later stored in the hard disk or the like, the input / output for re-storing is other. The effect on the processing of
<第一の実施の形態>
<概要>
本実施の形態にかかる通信ログ記録装置10は、通信ログの記録をログの採取とログの保存の2つのフェーズに分ける。通信ログ記録装置10は、ログの採取フェーズでは、通信ログを採取して、高速な記録媒体、例えば半導体メモリ等のログ一時記憶部15に一時的に記録する。後続するログ保存フェーズにおいて、通信ログ記録装置10は、通信待ち時間中に通信ログを、ログ一時記憶部15からHDD(Hard Disk Drive)等のログ記憶部13に移動させる。
<First embodiment>
<Overview>
The communication
<構成>
図1は、本実施の形態にかかる通信ログ記録装置10の構成を示す図である。通信ログ記録装置10は、ログ採取部11、ログ保存部12、ログ記憶部13、通信カウンタ14、ログ一時記憶部15、受信要求記憶部16、通信処理部21、及び、通信待ち部22を備える。さらに、通信ログ記録装置10は、通信を要求する主体であるアプリケーション17を備えている。この主体は、プログラムであっても良いし、画像処理プロセッサのようなハードウェアであっても良い。
<Structure>
FIG. 1 is a diagram showing a configuration of a communication
ログ採取部11は上述したログの採取フェーズを実行する。すなわち、ログ採取部11は、アプリケーション17が要求した通信を実行して、通信ログを採取してログ一時記憶部15に一時的に記録する。ログ保存部12は上述したログの採取フェーズを実行する。すなわち、ログ保存部12は、通信待ち時間中に通信ログをログ一時記憶部15から読み出しで、ログ記憶部13に格納し直す。通信ログはログ記憶部13に蓄積されていく。
The
通信カウンタ14は、アプリケーション17が要求した通信の順番を記録するカウンタである。初期値は1である。ログ採取部11は、アプリケーション17から通信の要求を受け付けると、ここから順番を取ってログID(Identification)を生成し、通信カウンタ14の値を1つ増加させる。
The
通信処理部21は通信を開始し、通信待ち部22は通信の終了を待ち合わせる。ここでいう通信は、例えばプロセス間通信であるが、ディスク装置への入出力や、通信網を経由した遠隔装置と通信であっても良い。受信要求記憶部16は、非ブロッキング型、すなわち非同期型の通信を実行した時に、終了した通信のログIDを得る為のテーブルを記憶する。
The
図2は、ログ一時記憶部15、および、ログ記憶部13に格納される通信ログのデータ構造を示す図である。通信ログは、アプリケーション17が、通信を要求する都度取得されて、図2におけるテーブルの1行に格納される。通信ログは、ログID,通信手続、実行結果、受信データ、及び、終了フラグの各データ項目を包含する。
FIG. 2 is a diagram showing a data structure of a communication log stored in the log
ログIDは、アプリケーション17が要求した通信の順番を表す。ログIDは、他の情報、例えば、アプリケーション17の識別子やプロセスの識別子を含んでいても良い。受信データは、当該要求で受信したデータの内容を表す。ログIDは、例えば、アプリケーション17の再演時に、通信要求に対して正しい受信データを出力する為に使うことが出来る。すなわち、再演を実行するシステムは、n(nは整数)番目に発行された通信要求が受信要求である場合、n番目を示すログIDを持つ通信ログの受信データを、アプリケーション17に出力すれば良い。
The log ID represents the order of communication requested by the
通信手続は当該要求の種別を示す。通信手続は、受信/送信の区別、同期型通信/非同期型通信の区別を示す。なお、同期型入出力/非同期型入出力は、ブロッキング/非ブロッキングと称されるときもある。実行結果は、通信が正常に終了したか否かを示す。 The communication procedure indicates the type of the request. The communication procedure indicates the distinction between reception / transmission and the distinction between synchronous communication / asynchronous communication. Synchronous input / output / asynchronous input / output may be referred to as blocking / non-blocking. The execution result indicates whether or not the communication has ended normally.
終了フラグはログ一時記憶部15内の通信ログだけが有し、通信要求の受信/送信が終了したか否かを示す。なお、終了フラグは初期値が0で通信実行中を示し、通信が終了すると1になる。ログ保存部12は、受信/送信が終了している通信要求の通信ログを、ログ一時記憶部15からログ記憶部13に格納し直す。ログ保存部12は、通信ログをログ一時記憶部15からログ記憶部13に格納し直すとき、終了フラグを取り除く。
The end flag is held only in the communication log in the log
なお、再演時等に不要であれば、通信ログは、通信手続、または実行結果を包含しなくても良い。例えば、通信結果は常に正常であるとして、再演が実施される場合である。また、再演時に送信結果を気にしない、例えば、常に正常終了として再演するのであれば、通信ログは受信についてだけ取得しても良い。 If it is not necessary at the time of replay, the communication log does not have to include the communication procedure or the execution result. For example, when the communication result is always normal and the replay is performed. Further, if the transmission result is not a concern at the time of replay, for example, if the replay is always performed as a normal end, the communication log may be acquired only for reception.
図3は、受信要求記憶部16に格納されるテーブルのデータ構造を示す図である。このテーブルは、実行中の非ブロッキング型の通信要求について、受信要求IDとログIDの関連付けを記憶する。受信要求IDは、アプリケーション17が発した通信要求の識別子である。受信要求IDは、実行中の非ブロッキング型の通信を識別できる情報であれば何でもよい。受信要求IDは、例えば実行中の非ブロッキング型通信を管理する為の制御情報格変数のアドレスや配列要素の添え字変数値である。
FIG. 3 is a diagram showing a data structure of a table stored in the reception
ここで、通信ログ記録装置10のログ採取部11、ログ保存部12、通信処理部21、及び、通信待ち部22は、論理回路、または、専用プロセッサとファームウェアで構成される。ログ記憶部13は、HDD、または、SDD(Solid State Drive)等の記憶装置である。通信カウンタ14、ログ一時記憶部15、および、受信要求記憶部16は、半導体記憶装置である。
Here, the
通信ログ記録装置10は、コンピュータ装置60で構成されても良い。図4は、コンピュータ装置60の構成を示す図である。コンピュータ装置60は、バス64で相互に接続された、プロセッサ61、主記憶装置63、及び、外部記憶装置62を備える。
The communication
プロセッサ61は、バス64を経由して、主記憶装置63、及び、外部記憶装置62に対してデータの読み書きを行う。また、プロセッサ61は、主記憶装置63に格納されている通信ログ記録プログラム65を実行する。なお、通信ログ記録プログラム65は、当初は外部記憶装置62に格納されており、コンピュータ装置60の初期設定時にプロセッサ61が外部記憶装置62から主記憶装置63にロードしても良い。
The
ここで、主記憶装置63は半導体記憶装置である。外部記憶装置62は、HDD、または、SDD等の記憶装置である。
Here, the
コンピュータ装置60のプロセッサ61は、通信ログ記録プログラム65を実行することにより、ログ採取部11、ログ保存部12、通信処理部21、及び、通信待ち部22として機能する。すなわち、プロセッサ61は、通信ログ記録プログラム65を実行することにより、ログ採取部11、ログ保存部12、通信処理部21、及び、通信待ち部22が行う処理を実行する。
By executing the communication
主記憶装置63は、通信カウンタ14、ログ一時記憶部15、および、受信要求記憶部16として使用される。外部記憶装置62は、ログ記憶部13として使用される。
The
<動作>
図5は、通信を要求されたときのログ採取部11の動作を表したフローチャートである。
<Operation>
FIG. 5 is a flowchart showing the operation of the
ログ採取部11は、アプリケーション17が通信を要求したときに起動される。起動されるとログ採取部11は、通信処理部21に依頼して通信を開始させる(S11)。その後、ログ採取部11は通信カウンタ14を参照してログIDを生成し(S12)、ログ一時記憶部15の空いている行にログID、通信手続、実行結果、及び、終了フラグを格納する(S13)。ここで、実行結果は、例えば通信処理部21から報告された値が設定される。終了フラグには、0が設定される。
The
その後、ログ採取部11はログ保存部12に依頼して、ログ一時記憶部15に終了フラグが1で未保存の通信ログが有れば、その通信ログをログ記憶部13に格納し直す(S14)。ここで格納し直されるのは、過去に実行した通信についての通信ログである。図7は、この動作フローチャートであり、後述する。
After that, the
開始した通信がブロッキング型通信の場合(S15でYES)、ログ採取部11は通信の終了を通信待ち部22で待ち合わせ、S14で格納した通信ログの終了フラグを1にして、通信待ち部22から得られた実行結果をログ一時記憶部15に格納する(S17)。受信の場合、ログ採取部11は、通信待ち部22から得られた受信データもログ一時記憶部15に格納する。その後、ログ採取部11は処理を了する。
When the started communication is blocking type communication (YES in S15), the
開始した通信が非ブロッキング型通信の場合(S15でNO、S16でYES)、ログ採取部11は受信要求記憶部16の空いている行に受信要求IDとログIDを格納する(S18)。その後、ログ採取部11は処理を了する。
When the started communication is non-blocking communication (NO in S15, YES in S16), the
開始した通信がその他、例えば送信で場合(S15でNO、S16でNO)、ログ採取部11は処理を了する。
If the started communication is other, for example, transmission (NO in S15, NO in S16), the
図6は、非ブロッキング型通信の終了待ち合わせ要求を受けたときのログ採取部11の動作を表したフローチャートである。
FIG. 6 is a flowchart showing the operation of the
アプリケーション17が非ブロッキング型通信の終了待ち合わせ要求を要求したときに起動されて、ログ採取部11は、入力された受信要求IDで指定された通信の終了を通信待ち部22で待ち合わせる(S21)。指定された通信が終了すると、ログ採取部11は受信要求記憶部16を検索して、受信要求IDが指定された受信要求IDと一致する行からログIDを取得する(S22)。
It is started when the
次いで、ログ採取部11はログ一時記憶部15を検索して、ログIDが前ステップで取得したログIDと一致する通信ログにアクセスして、終了フラグを1にセットし、通信待ち部22から得られた実行結果を格納する(S23)。受信の場合、ログ採取部11は、通信待ち部22から得られた受信データも当該通信ログに格納する。その後、ログ採取部11は、受信要求記憶部16からS22でアクセスした行のデータを削除して(S24)、処理を終了する。
Next, the
なお、ログ採取部11は非ブロッキング型通信の終了同期をとるインターフェースとして、終了待ち合わせ要求以外に終了確認要求をアプリケーション17に提供しても良い。終了確認を要求された場合、ログ採取部11はS21の代わりに、通信の終了をチェックして終了していればS22以降のステップを実行し、終了していなければその旨をアプリケーション17に報告すれば良い。
The
図7は、ログ保存部12の動作を表したフローチャートである。このフローチャートは、図5におけるS14の処理を詳しく説明したものである。
FIG. 7 is a flowchart showing the operation of the
ログ採取部11から起動されたログ保存部12は、実行中の通信が有り、かつ、終了フラグが1の通信ログがログ一時記憶部15に有る場合(S31でYES)、ログ一時記憶部15から終了フラグが1の通信ログを読み出してログ記憶部13に保存する(S32、S33)。すなわち、ログ保存部12は、終了フラグが1の通信ログを、ログ一時記憶部15からログ記憶部13に格納し直す。その後、ログ保存部12は、ログ記憶部13に保存し終えた通信ログをログ一時記憶部15から削除して(S34)、S31に戻る。
When the
ログ保存部12は、実行中の通信が無い、または、終了フラグが1の通信ログがログ一時記憶部15に無い場合(S31でNO)、処理を終了してログ採取部11を再開する。
If there is no running communication or there is no communication log with the
<効果>
本実施の形態にかかる通信ログ記録装置10は、通信ログを主記憶等のログ一時記憶部15にバッファリングしておき、後で当該通信ログをHDD等のログ記憶部13に格納し直す場合、格納し直しの為の入出力が他の処理に及ぼす影響を抑制できる。その理由は、ログ保存部12が通信の実行中に、ログ一時記憶部15に記憶されている通信ログをログ記憶部13に格納し直すからである。
<Effect>
When the communication
通信待ち時間を、通信ログのログ一時記憶部15からログ記憶部13への格納し直しに利用することで、通信ログ記録装置10は、非同期型入出力を用いることなく、また、計算に使用するCPU資源を減らすことなく、通信ログの移動に伴う実行時間の増大を低減できる。
By using the communication waiting time for re-storing the communication log from the log
図8は、タイムラインで通信終了直後に当該通信の通信ログを保存した場合(図中のA)と、本実施の形態にかかる通信ログ記録装置10の場合(図中のB)との実行時間の差を表している。本実施の形態にかかる通信ログ記録装置10は、例えば、通信aの通信ログの格納し直しを通信aの終了後に行うのではなく、次の通信bの実行中に並行して行うようにタイミングを変更している(図中の矢印)。これにより、通信ログ記録装置10は、通信aの通信ログの格納し直しを同期型の入出力で行った場合に発生するアプリケーション17の計算の遅延を防ぐ。また、通信ログ記録装置10は、通信aの通信ログの格納し直しを非同期型の入出力で行った場合に当該入出力が与える、アプリケーション17の計算への影響(コンテキスト変更のオーバヘッド等)を防ぐことが出来る。
FIG. 8 shows execution when the communication log of the communication is saved immediately after the end of the communication on the timeline (A in the figure) and in the case of the communication
<第二の実施形態>
<構成と動作>
本実施の形態の通信ログ記録装置10は、汎用OS(Operating System)を備え、複数のプロセスを並行して実行する。ログ採取部11、ログ保存部12、アプリケーション17、通信処理部21、および、通信待ち部22はプロセスにより起動される。本実施の形態の通信ログ記録装置10は、ログ記憶部13、通信カウンタ14、ログ一時記憶部15、及び、受信要求記憶部16をプロセスごとに備えている。但し、ログ記憶部13、及び、ログ一時記憶部15は、別のプロセスからもアクセス可能となっている。
<Second embodiment>
<Configuration and operation>
The communication
図9は、本実施の形態におけるログ一時記憶部15の構成を示す図である。各プロセスのログ一時記憶部15は、通信ログ記録装置10のプロセス間共用メモリ上に配置されている。プロセスごとのログ一時記憶部15は、第一の実施形態のものと同じである。
FIG. 9 is a diagram showing the configuration of the log
ログ採取部11は、プロセスごとに、起動されたプロセス(自プロセスともいう)の通信を反映した通信ログを、自プロセスに設けられたログ一時記憶部15に格納していく。ログ保存部12は、自プロセスに設けられたログ一時記憶部15の通信ログを、自プロセスに設けられたログ記憶部13に格納し直していく。但し、自プロセスに設けられたログ一時記憶部15に終了フラグが1の通信ログが存在しないと、自プロセス以外のプロセス(他プロセスともいう)に設けられたログ一時記憶部15の通信ログを、他プロセスに設けられたログ記憶部13に格納し直していく。
The
図10は、本実施の形態のログ保存部12の動作を表したフローチャートである。プロセスに起動されているログ採取部11から起動されるとログ保存部12は、先ず次プロセスが開始して、実行中、すなわちまだ終了していない通信が有るかをチェックし、無ければ(S41でNO)処理を終了する。
FIG. 10 is a flowchart showing the operation of the
実行中の通信が有れば(S41でYES)、ログ保存部12は、終了フラグが1の通信ログが自プロセスのログ一時記憶部15に有るかをチェックする。有れば(S42でYES)、ログ保存部12は自プロセスに設けられたログ一時記憶部15の通信ログを、自プロセスに設けられたログ記憶部13に格納し直して、当該通信ログをログ一時記憶部15から削除し(S43乃至S45)、S41に戻る。
If there is a communication being executed (YES in S41), the
無ければ(S42でNO)、ログ保存部12は、終了フラグが1の通信ログが他プロセスのログ一時記憶部15に有るかをチェックする。有れば(S46でYES)、ログ保存部12は当該他プロセスに設けられたログ一時記憶部15の通信ログを、当該他プロセスに設けられたログ記憶部13に格納し直して、当該通信ログをログ一時記憶部15から削除し(S47乃至S49)、S41に戻る。
If not (NO in S42), the
<効果>
本実施の形態の通信ログ記録装置10は、或るプロセスの通信待ち時間を、別のプロセスの通信ログのログ一時記憶部15からログ記憶部13への格納し直しに利用することで、前述した効果を奏することが出来る。その理由は、ログ保存部12が他プロセスに設けられたログ一時記憶部15の通信ログを、他プロセスに設けられたログ記憶部13に格納し直していくからである。
<Effect>
The communication
図11は、タイムラインで、本実施の形態にかかる通信ログ記録装置10の効果を表している。図中、プロセスAが実行した通信aの通信ログがログ一時記憶部15に取得され、後続する通信bで通信待ちが発生しないとする。この場合、第一の実施の形態の通信ログ記録装置10において、通信aの通信ログは、プロセスAのログ一時記憶部15に長時間放置されることになる。最悪の場合、プロセスAの終了処理でログ記憶部13に格納し直しが発生し、終了処理が遅延する。
FIG. 11 is a timeline showing the effect of the communication
本実施の形態の通信ログ記録装置10においては、プロセスAの通信aの通信ログは、他のプロセスBの通信dの通信待ち時間を利用して、プロセスAのログ一時記憶部15からログ記憶部13に格納し直される。これにより、上述の処理遅延が防止できる。
In the communication
<第三の実施形態>
受信データが非常に大きい場合、通信ログをログ一時記憶部15からログ記憶部13へ格納し直す時間が通信の実行時間よりも長くなる場合がある。この場合、超過時間分だけ、アプリケーション17の処理が遅延することになる。これを防止する為、本実施の形態の通信ログ記録装置10は、通信ログの格納し直しを通信ログ単位でなく、複数の区画に分割して実施する。
<Third embodiment>
When the received data is very large, the time for re-storing the communication log from the log
図12は、本実施の形態にかかる通信ログ記録装置10の構成を示す図である。本実施の形態にかかる通信ログ記録装置10は、第一の実施の形態の通信ログ記録装置10の構成に加え、保存情報記憶部18を備える。保存情報記憶部18は、所定サイズに分割したどの区画までが、ログ一時記憶部15からログ記憶部13に格納し直されたか、すなわち保存済みにされたかを示す保存情報を記憶する。
FIG. 12 is a diagram showing the configuration of the communication
通信ログのサイズが所定バイト数以上であることを検出すると、ログ保存部12は、通信ログを所定サイズの区画に分割し、通信の実行終了待ちが発生するたびに先頭から順次、1区画ずつをログ一時記憶部15からログ記憶部13へ格納し直していく。その過程でログ保存部12は、通信ログのどの区画までを格納し直したか、すなわち保存済みにしたかを保存情報記憶部18に記録しておく。ログ保存部12は通信の実行終了待ちが発生するたびに、保存情報記憶部18が示す次の区画をログ一時記憶部15からログ記憶部13へ格納し直す。ログ保存部12はこの動作を全区画の格納し直しが終了する迄繰り返し、終了した後ログ一時記憶部15から当該通信ログを削除する。
When it detects that the size of the communication log is equal to or larger than the predetermined number of bytes, the
<第四の実施形態>
図13は、本実施の形態にかかる通信ログ記録装置10の構成を示す図である。本実施の形態にかかる通信ログ記録装置10は、ログ記憶部13と、ログ記憶部13より高速なログ一時記憶部15と、ログ採取部11と、ログ保存部12と、を備える。
<Fourth Embodiment>
FIG. 13 is a diagram showing the configuration of the communication
ログ採取部11は、受信要求を受け付けると、受信要求の発行順を示すログIDの生成と受信の開始を行い、受信の終了時にログIDと読み込んだ受信データとを含むログ情報をログ一時記憶部15に格納する。ログ保存部12は、要求された送信または受信が開始された後、ログ一時記憶部15内に格納されているログ情報をログ記憶部13に格納し直す。
When the
本実施の形態にかかる通信ログ記録装置10は、通信ログを主記憶等のログ一時記憶部15にバッファリングしておき、後で当該通信ログをHDD等のログ記憶部13に格納し直す場合、格納し直しの為の入出力が他の処理に及ぼす影響を抑制できる。その理由は、ログ保存部12が通信の実行中に、ログ一時記憶部15に記憶されている通信ログをログ記憶部13に格納し直すからである。
When the communication
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments. Various modifications that can be understood by those skilled in the art can be made to the structure and details of the present invention within the scope of the present invention.
10 通信ログ記録装置
11 ログ採取部
12 ログ保存部
13 ログ記憶部
14 通信カウンタ
15 ログ一時記憶部
16 受信要求記憶部
17 アプリケーション
18 保存情報記憶部
21 通信処理部
22 通信待ち部
60 コンピュータ装置
61 プロセッサ
62 外部記憶装置
63 主記憶装置
64 バス
65 通信ログ記録プログラム
10 Communication
Claims (10)
前記ログ記憶手段より高速なログ一時記憶手段と、
受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取手段と、
要求された送信または前記受信が開始された後、実行中の通信が有り、かつ、前記ログ一時記憶手段内に通信が終了した通信ログが有る場合に、前記通信が終了した通信ログの前記ログ情報を前記ログ記憶手段に格納し直すログ保存手段と、を備える通信ログ記録装置。 Log storage means and
A log temporary storage means faster than the log storage means,
When the reception request is received, a log ID indicating the issuing order of the reception request is generated and reception is started, and at the end of the reception, the log information including the log ID and the read reception data is stored in the log temporary storage means. Log collection means to store and
If there is communication in progress after the requested transmission or reception is started, and there is a communication log for which communication has ended in the log temporary storage means, the log of the communication log for which communication has ended. A communication log recording device including a log storage means for re-storing information in the log storage means.
前記ログ記憶手段より高速なログ一時記憶手段と、
受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取手段と、
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報を前記ログ記憶手段に格納し直すログ保存手段と、を備え、
前記ログ採取手段は、同期型の前記受信要求を受け付けると、前記ログIDの生成と前記受信の開始を行い、前記受信の終了待ち合わせ後に、生成した前記ログIDと前記受信データを含む前記ログ情報を前記ログ一時記憶手段に格納する
通信ログ記録装置。 Log storage means and
A log temporary storage means faster than the log storage means,
When the reception request is received, a log ID indicating the issuing order of the reception request is generated and reception is started, and at the end of the reception, the log information including the log ID and the read reception data is stored in the log temporary storage means. Log collection means to store and
A log storage means for re-storing the log information stored in the log temporary storage means in the log storage means after the requested transmission or reception is started is provided.
When the log collecting means receives the synchronous reception request, the log ID is generated and the reception is started, and after waiting for the end of the reception, the log information including the generated log ID and the reception data is included. Is stored in the log temporary storage means.
Communication log recording device.
前記ログ記憶手段より高速なログ一時記憶手段と、
受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取手段と、
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報を前記ログ記憶手段に格納し直すログ保存手段と、
実行中である非同期型の前記受信要求を識別する受信要求IDと、前記ログIDを関連付けて格納する受信要求記憶手段とを備え、
前記ログ採取手段は、1)前記非同期型の前記受信要求を受け付けると、前記ログIDの生成と前記受信要求IDの取得を行って両者を関連付けて前記受信要求記憶手段に格納する処理と、前記受信を開始する処理とを実行した後、前記受信要求を発行したアプリケーションの実行を再開させ、2)前記受信の終了時に、終了した前記受信の前記受信要求IDに関連付けられて前記受信要求記憶手段に格納されている前記ログIDと、前記受信データを含む前記ログ情報を前記ログ一時記憶手段に格納する
通信ログ記録装置。 Log storage means and
A log temporary storage means faster than the log storage means,
When the reception request is received, a log ID indicating the issuing order of the reception request is generated and reception is started, and at the end of the reception, the log information including the log ID and the read reception data is stored in the log temporary storage means. Log collection means to store and
After the requested transmission or reception is started, the log storage means for re-storing the log information stored in the log temporary storage means in the log storage means, and a log storage means.
It is provided with a reception request ID for identifying the asynchronous type reception request being executed and a reception request storage means for storing the log ID in association with each other.
The log collecting means 1) receives the asynchronous reception request, generates the log ID, acquires the reception request ID, associates the two, and stores the log ID in the reception request storage means. After executing the process of starting reception, the execution of the application that issued the reception request is restarted. 2) At the end of the reception, the reception request storage means associated with the reception request ID of the completed reception. The log ID stored in the log ID and the log information including the received data are stored in the log temporary storage means.
Communication log recording device.
前記ログ採取手段は各々の前記プロセスにより起動されて、前記ログ情報を、起動されている前記プロセスに設けられている前記ログ一時記憶手段に格納し、
前記ログ保存手段は各々の前記プロセスにより実行されて、起動されている前記プロセスとは別の前記プロセスに設けられている前記ログ一時記憶手段内に格納されている前記ログ情報を、前記別の前記プロセスに設けられている前記ログ記憶手段に格納し直す、請求項1乃至請求項3の何れか一項の通信ログ記録装置。 The log storage means and the log temporary storage means are provided for each process executed by the communication log recording device.
The log collecting means is started by each of the processes, and the log information is stored in the log temporary storage means provided in the started process.
The log storage means is executed by each of the processes, and the log information stored in the log temporary storage means provided in the process different from the started process can be used as another log information. The communication log recording device according to any one of claims 1 to 3, which is re-stored in the log storage means provided in the process.
前記ログ保存手段は、前記保存情報が示す次の前記区画を前記ログ一時記憶手段から前記ログ記憶手段に格納し直し、前記保存情報に当該区画を保存済みとして記録する、請求項1乃至請求項4の何れか一項の通信ログ記録装置。 A storage information storage means for storing storage information indicating which section of the log information is divided into predetermined sizes is stored in the log storage means.
Claims 1 to claim 1, wherein the log storage means re-stores the next section indicated by the save information from the log temporary storage means into the log storage means, and records the section in the save information as saved. Communication log recording device according to any one of 4.
要求された送信または前記受信が開始された後、実行中の通信が有り、かつ、前記ログ一時記憶手段内に通信が終了した通信ログが有る場合に、前記通信が終了した通信ログの前記ログ情報を、ログ記憶手段に格納し直す、通信ログ記録方法。 When a reception request is received, a log ID indicating the issuing order of the reception request is generated and reception is started, and at the end of the reception, log information including the log ID and the read reception data is faster than the log storage means. Store in log temporary storage means,
If there is communication in progress after the requested transmission or reception is started, and there is a communication log for which communication has ended in the log temporary storage means, the log of the communication log for which communication has ended. A communication log recording method that stores information back in the log storage means.
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内の前記ログ情報を、ログ記憶手段に格納し直す、通信ログ記録方法。 When a synchronous reception request is received , a log ID indicating the issuance order of the reception request is generated and reception is started, and after waiting for the end of the reception, the generated log ID and the read reception data are combined. The log information including is stored in the log temporary storage means, which is faster than the log storage means .
A communication log recording method for re-storing the log information in the log temporary storage means in the log storage means after the requested transmission or reception is started .
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内の前記ログ情報を、ログ記憶手段に格納し直す、通信ログ記録方法。 When an asynchronous reception request is received, a log ID indicating the order in which the reception request is issued is generated and reception is started. 1 ) The log ID is generated and the running asynchronous reception request is identified. After executing the process of acquiring the reception request ID and storing the two in association with each other in the reception request storage means and the process of starting the reception, the execution of the application that issued the reception request is restarted. 2) The above. At the end of reception, the log ID stored in the reception request storage means associated with the reception request ID of the completed reception and the log information including the read reception data are stored in the log temporary storage means. Store in
A communication log recording method for re-storing the log information in the log temporary storage means in the log storage means after the requested transmission or reception is started .
受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取処理と、
要求された送信または前記受信が開始された後、実行中の通信が有り、かつ、前記ログ一時記憶手段内に通信が終了した通信ログが有る場合に、前記通信が終了した通信ログの前記ログ情報を前記ログ記憶手段に格納し直すログ保存処理と、を実行させる通信ログ記録プログラム。 A computer provided with a log storage means and a log temporary storage means faster than the log storage means.
When the reception request is received, a log ID indicating the issuing order of the reception request is generated and reception is started, and at the end of the reception, the log information including the log ID and the read reception data is stored in the log temporary storage means. Log collection processing to be stored and
If there is communication in progress after the requested transmission or reception is started, and there is a communication log whose communication has ended in the log temporary storage means, the log of the communication log whose communication has ended. A communication log recording program that executes a log storage process that stores information back in the log storage means.
同期型の受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了待ち合わせ後に、生成した前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取処理と、
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報を前記ログ記憶手段に格納し直すログ保存処理と、を実行させる、通信ログ記録プログラム。 A computer provided with a log storage means and a log temporary storage means faster than the log storage means.
When a synchronous reception request is received, a log ID indicating the issuance order of the reception request is generated and reception is started, and after waiting for the end of the reception, the generated log ID and the read reception data are combined. Log collection processing to store the included log information in the log temporary storage means ,
After the requested transmission or reception is started , the communication log recording for executing the log storage process of re-storing the log information stored in the log temporary storage means in the log storage means. program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018007465A JP7073737B2 (en) | 2018-01-19 | 2018-01-19 | Communication log recording device, communication log recording method, and communication log recording program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018007465A JP7073737B2 (en) | 2018-01-19 | 2018-01-19 | Communication log recording device, communication log recording method, and communication log recording program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019125321A JP2019125321A (en) | 2019-07-25 |
JP7073737B2 true JP7073737B2 (en) | 2022-05-24 |
Family
ID=67398901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018007465A Active JP7073737B2 (en) | 2018-01-19 | 2018-01-19 | Communication log recording device, communication log recording method, and communication log recording program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7073737B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143304B (en) * | 2019-11-20 | 2023-09-29 | 杭州端点网络科技有限公司 | Micro-service system exception log analysis method based on request link |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002140211A (en) | 2000-11-02 | 2002-05-17 | Ricoh Co Ltd | Information processor and its inter-process communication history acquiring method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3116443B2 (en) * | 1991-08-30 | 2000-12-11 | ソニー株式会社 | Socket communication log storage device |
-
2018
- 2018-01-19 JP JP2018007465A patent/JP7073737B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002140211A (en) | 2000-11-02 | 2002-05-17 | Ricoh Co Ltd | Information processor and its inter-process communication history acquiring method |
Non-Patent Citations (1)
Title |
---|
川島 英之,非同期的ログバッファ転送機構によるリモートロギングの効率的実行,DEWS2006論文集 [online],電子情報通信学会データ工学研究専門委員会,2006年06月30日 |
Also Published As
Publication number | Publication date |
---|---|
JP2019125321A (en) | 2019-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019141186A1 (en) | Data processing method and device | |
CN110555001B (en) | Data processing method, device, terminal and medium | |
JPH076099A (en) | System and method for duplexing of remote data | |
JPH1091357A (en) | Data storage device and method therefor | |
JPH07219844A (en) | Apparatus and method for cache line replacing | |
JP2010015610A (en) | Information processing apparatus, control method thereof, and program | |
CN102521279A (en) | Playing method, playing system and player of streaming media files | |
CN115599747B (en) | Metadata synchronization method, system and equipment of distributed storage system | |
WO2019109299A1 (en) | Memory access technique and computer system | |
JP3877519B2 (en) | System recovery method, computer system for implementing the method, and recording medium recording the processing program | |
EP1094392A1 (en) | Method and apparatus for interfacing with a secondary storage system | |
WO2023015866A1 (en) | Data writing method, apparatus and system, and electronic device and storage medium | |
JP2009032053A (en) | Data reception system | |
EP3035215A1 (en) | File system, control method for file system, and control program for file system | |
JP7073737B2 (en) | Communication log recording device, communication log recording method, and communication log recording program | |
JP2015158910A (en) | Memory subsystem with wrapped-to-continuous read | |
CN110413689B (en) | Multi-node data synchronization method and device for memory database | |
KR102262209B1 (en) | Method and apparatus for sending barrier command using dummy io request | |
WO2022033269A1 (en) | Data processing method, device and system | |
JP2005234794A (en) | File system controller | |
JP3781007B2 (en) | Data transfer method between computers | |
JP3477056B2 (en) | Data transfer device | |
CN112559457A (en) | Data access method and device | |
JP2000163294A (en) | Method and device for managing database and machine- readable recording medium with program recorded thereon | |
JP7456601B2 (en) | Information processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201215 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20211020 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211222 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220118 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220318 |
|
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: 20220412 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220425 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7073737 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |