JP4627275B2 - Monitoring program, monitoring method, and monitoring apparatus - Google Patents
Monitoring program, monitoring method, and monitoring apparatus Download PDFInfo
- Publication number
- JP4627275B2 JP4627275B2 JP2006097690A JP2006097690A JP4627275B2 JP 4627275 B2 JP4627275 B2 JP 4627275B2 JP 2006097690 A JP2006097690 A JP 2006097690A JP 2006097690 A JP2006097690 A JP 2006097690A JP 4627275 B2 JP4627275 B2 JP 4627275B2
- Authority
- JP
- Japan
- Prior art keywords
- system call
- monitoring
- buffer
- program
- monitored program
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、監視プログラム、監視方法、および、監視装置に関し、特に、被監視プログラムに発生するループを検出することを可能とした監視プログラム、監視方法、および、監視装置に関する。 The present invention relates to a monitoring program, a monitoring method, and a monitoring apparatus, and more particularly to a monitoring program, a monitoring method, and a monitoring apparatus that can detect a loop that occurs in a monitored program.
プログラムの実行中に、そのプログラムの実行するアドレスが周期的に変化する状態(ループ状態)がある。ループがいつまでも終了しない(無限ループ)等の障害がこのループ状態時に発生する場合がある。このようなループに発生する障害を以下ではループ障害と呼ぶ。 During execution of a program, there is a state (loop state) in which an address executed by the program changes periodically. A fault such as a loop never ending (infinite loop) may occur during this loop state. Such a failure occurring in the loop is hereinafter referred to as a loop failure.
ループ障害を検出する技術として、例えば、特許文献1および2の技術が知られている。
特許文献1では、プログラムカウンタの値を一定の時間間隔で取得し、その取得したプログラムカウンタ値が1通りの値しかとらなくなった場合に、ループ障害が発生していると判定している。
As a technique for detecting a loop fault, for example, techniques of
In
また、特許文献2では、プログラムカウンタそのものの値を使用する代わりに、そのプログラムカウンタの値を例えば、1000で割った変換値を用いて、一定間隔で取得されるプログラムカウンタ値から得られる変換値の値が1通りの値しかとらなくなった場合に、ループ障害が発生したと判定している。
Further, in
しかし、特許文献1の技術では、プログラムカウンタ値が1通りの値しかとらないようなループについては発生していることを検出できるが、例えば、2通り以上の値をとってループが発生している場合は検出できない。
However, in the technique of
また、特許文献2の技術では、予め定められた範囲の中でアドレス(プログラムカウンタ値)が周期的に変化する場合であれば、ループの発生を検出できる。しかし、その予め定められた範囲より広い範囲にまたがった(例えば、複数の関数のまたがった)ループについては、その発生が検出できない。
In the technique of
さらに、I/O処理等では、かなり狭い範囲でアドレスが変化して、ループを発生する場合(1文字入力の繰り返しなど)があるが、上記特許文献1および2の技術では、そのようなI/O処理等を問題のあるループとして誤検出する恐れがある。
本発明の課題は、被監視プログラムに発生するループ障害をより高い精度で検出することを可能とした監視プログラム、監視方法、および、監視装置を提供することである。 An object of the present invention is to provide a monitoring program, a monitoring method, and a monitoring apparatus that can detect a loop fault occurring in a monitored program with higher accuracy.
本発明の第1態様の監視プログラムは、被監視プログラムを監視する処理をコンピュータに実行させる監視プログラムにおいて、実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、前記変化数が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定する第2判定ステップを前記コンピュータに実行させることを特徴とする監視プログラムである。 The monitoring program according to the first aspect of the present invention is a monitoring program for causing a computer to execute a process for monitoring a monitored program, obtains an address of the monitored program being executed at a predetermined timing, and stores the acquired address in a buffer. And the number of changes indicating how many different values the values of the plurality of addresses stored in the buffer or the values calculated based on the values of the addresses are within a predetermined threshold. A first determination step of determining whether the number of changes is within the threshold, a step of acquiring a system call issue status of the monitored program, and an issuance of the acquired system call of the monitored program Based on the situation, the monitored program is not currently issuing a system call and the last call A monitoring program that causes the computer to execute a second determination step for determining that a loop failure has occurred in the monitored program when the time does not exist within the time range stored in the buffer. .
ここで、第1判定ステップにおいて変化数が閾値以内と判定された場合、すなわち、ループ状態が検出された場合に、さらに、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないことを判定している。これにより、被監視プログラムが正常に動作している証拠の1つである、システムコールが、目安としての時間(バッファに格納される時刻の範囲内)が経過しても、発行されていないことになり、ループ障害の疑いが持たれる場合を検出できる(ループ障害が検出できる)。 Here, when it is determined in the first determination step that the number of changes is within the threshold value, that is, when a loop state is detected, the last issue time of the system call is further within the range of the time stored in the buffer. Is determined not to exist. As a result, the system call, which is one of the evidences that the monitored program is operating normally, has not been issued even after the time (in the range of the time stored in the buffer) has passed. Thus, it is possible to detect a case in which a loop failure is suspected (a loop failure can be detected).
なお、ループ状態が検出された場合に、さらに、被監視プログラムが現在システムコールを発行中でないことを併せて判定することで、I/O処理等で、かなり狭い範囲でアドレスが変化して、ループを発生する場合を、ループ障害として誤検出することを回避できる。また、第1判定ステップの変化数を、例えば、取得したアドレスの上位側ビットについて見ることにより、広い範囲にまたがった(例えば、複数の関数のまたがった)ループについても、ループが検出でき、よって、システムコールに関する判定と併せることで、その広い範囲にまたがったループについてもループ障害が検出できる。以上のことから、ループ障害をより高い精度で検出することが可能となる。 In addition, when a loop state is detected, by further determining that the monitored program is not currently issuing a system call, the address changes within a fairly narrow range by I / O processing, etc. It is possible to avoid erroneously detecting a loop occurrence as a loop failure. In addition, by looking at the number of changes in the first determination step, for example, with respect to the higher-order bits of the acquired address, it is possible to detect a loop even over a wide range (for example, spanning multiple functions). In combination with the determination regarding the system call, a loop fault can be detected for a loop extending over the wide range. From the above, it becomes possible to detect a loop fault with higher accuracy.
本発明の第2態様の監視プログラムは、被監視プログラムを監視する処理をコンピュータに実行させる監視プログラムにおいて、実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、前記変化数が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないかどうかを判定する第2判定ステップと、前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定ステップと、前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変化数が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない状態が続いた場合は、ループ障害が発生したと判定し、前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変化数が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定ステップ、を前記コンピュータに実行させることを特徴とする監視プログラムである。 The monitoring program according to the second aspect of the present invention is a monitoring program for causing a computer to execute a process for monitoring a monitored program, obtains the address of the monitored program being executed at a predetermined timing, and stores it in a buffer. And the number of changes indicating how many different values the values of the plurality of addresses stored in the buffer or the values calculated based on the values of the addresses are within a predetermined threshold. A first determination step of determining whether the number of changes is within the threshold, a step of acquiring a system call issue status of the monitored program, and an issuance of the acquired system call of the monitored program Based on the situation, the monitored program is not currently issuing a system call and the A second determination step for determining whether an issue time does not exist within a time range stored in the buffer; and the second determination step, wherein the monitored program is not currently issuing a system call; and A loop failure provisional determination step that temporarily determines that a loop failure has occurred when it is determined that the last issue time of the system call is not within the time range stored in the buffer; After the determination is made, a predetermined monitoring duration, a state in which the number of changes is within the threshold value continues, a state in which a system call is not issued continues, and the last issue time of the system call is the buffer If a state that does not exist within the time range stored in the file continues, it is determined that a loop failure has occurred, and a temporary determination of the loop failure is made. From any point in time within a predetermined monitoring duration, the number of changes exceeds the threshold, a system call is being issued, or the last issue time of a system call is the buffer If it is within the range of the time stored in, the monitoring program is characterized by causing the computer to execute a loop failure determination step for determining to cancel the provisional determination of the loop failure.
ここで、第1判定ステップにおいて変化数が閾値以内と判定された場合、すなわち、ループ状態が検出された場合に、さらに、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないことを判定している。これにより、被監視プログラムが正常に動作している証拠の1つである、システムコールが、目安としての時間(バッファに格納される時刻の範囲内)が経過しても、発行されていないことになり、ループ障害の疑いが持たれる場合を検出できる(ループ障害が検出できる)。 Here, when it is determined in the first determination step that the number of changes is within the threshold value, that is, when a loop state is detected, the last issue time of the system call is further within the range of the time stored in the buffer. Is determined not to exist. As a result, the system call, which is one of the evidences that the monitored program is operating normally, has not been issued even after the time (in the range of the time stored in the buffer) has passed. Thus, it is possible to detect a case in which a loop failure is suspected (a loop failure can be detected).
なお、ループ状態が検出された場合に、さらに、被監視プログラムが現在システムコールを発行中でないことを併せて判定することで、I/O処理等で、かなり狭い範囲でアドレスが変化して、ループを発生する場合を、ループ障害として誤検出することを回避できる。また、第1判定ステップの変化数を、例えば、取得したアドレスの上位側ビットについて見ることにより、広い範囲にまたがった(例えば、複数の関数のまたがった)ループについても、ループが検出でき、よって、システムコールに関する判定と併せることで、その広い範囲にまたがったループについてもループ障害が検出できる。 In addition, when a loop state is detected, by further determining that the monitored program is not currently issuing a system call, the address changes within a fairly narrow range by I / O processing, etc. It is possible to avoid erroneously detecting a loop occurrence as a loop failure. In addition, by looking at the number of changes in the first determination step, for example, with respect to the higher-order bits of the acquired address, it is possible to detect a loop even over a wide range (for example, spanning multiple functions). In combination with the determination regarding the system call, a loop fault can be detected for a loop extending over the wide range.
さらに、第1判定ステップおよび第2判定ステップの判定結果が、予め定められた監視継続時間だけ持続する場合に、ループ障害が検出されたと判定しているので、例えば、ループ状態の時間が長いだけで、正常に動作するものを、ループ障害として誤検出することを回避できる。以上のことから、ループ障害をより高い精度で検出することが可能となる。 Furthermore, since the determination result of the first determination step and the second determination step lasts for a predetermined monitoring duration time, it is determined that a loop failure has been detected. Thus, it is possible to avoid erroneously detecting a normal operation as a loop failure. From the above, it becomes possible to detect a loop fault with higher accuracy.
本発明の第3態様の監視方法は、被監視プログラムを監視する処理をコンピュータが実行する監視方法において、実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、前記変化数が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定する第2判定ステップを備えることを特徴とする監視方法である。 The monitoring method according to the third aspect of the present invention is the monitoring method in which the computer executes the process of monitoring the monitored program, and acquires the address of the monitored program being executed at a predetermined timing and stores it in a buffer. And the number of changes indicating how many different values the values of the plurality of addresses stored in the buffer or the values calculated based on the values of the addresses are within a predetermined threshold. A first determination step of determining whether the number of changes is within the threshold, a step of acquiring a system call issue status of the monitored program, and an issuance of the acquired system call of the monitored program Based on the situation, the monitored program is not currently issuing a system call and the last issue time of the system call is If not in the range of times to be stored in Ffa a monitoring method, characterized in that it comprises a second determination step of determining that a loop fault occurs in the monitored program.
本発明の第4態様の監視方法は、被監視プログラムを監視する処理をコンピュータが実行する監視方法において、実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、前記変化数が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないかどうかを判定する第2判定ステップと、前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定ステップと、前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変化数が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない状態が続いた場合は、ループ障害が発生したと判定し、前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変化数が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定ステップ、を備えることを特徴とする監視方法である。 The monitoring method according to the fourth aspect of the present invention is the monitoring method in which the computer executes processing for monitoring the monitored program, and acquires the address of the monitored program being executed at a predetermined timing and stores it in a buffer. And the number of changes indicating how many different values the values of the plurality of addresses stored in the buffer or the values calculated based on the values of the addresses are within a predetermined threshold. A first determination step of determining whether the number of changes is within the threshold, a step of acquiring a system call issue status of the monitored program, and an issuance of the acquired system call of the monitored program Based on the situation, the monitored program is not currently issuing a system call, and the last issue time of the system call is A second determination step for determining whether or not the current time is stored within the time range stored in the buffer; and the second determination step, wherein the monitored program is not currently issuing a system call, and the system call When it is determined that the last issue time is not within the time range stored in the buffer, a loop failure provisional determination step for temporarily determining that a loop failure has occurred and a provisional determination of the loop failure are performed. After that, a state in which the number of changes continues within a predetermined monitoring duration, a state in which a system call is not being issued continues, and the last issue time of the system call is stored in the buffer. If a state that does not exist within the time range continues, it is determined that a loop failure has occurred, and after the provisional determination of the loop failure has been made, the predetermined time is determined in advance. At any point in time within the monitored duration, the number of changes exceeds the threshold value, a system call is being issued, or the last issue time of a system call is stored in the buffer A loop failure determination step for performing a determination to cancel the provisional determination of the loop failure if it exists within a time range.
本発明の第5態様の監視装置は、被監視プログラムを監視する処理を実行する監視装置において、実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するアドレス取得部と、前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、前記変化数が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するシステムコール発行状況取得部と、取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定する第2判定部を備えることを特徴とする監視装置である。 The monitoring apparatus according to the fifth aspect of the present invention is the monitoring apparatus that executes the process of monitoring the monitored program, wherein the address of the monitored program being executed is acquired at a predetermined timing and stored in a buffer. The number of changes indicating how many different values the acquisition unit and the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value A first determination step for determining whether or not the system call issuance status acquisition unit acquires a system call issuance status of the monitored program when the number of changes is within the threshold; and the acquired monitored program Based on the system call issuance status, the monitored program is not currently issuing a system call, and the system call is issued Time is when it is not in a range of times that are stored in the buffer, a monitoring device, characterized in that it comprises a second judging unit judges that the loop fault occurs in the monitored program.
本発明によれば、広い範囲にまたがった(例えば、複数の関数のまたがった)ループについても、ループ障害の発生が検出できる。
また、本発明によれば、I/O処理等で、かなり狭い範囲でアドレスが変化して、ループを発生する場合を、ループ障害として誤検出することを回避できる。
According to the present invention, it is possible to detect the occurrence of a loop fault even for a loop that spans a wide range (for example, spans a plurality of functions).
Further, according to the present invention, it is possible to avoid erroneously detecting a loop fault when an address is changed in a considerably narrow range and a loop is generated by I / O processing or the like.
また、本発明によれば、ループ状態の時間が長いだけで、正常に動作するものを、ループ障害として誤検出することを回避できる。 Further, according to the present invention, it is possible to avoid erroneously detecting a normal operation as a loop failure only by a long loop state time.
以下、本発明の実施の形態を、図面を参照しながら詳細に説明する。
図1は、本発明の各実施形態に共通する監視システムの全体構成図である。
図1において、被監視プログラム(被監視プロセス)11は、本発明の監視処理部(監視プロセス)12によって、その動作が監視されるプログラムである。この被監視プログラムは、オペレーティングシステム(OS)13上で実行されている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is an overall configuration diagram of a monitoring system common to each embodiment of the present invention.
In FIG. 1, a monitored program (monitored process) 11 is a program whose operation is monitored by a monitoring processing unit (monitoring process) 12 of the present invention. This monitored program is executed on the operating system (OS) 13.
OS13は、自身の上で実行されるプログラムが発行するシステムコールの発行状況を監視する機能(システムコール発行状況監視機能)14を備える。この監視機能14は、自身の上で実行されるプログラムが発行したシステムコールの履歴情報を保存する。この履歴は、プログラム(プロセス)のID、システムコールの発行時刻(OSがプログラムからシステムコールを受け取った時刻)、システムコールのステータス(終了(正常終了、エラー終了)したか、発行中(OSからの復帰命令待ち)か、等)、を含む。
The
また、OS13は、自身の上で実行されるプログラム上のどのアドレスがCPUによって現在実行されているかを示すプログラムカウンタ値を取得する機能(プログラムカウンタ値取得機能)15を備える。この取得機能15は、監視処理部12からのプログラムカウンタ値の取得要求を受信すると、その取得要求を被監視プログラム(被監視プロセス)11に出力する。被監視プログラム11は、受信した取得要求に対応して、その時点でCPUが実行(フェッチ)しているアドレスの値(プログラムカウンタの値)を取得機能15に送信する。取得機能15は、このプログラムカウンタの値を監視処理部12に送信する。
The OS 13 also includes a function (program counter value acquisition function) 15 that acquires a program counter value indicating which address on the program executed on itself is currently being executed by the CPU. Upon receiving the program counter value acquisition request from the
図2は、本発明の第1実施形態の監視処理部の構成を示すブロック図である。
図2に示すように、監視処理部20は、予め定められたタイミングで、実行中の被監視プログラムのアドレス(プログラムカウンタ値)を取得してバッファ部23に格納するプログラムカウンタ値取得部21、取得されたプログラムカウンタ値を基に、そのプログラムカウンタ値から上位側ビット(変換値)を取り出してバッファ部23の対応する項目に書き込む変換値算出部24、バッファ部23に格納された複数のアドレスの上位側ビットを基に、それらアドレスの値またはそれらアドレスの値に基づいて算出された値が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定することでループを検出するループ検出部25、その変化数がその閾値以内であると判定された場合に、システムコール発行状況取得部22を介して、被監視プログラムのシステムコールの発行状況を取得し、その発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定するループ障害判定部26、被監視プログラムのシステムコールの発行状況の取得要求を、OS13のシステムコール発行状況監視機能14に出力して、その監視機能14から、被監視プログラムのシステムコールの発行状況を取得するシステムコール発行状況取得部22、ループ障害判定部26によってループ障害が発生したと判定された場合に、ループ障害が発生したことを示すメッセージ等を出力する出力部27、を備える。
FIG. 2 is a block diagram illustrating a configuration of the monitoring processing unit according to the first embodiment of this invention.
As shown in FIG. 2, the
図3は、図2のバッファ部23に格納されるデータ例(その1)を示す図である。
図3に示されるように、バッファ部23は、先入れ先出し方式のFIFO(First-In First-Out)である。このバッファ部23は、予め定められた数のデータ(図3では、9個のデータ)を格納可能なバッファである。
FIG. 3 is a diagram showing an example (part 1) of data stored in the
As shown in FIG. 3, the
バッファに格納されるデータは、時間(プログラムカウンタ値がバッファ部23に格納された時刻)、プログラムカウンタ値(PC値)、変換値(プログラムカウンタ値から下位側ビットを切り捨てて得られる上位側ビットの値)、の各項目を備える。 The data stored in the buffer includes time (time when the program counter value is stored in the buffer unit 23), program counter value (PC value), conversion value (upper bit obtained by truncating the lower bit from the program counter value) Value), and each item.
上記変換値は、例えば、プログラムカウンタ値を1000で割った値を整数型の変数に代入することにより得られる。
なお、図2からは定かでないが、ユーザは、監視処理部20に付属のユーザインターフェイス部(図2では、不図示)を介して、以下の項目を指定する。
(1)プログラムカウンタ値取得間隔(監視処理部20がOS13のプログラムカウンタ値取得機能15を介してプログラムカウンタ値を取得する時間間隔)
(2)監視テーブルサイズ(バッファ部23に格納するデータ数)
(3)プログラムカウンタ値の変化数(バッファ部23内に保持されるプログラムカウンタ値の上位側ビットが何通りの異なる値をとるかという数がこの変化数未満であれば、被監視プログラムはループ状態にあるものとみなす閾値)
(4)被監視プログラム(被監視プロセス)
図4Aおよび図4Bは、本発明の第1実施形態の監視処理部によって実行される監視処理のフローチャートである。
The converted value is obtained, for example, by substituting a value obtained by dividing the program counter value by 1000 into an integer type variable.
Although not certain from FIG. 2, the user designates the following items via a user interface unit (not shown in FIG. 2) attached to the
(1) Program counter value acquisition interval (time interval at which the
(2) Monitor table size (number of data stored in the buffer unit 23)
(3) Number of changes in the program counter value (if the number of different values of the higher-order bits of the program counter value held in the
(4) Monitored program (monitored process)
4A and 4B are flowcharts of monitoring processing executed by the monitoring processing unit according to the first embodiment of this invention.
まず、図4Aにおいて、ステップS101で、初期化処理が実行される。この初期化処理では、現在時刻をタイマ監視処理部(図2では、不図示)がタイマ監視時に参照する参照変数に設定するとともに、上述の監視テーブルサイズ分の領域が監視テーブル(バッファ)用の領域としてメモリ上に確保される。 First, in FIG. 4A, an initialization process is executed in step S101. In this initialization process, the current time is set as a reference variable that is referred to by the timer monitoring processing unit (not shown in FIG. 2) during timer monitoring, and the area for the monitoring table size described above is used for the monitoring table (buffer). An area is secured on the memory.
そして、ステップS102で、タイマ監視処理部によるタイマ監視処理が実行される。このタイマ監視処理では、ステップS101で参照変数に設定された値と、ステップS102の時点での現在時刻との差が算出され、その差が、上述のプログラムカウンタ値取得間隔より短いうちは、差の算出を繰り返し、その差が、プログラムカウンタ値取得間隔に一致したときに、参照変数に、その時点での時刻を設定するとともに、ステップS103に進む。 In step S102, timer monitoring processing by the timer monitoring processing unit is executed. In this timer monitoring process, the difference between the value set in the reference variable in step S101 and the current time at the time of step S102 is calculated, and while the difference is shorter than the above-described program counter value acquisition interval, the difference is calculated. Is repeated, and when the difference coincides with the program counter value acquisition interval, the current time is set in the reference variable, and the process proceeds to step S103.
ステップS103では、プログラムカウンタ値取得部21によって、実行中の被監視プログラムのアドレス(プログラムカウンタ値)が、OS13の既存の機能(プログラムカウンタ値取得機能)15を介して取得され、バッファ部(監視テーブル)23の末尾に追加される。
In step S103, the program counter
すなわち、この監視テーブルに追加されたデータは、図3に示すように、監視テーブルへの書き込み時刻(ステップS102の参照変数に設定された現在時刻)、プログラムカウンタ値、変換値の各項目を備える。 That is, as shown in FIG. 3, the data added to the monitoring table includes items for writing time to the monitoring table (current time set in the reference variable in step S102), program counter value, and conversion value. .
そして、ステップS104で、監視テーブルに、上述の監視テーブルサイズに指定された数のデータが格納されたかが判定される。なお、監視テーブルへのデータ書き込みが一定の間隔(プログラムカウンタ値取得間隔)毎に行われることを考えると、ステップS104で、監視テーブルに一定時間分のデータがあるかが判定される、ということもできる。 In step S104, it is determined whether or not the number of data specified for the above-described monitoring table size is stored in the monitoring table. Note that, considering that data is written to the monitoring table at regular intervals (program counter value acquisition interval), it is determined in step S104 whether there is data for a certain time in the monitoring table. You can also.
ステップS104において、監視テーブルに、監視テーブルサイズに指定された数のデータが格納されていなければ、ステップS102に戻る。
一方、ステップS104において、監視テーブルに、監視テーブルサイズに指定された数のデータが格納されていれば、ステップS105において、監視テーブル上の変換値が何通りの異なる値をとるかという数が、上述のプログラムカウンタ値の変化数(閾値)以上であるかが判定される。
If it is determined in step S104 that the number of data designated by the monitoring table size is not stored in the monitoring table, the process returns to step S102.
On the other hand, if the number of data specified in the monitoring table size is stored in the monitoring table in step S104, the number of different values of the conversion value on the monitoring table in step S105 is It is determined whether the number of changes (threshold value) of the program counter value is equal to or greater than the above.
図5A、図5B、および、図5Cは、プログラムカウンタ値の変化数=4に設定した場合の、監視テーブルのデータ例を示す図である。図5Aの監視テーブルでは、変換値は、4以上の異なる値をとるため、被監視プログラムはループ状態にはないと判定される。図5Bの監視テーブルでは、変換値は、3つの異なる値をとるため、被監視プログラムは、例えば、数個の関数をまたいだループ状態にあるものと判定される。図5Cの監視テーブルでは、変換値は、1つの値しかとらないため、被監視プログラムは、例えば、図5Bの数個の関数をまたいだループ状態より、狭い範囲でループ状態にあるものと判定される。 5A, 5B, and 5C are diagrams illustrating examples of data in the monitoring table when the number of changes in the program counter value is set to 4. FIG. In the monitoring table of FIG. 5A, since the conversion value takes four or more different values, it is determined that the monitored program is not in the loop state. In the monitoring table of FIG. 5B, since the conversion value takes three different values, it is determined that the monitored program is in a loop state across several functions, for example. In the monitoring table of FIG. 5C, since the conversion value takes only one value, for example, the monitored program determines that the loop state is in a narrower range than the loop state across several functions in FIG. 5B. Is done.
ステップS105において、監視テーブル上の変換値が何通りの異なる値をとるかを示す数が、プログラムカウンタ値の変化数(閾値)以上であると判定されれば、ステップS102に戻る。 If it is determined in step S105 that the number indicating how many different values the conversion value on the monitoring table takes is greater than or equal to the number of changes (threshold value) in the program counter value, the process returns to step S102.
一方、監視テーブル上の変換値が何通りの異なる値をとるかを示す数が、プログラムカウンタ値の変化数(閾値)より小さいと判定されれば、ステップS106において、システムコール発行状況取得部22によって、被監視プログラムのシステムコールの発行状況の取得要求が、OS13のシステムコール発行状況監視機能14に出力され、その監視機能14から、被監視プログラムのシステムコールの発行状況が取得される。
On the other hand, if it is determined that the number indicating how many different values the conversion value on the monitoring table takes is smaller than the number of changes (threshold value) of the program counter value, in step S106, the system call issue
続いて、図4Bに移り、この取得された被監視プログラムのシステムコールの発行状況を基に、ステップS107、S108、S109での判定がループ障害判定部26によって行われる。まず、ステップS107では、ループ障害判定部26によって、被監視プログラムがシステムコールを発行中であるか、すなわち、OSからの復帰命令待ちであるかが判定される。
Subsequently, the process proceeds to FIG. 4B, and the loop
ステップS107において、被監視プログラムがシステムコールを発行中であると判定された場合、ステップS102に戻る。I/O処理等でループが形成されている場合が、この場合に含まれる。 If it is determined in step S107 that the monitored program is issuing a system call, the process returns to step S102. A case where a loop is formed by I / O processing or the like is included in this case.
一方、ステップS107において、被監視プログラムがシステムコールを発行中でないと判定された場合、ステップS108において、ループ障害判定部26によって、ループ時間内にシステムコールが発行されたかが判定される。なお、「ループ時間内」とは、監視テーブルにデータが書き込まれた時刻の範囲内という意味である。
On the other hand, if it is determined in step S107 that the monitored program is not issuing a system call, the loop
ステップS108において、ループ時間内にシステムコールが発行されていないと判定された場合、すなわち、ループ時間以前にシステムコールが発行されたと判定された場合、ステップS110に進む。 If it is determined in step S108 that a system call has not been issued within the loop time, that is, if it is determined that a system call has been issued before the loop time, the process proceeds to step S110.
一方、ステップS108において、ループ時間内にシステムコールが発行されたと判定された場合、ステップS109において、そのループ時間内に発行されたシステムコールが正常終了しているかどうかが判定される。 On the other hand, if it is determined in step S108 that the system call has been issued within the loop time, it is determined in step S109 whether or not the system call issued within the loop time has ended normally.
ステップS109において、ループ時間内に発行されたシステムコールが正常終了していると判定された場合、ステップS102に戻る。
ステップS109において、ループ時間内に発行されたシステムコールがエラー終了していると判定された場合、ステップS110に進む。
If it is determined in step S109 that the system call issued within the loop time has ended normally, the process returns to step S102.
If it is determined in step S109 that the system call issued within the loop time has ended in error, the process proceeds to step S110.
なお、ステップS109の判定を行うかどうかをユーザが上述のユーザインターフェイスを介して指定できるようにしてもよい。ステップS109の判定を行わない場合、ステップS108において、ループ時間内にシステムコールが発行されたと判定された場合に直ちに、ステップS102に戻る。 Note that the user may be able to specify whether or not to perform the determination in step S109 via the above-described user interface. When the determination in step S109 is not performed, if it is determined in step S108 that a system call has been issued within the loop time, the process immediately returns to step S102.
ステップS110では、資料採取が行われる。資料採取では、以下の情報が出力部27を介して出力される。
1.バッファ部33に保持される複数件のデータ。
2.最近取得したシステムコールについての情報。
In step S110, material collection is performed. In collecting data, the following information is output via the
1. A plurality of data held in the
2. Information about recently acquired system calls.
ここで、上記1.は、ループ範囲を特定するのに有用な情報である。また、上記2.は、ループ処理直前にプログラムが何を処理していたのかを特定するのに有用な情報である。 Here, the above 1. Is useful information for specifying the loop range. In addition, the above 2. Is information useful for identifying what the program was processing immediately before the loop processing.
そして、続く、ステップS111で、ループ障害が発生したことを示すメッセージが、出力部27によって出力され、ステップS102に戻る。
続いて、本発明の第2実施形態について説明する。
In step S111, a message indicating that a loop failure has occurred is output by the
Subsequently, a second embodiment of the present invention will be described.
第1実施形態でループ障害と判定されたものの中には、ループ状態(閾値より小さい数のアドレスを周期的に繰り返す状態)の時間が長いだけで、正常に動作するものも含まれる場合がある。第2実施形態では、そのようなものをループ障害の判定から除くようにしている。 Among the cases determined as loop faults in the first embodiment, there may be cases in which the loop state (a state in which a number of addresses smaller than the threshold is periodically repeated) is only long and operates normally. . In the second embodiment, such a case is excluded from the determination of the loop fault.
図6は、本発明の第2実施形態の監視処理部の構成を示すブロック図である。
図6に示すように、監視処理部30は、予め定められたタイミングで、実行中の被監視プログラムのアドレス(プログラムカウンタ値)を取得してバッファ部33に格納するプログラムカウンタ値取得部31、取得されたプログラムカウンタ値を基に、そのプログラムカウンタ値から上位側ビット(変換値)を取り出してバッファ部33の対応する項目に書き込む変換値算出部34、バッファ部33に格納された複数のアドレスの上位側ビットを基に、それらアドレスの値またはそれらアドレスの値に基づいて算出された値が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定することで、ループを検出するループ検出部36、その変化数がその閾値以内であると判定された場合に、システムコール発行状況取得部32を介して、被監視プログラムのシステムコールの発行状況を取得し、その発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファ部33に格納される時刻の範囲内に存在しないかどうかを判定するループ障害仮判定部37、被監視プログラムのシステムコールの発行状況の取得要求を、OS13のシステムコール発行状況監視機能14に出力して、その監視機能14から、被監視プログラムのシステムコールの発行状況を取得するシステムコール発行状況取得部32、ループ検出部36およびループ障害仮判定部37から構成されるループ障害判定部35によってループ障害が発生したと判定された場合に、ループ障害が発生したことを示すメッセージ等を出力する出力部38、ループ障害判定部35によってループ障害が発生したと判定された場合に、バッファ部33のバッファサイズを適正値に変更するバッファサイズ変更部39、を備える。
FIG. 6 is a block diagram illustrating a configuration of the monitoring processing unit according to the second embodiment of this invention.
As shown in FIG. 6, the
ここで、ループ障害判定部35は、ループ障害仮判定部37によって、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、バッファ部33に格納される時刻の範囲内に存在しないと判定された場合に、ループ障害が発生したと仮判定して、監視継続のためのタイマを起動するとともに、そのループ障害の仮判定が行われてから、予め定められた監視継続時間、変化数が閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、バッファ部33に格納される時刻の範囲内に存在しない状態が続いた場合は、ループ障害が発生したと判定し、そのループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、変化数が閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、バッファ部33に格納される時刻の範囲内に存在するかした場合は、そのループ障害の仮判定を取り消す判定を行う。
Here, the loop
上記ループ障害の仮判定がループ障害判定部35によって取り消された場合、バッファ部33のバッファサイズが、ループ障害判定を行うのに十分な大きさではなかったものとみなされる。すなわち、ループ障害判定部35は、変化数が閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、バッファ部33に格納される時刻の範囲内に存在するかした、時刻をバッファサイズ変更部39に通知する。バッファサイズ変更部39は、その通知された時刻の値を、アドレスを取得するタイミング(時間間隔)で割ることで、バッファ部33の段数の増分を算出して、バッファ部33に通知することで、バッファ部33のバッファサイズの変更を行う。
When the loop failure tentative determination is canceled by the loop
なお、図6からは定かでないが、ユーザは、監視処理部30に付属のユーザインターフェイス部(図6では、不図示)を介して、以下の項目を指定する。
(1)プログラムカウンタ値取得間隔(監視処理部30がOS13のプログラムカウンタ値取得機能15を介してプログラムカウンタ値を取得する時間間隔)
(2)監視テーブルサイズ(バッファ部33に格納するデータ数)
(3)プログラムカウンタ値の変化数(バッファ部33内に保持されるプログラムカウンタ値の上位側ビットが何通りの異なる値をとるかという数がこの変化数未満であれば、被監視プログラムはループ状態にあるものとみなす閾値)
(4)被監視プログラム(被監視プロセス)
(5)監視継続時間(ループ障害が発生したと仮判定されてから、その発生時点での状況が監視継続時間だけ続いた場合、ループ障害が発生したものと判定する)
図7A、図7B、および、図7Cは、本発明の第2実施形態の監視処理部によって実行される監視処理のフローチャートである。
Although not certain from FIG. 6, the user designates the following items via a user interface unit (not shown in FIG. 6) attached to the
(1) Program counter value acquisition interval (time interval at which the
(2) Monitor table size (number of data stored in buffer 33)
(3) Number of changes in program counter value (If the number of different values of the higher-order bits of the program counter value held in the
(4) Monitored program (monitored process)
(5) Monitoring continuation time (If it is determined that a loop failure has occurred and the situation at the time of occurrence continues for the monitoring continuation time, it is determined that a loop failure has occurred.)
7A, 7B, and 7C are flowcharts of monitoring processing executed by the monitoring processing unit according to the second embodiment of this invention.
まず、図7Aにおいて、ステップS201で、初期化処理が実行される。この初期化処理では、現在時刻をタイマ監視処理部(図6では、不図示)がタイマ監視時に参照する参照変数に設定し、上述の監視継続時間中かを示す監視継続フラグを、「監視継続中ではない」という値に設定し、かつ、上述の監視テーブルサイズ分の領域が監視テーブル(バッファ)用の領域としてメモリ上に確保される。 First, in FIG. 7A, an initialization process is executed in step S201. In this initialization processing, the current time is set as a reference variable that is referred to by the timer monitoring processing unit (not shown in FIG. 6) during timer monitoring, and the monitoring continuation flag indicating whether the monitoring duration is in progress is set to “monitoring continuation”. An area corresponding to the above-described monitoring table size is secured on the memory as a monitoring table (buffer) area.
そして、ステップS202で、タイマ監視処理部によるタイマ監視処理が実行される。このタイマ監視処理では、ステップS201で参照変数に設定された値と、ステップS202の時点での現在時刻との差が算出され、その差が、上述のプログラムカウンタ値取得間隔より短いうちは、差の算出を繰り返し、その差が、プログラムカウンタ値取得間隔に一致したときに、参照変数に、その時点での時刻を設定するとともに、ステップS203に進む。 In step S202, timer monitoring processing by the timer monitoring processing unit is executed. In this timer monitoring process, the difference between the value set in the reference variable in step S201 and the current time at the time of step S202 is calculated, and while the difference is shorter than the above-described program counter value acquisition interval, the difference is calculated. When the difference is equal to the program counter value acquisition interval, the current time is set in the reference variable, and the process proceeds to step S203.
ステップS203では、プログラムカウンタ値取得部21によって、実行中の被監視プログラムのアドレス(プログラムカウンタ値)が、OS13の既存の機能(プログラムカウンタ値取得機能)15を介して取得され、バッファ部(監視テーブル)23の末尾に追加される。
In step S203, the program counter
すなわち、この監視テーブルに追加されたデータは、監視テーブルへの書き込み時刻(ステップS202の参照変数に設定された現在時刻)、プログラムカウンタ値、変換値の各項目を備える。 In other words, the data added to the monitoring table includes items for writing time to the monitoring table (current time set in the reference variable in step S202), program counter value, and conversion value.
そして、ステップS204で、監視テーブルに、上述の監視テーブルサイズに指定された数のデータが格納されたかが判定される。なお、監視テーブルへのデータ書き込みが一定の間隔(プログラムカウンタ値取得間隔)毎に行われることを考えると、ステップS104で、監視テーブルに一定時間分のデータがあるかが判定される、ということもできる。 In step S204, it is determined whether or not the number of data specified for the above-described monitoring table size is stored in the monitoring table. Note that, considering that data is written to the monitoring table at regular intervals (program counter value acquisition interval), it is determined in step S104 whether there is data for a certain time in the monitoring table. You can also.
ステップS204において、監視テーブルに、監視テーブルサイズに指定された数のデータが格納されていなければ、ステップS102に戻る。
一方、ステップS204において、監視テーブルに、監視テーブルサイズに指定された数のデータが格納されていれば、ステップS205において、監視テーブル上の変換値が何通りの値をとるかを示す数が、上述のプログラムカウンタ値の変化数(閾値)以上であるかが判定される。
If it is determined in step S204 that the number of data specified in the monitoring table size is not stored in the monitoring table, the process returns to step S102.
On the other hand, if the number of data specified in the monitoring table size is stored in the monitoring table in step S204, the number indicating how many values the conversion value on the monitoring table takes in step S205 is as follows. It is determined whether the number of changes (threshold value) of the program counter value is equal to or greater than the above.
ステップS205において、監視テーブル上の変換値が何通りの値をとるかを示す数が、プログラムカウンタ値の変化数(閾値)以上であると判定されれば、ステップS214に進む。 If it is determined in step S205 that the number indicating the number of conversion values on the monitoring table is greater than or equal to the number of changes (threshold value) in the program counter value, the process proceeds to step S214.
一方、監視テーブル上の変換値が何通りの値をとるかを示す数が、プログラムカウンタ値の変化数(閾値)より小さいと判定されれば、ステップS206において、システムコール発行状況取得部22によって、被監視プログラムのシステムコールの発行状況の取得要求が、OS13のシステムコール発行状況監視機能14に出力され、その監視機能14から、被監視プログラムのシステムコールの発行状況が取得される。
On the other hand, if it is determined that the number indicating the conversion value on the monitoring table is smaller than the number of changes (threshold value) of the program counter value, the system call issuance
続いて、図7Bに移り、この取得された被監視プログラムのシステムコールの発行状況を基に、ステップS207、S208、S209での判定がループ障害判定部26によって行われる。まず、ステップS207では、ループ障害判定部26によって、被監視プログラムがシステムコールを発行中であるか、すなわち、OSからの復帰命令待ちであるかが判定される。
Subsequently, the process proceeds to FIG. 7B, and the loop
ステップS207において、被監視プログラムがシステムコールを発行中であると判定された場合、ステップS214に進む。I/O処理等でループが形成されている場合が、この場合に含まれる。 If it is determined in step S207 that the monitored program is issuing a system call, the process proceeds to step S214. A case where a loop is formed by I / O processing or the like is included in this case.
一方、ステップS207において、被監視プログラムがシステムコールを発行中でないと判定された場合、ステップS208において、ループ障害判定部26によって、ループ時間内にシステムコールが発行されたかが判定される。なお、「ループ時間内」とは、監視テーブルにデータが書き込まれた時刻の範囲内という意味である。
On the other hand, if it is determined in step S207 that the monitored program is not issuing a system call, the loop
ステップS208において、ループ時間内にシステムコールが発行されていないと判定された場合、すなわち、ループ時間以前にシステムコールが発行されたと判定された場合、ステップS210に進む。 If it is determined in step S208 that a system call has not been issued within the loop time, that is, if it is determined that a system call has been issued before the loop time, the process proceeds to step S210.
一方、ステップS208において、ループ時間内にシステムコールが発行されたと判定された場合、ステップS209において、監視継続フラグの値が、「監視継続中である」という値になっているか、または、監視継続そのループ時間内に発行されたシステムコールが正常終了しているかが判定される。 On the other hand, if it is determined in step S208 that the system call has been issued within the loop time, in step S209, the value of the monitoring continuation flag is a value of “continuing monitoring” or monitoring continuation. It is determined whether the system call issued within the loop time has ended normally.
ステップS209において、ループ時間内に発行されたシステムコールが正常終了している場合、または、監視継続フラグの値が、「監視継続中である」という値になっている場合は、ステップS214に進む。 In step S209, if the system call issued within the loop time has ended normally, or if the value of the monitoring continuation flag is “continuing monitoring”, the process proceeds to step S214. .
ステップS209において、ループ時間内に発行されたシステムコールがエラー終了していて、かつ、監視継続フラグの値が、「監視継続中である」という値になっていない場合は、ステップS210に進む。 If it is determined in step S209 that the system call issued within the loop time has ended in error and the value of the monitoring continuation flag is not “monitoring is continuing”, the process proceeds to step S210.
なお、ステップS209の判定を行うかどうかをユーザが上述のユーザインターフェイスを介して指定できるようにしてもよい。ステップS209の判定を行わない場合、ステップS208において、ループ時間内にシステムコールが発行されたと判定された場合に直ちに、ステップS214に進む。 Note that the user may be able to specify whether or not to perform the determination in step S209 via the above-described user interface. If the determination in step S209 is not performed, if it is determined in step S208 that a system call has been issued within the loop time, the process immediately proceeds to step S214.
ステップS210では、監視継続フラグの値が、「監視継続中である」という値になっているかが判定される。ステップS210の制御に初回に入った場合は、この監視継続フラグの値は、「監視継続中ではない」という値に初期化されているので、ステップS210では、監視継続フラグの値が、「監視継続中である」という値になっていないと判定され、ステップS211において、監視継続状態に移行する。すなわち、ループ障害判定部35によって、監視継続のためのタイマが起動されるとともに、監視継続フラグの値が、「監視継続中である」という値に変更される。
In step S <b> 210, it is determined whether the value of the monitoring continuation flag is a value “monitoring is ongoing”. When the control of step S210 is entered for the first time, the value of the monitoring continuation flag is initialized to the value “not monitoring continuation”. Therefore, in step S210, the value of the monitoring continuation flag is set to “monitoring continuation”. It is determined that the value is not “continuing”, and the process proceeds to the monitoring continuation state in step S211. That is, the loop
そして、ステップS212において、資料採取が行われる。資料採取では、以下の情報が出力部38を介して出力される。
1.バッファ部33に保持される複数件のデータ。
2.最近取得したシステムコールについての情報。
In step S212, material collection is performed. In data collection, the following information is output via the
1. A plurality of data held in the
2. Information about recently acquired system calls.
ここで、上記1.は、ループ範囲を特定するのに有用な情報である。また、上記2.は、ループ処理直前にプログラムが何を処理していたのかを特定するのに有用な情報である。 Here, the above 1. Is useful information for specifying the loop range. In addition, the above 2. Is information useful for identifying what the program was processing immediately before the loop processing.
そして、続く、ステップS213で、ループ障害が発生したことを示すメッセージが、出力部38によって出力され、ステップS202に戻る。
一方、ステップS210で、監視継続フラグの値が、「監視継続中である」という値になっていると判定された場合、直ちにステップS202に戻る。これは、監視継続状態のときに「ループ障害が発生した」旨のメッセージを繰り返し出力することを避けるためである。
In step S213, a message indicating that a loop failure has occurred is output by the
On the other hand, if it is determined in step S210 that the value of the monitoring continuation flag is the value “continuing monitoring”, the process immediately returns to step S202. This is to avoid repeatedly outputting the message “A loop failure has occurred” in the monitoring continuation state.
続く、図7Cでは、まず、ステップS214において、監視継続フラグの値が、「監視継続中である」という値になっているかが判定される。
ステップS214は、ステップS205、S207、S209から制御が渡されるステップである。よって、ここで、監視継続フラグの値が、「監視継続中である」という値になっていると判定された場合は、監視継続状態のときに、ループ障害と仮決定した時点での条件を満たさなくなったこと、すなわち、変化数が閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、バッファ部33に格納される時刻の範囲内に存在するかした、ことを意味する。
In FIG. 7C, first, in step S214, it is determined whether or not the value of the monitoring continuation flag is “monitoring is ongoing”.
Step S214 is a step in which control is passed from steps S205, S207, and S209. Therefore, here, if it is determined that the value of the monitoring continuation flag is the value of “continuing monitoring”, the condition at the time when the loop fault is tentatively determined in the monitoring continuation state is It is no longer satisfied, that is, the number of changes exceeds the threshold value, the system call is being issued, or the last issue time of the system call is within the time range stored in the buffer unit 33 I mean.
この場合、ステップS215において、監視継続状態から非監視継続状態への移行が行われる。すなわち、すなわち、ループ障害判定部35によって、その時点での監視継続のためのタイマの値がバッファサイズ変更部39に出力されるとともに、監視継続フラグの値が、「監視継続中ではない」という値に変更される。
In this case, in step S215, a transition from the monitoring continuation state to the non-monitoring continuation state is performed. That is, the loop
続く、ステップS216では、バッファサイズ変更部39によって、その通知された時刻の値が、アドレスを取得するタイミング(プログラムカウンタ値取得間隔)で割られることで、バッファ部33の段数の増分が算出されて、バッファ部33に通知されることで、バッファ部33のバッファサイズの変更が行われる。
Subsequently, in step S216, the buffer
ステップS214において、監視継続フラグの値が、「監視継続中である」という値になっていないと判定された場合、ステップS202に戻る。
図8は、記憶媒体例を示す図である。
If it is determined in step S214 that the value of the monitoring continuation flag is not the value of “continuing monitoring”, the process returns to step S202.
FIG. 8 is a diagram illustrating an example of a storage medium.
本発明の監視処理は、情報処理装置61によって実現することが可能である。本発明の処理のためのプログラムやデータは、情報処理装置61の記憶装置65から情報処理装置61のメモリにロードして実行することも、可搬型記憶媒体63から情報処理装置61のメモリにロードして実行することも、外部記憶装置62からネットワーク66を介して情報処理装置61のメモリにロードして実行することも可能である。
The monitoring process of the present invention can be realized by the
本発明は下記構成でもよい。
(付記1) 被監視プログラムを監視する処理をコンピュータに実行させる監視プログラムにおいて、
実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変換値が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定する第2判定ステップを前記コンピュータに実行させることを特徴とする監視プログラム。
(付記2) 前記第2判定ステップにおいて、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合でも、前記被監視プログラムが発行するシステムコールが前記バッファに格納される時刻の範囲内に正常終了していた場合は、ループ障害が発生していないと判定することを特徴とする付記1記載の監視プログラム。
(付記3) 被監視プログラムを監視する処理をコンピュータに実行させる監視プログラムにおいて、
実行されている前記被監視プログラムのアドレスを予め定められたタイミング(時間間隔)で取得してバッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変換値が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないかどうかを判定する第2判定ステップと、
前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定ステップと、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変換値が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない状態が続いた場合は、ループ障害が発生したと判定し、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変換値が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定ステップ、を前記コンピュータに実行させることを特徴とする監視プログラム。
(付記4) 前記ループ障害判定ステップにおいて、前記仮決定を取り消す判定が行われた場合に、変化数が閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした、時刻の値を、アドレスを取得するタイミング(時間間隔)で割ることで、前記バッファの段数の増分を算出する段数増分算出ステップと、
前記算出された増分だけ前記バッファの段数を増やすバッファサイズ変更ステップをさらに備えることを特徴とする付記3記載の監視プログラム。
(付記5) 被監視プログラムを監視する処理をコンピュータが実行する監視方法において、
実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変換値が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定する第2判定ステップを備えることを特徴とする監視方法。
(付記6) 前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合でも、前記被監視プログラムが発行するシステムコールが前記バッファに格納される時刻の範囲内に正常終了していた場合は、ループ障害が発生していないと判定することを特徴とする付記5記載の監視方法。
(付記7) 被監視プログラムを監視する処理をコンピュータが実行する監視方法において、
実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変換値が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないかどうかを判定する第2判定ステップと、
前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定ステップと、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変換値が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない状態が続いた場合は、ループ障害が発生したと判定し、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変換値が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定ステップ、を備えることを特徴とする監視方法。
(付記8) 前記ループ障害判定ステップにおいて、前記仮決定を取り消す判定が行われた場合に、変化数が閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした、時刻の値を、アドレスを取得するタイミング(時間間隔)で割ることで、前記バッファの段数の増分を算出する段数増分算出ステップと、
前記算出された増分だけ前記バッファの段数を増やすバッファサイズ変更ステップをさらに備えることを特徴とする付記7記載の監視方法。
(付記9) 被監視プログラムを監視する処理を実行する監視装置において、
実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するアドレス取得部と、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変換値が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するシステムコール発行状況取得部と、
取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合に、被監視プログラムにループ障害が発生したと判定する第2判定部を備えることを特徴とする監視装置。
(付記10) 前記第2判定部は、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない場合でも、前記被監視プログラムが発行するシステムコールが前記バッファに格納される時刻の範囲内に正常終了していた場合は、ループ障害が発生していないと判定することを特徴とする付記9記載の監視装置。
(付記11) 被監視プログラムを監視する処理を実行する監視装置において、
実行されている前記被監視プログラムのアドレスを予め定められたタイミングで取得してバッファに格納するアドレス取得部と、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定部と、
前記変換値が前記閾値以内である場合に、前記被監視プログラムのシステムコールの発行状況を取得するシステムコール発行状況取得部と、
取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないかどうかを判定する第2判定部と、
前記第2判定部において、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定部と、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変換値が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在しない状態が続いた場合は、ループ障害が発生したと判定し、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変換値が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定部、を備えることを特徴とする監視装置。
(付記12) 前記ループ障害判定部によって、前記仮決定を取り消す判定が行われた場合に、変化数が閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が、前記バッファに格納される時刻の範囲内に存在するかした、時刻の値を、アドレスを取得するタイミング(時間間隔)で割ることで、前記バッファの段数の増分を算出する段数増分算出部と、
前記算出された増分だけ前記バッファの段数を増やすバッファサイズ変更部をさらに備えることを特徴とする付記11記載の監視装置。
The present invention may have the following configuration.
(Supplementary Note 1) In a monitoring program that causes a computer to execute processing for monitoring a monitored program,
Acquiring the address of the monitored program being executed at a predetermined timing and storing it in a buffer;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program when the conversion value is within the threshold; and
Based on the acquired system call issuance status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is within the time range stored in the buffer. A monitoring program that causes the computer to execute a second determination step for determining that a loop failure has occurred in the monitored program when the program is not present in the monitoring program.
(Supplementary Note 2) In the second determination step, even if the monitored program is not currently issuing a system call and the last issue time of the system call is not within the time range stored in the buffer, The monitoring program according to
(Additional remark 3) In the monitoring program which makes a computer perform the process which monitors a to-be-monitored program,
Obtaining an address of the monitored program being executed at a predetermined timing (time interval) and storing it in a buffer;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program when the conversion value is within the threshold; and
Based on the obtained system call issuance status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is stored in the buffer. A second determination step of determining whether or not it exists in
When it is determined in the second determination step that the monitored program is not currently issuing a system call and the last issue time of the system call does not exist within the time range stored in the buffer A loop failure provisional determination step that temporarily determines that a loop failure has occurred;
After the provisional determination of the loop failure, a state in which the conversion value is within the threshold continues for a predetermined monitoring duration, a state in which a system call is not being issued continues, and a system call is last issued If the time does not exist within the time range stored in the buffer, it is determined that a loop failure has occurred,
The conversion value exceeds the threshold value, or a system call is being issued at any point in time within a predetermined monitoring duration after the provisional determination of the loop failure, or If the last issue time of the system call is within the range of the time stored in the buffer, the computer is caused to execute a loop failure determination step for determining to cancel the provisional determination of the loop failure. Feature monitoring program.
(Additional remark 4) In the said loop failure determination step, when the determination which cancels the said temporary determination is performed, the number of changes exceeds a threshold value, it will be in the state which is issuing the system call, or the last issue of a system call Stage time increment calculation for calculating the increment of the stage number of the buffer by dividing the time value by the timing (time interval) for acquiring the address, whether the time exists within the time range stored in the buffer Steps,
The monitoring program according to
(Supplementary Note 5) In a monitoring method in which a computer executes processing for monitoring a monitored program,
Acquiring the address of the monitored program being executed at a predetermined timing and storing it in a buffer;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program when the conversion value is within the threshold; and
Based on the acquired system call issuance status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is within the time range stored in the buffer. A monitoring method comprising: a second determination step for determining that a loop failure has occurred in the monitored program when the program is not present in the monitoring program.
(Supplementary Note 6) In the second determination step, even when the monitored program is not currently issuing a system call and the last issue time of the system call is not within the time range stored in the buffer The monitoring according to
(Supplementary Note 7) In a monitoring method in which a computer executes processing for monitoring a monitored program,
Acquiring the address of the monitored program being executed at a predetermined timing and storing it in a buffer;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program when the conversion value is within the threshold; and
Based on the obtained system call issuance status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is stored in the buffer. A second determination step of determining whether or not it exists in
When it is determined in the second determination step that the monitored program is not currently issuing a system call and the last issue time of the system call does not exist within the time range stored in the buffer A loop failure provisional determination step that temporarily determines that a loop failure has occurred;
After the provisional determination of the loop failure, a state in which the conversion value is within the threshold continues for a predetermined monitoring duration, a state in which a system call is not being issued continues, and a system call is last issued If the time does not exist within the time range stored in the buffer, it is determined that a loop failure has occurred,
The conversion value exceeds the threshold value, or a system call is being issued at any point in time within a predetermined monitoring duration after the provisional determination of the loop failure, or And a loop failure determination step for determining whether to cancel the provisional determination of the loop failure when the last issue time of the system call is within the range of the time stored in the buffer. Method.
(Supplementary Note 8) In the loop failure determination step, when the determination to cancel the provisional decision is made, whether the number of changes exceeds a threshold value, a system call is being issued, or a system call is last issued Stage time increment calculation for calculating the increment of the stage number of the buffer by dividing the time value by the timing (time interval) for acquiring the address, whether the time exists within the time range stored in the buffer Steps,
The monitoring method according to
(Additional remark 9) In the monitoring apparatus which performs the process which monitors a to-be-monitored program,
An address acquisition unit that acquires an address of the monitored program being executed at a predetermined timing and stores the acquired address in a buffer;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
A system call issuance status acquisition unit for acquiring a system call issuance status of the monitored program when the conversion value is within the threshold;
Based on the acquired system call issuance status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is within the time range stored in the buffer. A monitoring apparatus comprising: a second determination unit that determines that a loop failure has occurred in the monitored program when it does not exist in the monitoring program.
(Supplementary Note 10) Even if the monitored program is not currently issuing a system call and the last issue time of the system call does not exist within the time range stored in the buffer, the second determination unit The monitoring according to
(Additional remark 11) In the monitoring apparatus which performs the process which monitors a to-be-monitored program,
An address acquisition unit for acquiring an address of the monitored program being executed at a predetermined timing and storing it in a buffer;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination unit;
A system call issuance status acquisition unit for acquiring a system call issuance status of the monitored program when the conversion value is within the threshold;
Based on the obtained system call issuance status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is stored in the buffer. A second determination unit for determining whether or not it exists,
When the second determination unit determines that the monitored program is not currently issuing a system call and the last issue time of the system call does not exist within the time range stored in the buffer A loop failure provisional determination unit that temporarily determines that a loop failure has occurred;
After the provisional determination of the loop failure, a state in which the conversion value is within the threshold continues for a predetermined monitoring duration, a state in which a system call is not being issued continues, and a system call is last issued If the time does not exist within the time range stored in the buffer, it is determined that a loop failure has occurred,
The conversion value exceeds the threshold value, or a system call is being issued at any point in time within a predetermined monitoring duration after the provisional determination of the loop failure, or A monitoring system comprising: a loop failure determination unit that performs a determination to cancel the provisional determination of the loop failure when the last issue time of the system call is within the range of the time stored in the buffer. apparatus.
(Additional remark 12) When the determination which cancels the said tentative decision is performed by the said loop failure determination part, the number of changes exceeds a threshold value, it will be in the state which is issuing the system call, or the last issue of a system call Stage time increment calculation for calculating the increment of the stage number of the buffer by dividing the time value by the timing (time interval) for acquiring the address, whether the time exists within the time range stored in the buffer And
The monitoring apparatus according to
11 被監視プログラム(被監視プロセス)
12 監視処理部(監視プログラム)
13 オペレーティングシステム
14 システムコール発行状況監視機能
15 プログラムカウンタ値取得機能
20、30 監視処理部
21、31 プログラムカウンタ値取得部
22、32 システムコール発行状況取得部
23、33 バッファ部(FIFO)
24、34 変換値算出部
25、36 ループ検出部
26、35 ループ障害判定部
27、38 出力部
37 ループ障害仮判定部
39 バッファサイズ変更部
11 Monitored program (monitored process)
12 Monitoring processor (monitoring program)
13
24, 34 Conversion
Claims (5)
前記監視プログラムが実行されるオペレーティングシステム上で実行されている前記被監視プログラムに、実行されている前記被監視プログラムのアドレスの取得要求を予め定められたタイミングで送信し、前記取得要求に基づいて前記被監視プログラムが送信した前記アドレスを取得してバッファに格納するとともに、前記アドレスを前記バッファに格納した格納時刻を前記バッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変化数が前記閾値以内である場合に、前記オペレーティングシステムを介して前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納された前記格納時刻の範囲内ではない場合に、被監視プログラムにループ障害が発生したと判定する第2判定ステップを前記コンピュータに実行させることを特徴とする監視プログラム。 In a monitoring program for causing a computer to execute processing for monitoring a monitored program,
An acquisition request for the address of the monitored program being executed is transmitted to the monitored program being executed on the operating system on which the monitoring program is executed at a predetermined timing, and based on the acquisition request Acquiring the address transmitted by the monitored program and storing it in a buffer, and storing the storage time when the address is stored in the buffer ;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program via the operating system when the number of changes is within the threshold;
Based on the system call issuance status of the monitored program acquired, the monitored program is not currently issuing a system call, and the last issue time of the system call is the storage time stored in the buffer. A monitoring program that causes the computer to execute a second determination step for determining that a loop failure has occurred in the monitored program when the value is not within the range.
前記監視プログラムが実行されるオペレーティングシステム上で実行されている前記被監視プログラムに、実行されている前記被監視プログラムのアドレスの取得要求を予め定められたタイミングで送信し、前記取得要求に基づいて前記被監視プログラムが送信した前記アドレスを取得してバッファに格納するとともに、前記アドレスを前記バッファに格納した格納時刻を前記バッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変化数が前記閾値以内である場合に、前記オペレーティングシステムを介して前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内かどうかを判定する第2判定ステップと、
前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内ではないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定ステップと、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変化数が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内ではない状態が続いた場合は、ループ障害が発生したと判定し、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変化数が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が前記バッファに格納されている前記格納時刻の範囲内となった場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定ステップ、を前記コンピュータに実行させることを特徴とする監視プログラム。 In a monitoring program for causing a computer to execute processing for monitoring a monitored program,
An acquisition request for the address of the monitored program being executed is transmitted to the monitored program being executed on the operating system on which the monitoring program is executed at a predetermined timing, and based on the acquisition request Acquiring the address transmitted by the monitored program and storing it in a buffer, and storing the storage time when the address is stored in the buffer ;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program via the operating system when the number of changes is within the threshold;
The storage in which the monitored program is not currently issuing a system call and the last issue time of the system call is stored in the buffer based on the acquired system call issue status of the monitored program a second judgment step of judging whether the range of time,
In the second determination step, it is determined that the monitored program is not currently issuing a system call and that the last issue time of the system call is not within the range of the storage time stored in the buffer. A loop fault provisional determination step that temporarily determines that a loop fault has occurred,
After the provisional determination of the loop fault, a state in which the predetermined monitoring duration, the number of changes is within the threshold continues, a state in which a system call is not issued continues, and a system call is last issued If the time is not within the range of the storage time stored in the buffer, it is determined that a loop failure has occurred,
After the provisional determination of the loop failure, at any point within a predetermined monitoring duration, the number of changes exceeds the threshold, a system call is being issued, or when it becomes in the range of the storage time the last issue time of the system call are stored before Symbol buffer, it is run loop fault determining step for determining to cancel the provisional determination of the loop failure, to the computer A monitoring program characterized by
監視プログラムが実行されるオペレーティングシステム上で実行されている前記被監視プログラムに、実行されている前記被監視プログラムのアドレスの取得要求を予め定められたタイミングで送信し、前記取得要求に基づいて前記被監視プログラムが送信した前記アドレスを取得してバッファに格納するとともに、前記アドレスを前記バッファに格納した格納時刻を前記バッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変化数が前記閾値以内である場合に、前記オペレーティングシステムを介して前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納された前記格納時刻の範囲内ではない場合に、被監視プログラムにループ障害が発生したと判定する第2判定ステップを備えることを特徴とする監視方法。 In a monitoring method in which a computer executes processing for monitoring a monitored program,
An acquisition request for the address of the monitored program being executed is transmitted to the monitored program being executed on the operating system on which the monitoring program is executed at a predetermined timing, and based on the acquisition request Acquiring the address transmitted by the monitored program and storing it in a buffer, and storing the storage time when the address is stored in the buffer ;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or the values calculated based on the values of the addresses are within a predetermined threshold. A first determination step;
Obtaining a system call issue status of the monitored program via the operating system when the number of changes is within the threshold;
Based on the acquired system call issue status of the monitored program, the monitored program is not currently issuing a system call, and the last issue time of the system call is the storage time stored in the buffer. A monitoring method comprising: a second determination step for determining that a loop failure has occurred in a monitored program when it is not within the range.
監視プログラムが実行されるオペレーティングシステム上で実行されている前記被監視プログラムに、実行されている前記被監視プログラムのアドレスの取得要求を予め定められたタイミングで送信し、前記取得要求に基づいて前記被監視プログラムが送信した前記アドレスを取得してバッファに格納するとともに、前記アドレスを前記バッファに格納した格納時刻を前記バッファに格納するステップと、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定ステップと、
前記変化数が前記閾値以内である場合に、前記オペレーティングシステムを介して前記被監視プログラムのシステムコールの発行状況を取得するステップと、
取得された前記被監視プログラムのシステムコールの発行状況を基に、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内かどうかを判定する第2判定ステップと、
前記第2判定ステップにおいて、前記被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内ではないと判定された場合に、ループ障害が発生したと仮判定するループ障害仮判定ステップと、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間、前記変化数が前記閾値以内である状態が続き、システムコールを発行中でない状態が続き、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内ではない状態が続いた場合は、ループ障害が発生したと判定し、
前記ループ障害の仮判定が行われてから、予め定められた監視継続時間内のいずれかの時点で、前記変化数が前記閾値を超えるか、システムコールが発行中の状態となるか、または、システムコールの最終発行時刻が前記バッファに格納されている前記格納時刻の範囲内となった場合は、前記ループ障害の仮判定を取り消す判定を行うループ障害判定ステップ、を備えることを特徴とする監視方法。 In a monitoring method in which a computer executes processing for monitoring a monitored program,
An acquisition request for the address of the monitored program being executed is transmitted to the monitored program being executed on the operating system on which the monitoring program is executed at a predetermined timing, and the acquisition request is transmitted based on the acquisition request. Acquiring the address transmitted by the monitored program and storing it in a buffer, and storing the storage time when the address is stored in the buffer in the buffer ;
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination step;
Obtaining a system call issue status of the monitored program via the operating system when the number of changes is within the threshold;
The storage in which the monitored program is not currently issuing a system call and the last issue time of the system call is stored in the buffer based on the acquired system call issue status of the monitored program a second judgment step of judging whether the range of time,
In the second determination step, it is determined that the monitored program is not currently issuing a system call and that the last issue time of the system call is not within the range of the storage time stored in the buffer. A loop fault provisional determination step that temporarily determines that a loop fault has occurred,
After the provisional determination of the loop fault, a state in which the predetermined monitoring duration, the number of changes is within the threshold continues, a state in which a system call is not issued continues, and a system call is last issued If the time is not within the range of the storage time stored in the buffer, it is determined that a loop failure has occurred,
After the provisional determination of the loop failure, at any point within a predetermined monitoring duration, the number of changes exceeds the threshold, a system call is being issued, or If the last issue time of the system call is made within the range of the storage time stored in the buffer, monitored, characterized in that it comprises a loop fault determination step of determining to cancel the provisional determination of the loop fault Method.
監視プログラムが実行されるオペレーティングシステム上で実行されている前記被監視プログラムのアドレスを、当該アドレスが格納された格納時刻とともに所定数格納するバッファと、
実行されている前記被監視プログラムのアドレスの取得要求を予め定められたタイミングで送信し、前記取得要求に基づいて前記被監視プログラムが送信した前記アドレスを取得して前記バッファに格納するアドレス取得部と、
前記バッファに格納された複数のアドレスの値またはそれらアドレスの値に基づいて算出された値、が何通りの異なる値をとるかを示す変化数が予め定められた閾値以内であるかを判定する第1判定部と、
前記変化数が前記閾値以内である場合に、前記オペレーティングシステムを介して前記被監視プログラムのシステムコールの発行状況を取得するシステムコール発行状況取得部と、
取得された前記被監視プログラムのシステムコールの発行状況を基に、被監視プログラムが現在システムコールを発行中でなく、かつ、システムコールの最終発行時刻が、前記バッファに格納されている前記格納時刻の範囲内ではない場合に、被監視プログラムにループ障害が発生したと判定する第2判定部を備えることを特徴とする監視装置。 In a monitoring device that executes processing for monitoring a monitored program,
A buffer for storing a predetermined number of addresses of the monitored program being executed on an operating system on which the monitoring program is executed, together with a storage time at which the address is stored;
The running transmitted at a predetermined timing a request for obtaining the address of the monitoring program, the acquisition request to the address acquisition unit which the monitoring program is stored in the buffer by obtaining the address transmitted on the basis of When,
It is determined whether the number of changes indicating how many different values the values of a plurality of addresses stored in the buffer or values calculated based on the values of these addresses are within a predetermined threshold value. A first determination unit;
A system call issuance status acquisition unit that acquires a system call issuance status of the monitored program via the operating system when the number of changes is within the threshold;
The storage time at which the monitored program is not currently issuing a system call and the last issue time of the system call is stored in the buffer based on the acquired system call issuance status of the monitored program A monitoring apparatus comprising: a second determination unit that determines that a loop failure has occurred in the monitored program when the value is not within the range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006097690A JP4627275B2 (en) | 2006-03-31 | 2006-03-31 | Monitoring program, monitoring method, and monitoring apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006097690A JP4627275B2 (en) | 2006-03-31 | 2006-03-31 | Monitoring program, monitoring method, and monitoring apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007272581A JP2007272581A (en) | 2007-10-18 |
JP4627275B2 true JP4627275B2 (en) | 2011-02-09 |
Family
ID=38675322
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006097690A Expired - Fee Related JP4627275B2 (en) | 2006-03-31 | 2006-03-31 | Monitoring program, monitoring method, and monitoring apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4627275B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103493023A (en) * | 2011-04-26 | 2014-01-01 | 富士通株式会社 | System and detection method |
WO2013073009A1 (en) * | 2011-11-15 | 2013-05-23 | トヨタ自動車株式会社 | Microcomputer system and monitoring microcomputer |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03292545A (en) * | 1990-04-11 | 1991-12-24 | Mitsubishi Electric Corp | Detection/recovery device for program loop |
JPH0695303B2 (en) * | 1990-12-28 | 1994-11-24 | ダイヤセミコンシステムズ株式会社 | Computer system status monitoring method and power saving control device |
JPH05224998A (en) * | 1992-02-17 | 1993-09-03 | Nec Corp | Fault detecting system for application task |
-
2006
- 2006-03-31 JP JP2006097690A patent/JP4627275B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007272581A (en) | 2007-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8286033B2 (en) | Network hang recovery | |
US7562391B1 (en) | Reducing false positive indications of buffer overflow attacks | |
JP2007323193A (en) | System, method and program for detecting abnormality of performance load | |
JP2007334716A (en) | Operation management system, monitoring device, device to be monitored, operation management method, and program | |
JP2008059102A (en) | Program for monitoring computer resource | |
US8245085B2 (en) | Dump output control apparatus and dump output control method | |
US20050096877A1 (en) | System and method for determination of load monitoring condition and load monitoring program | |
US8214693B2 (en) | Damaged software system detection | |
JP4627275B2 (en) | Monitoring program, monitoring method, and monitoring apparatus | |
US20060235655A1 (en) | Method for monitoring function execution | |
KR101595936B1 (en) | Optimization method, optimization server and computer readable recording medium for providing service with vaccine and optimization functions | |
JP5365273B2 (en) | Information processing system, monitoring method, and monitoring program | |
JP2012123762A (en) | Information processing device and information processing method | |
JP2012247937A (en) | Information processing unit, log storage control program, and log storage control method | |
JP4050253B2 (en) | Computer virus information collection apparatus, computer virus information collection method, and program | |
JP4978504B2 (en) | Information processing apparatus, communication information collecting method, and program | |
JP2008191813A (en) | File importance determination device, file importance determination method and file importance determination program | |
JP2002366393A (en) | Method for collecting computer operation information, implementing system therefor, and its processing program | |
US6957174B2 (en) | Sensor signal debouncing | |
JP4968092B2 (en) | Stall detection device, stall detection method, and stall detection program | |
US8614799B2 (en) | Memory paging | |
JPH076113A (en) | Data processing system having event reporting word processing function | |
JP7218630B2 (en) | Information processing device, information processing method, information processing program, and information processing system | |
JP5389734B2 (en) | Extraction apparatus and extraction method | |
JP4349303B2 (en) | File storage system, file storage method, and file storage program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080818 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100726 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100803 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101004 |
|
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: 20101102 |
|
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: 20101104 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131119 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |