JP2008210135A - Log acquisition method, log acquisition system and log acquisition program - Google Patents

Log acquisition method, log acquisition system and log acquisition program Download PDF

Info

Publication number
JP2008210135A
JP2008210135A JP2007045999A JP2007045999A JP2008210135A JP 2008210135 A JP2008210135 A JP 2008210135A JP 2007045999 A JP2007045999 A JP 2007045999A JP 2007045999 A JP2007045999 A JP 2007045999A JP 2008210135 A JP2008210135 A JP 2008210135A
Authority
JP
Japan
Prior art keywords
time
log
transaction
log acquisition
storing
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
Application number
JP2007045999A
Other languages
Japanese (ja)
Other versions
JP4989258B2 (en
Inventor
Norio Yoshida
典生 吉田
Wataru Abe
渉 阿部
Masao Dobashi
昌郎 土橋
Tetsuo Otani
哲夫 大谷
Takehiro Shimada
丈裕 嶋田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central Research Institute of Electric Power Industry
Tokyo Metropolitan Government
Original Assignee
Central Research Institute of Electric Power Industry
Tokyo Metropolitan Government
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Central Research Institute of Electric Power Industry, Tokyo Metropolitan Government filed Critical Central Research Institute of Electric Power Industry
Priority to JP2007045999A priority Critical patent/JP4989258B2/en
Publication of JP2008210135A publication Critical patent/JP2008210135A/en
Application granted granted Critical
Publication of JP4989258B2 publication Critical patent/JP4989258B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform log analysis of a method performed with parallel processing. <P>SOLUTION: In the method, a log is acquired by use of aspect oriented technology. A join point, identifying time, and log acquisition target information are stored as the log in time of a start of a transaction, and the join point, the identifying time, the log acquisition target information and end time are stored as the log in time of an end of the transaction. Thereby, even when the parallel processing is performed, the join point, the identifying time, and the log acquisition target information common to in time of the start and in time of the end are referred, a processing time spent for the transaction can be accurately and easily decided from a time interval between the end time and the identifying time. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ログ取得方法、ログ取得システム及びログ取得プログラムに関する。さらに詳述すると、本発明は、オブジェクト指向技術を用いて構築され、リアルタイム性、信頼性を要求されるシステムにおけるロギングに好適なログ取得方法、ログ取得システム及びログ取得プログラムに関する。   The present invention relates to a log acquisition method, a log acquisition system, and a log acquisition program. More specifically, the present invention relates to a log acquisition method, a log acquisition system, and a log acquisition program suitable for logging in a system that is constructed using object-oriented technology and requires real-time performance and reliability.

オブジェクト指向技術を用いたシステム開発がシステム開発の主流となりつつある。   System development using object-oriented technology is becoming the mainstream of system development.

例えば、監視、制御の対象となる設備および資源等(以下、監視対象物という)を集中的に監視、制御する監視制御システムの設計に際し、監視対象物をオブジェクトクラスとしてモデル化し、設備構成データや状態/測定値の管理にオブジェクトを利用する方法が普及しつつある。尚、このようなオブジェクトクラスの集合は、「情報モデル」と呼ばれる。監視制御システムの構築時において「情報モデル」は、ソフトウェアライブラリという形で実現され、監視制御機能を実現するソフトウェア(アプリケーション)に利用される。   For example, when designing a monitoring control system that centrally monitors and controls equipment and resources (hereinafter referred to as monitoring objects) to be monitored and controlled, the monitoring objects are modeled as object classes, Methods that use objects to manage state / measurements are becoming popular. Such a set of object classes is called an “information model”. At the time of construction of the monitoring control system, the “information model” is realized in the form of a software library and used for software (application) that realizes the monitoring control function.

監視制御システムにおいては、リアルタイム性(要求時間内に処理を終了すること)や信頼性が非常に重視され、例えば、ある制御処理の開始から終了までシステム全体で1秒以内に実行を完了しなければならないといった制約が存在する。   In a supervisory control system, real-time performance (end processing within the required time) and reliability are very important. For example, the entire system must be executed within 1 second from the start to the end of a certain control process. There are constraints that must be met.

従来の監視制御システムは、リアルタイム性を実現するために、使用するハードウェアに応じて単一のベンダーによりソフトウェアライブラリ等が構築されていた。このため、異なるハードウェア、オペレーティングシステムではソフトウェアライブラリを使用できず、汎用性がなかったが、近年、単一のベンダーに依存しないソフトウェアライブラリの共通的利用へのニーズが存在する。したがって、「情報モデル」を実装したソフトウェアライブラリは、異なるオペレーティングシステムにおいて利用され、アプリケーションは様々な開発者によって利用されることが望まれる。   In a conventional supervisory control system, a software library or the like is constructed by a single vendor according to the hardware to be used in order to realize real-time performance. For this reason, software libraries cannot be used on different hardware and operating systems and are not versatile. However, in recent years, there is a need for common use of software libraries that do not depend on a single vendor. Therefore, it is desired that a software library that implements an “information model” is used in different operating systems, and applications are used by various developers.

更に、システム分析に際し、動作記録であるログの分析は重要であるが、特に監視制御システムのように高いリアルタイム性や信頼性を要求されるシステムにおいては、問題が発生した場合に問題場所の特定を正確且つシステム全体に負荷をかけることなく行うことが要求される。   In addition, analysis of logs, which are operation records, is important for system analysis. Especially in systems that require high real-time performance and reliability, such as supervisory control systems, when a problem occurs, the problem location can be identified. Must be performed accurately and without burdening the entire system.

例えば、特許文献1には、ネットワークのログ管理において、各サーバのアプリケーションを停止させることなく各アプリケーションにログレベルおよび出力先変更のコードを挿入し、コマンドを各アプリケーションに送信することによってログレベルの変更およびログ出力先の変更を動的に実行するログ管理方法が提案されている。また、特許文献2には、ログの出力機構をシステムカーネルへ実装したソフトウェア動作監視装置が提案されている。   For example, Patent Document 1 discloses that in log management of a network, a log level and an output destination change code are inserted into each application without stopping the application of each server, and a command is sent to each application. A log management method has been proposed in which changes and log output destination changes are dynamically executed. Patent Document 2 proposes a software operation monitoring apparatus in which a log output mechanism is mounted on a system kernel.

更に、近年オブジェクト指向ではうまく分離できないクラス間を横断するような特徴を「横断的関心事」とし、この「横断的関心事」をアスペクトとして分離して記述することでプログラムの保守性を向上するアスペクト指向技術が注目されている(非特許文献1)。アスペクト指向技術を実現するプログラム言語としては、例えば、AspectJが存在する。AspectJは、Java(登録商標)言語にアスペクト指向技術のための拡張性を持たせたプログラム言語である。   Furthermore, features that cross between classes that cannot be separated well in recent years by object-oriented are defined as “cross-cutting concerns”, and this “cross-cutting concerns” is separated and described as an aspect to improve program maintainability. Aspect-oriented technology has attracted attention (Non-Patent Document 1). As a programming language for realizing the aspect-oriented technology, for example, AspectJ exists. AspectJ is a programming language in which the Java (registered trademark) language is provided with extensibility for aspect-oriented technology.

特開2004−152024JP2004-152024A 特開2006−53788JP 2006-53788 A 「アスペクト指向ソフトウェア開発とそのツール」,千葉滋,情報処理 45巻1号,pp.28-33(平成16年1月号)"Aspect Oriented Software Development and Tools", Shiba Chiba, Information Processing, Vol. 45, No. 1, pp. 28-33 (January 2004)

しかしながら、特許文献1に記載のようにログ出力のためのコードをアプリケーション単位で明示的に埋込む必要があるのでは、システムの仕様が変更される毎に、ログを取得するすべてのプログラムのソースコードを見直す必要が生じ、ソースコードの修正量が膨大となるため容易に対応できないという問題がある。また、修正の過程において、プログラマによるコーディングのミス、例えば、本来処理を追加すべきでない場所にコードを追加してしまう場合、本来追加すべき場所にコードを追加し忘れる場合、誤ったコードを記載してしまう場合、ロギングに関係のない箇所のコードを変更し本来のプログラムにバグを生じさせる場合等が起こることが想定される。   However, if it is necessary to explicitly embed code for log output in units of applications as described in Patent Document 1, every time the system specifications are changed, the source of all programs that acquire logs There is a problem that the code needs to be reviewed and the amount of correction of the source code becomes enormous, so that it cannot be easily handled. In addition, in the process of correction, if there is a coding mistake by the programmer, for example, if code is added to a place where processing should not be added, or if it is forgotten to add code where it should be added, incorrect code will be described In such a case, it may be assumed that a bug occurs in the original program by changing the code in a part not related to logging.

また、特許文献2に記載の技術では、ログの出力機構をシステムカーネルへ実装しているため、システム全体を実現するオペレーティングシステムの修正、機能追加等の度にログ取得のためのソースコードの適正を見直さねばならず、保守性が低いという問題がある。また、オペレーティングシステムの修正、機能追加等は、頻繁に発生することが想定されるため、その修正頻度は多く、保守作業が繁雑となる。更に、オペレーティングシステム毎に実装する必要があるので、情報モデルを実装したソフトウェアライブラリの共通的利用ができなくなるという問題がある。また、ソースコードが一般に公開されていないオペレーティングシステムを用いたシステムには適用できないという問題も存在する。   In the technique described in Patent Document 2, since the log output mechanism is implemented in the system kernel, the appropriate source code for log acquisition is required every time the operating system that implements the entire system is modified or a function is added. There is a problem that the maintainability is low. Further, since it is assumed that the operating system is corrected and the function is added frequently, the frequency of the correction is high, and the maintenance work becomes complicated. Furthermore, since it is necessary to implement for each operating system, there is a problem that the software library in which the information model is implemented cannot be shared. There is also a problem that it cannot be applied to a system using an operating system whose source code is not publicly available.

これらの問題に対しては、非特許文献1に記載の発明のようにアスペクト指向技術により、アスペクトとしてログの出力処理を規定することで保守性の向上を図ることが考えられるが、非特許文献1に記載の技術を用いて、アスペクトによりログの出力処理を行った場合、以下の問題がある。   For these problems, it is conceivable to improve the maintainability by defining log output processing as an aspect by aspect-oriented technology as in the invention described in Non-Patent Document 1. When the log output process is performed according to the aspect using the technique described in No. 1, there are the following problems.

システムの規模が大きい場合、特に監視制御システムのように高いリアルタイム性を要求されるシステムにおいては、計算機上で複数の処理を同時に実行する(並列処理、マルチスレッド)が行われる。即ち、同じメソッドが複数並列して呼び出される可能性がある。しかしながら、非特許文献1に記載の技術を用いても、このような並列処理が行われる場合、それぞれがどのログに対応しているかを分析することはできず、適切なシステム分析を行うことができない。   When the scale of the system is large, especially in a system that requires high real-time performance, such as a supervisory control system, a plurality of processes are executed simultaneously (parallel processing, multithreading) on a computer. That is, the same method may be called in parallel. However, even if the technique described in Non-Patent Document 1 is used, when such parallel processing is performed, it is not possible to analyze which log each corresponds to, and an appropriate system analysis can be performed. Can not.

また、同じメソッドであってもどのような順序で呼び出されたか(呼出しスタック)により処理時間は異なる場合がある。しかしながら、非特許文献1に記載の技術を用いても、同じメソッドを呼出したスレッドの違いによるタイムラグをログとして取得することはできない。   Also, the processing time may vary depending on the order in which the methods are called (call stack). However, even if the technique described in Non-Patent Document 1 is used, a time lag due to a difference in threads calling the same method cannot be acquired as a log.

更に、アスペクト指向により各メソッドの毎回の実行につき、ログを取得することはシステム全体の負荷となり、特に監視制御システム等においては、リアルタイム性の阻害要因ともなるという問題がある。   Furthermore, acquiring a log for each execution of each method by aspect orientation is a burden on the entire system, and in particular, in a monitoring control system or the like, there is a problem that it becomes a hindrance to real-time characteristics.

そこで本発明は、並列処理されるトランザクションであってもそのトランザクションに要した時間を計測すること、更に、ログを記録する対象となるメソッドやサンプリング周期を任意に指定することを可能とするログ取得方法、ログ取得システム及びログ取得プログラムを提供することを目的とする。   Therefore, the present invention is capable of measuring a time required for a transaction that is processed in parallel, and acquiring a log that can arbitrarily specify a method for recording a log and a sampling period. It is an object to provide a method, a log acquisition system, and a log acquisition program.

かかる目的を達成するため、請求項1記載のログ取得方法は、アスペクト指向によりログを取得する方法において、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻を識別用時刻として取得して、識別用時刻を当該時点でのジョインポイントに関連づけて記憶する処理及びトランザクションのログ取得対象情報を記憶する処理を少なくとも行って、トランザクションの開始時のログとして、ジョインポイント、識別用時刻及びログ取得対象情報を保存し、トランザクションの終了時に、当該時点でのジョインポイントをキーとして識別用時刻を取得してこれらを記憶する処理、トランザクションのログ取得対象情報を記憶する処理及び当該時点での時刻を終了時刻として取得して、終了時刻を記憶する処理を少なくとも行って、トランザクションの終了時のログとして、ジョインポイント、識別用時刻、ログ取得対象情報及び終了時刻を保存するようにしている。   In order to achieve this object, the log acquisition method according to claim 1 is an aspect-oriented method of acquiring a log, and acquires the time at the time as an identification time at the start of a transaction to be acquired. Then, at least the process of storing the identification time in association with the join point at the time and the process of storing the log acquisition target information of the transaction is performed, and the join point, the identification time and the log are used as a log at the start of the transaction. Stores acquisition target information, and at the end of the transaction, acquires the identification time using the join point at that time as a key and stores them, processing to store the log acquisition target information of the transaction, and time at that time At least the process of acquiring the end time and storing the end time You, as a log at the end of the transaction, join point, identification time, so that to save the log acquisition target information and end time.

また、請求項7に記載のログ取得システムは、アスペクト指向技術を用いてログを取得するシステムであって、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻をタイマーから読み出して識別用時刻とし、識別用時刻を当該時点でのジョインポイントに関連づけて記憶装置に記憶する処理及びトランザクションのログ取得対象情報を記憶装置に記憶する処理を少なくとも実行して、トランザクションの開始時のログとして、ジョインポイント、識別用時刻及びログ取得対象情報をログ記録部に記憶する処理及びトランザクションの終了時に、当該時点でのジョインポイントをキーとして識別用時刻を読み出してこれらを記憶装置に記憶する処理、トランザクションのログ取得対象情報を記憶装置に記憶する処理及び当該時点での時刻をタイマーから読み出して終了時刻とし、終了時刻を記憶装置に記憶する処理を少なくとも実行して、トランザクションの終了時のログとして、ジョインポイント、識別用時刻、ログ取得対象情報及び終了時刻をログ記録部に記憶する処理を実行するログ取得部を備えるものである。   The log acquisition system according to claim 7 is a system for acquiring a log by using aspect-oriented technology, and at the start of a transaction to be acquired by the log, the time at the time is read from the timer and identified. As a log at the start of a transaction, at least a process for storing the identification time in association with the join point at the time and storing the log acquisition target information of the transaction in the storage apparatus is executed. Processing for storing the join point, identification time and log acquisition target information in the log recording unit, and at the end of the transaction, reading the identification time using the join point at that time as a key and storing them in the storage device, Processing for storing transaction log acquisition target information in a storage device, and The time at the point is read from the timer as the end time, and at least the process of storing the end time in the storage device is executed, and as a log at the end of the transaction, the join point, identification time, log acquisition target information, and end time Is provided with a log acquisition unit that executes a process of storing the information in the log recording unit.

また、請求項8に記載のログ取得プログラムは、アスペクト指向技術を用いてログを取得するプログラムであって、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻をタイマーから読み出して識別用時刻とし、識別用時刻を当該時点でのジョインポイントに関連づけて記憶装置に記憶させる処理、トランザクションのログ取得対象情報を記憶装置に記憶させる処理及びトランザクションの開始時のログとして、ジョインポイント、識別用時刻及びログ取得対象情報をログ記録部に記憶させる処理、並びにトランザクションの終了時に、当該時点でのジョインポイントをキーとして識別用時刻を読み出してこれらを記憶装置に記憶させる処理、トランザクションのログ取得対象情報を記憶装置に記憶させる処理、当該時点での時刻をタイマーから読み出して終了時刻とし、終了時刻を記憶装置に記憶させる処理及びトランザクションの終了時のログとして、ジョインポイント、識別用時刻、ログ取得対象情報及び終了時刻をログ記録部に記憶させる処理をコンピュータに実行させるものである。   The log acquisition program according to claim 8 is a program for acquiring a log by using aspect-oriented technology, and at the start of a transaction to be acquired by a log, the time at the time is read from the timer and identified. Process for storing the identification time in the storage device in association with the join point at the time, processing for storing the log acquisition target information of the transaction in the storage device, and log at the start of the transaction as a join point, identification Processing for storing the time and log acquisition target information in the log recording unit, processing for reading the identification time using the join point at the time as a key and storing them in the storage device at the end of the transaction, transaction log acquisition Processing to store the target information in the storage device, at the time Is read from the timer as the end time, the process of storing the end time in the storage device and the log at the end of the transaction, the join point, identification time, log acquisition target information, and end time are stored in the log recording unit The processing is executed by a computer.

したがって、アスペクト指向技術を用いたログの取得であって、トランザクションの開始時に、ジョインポイント、識別用時刻及びログ取得対象情報がログとして保存され、トランザクションの終了時にジョインポイント、識別用時刻、ログ取得対象情報及び終了時刻がログとして保存されることにより、システムの運用者は、並列処理がなされた場合であっても、開始時と終了時に共通するジョインポイント、識別用時刻、ログ取得対象情報を参考にして、識別用時刻と終了時刻との時間間隔から、あるトランザクションにかかった処理時間を正確かつ簡易に判断することが可能となる。尚、ジョインポイントとは、アスペクト指向技術において、コードのどこでアドバイス(処理内容、この場合、ログ取得)の対象にするかというコード中の場所をいう。また、本明細書においてトランザクションとは、ログ取得の対象となる処理全般を指し、メソッド及び後述するコンストラクタの呼出し、データの表示機能等も含むものである。   Therefore, log acquisition using aspect-oriented technology, at the start of the transaction, the join point, identification time and log acquisition target information are saved as a log, and at the end of the transaction, the join point, identification time, and log acquisition By storing the target information and end time as a log, the system operator can set the common join point, identification time, and log acquisition target information at the start and end even when parallel processing is performed. For reference, it is possible to accurately and easily determine the processing time required for a certain transaction from the time interval between the identification time and the end time. The join point refers to a place in the code where the advice (processing contents, in this case, log acquisition) is targeted in the aspect-oriented technology. Further, in this specification, a transaction refers to the entire processing that is the target of log acquisition, and includes a method and a later-described constructor call, a data display function, and the like.

また、請求項2に記載の発明は、請求項1に記載のログ取得方法において、トランザクションの開始時に、識別用時刻を当該時点でのジョインポイントに関連づけて記憶する処理及びトランザクションのログ取得対象情報を記憶する処理を行った後に、更に、当該時点での時刻を開始時刻として取得して記憶する処理を行って、トランザクションの開始時のログとして保存するようにしている。したがって、トランザクションの開始直前に開始時刻を識別用時刻とは別途取得し、開始時のログとして保存している。   The invention according to claim 2 is the log acquisition method according to claim 1, wherein at the start of the transaction, the processing for storing the identification time in association with the join point at the time and the transaction log acquisition target information In addition, after the process of storing is performed, a process of acquiring and storing the time at the time as the start time is performed and stored as a log at the start of the transaction. Therefore, the start time is acquired separately from the identification time immediately before the start of the transaction, and stored as a log at the start.

また、請求項3に記載の発明は、請求項1または2のいずれかに記載のログ取得方法において、トランザクションの開始時に、メソッドがどの順番で呼び出されたかを示す呼出しスタックを併せて記憶し、トランザクションの開始時のログとして保存するようにしている。   Further, the invention according to claim 3 is the log acquisition method according to claim 1 or 2, further storing a call stack indicating in what order the methods are called at the start of the transaction, It is saved as a log at the start of a transaction.

したがって、呼出しスタックを取得することにより、同じメソッドが呼び出された順番によってメソッドの処理時間が異なる場合であっても、それぞれの呼出位置で何秒かかったかをログとして保存することが可能となる。   Therefore, by acquiring the call stack, it is possible to save as a log how many seconds it took at each call position even if the processing time of the method differs depending on the order in which the same method is called.

また、請求項4に記載の発明は、請求項1から3までのいずれかに記載のログ取得方法において、ログ取得の対象となるオブジェクトクラス及びメソッドを、予めパラメータとして任意に設定可能としている。したがって、アスペクト指向技術が用いられているので、ログ取得の対象となるクラス及びメソッドをシステムの運用中にも変更することを可能としている。   According to a fourth aspect of the present invention, in the log acquisition method according to any one of the first to third aspects, an object class and a method that are targets of log acquisition can be arbitrarily set as parameters in advance. Therefore, since the aspect-oriented technology is used, it is possible to change the class and method for which the log is acquired even during operation of the system.

また、請求項5に記載の発明は、請求項1から4までのいずれかに記載のログ取得方法において、トランザクションの開始時に、カウンタの値をインクリメントし、予め設定されたサンプリング周期の設定値とカウンタの値とが一致した場合にのみログの取得を行うようにしている。   According to a fifth aspect of the present invention, in the log acquisition method according to any one of the first to fourth aspects, at the start of a transaction, a counter value is incremented, and a preset sampling period setting value is set. The log is acquired only when the counter value matches.

したがって、予めパラメータとして入力されるサンプリング周期の設定値により、ログの取得を行う頻度を任意に設定可能としている。   Therefore, the log acquisition frequency can be arbitrarily set by the set value of the sampling period input in advance as a parameter.

また、請求項6に記載のログ取得方法は、請求項1から5までのいずれかに記載のログ取得方法を、監視制御システムにおいて監視制御機能を実現する監視制御アプリケーションに利用されるソフトウェアライブラリに適用するようにしている。   According to a sixth aspect of the present invention, in the log acquisition method according to the sixth aspect, the log acquisition method according to any one of the first to fifth aspects is applied to a software library used for a monitoring control application that implements a monitoring control function in the monitoring control system. I am trying to apply it.

したがって、アスペクト指向技術により、ソフトウェアライブラリを実現する「情報モデル」とは別のソースコードとしてログ取得のためのコードを記載し、「情報モデル」の修正等に際しても、ログ取得のためのソースコードを変更する必要がないようにしている。   Therefore, the code for log acquisition is described as source code different from the “information model” that implements the software library by aspect-oriented technology, and the source code for log acquisition is also used when modifying the “information model” There is no need to change.

請求項1に記載のログ取得方法、請求項7に記載のログ取得システム及び請求項8に記載のログ取得プログラムによれば、トランザクションが並列処理される場合であっても、あるトランザクションに要した時間を個別に識別できることができる。例えば、並列処理において、スレッドAにてメソッド1が起動され、その直後にスレッドBにてメソッド1が終了した場合、どのトランザクションを測定しているのかをきちんと把握していないと、実際とは異なる短い時間が計測されてしまうが、各メソッドの処理に要した時間を個別に識別することができるので、このような不具合を回避することが可能となる。また、アスペクトを用いることによって、各オブジェクトクラスには本来の処理だけを定義すれば良く、ソフトウェアの保守性を向上させることができる。   According to the log acquisition method according to claim 1, the log acquisition system according to claim 7, and the log acquisition program according to claim 8, even if a transaction is processed in parallel, a certain transaction is required. The time can be individually identified. For example, in parallel processing, when method 1 is activated in thread A and method 1 is terminated in thread B immediately after that, it is different from the actual situation if it is not properly grasped which transaction is being measured. Although a short time is measured, since the time required for processing each method can be individually identified, such a problem can be avoided. Also, by using the aspect, it is only necessary to define the original processing for each object class, and software maintainability can be improved.

また、請求項2に記載のログ取得方法によれば、識別用時刻の取得後であって、トランザクションの開始直前に再度開始時刻を取得することにより、当該開始時刻及び終了時刻から処理時間をより正確に計測することが可能となる。   In addition, according to the log acquisition method according to claim 2, by acquiring the start time again immediately after the acquisition of the identification time and immediately before the start of the transaction, the processing time can be further increased from the start time and the end time. It becomes possible to measure accurately.

また、請求項3に記載のログ取得方法によれば、同じメソッドがどのスレッドに呼出されるかによって処理時間が異なる場合であっても、呼出しスタックを参照することでそれぞれの呼出位置で何秒かかったかを判断することができる。例えば、対象メソッドを呼び出すスレッド毎にメソッドの処理時間をログとして記録することが可能となる。   According to the log acquisition method of claim 3, even if the processing time differs depending on which thread the same method is called, by referring to the call stack, the number of seconds at each call position It can be judged whether it took. For example, the processing time of a method can be recorded as a log for each thread that calls the target method.

また、請求項4に記載のログ取得方法によれば、ログを取得する対象となるクラス及びメソッドを、システムの実運用中にも任意に変更することが可能となる。更に、ログの取得対象を任意に選択できることにより、運用者は適宜ログ取得の必要な処理を選択することができ、システム全体におけるログ取得のための処理の負荷を軽減し、オーバヘッドタイムの最小化を図ることが可能となる。   Further, according to the log acquisition method of the fourth aspect, it is possible to arbitrarily change the class and the method for which the log is acquired even during the actual operation of the system. Furthermore, the ability to select the log acquisition target arbitrarily allows the operator to select the process that needs to acquire the log as appropriate, reducing the processing load for log acquisition in the entire system and minimizing overhead time. Can be achieved.

また、請求項5に記載のログ取得方法によれば、ログの取得を行う頻度を任意に設定することが可能となる。これにより、運用者の要求に応じたログの取得を行うことが可能となる。また、システム全体におけるログ取得のための処理の負荷を軽減し、オーバヘッドタイムの最小化を図ることが可能となる。   Further, according to the log acquisition method of the fifth aspect, it is possible to arbitrarily set the frequency of log acquisition. As a result, it is possible to acquire a log according to an operator's request. In addition, it is possible to reduce the processing load for log acquisition in the entire system and to minimize the overhead time.

また、請求項6に記載のログ取得方法によれば、様々なシステム開発者に利用される監視制御用ライブラリにおけるログ取得を、監視制御処理を実行するアプリケーション及び監視制御用ライブラリに影響を与えることなく実現することができるため、監視制御システム全体の保守性を向上することができる。   According to the log acquisition method described in claim 6, the log acquisition in the monitoring control library used by various system developers affects the application that executes the monitoring control processing and the monitoring control library. Therefore, maintainability of the entire monitoring control system can be improved.

以下、本発明の構成を図面に示す実施形態に基づいて詳細に説明する。   Hereinafter, the configuration of the present invention will be described in detail based on embodiments shown in the drawings.

本発明のログ取得方法は、アスペクト指向によりログを取得する方法において、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻を識別用時刻として取得して、識別用時刻を当該時点でのジョインポイントに関連づけて記憶する処理及びトランザクションのログ取得対象情報を記憶する処理を少なくとも行って、トランザクションの開始時のログとして、ジョインポイント、識別用時刻及びログ取得対象情報を保存し、トランザクションの終了時に、当該時点でのジョインポイントをキーとして識別用時刻を取得してこれらを記憶する処理、トランザクションのログ取得対象情報を記憶する処理及び当該時点での時刻を終了時刻として取得して、終了時刻を記憶する処理を少なくとも行って、トランザクションの終了時のログとして、ジョインポイント、識別用時刻、ログ取得対象情報及び終了時刻を保存するようにしている。また、ログ取得の対象となるトランザクションの開始直前に、識別用時刻とは別に開始時刻をしゅとくすることで、より正確にトランザクションの処理時間の計測をしても良い。更に、ログとして取得する情報も、業務の必要性に応じて上述の項目に加えて適宜必要な情報を取得するようにすることが可能である。   The log acquisition method according to the present invention is an aspect-oriented method of acquiring a log. At the start of a transaction to be acquired, the time at the time is acquired as an identification time, and the identification time is determined at the time. At least the process of storing the information in relation to the join point and the process of storing the log acquisition target information of the transaction, and storing the join point, the identification time and the log acquisition target information as a log at the start of the transaction, At the end, the process of acquiring identification times using the join point at the time as a key and storing them, the process of storing the transaction log acquisition target information, and the time at the time as the end time At least when processing to memorize the time, at the end of the transaction As a log, join points, identification time, so that to store the log acquisition target information and end time. Alternatively, the transaction processing time may be measured more accurately by measuring the start time separately from the identification time immediately before the start of the transaction for which the log is to be acquired. Furthermore, as information acquired as a log, necessary information can be appropriately acquired in addition to the above-described items according to the necessity of business.

本発明のログ取得方法、ログ取得システム及びログ取得プログラムを適用するシステムは、オブジェクト指向技術により設計されたシステムであれば、特に限られるものではない。本実施形態では、以下に水再生センター(下水処理場)の監視制御システム(参考文献:中村、吉田、高橋、大谷、嶋田「実験システム構築を通じた水再生センター監視制御システムに対する汎用技術の適用性評価」、平成17年電気学会産業応用部門大会、pp.II-265〜II268、平成17年8月))に本発明のログ取得方法、ログ取得システム及びログ取得プログラムを適用した場合について説明する。   The system to which the log acquisition method, the log acquisition system, and the log acquisition program of the present invention are applied is not particularly limited as long as it is a system designed by object-oriented technology. In this embodiment, the monitoring and control system of the water reclamation center (sewage treatment plant) (reference documents: Nakamura, Yoshida, Takahashi, Otani, Shimada “Applicability of general-purpose technology to the water reclamation center monitoring and control system through the construction of an experimental system” Evaluation ”, 2005 Institute of Electrical Engineers of Japan Industrial Application Division, pp.II-265 to II268, August 2005)), the case of applying the log acquisition method, log acquisition system and log acquisition program of the present invention will be described. .

本実施形態での水再生センターの監視制御システム1の構成は、例えば、図1に示すようなハードウェア構成となっている。   The configuration of the water reclamation center monitoring control system 1 in the present embodiment is, for example, a hardware configuration as shown in FIG.

本実施形態の監視制御システム1は、中央監視制御設備2、プロセスコントローラ3、シーケンサ4により構成される。以下、プロセスコントローラ3とシーケンサ4を併せてローカル制御設備6という。   The monitoring control system 1 according to this embodiment includes a central monitoring control facility 2, a process controller 3, and a sequencer 4. Hereinafter, the process controller 3 and the sequencer 4 are collectively referred to as a local control facility 6.

中央監視制御設備2には、図2に示すようなディスプレイ等の出力装置20と、キーボード、マウス等の入力装置21と、演算処理を行う中央処理演算装置(CPU)22と、計算中のデータ、パラメータ等が記憶される主記憶装置(RAM)23と、各データベース、計算結果等が記録される補助記憶装置24としてのハードディスク、外部との通信を行う通信インタフェース25等を備えたワークステーションや専用の計算機が用いられる。以下、主記憶装置23及び補助記憶装置24を総称して単に記憶装置ともいう。また、上記各ハードウェア資源は例えばバス26を通じて電気的に接続されている。   The central monitoring control facility 2 includes an output device 20 such as a display as shown in FIG. 2, an input device 21 such as a keyboard and a mouse, a central processing unit (CPU) 22 that performs arithmetic processing, and data being calculated. A workstation having a main storage device (RAM) 23 in which parameters and the like are stored, a hard disk as an auxiliary storage device 24 in which each database and calculation results are recorded, a communication interface 25 for communicating with the outside, etc. A dedicated computer is used. Hereinafter, the main storage device 23 and the auxiliary storage device 24 are collectively referred to simply as a storage device. The hardware resources are electrically connected through a bus 26, for example.

更に、図3に示すように中央監視制御装置2には、監視制御用ライブラリ17及び監視制御アプリケーション(監視制御APP1〜3)16が構成される。監視制御用ライブラリ17及び監視制御アプリケーション16を実現するプログラム等は、補助記憶装置24に記録されており、これらがCPU22に読み込まれ実行されることによって、ワークステーションや専用の計算機が中央監視制御設備2として機能する。その実行の際に必要なデータ、パラメータ等は、RAM23にロードされる。   Further, as shown in FIG. 3, the central supervisory control device 2 includes a supervisory control library 17 and supervisory control applications (supervisory control APP 1 to 3) 16. The programs for realizing the monitoring control library 17 and the monitoring control application 16 are recorded in the auxiliary storage device 24, and these are read and executed by the CPU 22 so that the workstation and the dedicated computer can be centrally monitored and controlled. Functions as 2. Data, parameters, and the like necessary for the execution are loaded into the RAM 23.

監視制御用ライブラリ17は、様々な監視制御アプリケーション16において利用されるものである。監視制御用ライブラリ17は、例えば、監視制御アプリケーション16の加工処理に必要な基本データ15(図示せず)を保存するとともに、ローカル制御設備6を介して監視対象機器5との監視データ18及び制御データ19の交換を担う。尚、基本データ15とは、例えば、現場から得られた監視データ18や運用者9が入力した設定値などである。   The monitoring control library 17 is used in various monitoring control applications 16. The monitoring control library 17 stores, for example, basic data 15 (not shown) necessary for processing of the monitoring control application 16, and monitoring data 18 and control with the monitoring target device 5 via the local control facility 6. Responsible for exchanging data 19. Note that the basic data 15 is, for example, monitoring data 18 obtained from the site, setting values input by the operator 9, and the like.

また、監視制御アプリケーション16は、例えば、監視結果を出力装置20に表示する等の運用者9に対するユーザインタフェースを提供するとともに、監視データ18及び制御データ19の加工処理等を行うものである。尚、本実施形態では、監視制御アプリケーション16と監視制御用ライブラリ17は同一のハードウェア上に実装するようにしているが、分散計算機環境において実現するようにしても良い。   The monitoring control application 16 provides a user interface for the operator 9 such as displaying a monitoring result on the output device 20 and processes the monitoring data 18 and the control data 19. In this embodiment, the monitoring control application 16 and the monitoring control library 17 are mounted on the same hardware, but may be realized in a distributed computer environment.

本実施形態では、この中央監視制御装置2がログ取得システム10として機能する。ログ取得システム10は、監視制御用ライブラリ17において監視データ18及び制御データ19の交換処理や基本データ15の保存・取得、更には基本データ15のファイルへの出力や監視制御アプリケーション16を経由した監視データ18の表示等にかかわるトランザクションについてログ8を取得、出力するものである。このように、ログ取得システム10は、中央監視制御装置2が通常実行する監視制御機能とは別に、ライブラリ自体の保守に有用なデータを取得することを可能とするものである。   In the present embodiment, the central monitoring control device 2 functions as the log acquisition system 10. The log acquisition system 10 exchanges the monitoring data 18 and the control data 19 in the monitoring control library 17, saves and acquires the basic data 15, outputs the basic data 15 to a file, and performs monitoring via the monitoring control application 16. The log 8 is acquired and output for transactions related to the display of the data 18 and the like. As described above, the log acquisition system 10 can acquire data useful for maintenance of the library itself, separately from the monitoring control function normally executed by the central monitoring control device 2.

本実施形態のログ取得システム10の機能構成の一例を図4に示す。本実施形態におけるログ取得システム10は、ログ取得処理を実行するログ取得部11、ログ取得のためのプログラムを記憶したプログラム記憶部12、作成されたログ8をログファイルとして記憶するログ記憶部13及びログを出力装置20に表示する表示制御部14により構成される。   An example of the functional configuration of the log acquisition system 10 of the present embodiment is shown in FIG. The log acquisition system 10 in this embodiment includes a log acquisition unit 11 that executes log acquisition processing, a program storage unit 12 that stores a program for log acquisition, and a log storage unit 13 that stores the created log 8 as a log file. The display control unit 14 displays the log on the output device 20.

また、プロセスコントローラ3には、少なくとも演算装置(CPU)、記憶装置、通信インタフェース等を備えた専用に開発されたハードウェア装置が主として用いられる。   The process controller 3 is mainly a hardware device developed exclusively for at least an arithmetic unit (CPU), a storage device, a communication interface, and the like.

プロセスコントローラ3は、シーケンサ4から送られてきたデータに基づきフィードバック制御に必要な積分計算や微分計算等の演算を行い、演算結果に基づく指令をシーケンサ4に送る機能および中央監視制御設備2から送られてきた指令値に基づいて制御演算のパラメータを設定したり、シーケンサ4に当該機器の操作指令を送ったりする機能を備えている。尚、個々の監視対象機器5a〜5dを制御する際に必要となる演算は、中央監視制御設備2で実行されるものではなく、プロセスコントローラ3により実行される場合が多い。   The process controller 3 performs calculations such as integral calculation and differential calculation necessary for feedback control based on the data sent from the sequencer 4, and sends a command based on the calculation result to the sequencer 4 and the central monitoring control equipment 2. A function for setting control calculation parameters based on the received command values and sending an operation command for the device to the sequencer 4 is provided. In addition, the calculation required when controlling each monitoring object apparatus 5a-5d is not performed by the central monitoring control equipment 2, but is often performed by the process controller 3.

シーケンサ4には、例えばプログラマブルロジックコントローラ(PLC)が用いられ、各シーケンサ4a〜4dには、例えば、ポンプ5a、弁5b、コンベヤ5c、送風機5d等が接続される。   For example, a programmable logic controller (PLC) is used for the sequencer 4, and for example, a pump 5a, a valve 5b, a conveyor 5c, a blower 5d, and the like are connected to each of the sequencers 4a to 4d.

シーケンサ4は、各監視対象機器5a〜5dからの上記アナログ値やディジタル値を示す信号を受けとる機能、プロセスコントローラ3からの指令を受信し、設定されたロジックとプロセスコントローラ3からの指令や機器からの信号に基づいてシーケンス制御を行い、信号を各監視対象機器5a〜5dへ送る機能および監視データをプロセスコントローラへ送信する機能等を備えるものである。尚、各監視対象機器5a〜5dとの信号の送受信には、例えば、リモート入出力装置を用いる。   The sequencer 4 receives a signal indicating the analog value or the digital value from each of the monitoring target devices 5a to 5d, a command from the process controller 3, and receives the set logic and the command or device from the process controller 3. The sequence control is performed based on the above signal, and the function of transmitting the signal to each of the monitoring target devices 5a to 5d and the function of transmitting the monitoring data to the process controller are provided. For example, a remote input / output device is used for transmission / reception of signals to / from the monitoring target devices 5a to 5d.

ローカル制御設備6(例えば、PLC)から中央監視制御設備2に送られる監視データ18は、アナログ値(測定値、連続値)とディジタル値(オンオフ情報、0−1値)に区別される。尚、監視データ18の各レコードは、各機器に一意のID(機器ID)を付され、各機器に予め指定された時間間隔で自動的に送信がなされるものである。その際、各機器IDと機器との対応関係については、予め初期設定ファイルとして補助記憶装置24に記憶させておけば良い。   The monitoring data 18 sent from the local control facility 6 (for example, PLC) to the central monitoring control facility 2 is classified into an analog value (measured value, continuous value) and a digital value (on / off information, 0-1 value). Each record of the monitoring data 18 is given a unique ID (device ID) to each device, and is automatically transmitted to each device at a predetermined time interval. At this time, the correspondence relationship between each device ID and the device may be stored in advance in the auxiliary storage device 24 as an initial setting file.

監視データ18のアナログ値には、例えば、水位(基準水位からの差)(m)、ポンプ出力(%)、弁の開閉度(%)、電流値(A)等がある。   The analog value of the monitoring data 18 includes, for example, a water level (difference from the reference water level) (m), pump output (%), valve opening / closing degree (%), current value (A), and the like.

一方、監視データ18のディジタル値には、例えば、弁の閉鎖状況(ON=全閉、OFF=寸開)、受変電設備における開閉装置の状況(ON=投入、OFF=開放)、ポンプの運転状況(ON=運転、OFF=停止)、各種警報(地絡発生の有無等)等がある。   On the other hand, the digital value of the monitoring data 18 includes, for example, the valve closing status (ON = fully closed, OFF = open), the status of the switchgear in the power receiving / transforming equipment (ON = turned on, OFF = opened), and the pump operation. There are situations (ON = running, OFF = stopped), various alarms (presence / absence of occurrence of ground fault, etc.).

また、中央監視制御設備2からローカル制御設備6に送信される制御データ19についても、同様にアナログ値とディジタル値に大別できる。   Similarly, the control data 19 transmitted from the central supervisory control facility 2 to the local control facility 6 can be roughly divided into analog values and digital values.

制御データ19のアナログ値には、例えば、ポンプ出力設定値(%)、弁開度設定値(%)、薬剤注入率(%)等があり、ディジタル値には、例えば、ポンプ、送風機などの各機器の運転指令(ON=運転、OFF=停止)、弁の開閉指令(ON=閉、OFF=開)等がある。   The analog value of the control data 19 includes, for example, a pump output set value (%), a valve opening set value (%), a medicine injection rate (%), and the like, and the digital value includes, for example, a pump, a blower, etc. There are operation commands (ON = operation, OFF = stop), valve opening / closing commands (ON = close, OFF = open), etc. for each device.

以上、本実施形態の監視制御システム1及びログ取得システム10のハードウェア構成について説明したが、上記ハードウェア構成は一例であり、これに限られるものではない。また、監視制御用ライブラリ17とローカル制御設備6の間で制御データ、監視データ等のデータ交換を行う際の通信プロトコルは特に限定されるものではない。本実施形態では、通信プロトコルとしてトランスポート層以下にTCP・UDP/IP/Ethernet(登録商標)を用い、セション層以上に独自に定義したものを利用しているが、通信プロトコルは特に限られるものではなく、新規又は公知の組合せを用いればよい。   The hardware configurations of the monitoring control system 1 and the log acquisition system 10 according to the present embodiment have been described above. However, the hardware configurations are merely examples, and the present invention is not limited thereto. The communication protocol for exchanging data such as control data and monitoring data between the monitoring control library 17 and the local control facility 6 is not particularly limited. In this embodiment, TCP / UDP / IP / Ethernet (registered trademark) is used as a communication protocol below the transport layer and uniquely defined above the session layer, but the communication protocol is particularly limited. Instead, a new or known combination may be used.

図5に本実施形態のログ取得システム10に用いる実行コードを生成する様子を模式した図を示す。ログ取得システム10は、監視制御用ライブラリ17本体を構成するオブジェクトクラス30,31と、ログ出力機能を定義したアスペクト32を別々に定義し、アスペクトコンパイラ33を通じて実行コード37を生成するものである。   FIG. 5 is a diagram schematically showing how an execution code used in the log acquisition system 10 of the present embodiment is generated. The log acquisition system 10 separately defines object classes 30 and 31 constituting the main body of the monitoring control library 17 and an aspect 32 that defines a log output function, and generates an execution code 37 through an aspect compiler 33.

オブジェクトクラスA30は、監視対象機器(ポンプ5a、弁5b等)の計測値を取得し、当該計測値が予め設定された閾値を超える値の場合に、計測値の送信を行うものである。例えば、あるポンプの出力の計測値が閾値(120%)を超える場合は、異常として計測値を送信するものである。また、オブジェクトクラスB31は、監視対象機器のON/OFF状態を取得して、これを送信するものである。尚、オブジェクトクラス30,31は、監視制御用ライブラリ17におけるログ取得を行う可能性のあるオブジェクトクラスの一例であり、特に限られるものではない。   The object class A30 acquires the measurement value of the monitoring target device (pump 5a, valve 5b, etc.), and transmits the measurement value when the measurement value exceeds a preset threshold value. For example, when the measured value of the output of a certain pump exceeds a threshold value (120%), the measured value is transmitted as an abnormality. The object class B31 acquires the ON / OFF state of the monitoring target device and transmits it. Note that the object classes 30 and 31 are examples of object classes that may perform log acquisition in the monitoring control library 17 and are not particularly limited.

これらのオブジェクトクラスに対し、アスペクト指向技術を用いて、アスペクト32として後述するログ取得プログラムを記述し、これらをアスペクトコンパイラ33(例えば、AspectJにおけるajc)によりコンパイルすることで、アスペクト32として記載されたログ取得プログラムは、オブジェクトクラスA30及びオブジェクトクラスB31の双方のオブジェクトクラスの処理に組み込まれる。これを中間コードA34、中間コードB35という。更に、中間コードA34、中間コードB35を言語コンパイラ36によりコンパイルすることにより実行コード37が生成されるものである。   For these object classes, an aspect-oriented technique is used to describe a log acquisition program, which will be described later as aspect 32, and these are compiled as aspect 32 by compiling them with aspect compiler 33 (for example, ajc in aspectJ). The log acquisition program is incorporated in the processing of both the object class A30 and the object class B31. These are called intermediate code A34 and intermediate code B35. Further, the execution code 37 is generated by compiling the intermediate code A34 and the intermediate code B35 by the language compiler 36.

本実施形態では、上述の手法により、ログ取得を行う可能性のあるすべてのオブジェクトクラスに対し、アスペクトを織り込むようにしている。これにより、ログ取得を行う可能性のあるすべてのオブジェクトクラスに対し、一つのアスペクトによりログ取得機能を自動的に織り込むことが可能となる。   In the present embodiment, the aspect is incorporated into all object classes that are likely to acquire logs by the above-described method. As a result, it is possible to automatically incorporate the log acquisition function according to one aspect for all object classes that may perform log acquisition.

以下に、本実施形態のログ取得部11が実行する処理について説明する。以下に述べる各処理は、プログラム記憶部12に記憶されたログ取得プログラムを読み出して、これを実行することにより実行されるものである。   Below, the process which the log acquisition part 11 of this embodiment performs is demonstrated. Each process described below is executed by reading a log acquisition program stored in the program storage unit 12 and executing it.

図7は、トランザクション開始時のログ取得処理の一例を示すフローチャートである。   FIG. 7 is a flowchart illustrating an example of a log acquisition process at the start of a transaction.

先ず、図6に示すログ取得処理開始条件が成立するかどうかを判断し(S101)、成立する場合は(S101:Yes)、図8のフローチャートに示すサンプリング周期となっているかどうか、即ち、ログを取得すべきタイミングであるかどうかを判断し(S102)、サンプリング周期であれば(S102:Yes)、現在の時刻を識別用時刻として取得する(S103)。識別用時刻の取得方法は、特に限られるものではないが、本実施形態では、中央監視制御設備2のタイマー(図示せず)から取得している。   First, it is determined whether or not the log acquisition process start condition shown in FIG. 6 is satisfied (S101). If it is satisfied (S101: Yes), whether or not the sampling cycle shown in the flowchart of FIG. (S102: Yes), the current time is acquired as the identification time (S103). The method for acquiring the identification time is not particularly limited, but in the present embodiment, it is acquired from a timer (not shown) of the central monitoring control facility 2.

これに対し、ログ取得処理開始条件を満たさない場合(S101:No)またはサンプリング周期となっていない場合(S102:No)は、ログ取得処理は終了し、ログは取得されない。   On the other hand, when the log acquisition process start condition is not satisfied (S101: No) or when the sampling cycle is not reached (S102: No), the log acquisition process ends and no log is acquired.

図6にログ取得処理開始条件の一例を示す。本実施形態では、例えば、「トランザクションログを取得するモードである」こと、「トランザクションログの取得対象クラスである」こと、「トランザクションログの取得対象メソッドである」ことをすべて満たし、且つ「メソッドの実行」、「コンストラクタの呼出し」、または「表示機能の呼出し」のいずれかが成立することを開始条件としている。尚、図6に示すログ取得処理開始条件は一例であって監視制御業務の必要に応じたログ取得を行うようにすればよい。   FIG. 6 shows an example of the log acquisition process start condition. In the present embodiment, for example, all of the “transaction log acquisition mode”, “transaction log acquisition target class”, and “transaction log acquisition target method” are satisfied, and “method The start condition is that any one of “execution”, “calling a constructor”, or “calling a display function” is satisfied. Note that the log acquisition process start condition shown in FIG. 6 is an example, and log acquisition may be performed according to the necessity of the monitoring control work.

本実施形態ログ取得システム10では、トランザクションログの取得の有無を表すモードについては、運用者9が適宜選択可能なパラメータとしている。また、ログの取得対象とするオブジェクトクラス(取得対象クラス)及びメソッド(取得対象メソッド)についても、同様に運用者9が適宜選択可能なパラメータとし、アスペクトが織り込まれたログ取得を行う可能性のあるすべてのオブジェクトクラスから任意に選択可能としている。   In the log acquisition system 10 of the present embodiment, the mode indicating whether or not a transaction log is acquired is a parameter that can be appropriately selected by the operator 9. Similarly, for the object class (acquisition target class) and method (acquisition target method) to be acquired by the log, similarly, the parameter that can be appropriately selected by the operator 9 is used, and there is a possibility of performing log acquisition incorporating an aspect. Any object class can be arbitrarily selected.

本実施形態では、これらのモード、取得対象クラス及び取得対象メソッドをライブラリの運用最中でも変更可能としている。例えば、トランザクションログの取得の有無を表すモードは、booleanの変数として保存され、アスペクトを実行する度にその値が参照される。運用者9がこの値を出力装置20上の操作画面から任意に設定可能とすることで、ライブラリの運用最中でも変更可能としている。   In this embodiment, these modes, acquisition target classes, and acquisition target methods can be changed even during library operation. For example, a mode indicating whether or not a transaction log is acquired is stored as a boolean variable, and the value is referred to every time an aspect is executed. By allowing the operator 9 to arbitrarily set this value from the operation screen on the output device 20, it can be changed even during library operation.

また、取得対象クラスまたは取得対象メソッドであるかどうかは、例えば、thisJoinPointから得られるクラス名またはメソッド名が、ログ取得対象クラスを管理する集合に登録されているかどうかを照合し、真であればログ取得を実行し、偽であればログ取得処理を終了するようにしている。運用者9がこの集合へのクラス名あるいはメソッド名の登録及び削除を出力装置20上の操作画面から任意に設定可能とすることで、ライブラリの運用最中でも変更可能としている。   Also, whether or not it is the acquisition target class or acquisition target method, for example, by checking whether the class name or method name obtained from thisJoinPoint is registered in the set that manages the log acquisition target class, if true Log acquisition is executed, and if it is false, the log acquisition process is terminated. Since the operator 9 can arbitrarily set the registration and deletion of the class name or method name in this set from the operation screen on the output device 20, it can be changed during the library operation.

また、「メソッドの実行」におけるメソッドとは、監視制御用ライブラリ17のために設計されたオブジェクトが有するメソッドを指し、例えば、Java(登録商標)を用いて実装した場合であれば、Java(登録商標)本来のオブジェクトにより提供されるメソッドは対象としないものである。   In addition, the method in “execution of method” refers to a method possessed by an object designed for the monitoring control library 17. For example, when implemented using Java (registered trademark), Java (registered) Trademark) The methods provided by the original object are not targeted.

また、「コンストラクタの呼出し」におけるコンストラクタとは、新たなオブジェクトを生成する際に呼び出されて内容の初期化等を行う処理であり、本実施形態では、監視制御用ライブラリ17のために設計されたオブジェクトが生成される際の所要時間を測定するために開始条件の一つとしているものである。   In addition, the constructor in “calling a constructor” is a process that is called when a new object is generated and performs initialization of contents, and is designed for the monitoring control library 17 in this embodiment. This is one of the start conditions for measuring the time required for generating an object.

また、「表示機能の呼出し」については、本実施形態では、表示機能がどのように実装されるかは監視制御用ライブラリ17の対象外であるので、例えば、Java(登録商標)において表示用のオブジェクトを再描写するメソッドを呼び出す際に、真の値を返すように設定している。   In addition, regarding “calling of display function”, in this embodiment, how the display function is implemented is out of the scope of the monitoring control library 17, and for example, for display in Java (registered trademark). When calling a method that redraws an object, it is set to return a true value.

次に、現在のジョインポイントをキーとして識別用時刻を値とする対を保存する(S104)。ジョインポイントとは、アスペクト指向技術において、アスペクトが呼び出されている位置をいい、それぞれの位置について一意に定まる値を有するものである。尚、本実施形態では、ジョインポイントのハッシュコードと識別用時刻の対を保存するようにしている。   Next, a pair having the current join point as a key and the time for identification as a value is stored (S104). A join point refers to a position where an aspect is called in aspect-oriented technology, and has a value uniquely determined for each position. In this embodiment, a pair of join point hash code and identification time is stored.

次に、ログ取得対象情報を取得する(S105)。ログ取得対象情報とは、例えば、ログを取得する対象となっているクラス名、メソッド名及び監視対象物の名称をいう。例えば、ある監視制御物である沈砂池(「沈砂池1号」)がTankオブジェクトによって表され、その水位をsetMeasurement()メソッドによって記録する場合に、このメソッドに関するログを取得する場合、ログ取得対象情報としては、Tankオブジェクトであること、setMeasurement()というメソッドであること及び監視制御物が「沈砂池1号」という名前であることが取得される。   Next, log acquisition target information is acquired (S105). The log acquisition target information refers to, for example, a class name, a method name, and a monitoring target name that are targets for log acquisition. For example, when a sedimentation basin (“sedimentation basin No. 1”), which is a monitoring control object, is represented by a Tank object and its water level is recorded by the setMeasurement () method, the log acquisition target As information, it is acquired that it is a Tank object, a method called setMeasurement (), and that the monitoring control object is named “Sedimentation basin No. 1”.

次に、呼出しスタックを取得する(S106)。呼出しスタックとは、メソッドの読み出す順序であり、処理対象となっているメソッドを呼び出したメソッドを呼出しスタックとして記憶するものである。具体的には、例えば、Java(登録商標)の場合Throwableクラスを生成することで、生成時点での呼出しスタックを取得することが可能となる。更に、Throwable.getStackTrace()メソッドを利用することで、スタックを構成するクラス名とメソッド名の組合せ等の要素に分解することが可能となる。本実施形態では、例えば、この要素から文字列を取得することで、最終的にログに保存する呼出しスタックを取得している。   Next, the call stack is acquired (S106). The call stack is the order in which the methods are read, and stores the method that called the processing target method as the call stack. Specifically, for example, in the case of Java (registered trademark), it is possible to acquire a call stack at the time of generation by generating a Throwable class. Furthermore, by using the Throwable.getStackTrace () method, it is possible to decompose it into elements such as combinations of class names and method names constituting the stack. In the present embodiment, for example, by acquiring a character string from this element, the call stack to be finally saved in the log is acquired.

次に、現在の時刻を開始時刻として取得する(S107)。開始時刻の取得方法は、特に限られるものではないが、識別用時刻と同様に中央監視制御設備2のタイマー(図示せず)から取得するものである。本実施形態では、開始時刻をログ取得の対象となるトランザクションの開始直前に、識別用時刻とは別途記憶することで、より正確なトランザクションの処理時間の計測を可能としている。尚、開始時刻を取得せず、識別用時刻を開始時刻と同じと扱い処理の簡素化を図ることも可能である。   Next, the current time is acquired as the start time (S107). Although the acquisition method of a start time is not specifically limited, It acquires from the timer (not shown) of the central monitoring control equipment 2 similarly to the time for identification. In this embodiment, the start time is stored separately from the identification time immediately before the start of the transaction that is the target of log acquisition, thereby enabling more accurate transaction processing time measurement. It is also possible to simplify the processing by treating the identification time as the start time without acquiring the start time.

次に、ログ取得対象情報、識別データ、呼出しスタック及び開始時刻を保存して(S108)、トランザクション開始時のログ取得処理は終了する。尚、識別データとは、S105で取得したメソッド名とS104で取得した現在のジョインポイントをキーとして識別用時刻を値とする対とを組み合わせたものいう。この識別データを記憶しておくことにより、並列処理がなされていて、同じメソッドに対するアクセスがほぼ同時に発生したとしても、ログを解析する際に、いずれのアクセスであるかを判別することが可能となる。尚、図7に示したログ取得対象情報、識別データ、呼出しスタック及び開始時刻の取得順序は、一例でありこれに限られるものではない。また、上述の開始時のログとして取得する情報は一例であり、業務の必要性に応じて適宜必要な情報を取得するようにすればよい。   Next, the log acquisition target information, identification data, call stack, and start time are stored (S108), and the log acquisition process at the start of the transaction ends. The identification data refers to a combination of the method name acquired in S105 and a pair having the identification time as a value using the current join point acquired in S104 as a key. By storing this identification data, it is possible to determine which access is made when analyzing the log even if parallel processing is performed and accesses to the same method occur almost simultaneously. Become. The log acquisition target information, identification data, call stack, and start time acquisition order shown in FIG. 7 is an example and is not limited to this. Moreover, the information acquired as a log at the time of the above-mentioned start is an example, and what is necessary is just to acquire required information suitably according to the necessity of work.

図8にログ取得処理において、設定されたサンプリングのタイミングであるかどうか判断するサンプリング判定処理(S102)の一例を示す。   FIG. 8 shows an example of the sampling determination process (S102) for determining whether it is the set sampling timing in the log acquisition process.

本実施形態では、同じメソッドの呼出しに対し、何回に1回(例えば、100回に1回)の割合でログを保存するのかを示す値(サンプリング周期)を設定可能としている。サンプリング周期は、運用者9が任意に設定することが可能なパラメータであり、メモリ上に読み出されたサンプリング周期の設定値は、処理回数を示すカウンタと比較される。これにより、サンプリング周期として設定した値分のメソッドの実行に際し、1回のログ取得処理を行うことが可能となる。   In the present embodiment, it is possible to set a value (sampling period) indicating how many times the log is stored once (for example, once in 100) for the same method call. The sampling period is a parameter that can be arbitrarily set by the operator 9, and the setting value of the sampling period read out on the memory is compared with a counter indicating the number of processing times. This makes it possible to perform one log acquisition process when executing the method corresponding to the value set as the sampling period.

このように、ログの取得を行う頻度を任意に設定可能とすることにより、例えば、普段は、サンプリング回数を多めに設定しておき、詳細な試験を行いたい場合にのみサンプリング回数を少なめに設定してログの取得頻度を多くする等の運用が可能となる。また、各メソッドの毎回の実行につきログを取得することは、システムの本来の目的(例えば、監視制御処理)とは異なる処理でシステム全体に負荷をかけ、処理量、処理時間の増大に繋がる。したがって、毎回ログの取得処理を行う場合に比べ、システム全体におけるログ取得処理の処理量を軽減することができるので、オーバヘッドタイムの最小化を図ることが可能となる。   In this way, by making it possible to arbitrarily set the frequency of log acquisition, for example, usually set a large number of samplings and set a small number of samplings only when a detailed test is desired. Thus, operation such as increasing the frequency of log acquisition becomes possible. In addition, acquiring a log for each execution of each method places a load on the entire system in a process different from the original purpose of the system (for example, monitoring control process), leading to an increase in processing amount and processing time. Therefore, the amount of log acquisition processing in the entire system can be reduced as compared with the case where log acquisition processing is performed every time, so that overhead time can be minimized.

サンプリング判定処理では、先ずカウンタの値を1増加させ(S201)、サンプリング周期とカウンタの値が一致するかどうかを判断する(S202)。   In the sampling determination process, first, the counter value is incremented by 1 (S201), and it is determined whether the sampling period and the counter value match (S202).

サンプリング周期とカウンタの値が一致している場合(S202:Yes)は、対象ジョインポイントを現在のジョインポイントに更新し(S203)、更に対象スレッドを現在実行しているスレッドに更新したうえで(S204)、S205の判断に移る。一方、サンプリング周期とカウンタの値が一致していない場合(S202:No)は、S205の判断に移るものである。   If the sampling period and the counter value match (S202: Yes), the target join point is updated to the current join point (S203), and the target thread is further updated to the currently executing thread (S203). S204) and the process proceeds to S205. On the other hand, if the sampling period and the counter value do not match (S202: No), the process proceeds to S205.

S205は、対象ジョインポイントが空でなく、かつ対象スレッドがこの手続きを呼び出しているスレッドかどうかを判断する(S205)。具体的には、ジョインポイントがnull値でないこと及び対象となるスレッドを表すオブジェクトが一致するかどうかを判断するものである。   In step S205, it is determined whether the target join point is not empty and the target thread is a thread calling this procedure (S205). Specifically, it is determined whether the join point is not a null value and whether the object representing the target thread matches.

S205の条件に該当する場合(S205:Yes)は真を返し(S206)、該当しない場合(S205:No)は偽を返して(S207)、サンプリング判定処理は終了する。即ち、本処理では、設定されたサンプリングのタイミングであれば真の値、そうでなければ偽の値が戻り値となるものである。   When the condition of S205 is satisfied (S205: Yes), true is returned (S206), and when not applicable (S205: No), false is returned (S207), and the sampling determination process ends. In other words, in this process, the true value is the set sampling timing, and the false value is the return value otherwise.

図9は、トランザクション終了時のログ取得処理の一例を示すフローチャートである。   FIG. 9 is a flowchart illustrating an example of a log acquisition process at the end of a transaction.

先ず、ログ取得処理開始条件が成立するかどうかを判断し(S301)、成立する場合は(S301:Yes)、現在のジョインポイントと開始時に保存したジョインポイントが同一かどうかを判断する(S302)。同一である場合(S302:Yes)は、サンプリングの諸データ(カウンタ等)をリセットする(S303)。一方、ログ取得処理終了条件が成立しない場合(S301:No)、または現在のジョインポイントと開始時に保存したジョインポイントが一致しない場合(S302:No)は、トランザクション終了時のログ取得処理は終了する。   First, it is determined whether or not the log acquisition process start condition is satisfied (S301). If it is satisfied (S301: Yes), it is determined whether or not the current join point is the same as the join point stored at the start (S302). . If they are the same (S302: Yes), the sampling data (counter, etc.) are reset (S303). On the other hand, when the log acquisition process end condition is not satisfied (S301: No), or when the current join point does not match the join point stored at the start (S302: No), the log acquisition process at the end of the transaction ends. .

次に、現在のジョインポイントに対応する識別用時刻を取得する(S304)。ここで識別用時刻は、S104において保存された「現在のジョインポイントをキーとして識別用時刻を値とする対」から取得する。これにより、同じメソッドが複数並行して呼び出された場合でも、それぞれ独立して時間を計測することが可能となる。   Next, the identification time corresponding to the current join point is acquired (S304). Here, the identification time is acquired from the “pair having the current join point as a key and the identification time as a value” stored in S104. As a result, even when the same method is called in parallel, the time can be measured independently.

ここで、識別用時刻が空かどうかを判断し、空であれば(S305:Yes)無効なデータであるとしてログ取得処理は終了する。   Here, it is determined whether or not the identification time is empty, and if it is empty (S305: Yes), the log acquisition process ends as invalid data.

一方、識別用時刻がある場合(S305:No)は、ログ取得対象情報を取得する(S306)。尚、処理の内容は、S105と同様であるので説明を省略する。   On the other hand, when there is an identification time (S305: No), the log acquisition target information is acquired (S306). Note that the content of the process is the same as that in S105, and thus the description thereof is omitted.

次に、終了時刻を取得する(S307)。終了時刻の取得方法は、特に限られるものではないが、識別用時刻と同様に中央監視制御設備2のタイマー(図示せず)から取得するものである。   Next, an end time is acquired (S307). The acquisition method of the end time is not particularly limited, but is acquired from a timer (not shown) of the central monitoring and control facility 2 in the same manner as the identification time.

最後に、ログ取得対象情報、識別データ、呼出しスタックおよび終了時刻を保存して(S308)、処理は終了する。尚、識別データとしては、S108と同様にS306で取得したメソッド名とS304で取得した現在のジョインポイントをキーとして識別用時刻を値とする対とを組み合わせたものを保存する。尚、図9に示したログ取得対象情報、識別データ及び終了時刻の取得順序は、一例でありこれに限られるものではない。また、上述の終了時のログとして取得する情報は一例であり、業務の必要性に応じて適宜必要な情報を取得するようにすればよい。   Finally, log acquisition target information, identification data, call stack and end time are stored (S308), and the process ends. As the identification data, the combination of the method name acquired in S306 and the pair having the identification time as a value using the current join point acquired in S304 as a key is stored as in S108. Note that the acquisition order of the log acquisition target information, the identification data, and the end time illustrated in FIG. 9 is an example and is not limited thereto. Moreover, the information acquired as the above-mentioned log at the end time is an example, and necessary information may be acquired as appropriate according to the necessity of business.

以上説明したログ取得処理により取得されたログ取得対象情報、識別データ、呼出しスタック、開始時刻は処理開始時のログとして、また、ログ取得対象情報、識別データ、終了時刻は処理終了時のログとして、ログ記憶部13のログファイルに記憶される。また、表示制御部14は、出力装置20にログを出力することを可能とする。   The log acquisition target information, identification data, call stack, and start time acquired by the log acquisition process described above are the log at the start of the process, and the log acquisition target information, identification data, and end time are the log at the end of the process And stored in the log file of the log storage unit 13. In addition, the display control unit 14 can output a log to the output device 20.

これにより、運用者9はログファイルを表示、印刷等を行うことによりログの解析を行うことが可能となるものである。本実施形態のログ取得システム10により提供されるログ8によれば、運用者9は、同じトランザクションが複数並行して実行された場合でも、識別データによりどのいずれのアクセスであるかを判別することが可能となる。   As a result, the operator 9 can analyze the log by displaying, printing, and the like of the log file. According to the log 8 provided by the log acquisition system 10 of the present embodiment, the operator 9 determines which access is made based on the identification data even when a plurality of the same transactions are executed in parallel. Is possible.

また、一般に、ログ取得システムの開発に際し、特殊な処理を実現するためには、多くのパラメータを使い、処理手順も複雑化する傾向があるが、本発明のログ取得方法によれば、上述のように、その処理手順自体や利用するパラメータの種類を最小に維持することができ、ログ取得処理のオーバーヘッドを最小限にすることを可能としている。   In general, in developing a log acquisition system, in order to realize special processing, many parameters are used and the processing procedure tends to be complicated. According to the log acquisition method of the present invention, As described above, the processing procedure itself and the types of parameters to be used can be kept to a minimum, and the overhead of the log acquisition processing can be minimized.

尚、上述の実施形態は本発明の好適な実施の例ではあるがこれに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々変形実施可能である。   The above-described embodiment is a preferred embodiment of the present invention, but is not limited thereto, and various modifications can be made without departing from the gist of the present invention.

監視制御システムのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a monitoring control system. 中央監視制御装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a central monitoring control apparatus. 中央監視制御装置におけるソフトウェアライブラリ、監視制御アプリケーションの関係を示す図である。It is a figure which shows the relationship between the software library in a central supervisory control apparatus, and the supervisory control application. ログ取得システムの機能構成の一例を示す図である。It is a figure which shows an example of a function structure of a log acquisition system. 監視制御ライブラリを構成するオブジェクトクラスとログ取得を定義したアスペクトをコンパイルし、実行コードを生成する際のイメージを示した図である。It is the figure which showed the image at the time of compiling the aspect which defined the object class and log acquisition which comprise a monitoring control library, and producing | generating an execution code. ログ取得処理開始条件の一例を示す図である。It is a figure which shows an example of log acquisition process start conditions. トランザクション開始時のログ取得処理の一例を示すフローチャートである。It is a flowchart which shows an example of the log acquisition process at the time of transaction start. サンプリング判定処理の一例を示すフローチャートである。It is a flowchart which shows an example of a sampling determination process. トランザクション終了時のログ取得処理の一例を示すフローチャートである。It is a flowchart which shows an example of the log acquisition process at the time of transaction end.

符号の説明Explanation of symbols

1 監視制御システム
10 ログ取得システム
11 ログ取得部
13 ログ記憶部
1 Monitoring and Control System 10 Log Acquisition System 11 Log Acquisition Unit 13 Log Storage Unit

Claims (8)

アスペクト指向によりログを取得する方法において、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻を識別用時刻として取得して、前記識別用時刻を当該時点でのジョインポイントに関連づけて記憶する処理及び前記トランザクションのログ取得対象情報を記憶する処理を少なくとも行って、前記トランザクションの開始時のログとして、前記ジョインポイント、前記識別用時刻及び前記ログ取得対象情報を保存し、前記トランザクションの終了時に、当該時点でのジョインポイントをキーとして前記識別用時刻を取得してこれらを記憶する処理、前記トランザクションのログ取得対象情報を記憶する処理及び当該時点での時刻を終了時刻として取得して、前記終了時刻を記憶する処理を少なくとも行って、前記トランザクションの終了時のログとして、前記ジョインポイント、前記識別用時刻、前記ログ取得対象情報及び前記終了時刻を保存することを特徴とするログ取得方法。   In the aspect-oriented method of acquiring a log, at the start of a transaction for which a log is to be acquired, the time at the time is acquired as an identification time, and the identification time is stored in association with the join point at the time And at least a process of storing log acquisition target information of the transaction, and storing the join point, the identification time, and the log acquisition target information as a log at the start of the transaction, and ending the transaction Sometimes, the process of acquiring the identification time using the join point at the time as a key and storing them, the process of storing the log acquisition target information of the transaction and the time at the time as the end time, At least a process of storing the end time is performed, and the traffic is As at the end of log-transactions, the join points, the identification time, log acquisition method characterized by storing the log acquisition target information and the end time. 前記トランザクションの開始時に、前記識別用時刻を当該時点でのジョインポイントに関連づけて記憶する処理及び前記トランザクションのログ取得対象情報を記憶する処理を行った後に、更に、当該時点での時刻を開始時刻として取得して記憶する処理を行って、前記トランザクションの開始時のログとして保存することを特徴とする請求項1に記載のログ取得方法。   After performing the process of storing the identification time in association with the join point at the time and the process of storing the log acquisition target information of the transaction at the start of the transaction, the time at the time is further set to the start time The log acquisition method according to claim 1, wherein the log acquisition method is stored as a log at the start of the transaction. 前記トランザクションの開始時に、メソッドがどの順番で呼び出されたかを示す呼び出しスタックを併せて記憶し、前記トランザクションの開始時のログとして保存することを特徴とする請求項1または2に記載のログ取得方法。   The log acquisition method according to claim 1 or 2, wherein a call stack indicating in what order the methods are called at the start of the transaction is also stored and saved as a log at the start of the transaction. . 前記ログ取得の対象となるオブジェクトクラス及びメソッドを、予めパラメータとして任意に設定可能としたことを特徴とする請求項1から3までのいずれかに記載のログ取得方法。   The log acquisition method according to any one of claims 1 to 3, wherein an object class and a method for acquiring the log can be arbitrarily set as parameters in advance. 前記トランザクションの開始時に、カウンタの値をインクリメントし、予め設定されたサンプリング周期の設定値と前記カウンタの値とが一致した場合にのみログの取得を行うことを特徴とする請求項1から4までのいずれかに記載のログ取得方法。   5. The counter is incremented at the start of the transaction, and a log is acquired only when a preset value of a sampling period matches the value of the counter. The log acquisition method according to any one of the above. 請求項1から5までのいずれかに記載のログ取得方法を、監視制御システムにおいて監視制御機能を実現する監視制御アプリケーションに利用されるソフトウェアライブラリに適用することを特徴とするログ取得方法。   6. A log acquisition method according to claim 1, wherein the log acquisition method according to claim 1 is applied to a software library used for a monitoring control application for realizing a monitoring control function in the monitoring control system. アスペクト指向技術を用いてログを取得するシステムであって、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻をタイマーから読み出して識別用時刻とし、前記識別用時刻を当該時点でのジョインポイントに関連づけて記憶装置に記憶する処理及び前記トランザクションのログ取得対象情報を記憶装置に記憶する処理を少なくとも実行して、前記トランザクションの開始時のログとして、前記ジョインポイント、前記識別用時刻及び前記ログ取得対象情報をログ記録部に記憶する処理及び前記トランザクションの終了時に、当該時点でのジョインポイントをキーとして前記識別用時刻を読み出してこれらを記憶装置に記憶する処理、前記トランザクションのログ取得対象情報を記憶装置に記憶する処理及び当該時点での時刻をタイマーから読み出して終了時刻とし、前記終了時刻を記憶装置に記憶する処理を少なくとも実行して、前記トランザクションの終了時のログとして、前記ジョインポイント、前記識別用時刻、前記ログ取得対象情報及び前記終了時刻をログ記録部に記憶する処理を実行するログ取得部を備えることを特徴とするログ取得システム。   A system for acquiring a log using aspect-oriented technology, and at the start of a transaction for which a log is to be acquired, the time at the time is read from a timer as an identification time, and the identification time is At least a process of storing in the storage device in association with the join point and a process of storing the log acquisition target information of the transaction in the storage device, and as the log at the start of the transaction, the join point, the identification time and Processing for storing the log acquisition target information in a log recording unit and processing for reading the identification time using the join point at the time as a key and storing them in a storage device at the end of the transaction, log acquisition of the transaction Processing to store the target information in the storage device and at the time Read the time from the timer as the end time, execute at least the process of storing the end time in the storage device, and as the log at the end of the transaction, the join point, the identification time, the log acquisition target information, A log acquisition system comprising a log acquisition unit that executes a process of storing the end time in a log recording unit. アスペクト指向技術を用いてログを取得するプログラムであって、ログ取得の対象となるトランザクションの開始時に、当該時点での時刻をタイマーから読み出して識別用時刻とし、前記識別用時刻を当該時点でのジョインポイントに関連づけて記憶装置に記憶させる処理、前記トランザクションのログ取得対象情報を記憶装置に記憶させる処理及び前記トランザクションの開始時のログとして、前記ジョインポイント、前記識別用時刻及び前記ログ取得対象情報をログ記録部に記憶させる処理、並びに前記トランザクションの終了時に、当該時点でのジョインポイントをキーとして前記識別用時刻を読み出してこれらを記憶装置に記憶させる処理、前記トランザクションのログ取得対象情報を記憶装置に記憶させる処理、当該時点での時刻をタイマーから読み出して終了時刻とし、前記終了時刻を記憶装置に記憶させる処理及び前記トランザクションの終了時のログとして、前記ジョインポイント、前記識別用時刻、前記ログ取得対象情報及び前記終了時刻をログ記録部に記憶させる処理をコンピュータに実行させることを特徴とするログ取得プログラム。   A program for acquiring a log using aspect-oriented technology, and at the start of a transaction for which a log is to be acquired, the time at the time is read from a timer as an identification time, and the identification time is set at the time The process of storing in the storage device in association with the join point, the process of storing the log acquisition target information of the transaction in the storage device, and the log at the start of the transaction, the join point, the identification time, and the log acquisition target information The log recording unit, the process of reading the identification time using the join point at the time as a key and storing them in the storage device at the end of the transaction, and storing the log acquisition target information of the transaction Processing stored in the device, time at the time A log recording unit that reads from the timer as an end time, stores the end time in a storage device, and logs at the end of the transaction, the join point, the identification time, the log acquisition target information, and the end time A log acquisition program for causing a computer to execute processing to be stored in the computer.
JP2007045999A 2007-02-26 2007-02-26 Log acquisition method, log acquisition system, and log acquisition program Expired - Fee Related JP4989258B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007045999A JP4989258B2 (en) 2007-02-26 2007-02-26 Log acquisition method, log acquisition system, and log acquisition program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007045999A JP4989258B2 (en) 2007-02-26 2007-02-26 Log acquisition method, log acquisition system, and log acquisition program

Publications (2)

Publication Number Publication Date
JP2008210135A true JP2008210135A (en) 2008-09-11
JP4989258B2 JP4989258B2 (en) 2012-08-01

Family

ID=39786383

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007045999A Expired - Fee Related JP4989258B2 (en) 2007-02-26 2007-02-26 Log acquisition method, log acquisition system, and log acquisition program

Country Status (1)

Country Link
JP (1) JP4989258B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012023318A1 (en) * 2010-08-17 2012-02-23 富士フイルム株式会社 Image processing device, image processing method, image processing program, and recording medium
JP2014182577A (en) * 2013-03-19 2014-09-29 Mitsubishi Electric Corp Data collecting/recording device, management system, data collecting/recording method and data collecting/recording program
WO2016194673A1 (en) * 2015-05-29 2016-12-08 日立オートモティブシステムズ株式会社 Log saving condition generating device and log saving condition generating method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02201552A (en) * 1989-01-30 1990-08-09 Nec Corp Transaction trace information picking system
JPH03188538A (en) * 1989-08-31 1991-08-16 Nec Corp Transaction data processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02201552A (en) * 1989-01-30 1990-08-09 Nec Corp Transaction trace information picking system
JPH03188538A (en) * 1989-08-31 1991-08-16 Nec Corp Transaction data processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012023318A1 (en) * 2010-08-17 2012-02-23 富士フイルム株式会社 Image processing device, image processing method, image processing program, and recording medium
JP2014182577A (en) * 2013-03-19 2014-09-29 Mitsubishi Electric Corp Data collecting/recording device, management system, data collecting/recording method and data collecting/recording program
WO2016194673A1 (en) * 2015-05-29 2016-12-08 日立オートモティブシステムズ株式会社 Log saving condition generating device and log saving condition generating method
JP2016224646A (en) * 2015-05-29 2016-12-28 日立オートモティブシステムズ株式会社 Log storage condition generation apparatus and log storage condition generation method

Also Published As

Publication number Publication date
JP4989258B2 (en) 2012-08-01

Similar Documents

Publication Publication Date Title
JP6602435B2 (en) Parallel execution of continuous event processing (CEP) queries
CN105911885B (en) Industrial control unit (ICU) for improving industrial control system
US20060101396A1 (en) Automatic toolbox population
US20100138815A1 (en) Implementing aspects with callbacks in virtual machines
US8423970B2 (en) Method, computer program product, and hardware product for handling breakpoints in an asynchronous debug model
US9898388B2 (en) Non-intrusive software verification
JP2013528884A (en) Dynamic loading of graph-based calculations
JP2009252247A (en) Debugger data processing system, debugging method and computer program
US20120089962A1 (en) Unchanged Object Management
US20190258460A1 (en) Method and system for generating a software component
CN111133434B (en) Apparatus and method for cryptographically protected running of virtual machines
Vierhauser et al. Developing a dsl-based approach for event-based monitoring of systems of systems: Experiences and lessons learned (e)
US11379345B2 (en) System and method for controlled data extraction in computer networks
KR102118236B1 (en) Operating system support for contracts
JP4989258B2 (en) Log acquisition method, log acquisition system, and log acquisition program
Carvalho et al. On the implementation of dynamic software product lines: An exploratory study
Camilli et al. Event-based runtime verification of temporal properties using time basic petri nets
Papoulias Remote Debugging and Reflection in Resource Constrained Devices
US20110184902A1 (en) business rule integration with engineering applications
EP3336626B1 (en) Memory analysis for industrial controllers
US20210382766A1 (en) Data processing
Ehlers Self-adaptive performance monitoring for component-based software systems
Soden et al. Temporal extensions of OCL revisited
Kannan et al. A retrospective look at the monitoring and checking (mac) framework
JPH11316685A (en) Device for performing remote control and/or operation of field device via field bus using controller and

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110920

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111118

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20111213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120309

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20120312

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20120404

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: 20120424

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120427

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150511

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees