JP2001005694A - System monitoring device - Google Patents

System monitoring device

Info

Publication number
JP2001005694A
JP2001005694A JP11172033A JP17203399A JP2001005694A JP 2001005694 A JP2001005694 A JP 2001005694A JP 11172033 A JP11172033 A JP 11172033A JP 17203399 A JP17203399 A JP 17203399A JP 2001005694 A JP2001005694 A JP 2001005694A
Authority
JP
Japan
Prior art keywords
monitoring
semaphore
monitored
time
lock
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.)
Pending
Application number
JP11172033A
Other languages
Japanese (ja)
Inventor
Kenji Ogawa
賢治 小川
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP11172033A priority Critical patent/JP2001005694A/en
Publication of JP2001005694A publication Critical patent/JP2001005694A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a system monitoring device capable of monitoring the wholesomeness of each process in a computer system, specifying an abnormal process and monitoring also the operation state or the like of a process to be monitored. SOLUTION: An operating system(OS) for driving plural processes is provided with a monitoring process 13, a process to be monitored 14 and a semaphore 11 to be used for synchronizing both the processes 13, 14. The process 1 executes each process by locking the semaphore 11 and the process 13 judges whether the semaphore is locked within a prescribed monitoring time or not, and when it can not be locked within the time, judges the occurrence of a process abnormality.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、複数のプロセス
(プロセスとはプログラムの実行形態のこと、この出願
では同様の意味で用いる)が動作する計算機システムの
監視技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for monitoring a computer system in which a plurality of processes (a process is an execution form of a program, which is used in the same sense in this application).

【0002】[0002]

【従来の技術】従来、計算機システムの異常を検知する
方法として種々提案されており、例えば、システム内に
特別なハードウエア(ウォッチドグタイマ)を用意し
て、システムプログラムが定期的に上記ハードウエアを
リセットする方法によりシステムの健全性を検知してい
るものがあった。
2. Description of the Related Art Conventionally, various methods have been proposed as methods for detecting an abnormality in a computer system. For example, a special hardware (watchdog timer) is prepared in a system, and a system program periodically executes the above hardware. Some systems detect the health of the system by resetting the system.

【0003】図11はウォッチドグタイマ(WDT)を用
いたシステム監視装置を示すブロック図である。図にお
いて、ウォッチドグタイマ(WDT)100は計算機シス
テム内に設けたハードウエアであり、システムプロセス
103は本計算機システムにおいて稼働するソフトウエ
アである。カウンタ101は、システムプロセス103
により初期値がセットされ、ウォッチドグタイマ(WD
T)100により減算される。タイマ102はシステム
プロセス103を周期起動するためのものであり、シス
テムプロセス103がカウンタ101内のカウンタ値を
初期値にセットするために使用する。
FIG. 11 is a block diagram showing a system monitoring apparatus using a watchdog timer (WDT). In the figure, a watchdog timer (WDT) 100 is hardware provided in a computer system, and a system process 103 is software that operates in the computer system. The counter 101 is a system process 103
, The initial value is set, and the watchdog timer (WD
T) is subtracted by 100. The timer 102 starts the system process 103 periodically, and is used by the system process 103 to set a counter value in the counter 101 to an initial value.

【0004】次に、上記従来のウォッチドグタイマ(W
DT)を用いた計算機システムの動作について説明す
る。システムプロセス103は初期値をカウンタ101
にセットするとともに、ウォッチドグタイマ(WDT)1
00の動作を開始指示する。ウォッチドグタイマ(WD
T)100は、一定時間毎に、カウンタ101内のカウ
ンタ値を減算する。一方、システムプロセス103はタ
イマ102の周期でカウンタ101内カウンタ値を初期
値に設定し直す。
Next, the conventional watch dog timer (W
The operation of the computer system using DT) will be described. The system process 103 stores the initial value in the counter 101
And watchdog timer (WDT) 1
00 is instructed to start. Watchdog timer (WD
T) 100 decrements the counter value in the counter 101 at regular intervals. On the other hand, the system process 103 resets the counter value in the counter 101 to the initial value at the cycle of the timer 102.

【0005】もし、システムプロセス103の動作(初
期値のセット)が計算機システムの異常によって途絶え
た場合には、カウンタ値は0になる。この場合には、ウ
ォッチドグタイマ(WDT)100は計算機システムに異
常が発生したと判断し、計算機システムに異常割り込み
を発生させる。
If the operation of the system process 103 (set of initial values) is interrupted due to an abnormality in the computer system, the counter value becomes zero. In this case, the watchdog timer (WDT) 100 determines that an abnormality has occurred in the computer system, and generates an abnormal interrupt in the computer system.

【0006】このように、ウォッチドグタイマ(WDT)
100を備えたシステムでは、上記初期値を、システム
プロセス103が定期的に設定し直す機構によってシス
テム全体の健全性を監視していた。
Thus, a watchdog timer (WDT)
In the system provided with 100, the system process 103 periodically resets the above initial values to monitor the health of the entire system.

【0007】[0007]

【発明が解決しようとする課題】従来のシステム監視装
置は以上のように構成されているので、下記の問題があ
った。
Since the conventional system monitoring apparatus is configured as described above, there are the following problems.

【0008】まず、計算機システムを構成する個別のプ
ロセスの異常(例えば、個別のプロセスのハングアップ
等)を検知することができない。
First, it is not possible to detect abnormalities of individual processes constituting the computer system (for example, hang-up of individual processes).

【0009】次に、どのプロセスが原因で異常状態に陥
ったかの要因を調査する手段がない。
[0009] Next, there is no means for investigating the cause of which process caused the abnormal state.

【0010】更に、システムプロセスのプライオリティ
値(プロセスを実行する際の計算機内での優先度)の設
定値によって、システムプロセスのプライオリティ値以
下のプロセスが暴走してもシステムプロセスは動作可能
であるので、異常を検知できない。
Further, the set value of the priority value of the system process (priority in the computer at the time of executing the process) allows the system process to operate even if a process below the priority value of the system process runs away. , Cannot detect abnormalities.

【0011】この発明は、上記のような課題を解消する
ためになされたものであり、計算機システム内の個々の
プロセスの健全性を監視でき、異常となったプロセスを
特定できるとともに、監視対象となるプロセスの動作状
況等も監視できるシステム監視装置を得ることを目的と
する。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and can monitor the health of each process in a computer system, identify an abnormal process, and specify a monitoring target. It is an object of the present invention to obtain a system monitoring device capable of monitoring the operation status of a process.

【0012】[0012]

【課題を解決するための手段】請求項1に記載のシステ
ム監視装置の発明は、複数のプロセスが動作するオペレ
ーティングシステム(OS)上において、監視プロセス
と、被監視プロセスと、監視プロセスと被監視プロセス
との同期のために使用するセマフォを備え、被監視プロ
セスはセマフォをロックして各プロセスを実行するとと
もに、監視プロセスは所定監視時間内にセマフォがロッ
クするか否かを判定し、上記監視時間内にロックができ
ない場合はプロセス異常が発生したものとすることを特
徴とする。
According to a first aspect of the present invention, there is provided a system monitoring apparatus, comprising: a monitoring process, a monitored process, a monitoring process, and a monitored process on an operating system (OS) on which a plurality of processes operate. A semaphore used for synchronization with the process is provided. The monitored process locks the semaphore and executes each process, and the monitoring process determines whether or not the semaphore is locked within a predetermined monitoring time. If the lock cannot be performed within the time, it is determined that a process abnormality has occurred.

【0013】請求項2に記載のシステム監視装置の発明
は、監視プロセスから監視対象分、逐次起動される複数
の監視スレッドを備え、被監視プロセスを上記複数の監
視スレッドによって監視することを特徴とする。
According to a second aspect of the present invention, there is provided a system monitoring apparatus comprising a plurality of monitoring threads which are sequentially activated for monitoring targets from a monitoring process, and wherein the monitored process is monitored by the plurality of monitoring threads. I do.

【0014】請求項3に記載のシステム監視装置の発明
は、監視プロセス側に可変長のスリープ時間を設定する
手段を備え、監視プロセスは上記スリープ時間中はセマ
フォをロックしたまま維持することを特徴とする。
According to a third aspect of the present invention, there is provided a system monitoring apparatus comprising means for setting a variable-length sleep time on the monitoring process side, and the monitoring process keeps the semaphore locked during the sleep time. And

【0015】請求項4に記載のシステム監視装置の発明
は、監視プロセスによるセマフォのロック時間を一時停
止させ、その間に被監視プロセスの状態を調査、特に被
監視プロセスのダンプ処理を実行することを特徴とす
る。
According to a fourth aspect of the present invention, there is provided a system monitoring apparatus for temporarily suspending a lock time of a semaphore by a monitoring process, and for investigating a state of the monitored process during that time, in particular, executing a dump process of the monitored process. Features.

【0016】[0016]

【発明の実施の形態】実施の形態1.以下、この発明の
実施の形態1を図に基づいて説明する。図1はこの発明
の実施の形態1によるシステム監視装置を示す機能ブロ
ックであり、図2は実施の形態1の動作を示すフローチ
ャートである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a functional block diagram showing a system monitoring device according to a first embodiment of the present invention, and FIG. 2 is a flowchart showing an operation of the first embodiment.

【0017】図1の計算機システムにおいて、監視プロ
セス13と被監視プロセス14とが並行して存在し、プ
ロセスの健全性を監視するための手段としてセマフォ1
1が監視プロセス13と被監視プロセス14の間に設け
られている。また、タイマ12はセマフォ11のロック
時間の監視を行うためのものである。ここで、セマフォ
とは、並行プロセス処理を同期するために用いられるシ
ステム変数(共有変数)を意味し、あるアクションが完
了したかどうか、又はあるイベントが生起したかどうか
を示す。
In the computer system of FIG. 1, a monitoring process 13 and a monitored process 14 exist in parallel, and the semaphore 1 is used as a means for monitoring the health of the process.
1 is provided between the monitoring process 13 and the monitored process 14. The timer 12 monitors the lock time of the semaphore 11. Here, the semaphore means a system variable (shared variable) used for synchronizing the parallel process processing, and indicates whether a certain action has been completed or whether a certain event has occurred.

【0018】次に、実施の形態1の動作について図2の
フローチャートを用いて説明する。被監視プロセス14
は、セマフォ11をロックし(S100)、各プロセス
内の処理を行う(S101)。その後、セマフォ11を
アンロックする(S102)。
Next, the operation of the first embodiment will be described with reference to the flowchart of FIG. Monitored process 14
Locks the semaphore 11 (S100) and performs processing in each process (S101). Thereafter, the semaphore 11 is unlocked (S102).

【0019】一方、監視プロセス13では、タイマ12
をセット(S110)して、ロック待ち時間の監視を行
う。そして、被監視プロセス14との同期に使用するセ
マフォロックを試みる(S111)。S112におい
て、タイマ12のセット間にセマフォロック成功かどう
かの判定を行う。この判定は計算機システムのセマフォ
システムサービスコールの実装による。ロックできない
場合には即時エラーリターンする場合もあるし、ロック
できるまでシステムコール内で待ち状態になる場合もあ
る。またその待ち制限時間を指定できるものもある。監
視時間内でロック可能となった場合には、監視プロセス
13は被監視プロセス14が正常動作していると見な
し、同セマフォをアンロックし(S113)、再びS1
10からの監視動作を継続する。
On the other hand, in the monitoring process 13, the timer 12
Is set (S110) to monitor the lock waiting time. Then, a semaphore lock used for synchronization with the monitored process 14 is attempted (S111). In S112, it is determined whether or not the semaphore lock is successful between the settings of the timer 12. This judgment depends on the implementation of the semaphore system service call of the computer system. If the lock cannot be performed, an error may be returned immediately, or a wait may occur in a system call until the lock can be performed. In some cases, the waiting time limit can be specified. If it becomes possible to lock within the monitoring time, the monitoring process 13 assumes that the monitored process 14 is operating normally, unlocks the semaphore (S113), and returns to S1.
The monitoring operation from 10 is continued.

【0020】前記S112において、セマフォ11を時
間内にロックできなかった場合には、監視プロセス13
に何らかの異常が発生したものとみなし、異常処理(S
114)、例えば被監視プロセス14の強制終了や、異
常情報の出力を行う。
In step S112, if the semaphore 11 cannot be locked in time, the monitoring process 13
It is assumed that some abnormality has occurred in the
114), for example, forcibly terminating the monitored process 14 and outputting abnormal information.

【0021】なお、本実施例において、監視プロセス1
3と被監視プロセス14との間にフラグ等を設け、当該
フラグ等により監視要否を伝え、さらに監視の要否を判
定する手段を設けることにより、本監視機構の取り外し
を行うことも可能である。
In this embodiment, the monitoring process 1
It is also possible to remove the monitoring mechanism by providing a flag or the like between the monitoring process 3 and the monitored process 14, transmitting the necessity of monitoring by the flag or the like, and further providing a means for determining the necessity of monitoring. is there.

【0022】以上のように実施の形態1によれば、複数
の監視プロセスを、ほぼすべての計算機システムで利用
可能なセマフォと、汎用のソフトウエアタイマを使用
し、特別のハードウエアを設けることなく監視できるよ
うに構成したので、システム監視装置が安価に構築可能
となる効果がある。また、個別のプロセスの異常を検出
できると共に異常となったプロセスの特定も簡単に行え
るため、トラブル発生時から原因の究明までの保守時間
を削減可能になる。
As described above, according to the first embodiment, a plurality of monitoring processes can be performed without using special hardware by using a semaphore that can be used in almost all computer systems and a general-purpose software timer. Since it is configured to be able to monitor, there is an effect that the system monitoring device can be constructed at low cost. In addition, since an abnormality of an individual process can be detected and an abnormal process can be easily specified, maintenance time from the occurrence of a trouble to the investigation of the cause can be reduced.

【0023】実施の形態2.以下、この発明の実施の形
態2を図に基づいて説明する。図3はこの発明の実施の
形態2によるシステム監視装置を示す機能ブロックであ
り、図4は実施の形態2の動作を示すフローチャートで
ある。
Embodiment 2 FIG. Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. FIG. 3 is a functional block diagram showing a system monitoring device according to a second embodiment of the present invention, and FIG. 4 is a flowchart showing an operation of the second embodiment.

【0024】図3において、実施の形態1(図1)と同
様に、監視プロセス13と被監視プロセス14が並行し
て存在し、プロセスの健全性を監視するための手段とし
てセマフォ11が監視プロセス13と被監視プロセス1
4の間に設けられている。そして、本実施の形態では、
監視プロセス13から監視対象分、逐次起動される監視
スレッド23が設置されている。なお、タイマ12はセ
マフォ11のロック時間を監視を行うためのものであ
る。
In FIG. 3, as in the first embodiment (FIG. 1), a monitoring process 13 and a monitored process 14 exist in parallel, and a semaphore 11 is used as a means for monitoring the health of the process. 13 and the monitored process 1
4 are provided. And in this embodiment,
A monitoring thread 23 that is sequentially activated for the monitoring target from the monitoring process 13 is provided. The timer 12 monitors the lock time of the semaphore 11.

【0025】次に、実施の形態2の動作について図4の
フローチャートを用いて説明する。被監視プロセス14
は、セマフォ11をロックし(S200)、各プロセス
内の処理を行う(S201)。その後、セマフォ11を
アンロックする(S202)。
Next, the operation of the second embodiment will be described with reference to the flowchart of FIG. Monitored process 14
Locks the semaphore 11 (S200) and performs processing in each process (S201). Thereafter, the semaphore 11 is unlocked (S202).

【0026】一方、監視プロセス13では、監視プロセ
ス数分スレッドを起動する(S210)。以下は監視ス
レッド23による個別の処理である。監視スレッド23
では、タイマをセットし(S221)、ロック待ち時間
の監視を行う。そして、被監視プロセス14との同期に
使用するセマフォロックを試みる(S222)。
On the other hand, in the monitoring process 13, threads are activated for the number of monitoring processes (S210). The following is an individual process by the monitoring thread 23. Monitoring thread 23
Then, the timer is set (S221), and the lock waiting time is monitored. Then, a semaphore lock used for synchronization with the monitored process 14 is attempted (S222).

【0027】S223において、監視時間内においてロ
ック成功かどうかの判定を行う。この判定は計算機シス
テムのセマフォシステムサービスコールの実装による。
ロックできない場合には即時エラーリターンする場合も
あるし、ロックできるまでシステムコール内で待ち状態
になる場合もある。またその待ち制限時間を指定できる
ものもある。
In S223, it is determined whether or not the lock is successful within the monitoring time. This judgment depends on the implementation of the semaphore system service call of the computer system.
If the lock cannot be performed, an error may be returned immediately, or a wait may occur in a system call until the lock can be performed. In some cases, the waiting time limit can be specified.

【0028】監視時間内でロック可能となった場合に
は、監視対象プロセス13は被監視プロセス14が正常
動作していると見なし、同セマフォ11をアンロックし
(S213)再びS221からの監視動作を継続する。
If the lock is possible within the monitoring time, the monitored process 13 regards the monitored process 14 as operating normally, unlocks the semaphore 11 (S213), and performs the monitoring operation again from S221. To continue.

【0029】S223で、セマフォ11を時間内にロッ
クできなかった場合には、監視プロセス13に何らかの
異常が発生したものとみなし、異常処理(S225)例
えば被監視プロセス14の強制終了や、異常情報の出力
を行う。
If the semaphore 11 cannot be locked in time in S223, it is considered that some abnormality has occurred in the monitoring process 13, and the abnormality processing (S225), for example, the forced termination of the monitored process 14, the abnormality information Output.

【0030】なお、上記実施の形態2では、被監視プロ
セスにおいて1カ所の監視領域を設定し、かつこの監視
領域に対するセマフォを1つ設定し、かつ監視スレッド
を1つに対応させたが、1つの被監視プロセスに対し
て、監視対象領域を複数設定することも可能である。こ
の際、被監視プロセス内の複数の監視領域を同一のセマ
フォで監視してもよいし、監視領域毎に、別のセマフォ
を用意してもよい。また、被監視プロセスの複数監視領
域毎に監視スレッドを複数用意してもよい。この手段に
よれば、複数のプロセスおよび複数の監視領域を監視可
能である。
In the second embodiment, one monitored area is set in the monitored process, one semaphore is set for the monitored area, and one monitoring thread is associated with one monitored area. It is also possible to set a plurality of monitoring target areas for one monitored process. At this time, a plurality of monitoring areas in the monitored process may be monitored by the same semaphore, or another semaphore may be prepared for each monitoring area. Further, a plurality of monitoring threads may be prepared for each of a plurality of monitoring areas of the monitored process. According to this means, a plurality of processes and a plurality of monitoring areas can be monitored.

【0031】実施の形態3.以下、この発明の実施の形
態3を図に基づいて説明する。図5はこの発明の実施の
形態3によるシステム監視装置を示す機能ブロックであ
り、図6は実施の形態3の動作を示すフローチャートで
ある。
Embodiment 3 Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. FIG. 5 is a functional block diagram showing a system monitoring device according to a third embodiment of the present invention, and FIG. 6 is a flowchart showing an operation of the third embodiment.

【0032】図5において、実施の形態1(図1)と同
様に、監視プロセス13と被監視プロセス14が並行し
て存在し、プロセスの健全性を監視するための手段とし
てセマフォ11が監視プロセス13と被監視プロセス1
4の間に設けられている。また、タイマ12はセマフォ
11のロック時間を監視を行うためのものである。そし
て、本実施の形態では、監視プロセス13がセマフォ1
1をロックしたままスリープするためのタイマ15が設
けられ、可変長のスリープ時間(命令を実行しない時
間)を設定するエリア16が配設されている。
In FIG. 5, as in the first embodiment (FIG. 1), a monitoring process 13 and a monitored process 14 exist in parallel, and the semaphore 11 is used as a means for monitoring the soundness of the process. 13 and the monitored process 1
4 are provided. The timer 12 monitors the lock time of the semaphore 11. In the present embodiment, the monitoring process 13 sets the semaphore 1
A timer 15 for sleeping while locking 1 is provided, and an area 16 for setting a variable-length sleep time (time during which no command is executed) is provided.

【0033】次に、実施の形態3の動作について図6の
フローチャートを用いて説明する。被監視プロセス14
は、セマフォ11をロックし(S300)、各プロセス
内の処理を行う(S301)。そして、セマフォ11を
アンロックする(S302)。
Next, the operation of the third embodiment will be described with reference to the flowchart of FIG. Monitored process 14
Locks the semaphore 11 (S300) and performs processing in each process (S301). Then, the semaphore 11 is unlocked (S302).

【0034】一方、監視プロセス13では、タイマ12
をセットし(S321)、ロック待ち時間の監視を行
う。そして、被監視プロセス14との同期に使用するセ
マフォロックを試みる(S322)。S323において
ロック成功かどうかの判定を行う。この判定は計算機シ
ステムのセマフォシステムサービスコールの実装によ
る。ロックできない場合には即時エラーリターンする場
合もあるし、ロックできるまでシステムコール内で待ち
状態になる場合もある。またその待ち制限時間を指定で
きるものもある。
On the other hand, in the monitoring process 13, the timer 12
Is set (S321), and the lock wait time is monitored. Then, a semaphore lock used for synchronization with the monitored process 14 is attempted (S322). In S323, it is determined whether or not the lock is successful. This judgment depends on the implementation of the semaphore system service call of the computer system. If the lock cannot be performed, an error may be returned immediately, or a wait may occur in a system call until the lock can be performed. In some cases, the waiting time limit can be specified.

【0035】監視時間内でロック可能となった場合に
は、スリープ時間設定エリア16に設定されたスリープ
時間に従って、一定時間スリープする。その後、セマフ
ォ11をアンロックし(S325)、監視動作を継続す
る(S321)。この手段によって監視対象プロセスに
任意の停止時間を与えることが可能となる。
When the lock becomes possible within the monitoring time, the computer sleeps for a certain time according to the sleep time set in the sleep time setting area 16. Thereafter, the semaphore 11 is unlocked (S325), and the monitoring operation is continued (S321). By this means, it is possible to give an arbitrary stop time to the monitored process.

【0036】なおS323で、セマフォ11を時間内に
ロックできなかった場合には、監視プロセス13に何ら
かの異常が発生したものとみなし、異常処理(S32
6)、例えば被監視プロセス14の強制終了や、異常情
報の出力を行う。
If the semaphore 11 cannot be locked in time in S323, it is regarded that some abnormality has occurred in the monitoring process 13 and the abnormality processing (S32
6) For example, forced termination of the monitored process 14 and output of abnormal information are performed.

【0037】以上のように実施の形態3によれば、監視
対象とするプロセスに対して任意のディレイ時間を与え
ることが可能となり、システム障害の暫定回避策や、デ
バッグ等に有効な手段を提供することができる。
As described above, according to the third embodiment, an arbitrary delay time can be given to a process to be monitored, and provision is made for provisional measures for avoiding a system failure and effective means for debugging and the like. can do.

【0038】実施の形態4.以下、この発明の実施の形
態4を図に基づいて説明する。図7はこの発明の実施の
形態4によるシステム監視装置を示す機能ブロックであ
り、図8は実施の形態4の動作を示すフローチャートで
ある。
Embodiment 4 FIG. Hereinafter, a fourth embodiment of the present invention will be described with reference to the drawings. FIG. 7 is a functional block diagram showing a system monitoring device according to a fourth embodiment of the present invention, and FIG. 8 is a flowchart showing an operation of the fourth embodiment.

【0039】図7において、実施の形態1(図1)と同
様に、監視プロセス13と被監視プロセス14が並行し
て存在し、プロセスの健全性を監視するための手段とし
てセマフォ11が監視プロセス13と被監視プロセス1
4の間に設けられている。また、タイマ12はセマフォ
11のロック時間を監視を行うためのものである。そし
て、本実施の形態では、監視プロセス13がロックした
まま停止することを指示する停止フラグが存在する停止
フラグ設定エリア17と、被監視プロセス14の状態を
ダンプする処理装置18が設置され、また、停止フラグ
をオンにする制御プログラム19を備えている。
In FIG. 7, as in the first embodiment (FIG. 1), a monitoring process 13 and a monitored process 14 exist in parallel, and the semaphore 11 is used as a means for monitoring the health of the process. 13 and the monitored process 1
4 are provided. The timer 12 monitors the lock time of the semaphore 11. In the present embodiment, a stop flag setting area 17 in which a stop flag indicating that the monitoring process 13 is stopped while being locked is provided, and a processing device 18 for dumping the state of the monitored process 14 is provided. And a control program 19 for turning on the stop flag.

【0040】次に、実施の形態4の動作について図8の
フローチャートを用いて説明する。被監視プロセス14
は、セマフォ11をロックし(S400)、各プロセス
内の処理を行う(S401)。そして、セマフォ11を
アンロックする(S402)。
Next, the operation of the fourth embodiment will be described with reference to the flowchart of FIG. Monitored process 14
Locks the semaphore 11 (S400) and performs processing in each process (S401). Then, the semaphore 11 is unlocked (S402).

【0041】一方、監視プロセス13では、タイマ12
をセットし(S421)、ロック待ち時間の監視を行
う。そして、被監視プロセス14との同期に使用するセ
マフォロックを試みる(S422)。S423により、
監視時間内においてロック成功かどうかの判定を行う。
この判定は計算機システムのセマフォシステムサービス
コールの実装による。ロックできない場合には即時エラ
ーリターンする場合もあるし、ロックできるまでシステ
ムコール内で待ち状態になる場合もある。またその待ち
制限時間を指定できるものもある。
On the other hand, in the monitoring process 13, the timer 12
Is set (S421), and the lock wait time is monitored. Then, a semaphore lock used for synchronization with the monitored process 14 is attempted (S422). By S423,
It is determined whether the lock is successful within the monitoring time.
This judgment depends on the implementation of the semaphore system service call of the computer system. If the lock cannot be performed, an error may be returned immediately, or a wait may occur in a system call until the lock can be performed. In some cases, the waiting time limit can be specified.

【0042】監視時間内でロック可能となった場合に
は、停止フラグ設定エリア17に制御プログラム19に
よって設定された停止フラグがオンかどうかを判定する
(S424)。もし、停止フラグがオンならば、停止フ
ラグをオフにし(S425)、ダンプ処理部18に被監
視プロセス14のダンプ処理の依頼を行ない(S42
6)、ダンプ終了待ちをおこなう(S427)。
If the lock is possible within the monitoring time, it is determined whether or not the stop flag set by the control program 19 in the stop flag setting area 17 is on (S424). If the stop flag is on, the stop flag is turned off (S425), and the dump processing unit 18 is requested to perform a dump process of the monitored process 14 (S42).
6) Wait for the end of the dump (S427).

【0043】もし、S424において、停止フラグがオ
フならば、監視動作を継続する(S421)。
If the stop flag is off in S424, the monitoring operation is continued (S421).

【0044】ダンプ処理部18では、監視プロセス13
からのダンプ指示(S426)を受け、被監視プロセス
14のダンプを行う(S430)。ダンプが終了したら
監視プロセス13に終了通知を行う(S431)。
In the dump processing unit 18, the monitoring process 13
Receives the dump instruction (S426) from the server, and dumps the monitored process 14 (S430). When the dump is completed, an end notification is sent to the monitoring process 13 (S431).

【0045】なおS423で、セマフォ11を時間内に
ロックできなかった場合には、監視プロセス13に何ら
かの異常が発生したものとみなし、異常処理(S42
8)、例えば被監視プロセス14の強制終了または異常
情報の出力を行う。
If the semaphore 11 cannot be locked in time in S423, it is regarded that some abnormality has occurred in the monitoring process 13, and the abnormality processing (S42) is performed.
8) Forcibly terminate the monitored process 14 or output abnormal information, for example.

【0046】以上のように実施の形態4によれば、監視
対象プロセスの任意の時点でのダンプ情報を入手可能と
することができるので、異常になったプロセスの内部情
報を取得することが可能になる。
As described above, according to the fourth embodiment, it is possible to obtain dump information at any time of a monitored process, so that it is possible to obtain internal information of an abnormal process. become.

【0047】実施の形態5.以下、この発明の実施の形
態5を図に基づいて説明する。図9はこの発明の実施の
形態5によるシステム監視装置を示す機能ブロックであ
り、図10は実施の形態5の動作を示すフローチャート
である。
Embodiment 5 Hereinafter, a fifth embodiment of the present invention will be described with reference to the drawings. FIG. 9 is a functional block diagram illustrating a system monitoring apparatus according to a fifth embodiment of the present invention, and FIG. 10 is a flowchart illustrating the operation of the fifth embodiment.

【0048】図9において、実施の形態1(図1)と同
様に、監視プロセス13と被監視プロセス14が並行し
て存在し、プロセスの健全性を監視するための手段とし
てセマフォ11が監視プロセス13と被監視プロセス1
4の間に設けられている。また、タイマ12はセマフォ
11のロック時間を監視を行うためのものである。そし
て、本実施の形態では、統計テーブルに測定回数を指示
するための制御プログラム19と、監視プロセス13の
動作時間を記録するための統計テーブル20が配設さ
れ、ロック時間を計測するための計測タイマ21が備っ
ている。
In FIG. 9, as in the first embodiment (FIG. 1), the monitoring process 13 and the monitored process 14 exist in parallel, and the semaphore 11 is used as a means for monitoring the health of the process. 13 and the monitored process 1
4 are provided. The timer 12 monitors the lock time of the semaphore 11. In the present embodiment, a control program 19 for instructing the number of measurements in the statistics table and a statistics table 20 for recording the operation time of the monitoring process 13 are provided, and a measurement for measuring the lock time is provided. A timer 21 is provided.

【0049】次に、実施の形態5の動作について図10
のフローチャートを用いて説明する。被監視プロセス1
4は、セマフォ11をロックし(S500)、各プロセ
ス内の処理を行う(S501)。そして、セマフォ11
をアンロックする(S502)。
Next, the operation of the fifth embodiment will be described with reference to FIG.
This will be described with reference to the flowchart of FIG. Monitored process 1
4 locks the semaphore 11 (S500) and performs processing in each process (S501). And semaphore 11
Is unlocked (S502).

【0050】一方、監視プロセス13では、タイマ12
をセットし(S521)、ロック待ち時間の監視を行
う。次に、被監視プロセス14の実行時間を計測するた
めのタイマ21をスタートさせる。(S522)その
後、被監視プロセス14との同期に使用するセマフォロ
ックを試みる(S523)。そして、S524により監
視時間内におけるロック成功かどうかの判定を行う。こ
の判定は計算機システムのセマフォシステムサービスコ
ールの実装による。ロックできない場合には即時エラー
リターンする場合もあるし、ロックできるまでシステム
コール内で待ち状態になる場合もある。またその待ち制
限時間を指定できるものもある。
On the other hand, in the monitoring process 13, the timer 12
Is set (S521), and the lock wait time is monitored. Next, the timer 21 for measuring the execution time of the monitored process 14 is started. (S522) Then, a semaphore lock used for synchronization with the monitored process 14 is attempted (S523). Then, in S524, it is determined whether or not the lock is successful within the monitoring time. This judgment depends on the implementation of the semaphore system service call of the computer system. If the lock cannot be performed, an error may be returned immediately, or a wait may occur in a system call until the lock can be performed. In some cases, the waiting time limit can be specified.

【0051】監視時間内でロック可能となった場合に
は、計測タイマ21から経過時間を得て、処理時間の記
録と計測回数を、統計テーブル20に記録する(S52
5)。その後、監視用セマフォ11をアンロックし(S
526)、監視・計測動作を継続する(S521)。統
計テーブル20内の測定指示回数は、制御プログラム1
9によって設定する。
If the lock becomes possible within the monitoring time, the elapsed time is obtained from the measurement timer 21, and the recording of the processing time and the number of times of measurement are recorded in the statistics table 20 (S52).
5). After that, the monitoring semaphore 11 is unlocked (S
526), the monitoring / measuring operation is continued (S521). The number of measurement instructions in the statistical table 20 is determined by the control program 1
Set by 9.

【0052】なおS524で、セマフォ11を時間内に
ロックできなかった場合には、監視プロセス13に何ら
かの異常が発生したものとみなし、異常処理(S52
7)、例えば被監視プロセス14の強制終了または異常
情報の出力を行う。
If the semaphore 11 cannot be locked in time in S524, it is considered that some abnormality has occurred in the monitoring process 13, and the abnormality process (S52).
7) For example, the monitored process 14 is forcibly terminated or abnormal information is output.

【0053】以上のように実施の形態5によれば、監視
対象のプロセスの性能、あるいは監視対象プロセスの個
別の領域に関して、詳細な実行時間性能を取得すること
ができる。
As described above, according to the fifth embodiment, detailed execution time performance can be obtained for the performance of a process to be monitored or for an individual area of the process to be monitored.

【0054】[0054]

【発明の効果】以上のように、請求項1に記載の発明に
よれば、複数の監視プロセスを、ほぼすべての計算機シ
ステムで利用可能なセマフォと、汎用のソフトウエアタ
イマを使用し、特別のハードウエアを設けることなくシ
ステム監視ができるように構成したので、システム監視
装置が安価に構築可能となる効果がある。また、個別の
プロセスの異常を検出できると共に異常となったプロセ
スの特定も簡単に行えるため、トラブル発生時から原因
の究明までの保守時間を削減可能になる。
As described above, according to the first aspect of the present invention, a plurality of monitoring processes are performed by using a semaphore which can be used in almost all computer systems and a general-purpose software timer. Since the system can be monitored without providing hardware, the system monitoring device can be constructed at low cost. In addition, since an abnormality of an individual process can be detected and an abnormal process can be easily specified, maintenance time from the occurrence of a trouble to the investigation of the cause can be reduced.

【0055】また、請求項2に記載発明によれば、複数
のプロセスを監視することが可能であり、同一プロセス
内でも複数の領域を監視することが可能である。
According to the second aspect of the present invention, a plurality of processes can be monitored, and a plurality of areas can be monitored even in the same process.

【0056】また、請求項3に記載の発明によれば、監
視対象とするプロセスに対して任意のディレイ時間を与
えることが可能となり、システム障害の暫定回避策や、
デバッグ等に有効な手段を提供することが可能である。
Further, according to the third aspect of the present invention, it is possible to give an arbitrary delay time to a process to be monitored, thereby providing a provisional workaround for a system failure,
It is possible to provide an effective means for debugging or the like.

【0057】また、請求項4に記載の発明によれば、監
視対象プロセスの任意の時点でのダンプ情報を入手可能
とすることができるので、請求項1に記載の発明と組み
合わせることによって、異常になったプロセスの内部情
報を取得可能である。
According to the fourth aspect of the present invention, it is possible to obtain dump information at any time of a process to be monitored. It is possible to obtain the internal information of the process that has become.

【0058】また、請求項5に記載の発明によれば、監
視対象のプロセスの性能、あるいは監視対象プロセスの
個別の領域に関して、詳細な実行時間性能を取得するこ
とができる。
According to the fifth aspect of the present invention, it is possible to acquire the performance of a process to be monitored or a detailed execution time performance for an individual area of the process to be monitored.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 この発明の実施の形態1によるシステム監視
装置を示すブロック図である。
FIG. 1 is a block diagram showing a system monitoring device according to a first embodiment of the present invention.

【図2】 この発明の実施の形態1による動作を説明す
るフローチャートである。
FIG. 2 is a flowchart illustrating an operation according to the first embodiment of the present invention.

【図3】 この発明の実施の形態2によるシステム監視
装置を示すブロック図である。
FIG. 3 is a block diagram showing a system monitoring device according to a second embodiment of the present invention.

【図4】 この発明の実施の形態2による動作を説明す
るフローチャートである。
FIG. 4 is a flowchart illustrating an operation according to the second embodiment of the present invention.

【図5】 この発明の実施の形態3によるシステム監視
装置を示すブロック図である。
FIG. 5 is a block diagram showing a system monitoring device according to a third embodiment of the present invention.

【図6】 この発明の実施の形態3による動作を説明す
るフローチャートである。
FIG. 6 is a flowchart illustrating an operation according to the third embodiment of the present invention.

【図7】 この発明の実施の形態4によるシステム監視
装置を示すブロック図である。
FIG. 7 is a block diagram showing a system monitoring device according to a fourth embodiment of the present invention.

【図8】 この発明の実施の形態4による動作を説明す
るすフローチャートである。
FIG. 8 is a flowchart illustrating an operation according to the fourth embodiment of the present invention.

【図9】 この発明の実施の形態5によるシステム監視
装置を示すブロック図である。
FIG. 9 is a block diagram showing a system monitoring device according to a fifth embodiment of the present invention.

【図10】 この発明の実施の形態5による動作を説明
するフローチャートである。
FIG. 10 is a flowchart illustrating an operation according to the fifth embodiment of the present invention.

【図11】 従来のウォッチドグタイマ(WDT)を用い
たシステム監視装置を示すブロック図である。
FIG. 11 is a block diagram showing a conventional system monitoring device using a watchdog timer (WDT).

【符号の説明】[Explanation of symbols]

11 セマフォ、12 タイマ(セマフォロック監視
用)、13 監視プロセス、14 被監視プロセス、1
5 タイマ(スリープ時間用)、16 スリープ時間設
定エリア、17 停止フラグ設定エリア、18 ダンプ
処理部、19 制御プログラム、20 統計テーブル、
21 タイマ(計測用)、23 監視スレッド、100
WDT(ウォッチドグタイマ)、101 カウン
タ、102タイマ(周期起動用)、103 システムプ
ログラム。
11 semaphore, 12 timer (for semaphore lock monitoring), 13 monitoring process, 14 monitored process, 1
5 timer (for sleep time), 16 sleep time setting area, 17 stop flag setting area, 18 dump processing unit, 19 control program, 20 statistics table,
21 timer (for measurement), 23 monitoring thread, 100
WDT (watchdog timer), 101 counter, 102 timer (for periodic activation), 103 system program.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数のプロセスが動作するオペレーティ
ングシステム(OS)上において、 監視プロセスと、被監視プロセスと、監視プロセスと被
監視プロセスとの同期のために使用するセマフォを備
え、 被監視プロセスはセマフォをロックして各プロセスを実
行するとともに、監視プロセスは所定監視時間内にセマ
フォがロックするか否かを判定し、上記監視時間内にロ
ックができない場合はプロセス異常が発生したものとす
ることを特徴とするシステム監視装置。
An operating system (OS) on which a plurality of processes operate includes a monitoring process, a monitored process, and a semaphore used for synchronizing the monitoring process and the monitored process. The semaphore is locked and each process is executed, and the monitoring process determines whether or not the semaphore is locked within a predetermined monitoring time. If the semaphore cannot be locked within the monitoring time, it is assumed that a process error has occurred. A system monitoring device characterized by the above-mentioned.
【請求項2】 上記監視プロセスから監視対象分、逐次
起動される複数の監視スレッドを備え、被監視プロセス
を上記複数の監視スレッドによって監視することを特徴
とする請求項1記載のシステム監視装置。
2. The system monitoring apparatus according to claim 1, further comprising a plurality of monitoring threads that are sequentially activated for the monitoring targets from the monitoring process, and wherein the monitored processes are monitored by the plurality of monitoring threads.
【請求項3】 上記監視プロセス側に可変長のスリープ
時間を設定する手段を備え、上記監視プロセスは上記ス
リープ時間中はセマフォをロックしたまま維持すること
を特徴とする請求項1または請求項2に記載のシステム
監視装置。
3. The monitoring process according to claim 1, further comprising means for setting a variable-length sleep time in the monitoring process, wherein the monitoring process keeps the semaphore locked during the sleep time. A system monitoring device according to claim 1.
【請求項4】 上記監視プロセスによるセマフォのロッ
ク時間を一時停止させ、被監視プロセスの状態を調査可
能とすることを特徴とする請求項1から請求項3のいず
れか1項に記載のシステム監視装置。
4. The system monitoring according to claim 1, wherein a lock time of the semaphore by the monitoring process is temporarily stopped so that a state of the monitored process can be checked. apparatus.
【請求項5】 上記監視プロセスによるセマフォロック
要求からセマフォロック完了までの統計をとることによ
って、被監視プロセスの実行に関する統計を取得するこ
とを特徴とする請求項1から請求項4のいずれか1項に
記載のシステム監視装置。
5. The method according to claim 1, wherein statistics from execution of the monitored process are acquired by collecting statistics from a semaphore lock request by the monitoring process to completion of the semaphore lock. The system monitoring device according to the paragraph.
JP11172033A 1999-06-18 1999-06-18 System monitoring device Pending JP2001005694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11172033A JP2001005694A (en) 1999-06-18 1999-06-18 System monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11172033A JP2001005694A (en) 1999-06-18 1999-06-18 System monitoring device

Publications (1)

Publication Number Publication Date
JP2001005694A true JP2001005694A (en) 2001-01-12

Family

ID=15934293

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11172033A Pending JP2001005694A (en) 1999-06-18 1999-06-18 System monitoring device

Country Status (1)

Country Link
JP (1) JP2001005694A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7089555B2 (en) 2001-06-27 2006-08-08 International Business Machines Corporation Ordered semaphore management subsystem
US7143414B2 (en) 2001-09-26 2006-11-28 International Business Machines Corporation Method and apparatus for locking multiple semaphores
US7406690B2 (en) 2001-09-26 2008-07-29 International Business Machines Corporation Flow lookahead in an ordered semaphore management subsystem
US7454753B2 (en) 2001-06-27 2008-11-18 International Business Machines Corporation Semaphore management subsystem for use with multi-thread processor systems

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7089555B2 (en) 2001-06-27 2006-08-08 International Business Machines Corporation Ordered semaphore management subsystem
US7454753B2 (en) 2001-06-27 2008-11-18 International Business Machines Corporation Semaphore management subsystem for use with multi-thread processor systems
US7143414B2 (en) 2001-09-26 2006-11-28 International Business Machines Corporation Method and apparatus for locking multiple semaphores
US7406690B2 (en) 2001-09-26 2008-07-29 International Business Machines Corporation Flow lookahead in an ordered semaphore management subsystem
US7917908B2 (en) 2001-09-26 2011-03-29 International Business Machines Corporation Flow lookahead in an ordered semaphore management subsystem

Similar Documents

Publication Publication Date Title
JP2001005694A (en) System monitoring device
JPH10198584A (en) Abnormality monitoring device for application software
JP2965075B2 (en) Program execution status monitoring method
JP2002140209A (en) Watch dog timer
JPS60100231A (en) System constitution control system of information processor
JPH1153225A (en) Fault processor
JP4313858B2 (en) calculator
JP7360077B2 (en) Control device, control method, and control program
JP2003036210A (en) Agent program monitoring method, agent program monitoring system and agent monitoring program
JP2002215428A (en) Device and method for monitoring task and recording medium with the method recorded thereon
JP2014203181A (en) Fault diagnosis device and program
JP2002351855A (en) Computer abnormality handling system, computer abnormality handling method, computer abnormality handling program running on computer and computer abnormality handling program stored in machine readable storage medium
JPH11232143A (en) Multithread monitor method
JP2004070458A (en) Program with self-diagnostic function, program supervising device and method, and program with program supervising function
JP2967824B2 (en) Multi-processor system
JP2746184B2 (en) Fault logging system
JP3318926B2 (en) Time synchronization method
JPH1069390A (en) Device and method for task stall
JPH01134637A (en) Supervising system for information in stall processing system
JPH0749817A (en) Dma transfer controller
JPH03253945A (en) Abnormality recovery processing function confirming system for data processing system
JPS6155748A (en) Electronic computer system
JPS62126749A (en) System supervisory system
JP2000181560A (en) Automatic schedule control system for computer and recording medium therefor
JP2000284979A (en) Dead lock job restarting method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040406