JP2018028738A - Communication control program, communication control device, and communication control method - Google Patents
Communication control program, communication control device, and communication control method Download PDFInfo
- Publication number
- JP2018028738A JP2018028738A JP2016159383A JP2016159383A JP2018028738A JP 2018028738 A JP2018028738 A JP 2018028738A JP 2016159383 A JP2016159383 A JP 2016159383A JP 2016159383 A JP2016159383 A JP 2016159383A JP 2018028738 A JP2018028738 A JP 2018028738A
- Authority
- JP
- Japan
- Prior art keywords
- log
- load
- communication control
- message
- output
- 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
Abstract
Description
本発明は、ログ出力を制御する通信制御プログラムに関する。 The present invention relates to a communication control program for controlling log output.
システムを運用する上で、ログはシステムにおいて何が起きたかを把握するために重要な役割を果たす。例えば、ログはプログラム動作中の状態監視や異常発生時の検知及び原因の調査に用いられる。その他に、業務の証跡として所定期間保存し、各種監査などのためにも用いられる。 In operating the system, the log plays an important role in grasping what happened in the system. For example, the log is used for status monitoring during program operation, detection when an abnormality occurs, and investigation of the cause. In addition, it is stored for a predetermined period as a business trail and used for various audits.
従来のログ出力の仕組みの一例は以下のようである。プログラム実行中にログ出力処理が呼び出されると、プログラムにあらかじめ埋め込まれたメッセージIDをキーとして、ログメッセージ定義ファイルを検索してログメッセージを取得する。定型化したログメッセージのみでは原因の調査ができないため、引数や変数の値など、そのタイミングでなければ取得できない情報を動的にログメッセージに埋め込み、編集してログファイルに出力する。すなわち、ログメッセージの出力までには、ログメッセージの取得処理、埋め込む情報の取得処理、ログメッセージの編集処理、ログメッセージの出力処理の一連の処理が行われる。ログメッセージを出力する技術が、例えば下記の特許文献1に開示されている。
An example of a conventional log output mechanism is as follows. When the log output process is called during the execution of the program, the log message definition file is searched using the message ID embedded in the program as a key to obtain the log message. Because the cause cannot be investigated only with the stylized log message, information that can only be acquired at that timing, such as arguments and variable values, is dynamically embedded in the log message, edited, and output to the log file. In other words, a series of processes including a log message acquisition process, an embedded information acquisition process, a log message editing process, and a log message output process are performed before the log message is output. A technique for outputting a log message is disclosed, for example, in
しかし、例えば、証券取引業務などのように高速処理が求められる場合、上記一連の処理を行うことによって、求められる処理の性能を満たすことがシステム上、困難になってしまう。 However, for example, when high-speed processing is required, such as in securities trading business, it is difficult for the system to satisfy the required processing performance by performing the above-described series of processing.
本発明は、上記課題に鑑み、ログ出力によるシステムの性能劣化の影響を抑えることができる通信制御プログラムを提供することを目的とする。 An object of this invention is to provide the communication control program which can suppress the influence of the performance degradation of the system by log output in view of the said subject.
上記目的を達成するために、本発明は、ログ出力の処理を制御する通信制御プログラムであって、ログ出力の呼び出しに基づいて、前記呼び出し時に取得可能な、ログを生成するために必要な情報を取得するステップと、取得された前記情報をログ中間ファイル情報として、ログの生成が開始される前に所定の記憶領域に出力するステップとをコンピュータに実行させることを特徴とする。 In order to achieve the above object, the present invention provides a communication control program for controlling log output processing, which is information necessary for generating a log that can be acquired at the time of a call based on a log output call. And a step of outputting the acquired information as log intermediate file information to a predetermined storage area before log generation is started.
また、本発明の通信制御プログラムにおいて、前記ログ出力の対象業務における業務処理を実行する業務処理部の負荷が所定の負荷を超えているか否かを判断するステップを更に有し、前記所定の負荷を超えていると判断された場合、取得された前記情報を前記ログ中間ファイル情報として出力することは、好ましい態様である。 In the communication control program of the present invention, the communication control program further includes a step of determining whether or not a load of a business processing unit that executes business processing in the target business of log output exceeds a predetermined load, When it is determined that the log information is over, outputting the acquired information as the log intermediate file information is a preferable mode.
また、本発明の通信制御プログラムにおいて、時間帯、単位時間あたりのデータ送受信量、又はあらかじめ決められた負荷状況に基づいて、前記業務処理部の負荷が前記所定の負荷を超えているか否かを判断することは、好ましい態様である。 In the communication control program of the present invention, whether or not the load of the business processing unit exceeds the predetermined load based on a time zone, a data transmission / reception amount per unit time, or a predetermined load situation. Judging is a preferred embodiment.
また、本発明の通信制御プログラムにおいて、所定の条件を満たした場合に、前記所定の記憶領域の前記ログ中間ファイル情報を用いてログを生成し、生成された前記ログを出力するステップを更に有することは、好ましい態様である。 The communication control program according to the present invention further includes a step of generating a log using the log intermediate file information in the predetermined storage area and outputting the generated log when a predetermined condition is satisfied. This is a preferred embodiment.
また、本発明は、ログ出力の処理を制御する通信制御装置であって、ログ出力の呼び出しに基づいて、前記呼び出し時に取得可能な、ログを生成するために必要な情報を取得する取得部と、取得された前記情報をログ中間ファイル情報として、ログの生成が開始される前に所定の記憶領域に出力する出力部とを備えることを特徴とする。 In addition, the present invention is a communication control device that controls processing of log output, and based on a log output call, an acquisition unit that acquires information necessary for generating a log that can be acquired at the time of the call; And an output unit that outputs the acquired information as log intermediate file information to a predetermined storage area before log generation is started.
また、本発明は、ログ出力の処理を制御する通信制御方法であって、ログ出力の呼び出しに基づいて、前記呼び出し時に取得可能な、ログを生成するために必要な情報を取得するステップと、取得された前記情報をログ中間ファイル情報として、ログの生成が開始される前に所定の記憶領域に出力するステップとを有することを特徴とする。 Further, the present invention is a communication control method for controlling the processing of log output, the step of acquiring information necessary for generating a log that can be acquired at the time of calling based on the call of log output; A step of outputting the acquired information as log intermediate file information to a predetermined storage area before log generation is started.
本発明によれば、ログ出力によるシステムの性能劣化の影響を抑えることができる。 According to the present invention, it is possible to suppress the influence of system performance degradation caused by log output.
以下、実施の形態について図面を参照して説明する。まず、実施の形態に係る通信制御プログラムを実装するサーバを含む通信制御システムの一例について図1を用いて説明する。通信制御システム1は、サーバ2(通信制御装置)と運用監視装置3から構成されている。サーバ2と運用監視装置3は、ネットワーク4を介して接続されている。
Hereinafter, embodiments will be described with reference to the drawings. First, an example of a communication control system including a server that implements a communication control program according to an embodiment will be described with reference to FIG. The
サーバ2は、所定の業務が遂行されている間に、ログ出力処理が呼び出される(ログ出力対象の事象が発生する)と、ログ(以下、ログメッセージとも言う)の生成に必要な情報(例えば、タイムスタンプ、メッセージID、埋め込み文字など)を取得する。そして、サーバ2は、取得した情報をログ中間ファイルとして、ログの生成が開始される前、すなわち将来的に行われるログの生成処理の前に出力する。ここで、所定の業務とは、例えば高速処理を必要とする業務であって、証券取引業務などである。サーバ2(通信制御プログラム)における詳細な処理については後述する。
When the
運用監視装置3は、図2に示すように、サーバ2によって出力されるログ中間ファイル及びログファイルを監視する監視プログラム20と、監視結果を出力する監視画面21から構成される。具体的には、運用監視装置3は、後述するログファイル格納部38に格納されたログメッセージなどを監視画面21に表示する。これにより、監視者はシステムにおいて何が起きたかを把握することができる。
As shown in FIG. 2, the
次に、実施の形態に係る通信制御プログラムを実装するサーバの機能構成の一例について図3を用いて説明する。図3に示すように、サーバ2は、業務処理部30、ログ出力処理部31、ログ編集処理部32、ログ出力後処理部33、業務負荷判定処理部34、業務負荷格納部35、ログメッセージ格納部36、ログ中間ファイル格納部37、ログファイル格納部38から構成されている。なお、サーバ2の構成はこれに限られるものではなく、他の構成を含むものであってもよい。
Next, an example of a functional configuration of a server that implements the communication control program according to the embodiment will be described with reference to FIG. As shown in FIG. 3, the
業務処理部30は、サーバ2の主な業務機能を実現する処理部であって、通信制御プログラムの場合、データの送受信を行う。また、ログ出力のための情報採取や、業務処理部30の業務負荷(負荷状況)を判断するための単位時間あたりのデータ送受信量の測定も行う。
The
ログ出力処理部31は、業務処理部30からのログ出力依頼を受け、ログ出力処理を行う。この際、後述するように、ログ出力処理部31は、業務負荷判定処理部34の判定結果を参照し、業務負荷が高負荷の場合はログ採取情報のみをログ中間ファイルとしてログ中間ファイル格納部37へ出力する。また、業務負荷が低負荷の場合は、ログ出力処理部31はログ編集処理部32にログ編集要求を行い、ログ採取情報を渡す。
The log
ここで、ログ採取情報とは、ログの生成に必要な情報であって、ログ出力処理が呼び出された時点でなければ取得できない情報である。具体的には、上述したタイムスタンプ、メッセージID、埋め込み文字などであり、ログ中間ファイルとして、例えばCSV(Comma-Separated Values)型式でログ中間ファイル格納部37へ出力される。
Here, the log collection information is information necessary for generating a log and can be acquired only when the log output process is called. Specifically, the above-mentioned time stamp, message ID, embedded character, and the like are output to the log intermediate
ログ中間ファイルの一例を図13に示す。ログ中間ファイルは、例えばタイムスタンプ、メッセージID、埋め込み文字の順に構成される。1つのログ中間ファイルが、1つのレコードとしてログ中間ファイル格納部37に格納される。なお、この例では埋め込み文字が5つであるが、これに限られるものではない。
An example of the log intermediate file is shown in FIG. The log intermediate file is configured in the order of, for example, a time stamp, a message ID, and embedded characters. One log intermediate file is stored in the log intermediate
ログ編集処理部32は、業務負荷が低負荷の場合にログ出力処理部31からのログ編集要求を受け、ログ編集処理を行う。具体的には、ログ採取情報のメッセージIDをキーとして、対応するログメッセージ(ログメッセージのテンプレート)をログメッセージ格納部36から取得し、取得したログメッセージにログ採取情報を埋め込んで編集(生成)する。編集結果(編集後のログメッセージ)はログファイル格納部38へ出力される。ログメッセージは、運用監視装置3を管理する監視者が目視でメッセージの意味を確認しやすい形式に編集される。なお、ログメッセージの編集は、サーバ2以外の装置やプログラムが行うようにしてもよい。
The log
ここで、ログメッセージ格納部36に格納されたログメッセージのテンプレートの一例を図14に示す。ログメッセージには、エラー(E)、警告(W)、インフォメーション(I)、デバッグ(D)などの種類がある。図14には、エラーメッセージ(ERROR)と警告メッセージ(WARNING)のテンプレートが示されている。例えば、エラーメッセージのテンプレートは、メッセージID(E001)にメッセージ内容(ERROR:001 Error occurred. A=%s、B=%d、C=%x、at %s-%d)が関連付けられている。上記%は埋込識別子といい、上記s、d、xは書式指定子という。%s、%d、%xにログ採取情報が埋め込まれる。ログメッセージの編集処理の詳細については後述する。
An example of a log message template stored in the log
ログ出力後処理部33は、業務終了指示などにより、業務処理部30からのログ出力後処理要求を受け、ログ出力後処理を行う。具体的には、ログ出力後処理部33は、業務負荷が高負荷の場合にログ中間ファイル格納部37に格納されたログ採取情報を読み込む。そして、ログ出力後処理部33は、メッセージIDをキーとして対応するログメッセージをログメッセージ格納部36から取得し、取得したログメッセージにログ採取情報を埋め込んで編集(生成)する。
The log
また、ログ出力後処理部33は、編集したログメッセージと、ログファイル格納部38内のログメッセージ(低負荷時に編集されたログメッセージ)とをマージ(併合)し、タイムスタンプ順などでソート(整列)してログファイル格納部38に出力する。所定の業務を遂行している間には、業務負荷が低負荷のときと高負荷のときが混在する場合がある。そのため、業務終了後に、それぞれの負荷時に編集されたログメッセージをマージする必要がある。そこで、ログ出力後処理部33は、業務終了後に、業務終了後に編集される高負荷時のログメッセージと、低負荷の場合に編集され、ログファイル格納部38に格納されたログメッセージとをマージし、ソートして出力する。ログ出力後処理部33によるマージ処理及びソート処理の詳細については後述する。なお、ログ出力後処理部33は、同一機器(プログラム)内に配置する場合と、別の機器(プログラム)に配置する場合が考えられる。
Further, the log
業務負荷判定処理部34は、業務負荷判定基準を参照し、業務処理部30の負荷を判定する。業務負荷判定基準としては、例えば、時間帯によるもの、データ送受信量によるもの、あらかじめ業務処理部30の負荷が高負荷か低負荷に設定されているものなどがある。具体的には、負荷判定時の時間が所定の時間帯にある場合、業務処理部30の負荷は高い(高負荷)と判定する。また、単位時間あたりのデータ送受信量が所定の閾値を超えている場合、業務処理部30は高負荷と判定する。また、あらかじめ業務処理部30の負荷が設定されている場合、設定された負荷に基づいて、業務処理部30の負荷を判定する。例えば、あらかじめ負荷が高負荷と設定されている場合、業務処理部30の負荷は高負荷と判定される。
The business load
業務負荷格納部35は、業務負荷判定処理部34が負荷を判定する際に用いる業務負荷判定基準を格納する。業務負荷判定基準(時間帯による基準)の一例を図15に示す。例えば、始業時(9時から10時)、昼休み前(11時から12時)、終業前(16時から17時)は注文などの依頼が集中するなどで高負荷となり、それ以外は依頼が集中せずに低負荷となるという経験則があるとする。その場合、図15に示すような業務負荷判定基準となる。このような業務負荷判定基準を用いて高負荷であるか低負荷であるかが判定される。
The business
ログメッセージ格納部36には、上述したように、ログメッセージ(ログメッセージのテンプレート)がメッセージIDと関連付けられて格納されている。
As described above, the log
次に、実施の形態に係る通信制御プログラムを実装するサーバ2を実現するためのハードウェア構成の一例について図4を用いて説明する。ハードウェア構成は、例えば、CPU41、HDD(Hard Disk Drive)42、RAM(Random Access Memory)43、ROM(Read Only Memory)44、グラフィック処理装置45、入力インタフェース(I/F)46、通信インタフェース(I/F)47、バス48を備えている。CPU41、HDD42、RAM43、ROM44、グラフィック処理装置45、入力インタフェース(I/F)46、通信インタフェース(I/F)47は、例えば、バス48を介して互いに接続されている。
Next, an example of a hardware configuration for realizing the
CPU41は、バス48を介して、HDD42などに格納されるサーバ2の各種処理を行うためのプログラム(例えば、通信制御プログラムなど)を読み込み、読み込んだプログラムをRAM43に一時的に格納し、そのプログラムにしたがって各種処理を行うものである。
The
HDD42には、サーバ2の各種処理を行うためのアプリケーションプログラムや、サーバ2の処理に必要なデータなどが格納される。
The
RAM43は、揮発性メモリであって、CPU41に実行させるためのOS(Operating System)プログラムやアプリケーションプログラムの一部が一時的に格納される。また、RAM43には、CPU41による処理に必要な各種データが格納される。
The
ROM44は、不揮発性メモリであって、ブートプログラムやBIOS(Basic Input/Output System)などのプログラムを記憶する。 The ROM 44 is a non-volatile memory, and stores programs such as a boot program and BIOS (Basic Input / Output System).
グラフィック処理装置45は、モニタ400と接続可能であって、モニタ400に表示させる情報を生成するものである。
The
入力インタフェース(I/F)46は、キーボード401やマウス402などを介して入力される情報を受け付けるものである。
The input interface (I / F) 46 receives information input via the
通信インタフェース(I/F)47は、外部(運用監視装置3や利用者が使用する端末など)とネットワーク4を介してデータの送受信を行うものである。
The communication interface (I / F) 47 performs data transmission / reception via the
バス48は、各装置間の制御信号、データ信号などの授受を媒介する経路である。なお、運用監視装置3を実現するためのハードウェア構成も、サーバ2と同様、CPU、HDD、各種インタフェースなどを含む。
The
次に、上述した業務処理部30が高負荷の場合の処理の流れについて図5、図16を用いて説明する。図5に示すように、サーバ2は、証券取引などにおける注文のために利用者によって送信されたメッセージを受信する。ここで、メッセージ受信による注文のメッセージ送信がログ出力対象の事象であるとすると、業務処理部30は、ログ出力対象事象が発生したと認識する。業務処理部30は、ログ出力対象事象が発生したことにより、ログ採取情報(例えば、タイムスタンプ、メッセージID、埋め込み文字など)を取得する。埋め込み文字は、事象発生時のプログラムの状態を示す情報であり、主にプログラムの変数値である。図16に示す例では、埋め込み文字は1番目から5番目まであり、順に変数Aの値(aaa)、変数Bの値(1)、変数Cの値(16)、変数Dの値(ddd)、変数Eの値(5)である。
Next, the flow of processing when the above-described
業務処理部30は、ログ採取情報の取得後、ログ出力処理部31に対してログ出力依頼を発行する。ログ出力処理部31は、業務負荷判定処理部34に対して、負荷状況判定要求を発行する。業務負荷判定処理部34は、業務負荷格納部35から業務負荷判定基準を取得し、取得した業務負荷判定基準に基づいて、例えば業務負荷を高負荷と判定する。ログ出力処理部31は、業務負荷が高負荷のため、取得したログ採取情報のみをログ中間ファイルとしてログ中間ファイル格納部37へ出力する。出力されるログ中間ファイルの一例が、図16中に詳細として記載されている。
The
このとき、運用監視装置3は、監視プログラム20により、ログ中間ファイルとログファイルを監視し、監視対象の事象が発生すると、監視結果を監視画面21に出力する。後述する低負荷の場合も同様である。
At this time, the
一方、業務処理部30が低負荷の場合の処理の流れについて図6、図17を用いて説明する。業務負荷判定処理部34による業務負荷を判定するまでの処理は、図5に示す高負荷の場合と同様であるため説明を省略する。業務負荷判定処理部34が、業務負荷の判定の結果、低負荷であると判定すると、ログ出力処理部31は、ログ編集処理部32に対してログ編集要求を発行する。このとき、ログ出力処理部31は、ログ採取情報をログ編集処理部32へ渡す。
On the other hand, the flow of processing when the
ログ編集処理部32は、ログ出力処理部31から渡されたログ採取情報に含まれるメッセージIDをキーとして、ログメッセージ格納部36から対応するログメッセージのテンプレートを取得する。ログ編集処理部32は、取得したログメッセージのテンプレートに従ってログメッセージを編集(生成)する。すなわち、ログ編集処理部32は、テンプレートの文字列を1文字ずつ順に解析し、埋め込み文字を埋め込む位置が出現(埋込識別子が出現)した場合、取得したログ採取情報の埋め込み文字を1項目ずつ変換しながらログメッセージを編集する。ログメッセージの編集処理の詳細については後述する。ログ編集処理部32は、編集されたログメッセージをログファイル格納部38に出力する。編集されたログメッセージの一例が、図17中に詳細として記載されている。
The log
次に、上述したログ出力後処理部33によるログ出力後処理について図7、図16を用いて説明する。監視者などから業務終了指示が出され、業務処理部30が、所定の条件を満たした場合、すなわち業務終了事象を検知した場合、ログ出力後処理部33に対してログ出力後処理要求を発行する。ログ出力後処理部33は、ログ中間ファイル格納部37のレコードを読み込み、1レコードごとに以下のようにログメッセージを編集(生成)する。
Next, post-log output processing by the log
ログ出力後処理部33は、読み込んだレコードのメッセージIDをキーとして、ログメッセージ格納部36から対応するログメッセージのテンプレートを取得する。ログ出力後処理部33は、取得したログメッセージのテンプレートに対して、レコードに含まれるタイムスタンプやその他の埋め込み文字などを反映し、ログメッセージを編集する。テンプレートにタイムスタンプや埋め込み文字を反映させる方法は、上述した低負荷時のログ編集処理部32による方法と同様である。このように、ログメッセージの編集処理を業務終了後などに後処理として行うことで、業務中の1つの事象のログ出力にかかる処理時間を短縮でき、業務の処理性能を向上させることができる。
The log
ログ出力後処理部33は、ログファイル格納部38のログメッセージ(低負荷時に編集されたログメッセージ)をすべて読み込む。ログ出力後処理部33は、上記編集したログメッセージと、ログファイル格納部38から読み込んだログメッセージとをマージし、例えばタイムスタンプの昇順にソートする。ログ出力後処理部33は、マージしてソートしたログメッセージをログファイル格納部38に出力する。なお、業務が終了しているため、運用監視装置3による監視も終了する。
The log
次に、実施の形態に係る通信制御プログラムを実装するサーバ2におけるログ出力の処理フローの一例について図8を用いて説明する。図8に示すように、サーバ2(通信制御プログラム)は、業務における事象(例えば、証券取引などの事象)が発生したか否かを判断し(ステップS801)、事象が発生したと判断した場合(ステップS801でYes)、発生した事象に応じた業務処理を行う(ステップS802)。なお、事象が発生したと判断しない場合(ステップS801でNo)、ステップS801へ戻る。
Next, an example of a processing flow of log output in the
サーバ2は、ログ出力対象の事象(例えば、メッセージ送信事象)が発生したか否かを判断し(ステップS803)、発生した場合(ステップS803でYes)、ログ採取情報を取得し(ステップS804)、ログ出力依頼(ログ出力処理の呼出)を発行する(ステップS805)。ログ出力処理については後述する。なお、ログ出力対象の事象が発生していない場合(ステップS803でNo)、ステップS806へ進む。
The
サーバ2は、受け付けた事象が業務終了の事象であるか否かを判断し(ステップS806)、業務終了の事象である場合(ステップS806でYes)、ログ出力後処理要求(ログ出力後処理の呼出)を発行する(ステップS807)。ログ出力後処理については後述する。
The
次に、上記ログ出力処理のサブルーチンについて図9を用いて説明する。サーバ2(通信制御プログラム)は、業務処理部30の負荷を判定させるため、負荷状況判定要求(業務負荷判定処理の呼出)を発行する(ステップS901)。業務負荷判定処理については後述する。サーバ2は、業務処理部30の負荷が高負荷か否かを判断し(ステップS902)、高負荷である場合(ステップS902でYes)、取得されたログ採取情報をログ中間ファイル格納部37へ出力する(ステップS903)。一方、高負荷でない場合(ステップS902でNo)、ログ編集要求(ログ編集処理の呼出)を発行する(ステップS904)。ログ編集処理については後述する。
Next, the log output processing subroutine will be described with reference to FIG. The server 2 (communication control program) issues a load status determination request (call of a business load determination process) in order to determine the load of the business processing unit 30 (step S901). The business load determination process will be described later. The
次に、上記業務負荷判定処理のサブルーチンについて図10を用いて説明する。サーバ2(通信制御プログラム)は、業務負荷を、例えばデフォルト値の低負荷とセットし(ステップS1001)、業務負荷格納部35から業務負荷判定基準を取得する(ステップS1002)。サーバ2は、取得した業務負荷判定基準が時間帯による判定基準か否かを判断し(ステップS1003)、時間帯によるものの場合(ステップS1003でYes)、現在の時刻の情報を取得する(ステップS1004)。
Next, a subroutine for the business load determination process will be described with reference to FIG. The server 2 (communication control program) sets the business load as, for example, a default low load (step S1001), and obtains the business load determination criterion from the business load storage unit 35 (step S1002). The
サーバ2は、取得した時刻が高負荷の時間帯であるか否かを判断し(ステップS1005)、高負荷の時間帯の場合(ステップS1005でYes)、業務負荷を高負荷とセットする(ステップS1006)。
The
一方、取得した業務負荷判定基準が時間帯による判定基準でない場合(ステップS1003でNo)、サーバ2は、単位時間あたりのデータ送受信量による判定基準か否かを判断し(ステップS1007)、データ送受信量によるものの場合(ステップS1007でYes)、単位時間あたりのデータ送受信量を取得する(ステップS1008)。サーバ2は、取得したデータ送受信量が所定の閾値以上であるか否かを判断し(ステップS1009)、所定の閾値以上である場合(ステップS1009でYes)、業務負荷を高負荷とセットする(ステップS1010)。なお、所定の閾値以上でない場合(ステップS1009でNo)、業務負荷判定処理を終了する。
On the other hand, if the acquired business load determination criterion is not the determination criterion based on the time zone (No in step S1003), the
また、取得した業務負荷判定基準が単位時間あたりのデータ送受信量による判定基準でない場合(ステップS1007でNo)、サーバ2は、あらかじめ負荷が設定されたもの、すなわち高負荷であるか又は低負荷であるかあらかじめ負荷が設定されているか否かを判断し(ステップS1011)、あらかじめ負荷が設定されている場合(ステップS1011でYes)、設定が高負荷であるか否かを判断し(ステップS1012)、高負荷である場合(ステップS1012でYes)、業務負荷を高負荷とセットする(ステップS1013)。なお、あらかじめ負荷が設定されていない場合(ステップS1011でNo)及び設定が高負荷でない場合(ステップS1012でNo)、業務負荷判定処理を終了する。
If the acquired business load determination criterion is not a determination criterion based on the amount of data transmitted / received per unit time (No in step S1007), the
次に、上記ログ編集処理のサブルーチンについて図11を用いて説明する。サーバ2(通信制御プログラム)は、ログメッセージ格納部36からログメッセージのテンプレートを取得し(ステップS1101)、取得したログメッセージのテンプレートにログ採取情報を埋め込んで編集する(ステップS1102)。ログメッセージの編集処理の詳細については後述する。サーバ2は、編集したログメッセージをログファイル格納部38へ出力する(ステップS1103)。
Next, the log editing process subroutine will be described with reference to FIG. The server 2 (communication control program) acquires a log message template from the log message storage unit 36 (step S1101), and embeds the log collection information in the acquired log message template for editing (step S1102). Details of the log message editing process will be described later. The
次に、上記ログ出力後処理のサブルーチンについて図12を用いて説明する。サーバ2(通信制御プログラム)は、ログ中間ファイル格納部37から1つのレコードを読み込み(ステップS1201)、ログメッセージ格納部36からステップS1201で読み込んだレコードのメッセージIDに対応するログメッセージのテンプレートを取得する(ステップS1202)。サーバ2は、取得したログメッセージのテンプレートにログ採取情報を埋め込んで編集する(ステップS1203)。ログメッセージの編集処理の詳細については後述する。このとき、編集したログメッセージを不図示のバッファに格納する(ステップS1204)。サーバ2は、次のレコードがないか否かを判断し(ステップS1205)、次のレコードがある場合(ステップS1205でNo)、ステップS1201へ戻る。
Next, the log output post-processing subroutine will be described with reference to FIG. The server 2 (communication control program) reads one record from the log intermediate file storage unit 37 (step S1201), and acquires a log message template corresponding to the message ID of the record read in step S1201 from the log
一方、次のレコードがない場合(ステップS1205でYes)、サーバ2は、ログファイル格納部38から全てのログメッセージ(低負荷時に編集されたログメッセージ)を読み込み、バッファにマージ(追加)する(ステップS1206)。そして、サーバ2は、バッファ中の全てのログメッセージをタイムスタンプ順でソートする(ステップS1207)。ログメッセージのマージ処理及びソート処理の詳細については後述する。サーバ2は、バッファ中の全てのログメッセージをログファイル格納部38へ出力する(ステップS1208)。
On the other hand, if there is no next record (Yes in step S1205), the
ここで、上記ログメッセージの編集処理のサブルーチンについて図18を用いて説明する。以下では、処理の主体をログ出力後処理部33として説明しているが、低負荷時におけるログメッセージの編集処理の場合には、処理の主体はログ編集処理部32となる。
The log message editing process subroutine will be described with reference to FIG. In the following description, the processing subject is described as the log
ログ出力後処理部33は、取得したテンプレートの先頭から最初のコーテーションマークが検出されるまでのデータを削除する(ステップS1801a)。ログ出力後処理部33は、削除したコーテーションマークの次の文字を読み込み位置とするとともに、埋め込み文字カウンタNを1とする(ステップS1801b)。このとき、ログ出力後処理部33は、削除したテンプレートの先頭にレコードから取得したタイムスタンプを埋め込む。なお、この例では、テンプレートのデータの削除をコーテーションマークの検出に基づいて行っているが、コーテーションマークに限定されるものではなく、他のマークや目印などであってもよい。
The log
ログ出力後処理部33は、読み込み位置から1文字を読み込む(ステップS1802)。ここで取得したテンプレートが、図14に示すテンプレートのうちのメッセージIDがE001のテンプレートの場合、読み込まれる文字は“E”となる。
The log
ログ出力後処理部33は、読み込んだ文字が埋込識別子%であるか否かを判断する(ステップS1803)。読み込んだ文字が埋込識別子%である場合(ステップS1803でYes)、ログ出力後処理部33は、更に1文字を読み込み(ステップS1804)、読み込んだ文字がどのような書式指定子であるかを判断する(ステップS1805)。
The log
ここでは、埋込識別子に続く文字(書式指定子)によってどのような変換を行うかを、例えば図19に示す埋め込み文字変換テーブルを用いて決めている。例えば、書式指定子が“s”の場合には、埋め込み文字を変換せずにそのまま埋め込む。書式指定子が“d”の場合には、埋め込み文字を10進数に変換して埋め込む。書式指定子が“x”の場合には、埋め込み文字を16進数に変換して埋め込む。なお、この例では、3種類の変換の例を挙げているが、数値の桁数を指定するなど、更に高度な編集を行うようにしてもよい。 Here, what conversion is performed by the character (format specifier) following the embedded identifier is determined using, for example, an embedded character conversion table shown in FIG. For example, when the format specifier is “s”, the embedded character is embedded as it is without being converted. When the format specifier is “d”, the embedded character is converted into a decimal number and embedded. When the format specifier is “x”, the embedded character is converted into a hexadecimal number and embedded. In this example, three types of conversion examples are given, but more advanced editing such as specifying the number of digits of numerical values may be performed.
ログ出力後処理部33は、書式指定子が“s”の場合、ログメッセージ(テンプレート)にN番目の埋め込み文字を連結(埋め込み)する(ステップS1806)。書式指定子が“d”の場合、ログ出力後処理部33は、N番目の埋め込み文字を10進数に変換し(ステップS1807)、変換後の文字列をログメッセージに連結する(ステップS1808)。書式指定子が“x”の場合、ログ出力後処理部33は、N番目の埋め込み文字を16進数に変換し(ステップS1809)、変換後の文字列をログメッセージに連結する(ステップS1810)。
When the format specifier is “s”, the log
連結後、ログ出力後処理部33は、埋め込み文字カウンタNを埋め込み文字数に応じてインクリメントする(ステップS1811)。ログ出力後処理部33は、テンプレートの読み込み位置の示す文字が最初のコーテーションマークに対応するコーテーションマークであるか否かを判断する(ステップS1812)。ログ出力後処理部33は、対応するコーテーションマークの場合(ステップS1812でYes)には、テンプレートの最後の文字に達したと判断し、ステップS1814においてログメッセージに連結された当該対応するコーテーションマークを削除してログメッセージの編集処理を終了する。一方、対応するコーテーションマークでない場合(ステップS1812でNo)、読み込み位置をインクリメントする(ステップS1813)。
After concatenation, the log
一方、ステップS1803において、読み込んだ文字が埋込識別子でない場合(ステップS1803でNo)、ログ出力後処理部33は、ログメッセージに読み込んだ文字を連結する(ステップS1814)。
On the other hand, if the read character is not an embedded identifier in step S1803 (No in step S1803), the log
次に、上記ログメッセージのマージ処理及びソート処理の具体的な例について図20を用いて説明する。図20に示すように、ログ出力後処理部33は、ログ中間ファイル格納部37から読み込んだログ中間ファイルと、ログメッセージ格納部36から取得したテンプレートとに基づいて、ログメッセージを編集する。編集されたログメッセージはバッファに格納(追加)される。
Next, a specific example of the log message merge processing and sort processing will be described with reference to FIG. As illustrated in FIG. 20, the log
その後、次のレコード(ログ中間ファイル)がないと判断されると、ログ出力後処理部33は、ログファイル格納部38から全てのログメッセージ(低負荷時に編集されたログメッセージ)を読み込む。この例では、全てのログメッセージのうちの2つのログメッセージが表記されている。読み込まれた全てのログメッセージは上記バッファにマージ(追加)される。四角い破線で囲まれたものがマージされたログメッセージである。
Thereafter, when it is determined that there is no next record (log intermediate file), the log
ログ出力後処理部33は、バッファに格納されたログメッセージを、例えばタイムスタンプをキーにして、昇順にソートし、ログファイル格納部38へ出力する。なお、ソートの方法は、タイムスタンプをキーにして行うものに限らず、例えばエラーコードの重要度に応じてソートするようにしてもよい。
The log
上述したようなサーバ2(通信制御プログラム)によれば、ログ出力によるシステムの性能劣化の影響を抑えることができる。 According to the server 2 (communication control program) as described above, it is possible to suppress the influence of system performance deterioration due to log output.
なお、上述した実施の形態では、サーバ2の主な処理をCPUによるソフトウェア処理によって実行するものとして説明したが、この処理の全部又は一部をハードウェアによって実現するようにしてもよい。
In the above-described embodiment, the main processing of the
また、上述した実施の形態は、上述したものに限定されるものではなく、実施の形態の要旨を逸脱しない範囲において種々の変更を加えることができる。 Further, the above-described embodiment is not limited to the above-described embodiment, and various changes can be made without departing from the gist of the embodiment.
1 通信制御システム
2 サーバ
3 運用監視装置
4 ネットワーク
20 監視プログラム
21 監視画面
30 業務処理部
31 ログ出力処理部
32 ログ編集処理部
33 ログ出力後処理部
34 業務負荷判定処理部
35 業務負荷格納部
36 ログメッセージ格納部
37 ログ中間ファイル格納部
38 ログファイル格納部
41 CPU
42 HDD
43 RAM
44 ROM
45 グラフィック処理装置
46 入力インタフェース
47 通信インタフェース
48 バス
400 モニタ
401 キーボード
402 マウス
DESCRIPTION OF
42 HDD
43 RAM
44 ROM
45
Claims (6)
ログ出力の呼び出しに基づいて、前記呼び出し時に取得可能な、ログを生成するために必要な情報を取得するステップと、
取得された前記情報をログ中間ファイル情報として、ログの生成が開始される前に所定の記憶領域に出力するステップとを、
コンピュータに実行させることを特徴とする通信制御プログラム。 A communication control program for controlling log output processing,
Obtaining information necessary to generate a log, which can be acquired at the time of the call, based on the call of the log output;
Outputting the acquired information as log intermediate file information to a predetermined storage area before log generation is started,
A communication control program executed by a computer.
前記所定の負荷を超えていると判断された場合、取得された前記情報を前記ログ中間ファイル情報として出力することを特徴とする請求項1に記載の通信制御プログラム。 A step of determining whether or not a load of a business processing unit that executes a business process in the target business of the log output exceeds a predetermined load;
The communication control program according to claim 1, wherein when it is determined that the predetermined load is exceeded, the acquired information is output as the log intermediate file information.
ログ出力の呼び出しに基づいて、前記呼び出し時に取得可能な、ログを生成するために必要な情報を取得する取得部と、
取得された前記情報をログ中間ファイル情報として、ログの生成が開始される前に所定の記憶領域に出力する出力部とを、
備えることを特徴とする通信制御装置。 A communication control device for controlling log output processing,
An acquisition unit that acquires information necessary for generating a log, which can be acquired at the time of the call, based on a log output call;
An output unit that outputs the acquired information as log intermediate file information to a predetermined storage area before log generation is started;
A communication control apparatus comprising:
ログ出力の呼び出しに基づいて、前記呼び出し時に取得可能な、ログを生成するために必要な情報を取得するステップと、
取得された前記情報をログ中間ファイル情報として、ログの生成が開始される前に所定の記憶領域に出力するステップとを、
有することを特徴とする通信制御方法。 A communication control method for controlling log output processing,
Obtaining information necessary to generate a log, which can be acquired at the time of the call, based on the call of the log output;
Outputting the acquired information as log intermediate file information to a predetermined storage area before log generation is started,
A communication control method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016159383A JP6652464B2 (en) | 2016-08-15 | 2016-08-15 | Communication control program, communication control device, and communication control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016159383A JP6652464B2 (en) | 2016-08-15 | 2016-08-15 | Communication control program, communication control device, and communication control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018028738A true JP2018028738A (en) | 2018-02-22 |
JP6652464B2 JP6652464B2 (en) | 2020-02-26 |
Family
ID=61248384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016159383A Active JP6652464B2 (en) | 2016-08-15 | 2016-08-15 | Communication control program, communication control device, and communication control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6652464B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004070420A (en) * | 2002-08-01 | 2004-03-04 | Matsushita Electric Ind Co Ltd | Trace data storage device |
JP2009110078A (en) * | 2007-10-26 | 2009-05-21 | Hitachi Ltd | Failure log management method |
CN103176888A (en) * | 2011-12-22 | 2013-06-26 | 阿里巴巴集团控股有限公司 | Log recording method and log recording system |
JP2014229313A (en) * | 2013-05-20 | 2014-12-08 | エルエス産電株式会社Lsis Co., Ltd. | Method for storing data |
US20150293801A1 (en) * | 2014-04-15 | 2015-10-15 | Lsis Co., Ltd. | Apparatus, system and method for application log data processing |
-
2016
- 2016-08-15 JP JP2016159383A patent/JP6652464B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004070420A (en) * | 2002-08-01 | 2004-03-04 | Matsushita Electric Ind Co Ltd | Trace data storage device |
JP2009110078A (en) * | 2007-10-26 | 2009-05-21 | Hitachi Ltd | Failure log management method |
CN103176888A (en) * | 2011-12-22 | 2013-06-26 | 阿里巴巴集团控股有限公司 | Log recording method and log recording system |
JP2014229313A (en) * | 2013-05-20 | 2014-12-08 | エルエス産電株式会社Lsis Co., Ltd. | Method for storing data |
US20150293801A1 (en) * | 2014-04-15 | 2015-10-15 | Lsis Co., Ltd. | Apparatus, system and method for application log data processing |
Also Published As
Publication number | Publication date |
---|---|
JP6652464B2 (en) | 2020-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108319547B (en) | Test case generation method, device and system | |
KR101238550B1 (en) | Method and computer-readable medium for commanding | |
CN107977442B (en) | Log file compression and decompression method, electronic device and readable storage medium | |
JP6150453B2 (en) | Server apparatus, system, and log collection support method | |
JP4483807B2 (en) | Log format conversion device, log format conversion method, and log format conversion program | |
JP2014081811A (en) | Log management system and log management method | |
JPWO2020204144A1 (en) | Business analysis method | |
CN110928851B (en) | Method, device and equipment for processing log information and storage medium | |
CN115525292A (en) | Low code development method and device, readable storage medium and electronic equipment | |
CN110941405A (en) | Kernel client log printing method, device, equipment and storage medium | |
JP2017045238A (en) | Information processing system, information processing device, and information processing method | |
Skinner | Performance monitoring of parallel scientific applications | |
JP6652464B2 (en) | Communication control program, communication control device, and communication control method | |
US10644971B2 (en) | Graph search in structured query language style query | |
JP2020064399A (en) | Control system, control device, terminal device, and program | |
Elmsheuser et al. | ATLAS Grid Workflow Performance Optimization | |
KR20190071571A (en) | Apparutus and method for analyzing user process based on standard process | |
Amontamavut et al. | Separated Linux process logging mechanism for embedded systems | |
CN115964348A (en) | Log data processing method and device, storage medium and electronic terminal | |
US9633061B2 (en) | Methods for determining event counts based on time-sampled data | |
Weber et al. | Online performance analysis with the Vampir tool set | |
KR102300347B1 (en) | Apparatus of continuous profiling for multicore embedded system and the method of the same | |
JP2020181429A (en) | Information analysis apparatus, information analysis method, program, and information analysis system | |
JPWO2020188779A1 (en) | Information processing equipment, information processing system and information processing program | |
JP5718256B2 (en) | System performance analysis apparatus, system performance analysis method, and system performance analysis program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181004 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190730 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190813 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191002 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20191002 |
|
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: 20200121 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200123 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6652464 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |