JP2019125321A - Communication log recording apparatus, communication log recording method, and communication log recording program - Google Patents
Communication log recording apparatus, communication log recording method, and communication log recording program Download PDFInfo
- Publication number
- JP2019125321A JP2019125321A JP2018007465A JP2018007465A JP2019125321A JP 2019125321 A JP2019125321 A JP 2019125321A JP 2018007465 A JP2018007465 A JP 2018007465A JP 2018007465 A JP2018007465 A JP 2018007465A JP 2019125321 A JP2019125321 A JP 2019125321A
- Authority
- JP
- Japan
- Prior art keywords
- log
- communication
- reception
- storage means
- storage unit
- 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.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、通信ログ記録装置、通信ログ記録方法、および、通信ログ記録プログラム、特に、アプリケーションが発行した受信要求の順序と受信データを含む通信ログを効率的に記録する装置等に関する。 The present invention relates to a communication log recording apparatus, a communication log recording method, and a communication log recording program, and more particularly to an apparatus for efficiently recording a communication log including an order of reception requests issued by an application and reception data.
アプリケーションが発行した受信要求の順序と受信データを含む通信ログは、有用なデータであり、例えば、データ記録型再演法での利用に適している。 The communication log including 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 record replay method.
プログラムのデバッグは問題の状態を再現する必要がある。プロセス間で通信して処理を進めるプログラム、例えばメッセージパッシング型・分散並列プログラムは、プロセス間で通信して処理を進めるため、状態の再現に通信結果が必要となる。この問題の解決法の一つに、データ記録型再演法がある(非特許文献1)。これは、デバッグ対象プロセスが行った通信結果を記録し、デバッグ実行(再演)時は、通信の代わりに以前に記録した通信結果を参照する。これにより、実際の通信が不要となり、デバッグ対象プロセスのみの実行でデバッグが可能となる。 Program debugging needs to reproduce the state of the problem. A program that communicates between processes to proceed with processing, such as a message passing type / distributed parallel program, communicates between processes to proceed with processing, and therefore communication results are 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 result of communication performed by the process to be debugged, and at the time of debugging (replay), refers to the previously recorded communication result instead of communication. As a result, actual communication is not necessary, and debugging can be performed only by the process to be debugged.
特許文献1は、並列プログラムの実行再現方法を開示する。この方法は、モニタモードで実行中の並列プログラムが主記憶上の共有データにアクセスした記録を、主記憶上におかれたシステム履歴テープに書き込む。この方法は、再演モードにおいて、システム履歴テープに書き込まれている記録を用いて、並列プログラムの実行を再現する。
特許文献2は、連続性があるとみなされた通信ログを一次保存領域にバッファリングしておき、バッファリング期間が満了すると、一次保存領域に保存されていた通信ログを二次保存領域に保存する情報処理装置を開示する。
データ受信を伴うプログラムのデータ記録型再演法に用いられるような通信ログは、受信データを含むため、データ量が多いという特徴がある。このような多くの通信ログを、特許文献1が開示するように主記憶上に置いておくことは出来ない。揮発性が問題となる場合もある。
The communication log used in the data recording type re-execution method of the program accompanied with data reception is characterized in that the amount of data is large since it includes the received data. Such many communication logs can not be kept on the main memory as disclosed in
一方、特許文献2が開示するように、通信ログを主記憶等の一次保存領域にバッファリングしておき、後で、当該通信ログをハードディスク等の二次保存領域に格納し直す場合は、この為の入出力が他の処理に悪影響を及ぼす可能性がある。すなわち他の処理が通信ログの入出力終了を待ち合わせる場合、この入出力は、当該他の処理の実行を遅延させる。非同期型入出力等により通信ログの入出力と当該他の処理を例列して実行した場合でも、この入出力は当該他の処理環境に以下のような悪影響を与える。
On the other hand, as disclosed in
問題(a) 再演されるプログラムが非同期型入出力を使用しない場合でも、DMA(Direct Memory Access)エンジンなどの特別なハードウェアが必要となる。 Problem (a) Even if the program to be reproduced does not use asynchronous I / O, special hardware such as a DMA (Direct Memory Access) engine is required.
問題(b) 非同期型入出力処理のプロセス・スレッドの為の仕組みと資源が必要となる。 Problem (b) A mechanism and resources for process threads of asynchronous I / O processing are required.
問題(c) 非同期型入出力処理のため、プログラムで利用できるCPU(Central Processing Unit)コアが減少する。
問題(d) 非同期型入出力処理のプロセス・スレッドとプログラムがCPUコアを共用する場合、コンテキストスイッチのオーバヘッドがかかる。また、計算中のプログラムと非同期型入出力処理が切り替わる場合、計算のCPUコア使用率が低下する
本発明は、通信ログを主記憶等にバッファリングしておき、後で当該通信ログをハードディスク等に格納し直す場合に、格納し直し時の入出力が他の処理に及ぼす影響を抑制できる通信ログ記録装置等を提供することを目的とする。
Problem (c) A central processing unit (CPU) core available to a program is reduced because of asynchronous input / output processing.
Problem (d) If the process thread of asynchronous I / O processing and the program share the CPU core, context switch overhead is incurred. In addition, when the program being calculated and asynchronous input / output processing are switched, the CPU core utilization of the calculation decreases. The present invention buffers the communication log in the main storage etc. It is an object of the present invention to provide a communication log recording device and the like which can suppress the influence of input / output at the time of storing again on other processing when storing the data in the memory.
本発明の一つの実施の形態の通信ログ記録装置は、ログ記憶手段と、前記ログ記憶手段より高速なログ一時記憶手段と、受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取手段と、要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直すログ保存手段と、を備える。 A communication log recording device according to one embodiment of the present invention is a log storage means, a log temporary storage means faster than the log storage means, and a log ID indicating the issuance order of the reception request when receiving the reception request. Log collection means for starting generation and reception and storing log information including the log ID and the received data read at the end of the reception in the temporary log storage means; requested transmission or the reception is started And log storage means for storing again the log information stored in the temporary log storage means in the log storage means.
本発明の一つの実施の形態の通信ログ記録方法は、受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報をログ記憶手段より高速なログ一時記憶手段に格納し、要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直す。 In the communication log recording method according to one embodiment of the present invention, when a reception request is received, generation and reception of a log ID indicating an issuance order of the reception request is performed, and reading of the log ID is performed at the end of the reception. The log information including the received data and the log information stored in the temporary log storage means faster than the log storage means, and after the requested transmission or the reception is started, the log information stored in the temporary log storage means Are stored in the log storage means.
本発明の一つの実施の形態の通信ログ記録プログラムは、ログ記憶手段と、前記ログ記憶手段より高速なログ一時記憶手段と、を備えるコンピュータに、受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取処理と、要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直すログ保存処理と、を実行させる。 A communication log recording program according to one embodiment of the present invention receives a reception request from a computer including a log storage unit and a log temporary storage unit faster than the log storage unit, in the order of issuance of the reception request. A log collection process for storing log information including the log ID and the received data read at the end of the reception in the log temporary storage means, and generation of the log ID indicating the start and reception of the requested log or After the reception is started, a log storage process is performed to store the log information stored in the temporary log storage means in the log storage means.
本発明にかかる通信ログ記録装置等は、通信ログを主記憶等にバッファリングしておき、後で当該通信ログをハードディスク等に格納し直す場合に、格納し直しの為の入出力が、他の処理に及ぼす影響を抑制できる。 In the communication log recording apparatus and the like according to the present invention, when the communication log is buffered in the main storage etc. and the communication log is later stored in the hard disk etc., the input / output for re-storage is other Influence on the treatment 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を備えている。この主体は、プログラムであっても良いし、画像処理プロセッサのようなハードウェアであっても良い。
<Configuration>
FIG. 1 is a diagram showing the configuration of the 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 the data structure of the log
ログIDは、アプリケーション17が要求した通信の順番を表す。ログIDは、他の情報、例えば、アプリケーション17の識別子やプロセスの識別子を含んでいても良い。受信データは、当該要求で受信したデータの内容を表す。ログIDは、例えば、アプリケーション17の再演時に、通信要求に対して正しい受信データを出力する為に使うことが出来る。すなわち、再演を実行するシステムは、n(nは整数)番目に発行された通信要求が受信要求である場合、n番目を示すログIDを持つ通信ログの受信データを、アプリケーション17に出力すれば良い。
The log ID indicates 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. Note that synchronous input / output / asynchronous input / output may be referred to as blocking / non-blocking. The execution result indicates whether the communication has ended normally.
終了フラグはログ一時記憶部15内の通信ログだけが有し、通信要求の受信/送信が終了したか否かを示す。なお、終了フラグは初期値が0で通信実行中を示し、通信が終了すると1になる。ログ保存部12は、受信/送信が終了している通信要求の通信ログを、ログ一時記憶部15からログ記憶部13に格納し直す。ログ保存部12は、通信ログをログ一時記憶部15からログ記憶部13に格納し直すとき、終了フラグを取り除く。
The end flag has only the communication log in the temporary
なお、再演時等に不要であれば、通信ログは、通信手続、または実行結果を包含しなくても良い。例えば、通信結果は常に正常であるとして、再演が実施される場合である。また、再演時に送信結果を気にしない、例えば、常に正常終了として再演するのであれば、通信ログは受信についてだけ取得しても良い。 Note that the communication log may not include the communication procedure or the execution result if it is not necessary at the time of replaying or the like. For example, when the communication result is always normal, a replay is performed. In addition, the communication log may be acquired only for the reception if the reproduction result is not considered at the time of the re-execution, for example, if the reproduction is always performed normally.
図3は、受信要求記憶部16に格納されるテーブルのデータ構造を示す図である。このテーブルは、実行中の非ブロッキング型の通信要求について、受信要求IDとログIDの関連付けを記憶する。受信要求IDは、アプリケーション17が発した通信要求の識別子である。受信要求IDは、実行中の非ブロッキング型の通信を識別できる情報であれば何でもよい。受信要求IDは、例えば実行中の非ブロッキング型通信を管理する為の制御情報格変数のアドレスや配列要素の添え字変数値である。
FIG. 3 is a view 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が行う処理を実行する。
The
主記憶装置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は、この動作フローチャートであり、後述する。
Thereafter, 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 type communication (NO in S15, YES in S16), the
開始した通信がその他、例えば送信で場合(S15でNO、S16でNO)、ログ採取部11は処理を了する。
If the communication started is, for example, transmission (NO in S15, NO in S16), the
図6は、非ブロッキング型通信の終了待ち合わせ要求を受けたときのログ採取部11の動作を表したフローチャートである。
FIG. 6 is a flow chart showing the operation of the
アプリケーション17が非ブロッキング型通信の終了待ち合わせ要求を要求したときに起動されて、ログ採取部11は、入力された受信要求IDで指定された通信の終了を通信待ち部22で待ち合わせる(S21)。指定された通信が終了すると、ログ採取部11は受信要求記憶部16を検索して、受信要求IDが指定された受信要求IDと一致する行からログIDを取得する(S22)。
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に戻る。
The
ログ保存部12は、実行中の通信が無い、または、終了フラグが1の通信ログがログ一時記憶部15に無い場合(S31でNO)、処理を終了してログ採取部11を再開する。
If there is no communication in progress or there is no communication log with an end flag of 1 in the log temporary storage unit 15 (NO in S31), the
<効果>
本実施の形態にかかる通信ログ記録装置10は、通信ログを主記憶等のログ一時記憶部15にバッファリングしておき、後で当該通信ログをHDD等のログ記憶部13に格納し直す場合、格納し直しの為の入出力が他の処理に及ぼす影響を抑制できる。その理由は、ログ保存部12が通信の実行中に、ログ一時記憶部15に記憶されている通信ログをログ記憶部13に格納し直すからである。
<Effect>
The communication
通信待ち時間を、通信ログのログ一時記憶部15からログ記憶部13への格納し直しに利用することで、通信ログ記録装置10は、非同期型入出力を用いることなく、また、計算に使用するCPU資源を減らすことなく、通信ログの移動に伴う実行時間の増大を低減できる。
By using the communication waiting time for storing the communication log from the log
図8は、タイムラインで通信終了直後に当該通信の通信ログを保存した場合(図中のA)と、本実施の形態にかかる通信ログ記録装置10の場合(図中のB)との実行時間の差を表している。本実施の形態にかかる通信ログ記録装置10は、例えば、通信aの通信ログの格納し直しを通信aの終了後に行うのではなく、次の通信bの実行中に並行して行うようにタイミングを変更している(図中の矢印)。これにより、通信ログ記録装置10は、通信aの通信ログの格納し直しを同期型の入出力で行った場合に発生するアプリケーション17の計算の遅延を防ぐ。また、通信ログ記録装置10は、通信aの通信ログの格納し直しを非同期型の入出力で行った場合に当該入出力が与える、アプリケーション17の計算への影響(コンテキスト変更のオーバヘッド等)を防ぐことが出来る。
FIG. 8 shows the execution of the case where the communication log of the communication is saved immediately after the end of communication in 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 temporary
ログ採取部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 in progress (YES in S41), the
無ければ(S42でNO)、ログ保存部12は、終了フラグが1の通信ログが他プロセスのログ一時記憶部15に有るかをチェックする。有れば(S46でYES)、ログ保存部12は当該他プロセスに設けられたログ一時記憶部15の通信ログを、当該他プロセスに設けられたログ記憶部13に格納し直して、当該通信ログをログ一時記憶部15から削除し(S47乃至S49)、S41に戻る。
If not (NO at 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 shows 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 to store 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 detecting that the size of the communication log is equal to or more 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 receiving the reception request, the
本実施の形態にかかる通信ログ記録装置10は、通信ログを主記憶等のログ一時記憶部15にバッファリングしておき、後で当該通信ログをHDD等のログ記憶部13に格納し直す場合、格納し直しの為の入出力が他の処理に及ぼす影響を抑制できる。その理由は、ログ保存部12が通信の実行中に、ログ一時記憶部15に記憶されている通信ログをログ記憶部13に格納し直すからである。
The communication
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 As mentioned above, although this invention was demonstrated with reference to embodiment, this invention is not limited to the said embodiment. Various modifications that can be understood by those skilled in the art can be made to the configuration 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 通信ログ記録プログラム
DESCRIPTION OF
Claims (10)
前記ログ記憶手段より高速なログ一時記憶手段と、
受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取手段と、
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直すログ保存手段と、を備える通信ログ記録装置。 Log storage means,
Temporary log storage means faster than the log storage means;
When the reception request is received, generation of the log ID indicating the issuance order of the reception request and start of reception are performed, and log information including the log ID and the received data read at the end of the reception is stored in the temporary log storage unit Log collection means to be stored;
A communication log recording device, comprising: log storage means for storing the log information stored in the temporary log storage means back into the log storage means after the requested transmission or the reception is started.
前記ログ採取手段は、1)前記非同期型の前記受信要求を受け付けると、前記ログIDの生成と前記受信要求IDの取得を行って両者を関連付けて前記受信要求記憶手段に格納する処理と、前記受信を開始する処理とを実行した後、前記受信要求を発行したアプリケーションの実行を再開させ、2)前記受信の終了時に、終了した前記受信の前記受信要求IDに関連付けられて前記受信要求記憶手段に格納されている前記ログIDと、前記受信データを含む前記ログ情報を前記ログ一時記憶手段に格納する請求項1の通信ログ記録装置。 It further comprises reception request storage means for storing the reception request ID identifying the asynchronous reception request being executed and the log ID in association with each other.
The log collection means 1) processing of generating the log ID and acquiring the reception request ID upon reception of the asynchronous reception request, associating the both with each other, and storing them in the reception request storage means; After executing the process of starting the reception, the execution of the application that issued the reception request is resumed, and 2) the reception request storage means is associated with the reception request ID of the reception that is ended when the reception is ended. The communication log recording apparatus according to claim 1, wherein the log ID stored in and the log information including the received data are stored in the temporary log storage unit.
前記ログ採取手段は各々の前記プロセスにより起動されて、前記ログ情報を、起動されている前記プロセスに設けられている前記ログ一時記憶手段に格納し、
前記ログ保存手段は各々の前記プロセスにより実行されて、起動されている前記プロセスとは別の前記プロセスに設けられている前記ログ一時記憶手段内に格納されている前記ログ情報を、前記別の前記プロセスに設けられている前記ログ記憶手段に格納し直す、請求項1乃至請求項3の何れか一項の通信ログ記録装置。 The log storage unit and the temporary log storage unit are provided for each process executed by the communication log recording device.
The log collecting means is activated by each of the processes, and stores the log information in the temporary log storage means provided in the activated process.
The log storage means is executed by each of the processes, and the log information stored in the temporary log storage means provided in the process other than the process being started is The communication log recording device according to any one of claims 1 to 3, wherein the log storage means provided in the process is stored again.
前記ログ保存手段は、前記保存情報が示す次の前記区画を前記ログ一時記憶手段から前記ログ記憶手段に格納し直し、前記保存情報に当該区画を保存済みとして記録する、請求項1乃至請求項4の何れか一項の通信ログ記録装置。 Storage information storage means for storing storage information indicating to which section the log information is divided into predetermined sizes is stored in the log storage means;
The log storage means stores again the next section indicated by the storage information from the log temporary storage means into the log storage means, and records the section as saved in the storage information. The communication log recording device of any one of 4.
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内の前記ログ情報を、ログ記憶手段に格納し直す、通信ログ記録方法。 When a reception request is received, generation and reception of a log ID indicating the issuance order of the reception request are started, and log information including the log ID and the received data read at the end of the reception is faster than the log storage means Store in temporary log storage means,
A communication log recording method, wherein the log information in the temporary log storage means is stored again in the log storage means after the requested transmission or the reception is started.
受信要求を受け付けると、前記受信要求の発行順を示すログIDの生成と受信の開始を行い、前記受信の終了時に前記ログIDと読み込んだ受信データとを含むログ情報を前記ログ一時記憶手段に格納するログ採取処理と、
要求された送信または前記受信が開始された後、前記ログ一時記憶手段内に格納されている前記ログ情報をログ記憶手段に格納し直すログ保存処理と、を実行させる通信ログ記録プログラム。 A computer comprising: log storage means; and temporary log storage means faster than said log storage means;
When the reception request is received, generation of the log ID indicating the issuance order of the reception request and start of reception are performed, and log information including the log ID and the received data read at the end of the reception is stored in the temporary log storage unit Log collection processing to be stored,
A communication log recording program for executing a log storage process of storing the log information stored in the temporary log storage means back into the log storage means after the requested transmission or the reception is started.
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 true JP2019125321A (en) | 2019-07-25 |
JP7073737B2 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143304A (en) * | 2019-11-20 | 2020-05-12 | 杭州端点网络科技有限公司 | Micro-service system abnormal log analysis method based on request link |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0561732A (en) * | 1991-08-30 | 1993-03-12 | Sony Corp | Socket communication log storage device |
JP2002140211A (en) * | 2000-11-02 | 2002-05-17 | Ricoh Co Ltd | Information processor and its inter-process communication history acquiring method |
-
2018
- 2018-01-19 JP JP2018007465A patent/JP7073737B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0561732A (en) * | 1991-08-30 | 1993-03-12 | Sony Corp | Socket communication log storage device |
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], JPN6022001179, 30 June 2006 (2006-06-30), ISSN: 0004683900 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143304A (en) * | 2019-11-20 | 2020-05-12 | 杭州端点网络科技有限公司 | Micro-service system abnormal log analysis method based on request link |
CN111143304B (en) * | 2019-11-20 | 2023-09-29 | 杭州端点网络科技有限公司 | Micro-service system exception log analysis method based on request link |
Also Published As
Publication number | Publication date |
---|---|
JP7073737B2 (en) | 2022-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2643651C2 (en) | System and method for calculation of the digest of messages | |
US20140013068A1 (en) | Information processing apparatus, storage system, and write control method | |
US9229970B2 (en) | Methods to minimize communication in a cluster database system | |
JP2017157152A (en) | Storage control apparatus, storage system, storage control method, and program | |
WO2016155238A1 (en) | File reading method in distributed storage system, and server end | |
CN102521279A (en) | Playing method, playing system and player of streaming media files | |
JP3877519B2 (en) | System recovery method, computer system for implementing the method, and recording medium recording the processing program | |
WO2023015866A1 (en) | Data writing method, apparatus and system, and electronic device and storage medium | |
CN103516549A (en) | File system metadata log mechanism based on shared object storage | |
EP3035215A1 (en) | File system, control method for file system, and control program for file system | |
CN110895545B (en) | Shared data synchronization method and device | |
JP7073737B2 (en) | Communication log recording device, communication log recording method, and communication log recording program | |
JP2015158910A (en) | Memory subsystem with wrapped-to-continuous read | |
CN111984198B (en) | Message queue implementation method and device and electronic equipment | |
CN113051221A (en) | Data storage method, device, medium, equipment and distributed file system | |
CN108304144B (en) | Data writing-in and reading method and system, and data reading-writing system | |
WO2022033269A1 (en) | Data processing method, device and system | |
JP2005234794A (en) | File system controller | |
JP2003296156A (en) | Information recording management device, data recording and regenerating device, information recording management method and file management method | |
JP2010176512A (en) | Storage device, storage device control method, and storage device control program | |
CN116431395B (en) | Cache dynamic balance method, system and storage medium based on volume real-time backup | |
JP2008009506A (en) | Information processor and its file access method | |
CN111858516B (en) | Data processing method and device | |
JP2000163294A (en) | Method and device for managing database and machine- readable recording medium with program recorded thereon | |
US11620082B2 (en) | Data retrieval method and apparatus |
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 |