JP2005078123A - Failure detection system and method and its program - Google Patents

Failure detection system and method and its program Download PDF

Info

Publication number
JP2005078123A
JP2005078123A JP2003209784A JP2003209784A JP2005078123A JP 2005078123 A JP2005078123 A JP 2005078123A JP 2003209784 A JP2003209784 A JP 2003209784A JP 2003209784 A JP2003209784 A JP 2003209784A JP 2005078123 A JP2005078123 A JP 2005078123A
Authority
JP
Japan
Prior art keywords
file
name
file descriptor
monitored
monitoring target
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
JP2003209784A
Other languages
Japanese (ja)
Inventor
Nobuhiro Kimura
伸宏 木村
Sho Yamada
祥 山田
Akemi Oka
朱実 岡
Hiroyuki Iinuma
寛幸 飯沼
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.)
NEC Corp
Nippon Telegraph and Telephone Corp
Original Assignee
NEC Corp
Nippon Telegraph and Telephone 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 NEC Corp, Nippon Telegraph and Telephone Corp filed Critical NEC Corp
Priority to JP2003209784A priority Critical patent/JP2005078123A/en
Publication of JP2005078123A publication Critical patent/JP2005078123A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a failure detection device equipped with functions to detect the failure of a process without performing a ps command or the like several times, and to detect the failure of the process in a real time. <P>SOLUTION: A process ID acquiring means 101 acquires a process list by performing a ps command, and acquires process ID corresponding to a process name mentioned in a monitor target process name description file 15 from the process list. Then, a file describer reading means 102 reads a file descriptor from a process information storage file 13 based on the acquired process ID, and a file descriptor registeration means 103 registers the file descriptor in a file descriptor status detection program 14. Also, a failure detection means 104 detects the failure of a monitor target process by accepting the notification of the invalidation of the file descriptor from the file descriptor status detection program 14. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、コンピュータシステムに係り、特に、故障検出装置および故障検出方法ならびにそのプログラムに関するものである。
【0002】
【従来の技術】
従来、UNIX(登録商標)システム内で起動しているプログラムのプロセスに関わる情報を取得する場合、UNIX(登録商標)のOSが備えているps(Report Process Status)コマンドを用いて取得する場合がある。そして、このpsコマンドを用いてUNIX(登録商標)システム内で起動しているプログラムのプロセスの情報を取得する技術が公開されている(例えば、特許文献1参照)。
【0003】
【特許文献1】
特開2002−342107号公報
【0004】
【発明が解決しようとする課題】
しかしながら、上述の技術でプロセスの情報を取得する方法の場合、リアルタイムにプロセス故障を検出するためには、短い周期でpsコマンドを実行する必要がある。ここで、psコマンドを用いてプロセスの情報を得ることによりプロセスの故障を検出する方法では、psコマンドを実行した時点のプロセスの状態しか検出できないのでリアルタイムに故障を検出することができない。また、短い周期でpsコマンドを何度も実行してプロセスの情報を取得する方法では、UNIX(登録商標)システムに負荷をかけてしまうため、プロセスの故障を行なう手段としては不適当である。
そこでこの発明は、psコマンドなどを何度も実行しなくてもプロセスの故障を検出することができ、また、リアルタイムにプロセスの故障を検出することができる機能を備えた、コンピュータの故障検出装置および故障検出方法ならびにそのプログラムを提供することを目的としている。
【0005】
【課題を解決するための手段】
本発明は、上述の課題を解決すべくなされたもので、監視対象プロセスに対応するファイル記述子を記録したプロセス情報格納ファイルと、前記監視対象プロセスの故障に基づいて前記ファイル記述子の無効を通知するファイル記述子状態検出手段とを有するコンピュータの故障検出装置であって、前記監視対象プロセスのプロセス名を記述した監視対象プロセス名記述ファイルと、プロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から前記監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得するプロセスID取得手段と、前記取得したプロセスIDに基づいて前記プロセス情報格納ファイルから前記ファイル記述子を読み取るファイル記述子取読み取り手段と、前記読み取ったファイル記述子を前記ファイル記述子状態検出手段に登録するファイル記述子登録手段と、当該登録したファイル記述子の無効の通知を前記ファイル記述子状態検出手段から受け付けて前記監視対象プロセスの故障を検出する故障検出手段とを備えることを特徴とする故障検出装置である。
【0006】
上述の構成によれば、本発明は、プロセスID取得手段がプロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得する。そしてファイル記述子取読み取り手段が、取得したプロセスIDに基づいてプロセス情報格納ファイルからファイル記述子を読み取り、ファイル記述子登録手段が、読み取ったファイル記述子をファイル記述子状態検出手段に登録する。また故障検出手段が、登録したファイル記述子の無効の通知をファイル記述子状態検出手段から受け付けて監視対象プロセスの故障を検出する。これにより、psコマンドなどを何度も実行しなくてもプロセスの故障を検出することができる。また、監視対象プロセスが故障した時点でファイル記述子状態検出手段よりファイル記述子の無効が通知されるので、リアルタイムにプロセスの故障を検出することができる。
【0007】
また本発明は、上述の故障検出装置において、前記監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルと、前記無効の通知を受けた監視対象プロセスの起動コマンド名を前記起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動手段とを備えることを特徴とする。これにより、起動コマンド名を起動コマンド名記述ファイルに記述しておけば、故障した監視対象プロセスの再起動を直ちに行うことができる。
【0008】
また本発明は、上述の故障検出装置において、前記監視対象プロセス名記述ファイルが同一のプロセス名を複数記述し、前記プロセスID取得手段は前記複数の同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得することを特徴とする。これにより、プロセス名が同一の監視対象プロセスが複数起動される場合でも、プロセス名が同一の監視対象プロセスそれぞれの異なるプロセスIDを読みとるので、複数の同一プロセス名の各監視対象プロセスの故障を検出することが出来る。
【0009】
また本発明は、上述の故障検出装置において、前記監視対象プロセス名記述ファイルが前記監視対象プロセスの起動に用いる引数を前記プロセス名に対応付けて記述し、前記プロセスID取得手段は前記監視対象プロセスのプロセス名と前記引数とに基づいて、前記プロセス一覧から前記プロセスIDを取得することを特徴とする。これにより、同じ引数で起動された同一プロセス名の監視対象プロセスが複数ある場合でも、同一プロセス名の各監視対象プロセスの故障をそれぞれ検出することが出来る。
【0010】
また本発明は、監視対象プロセスに対応するファイル記述子を記録したプロセス情報格納ファイルと、前記監視対象プロセスの故障に基づいて前記ファイル記述子の無効を通知するファイル記述子状態検出手段とを有するコンピュータの故障検出方法であって、プロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得するプロセスID取得過程と、前記取得したプロセスIDに基づいて前記プロセス情報格納ファイルから前記ファイル記述子を読み取るファイル記述子取読み取り過程と、前記読み取ったファイル記述子を前記ファイル記述子状態検出手段に登録するファイル記述子登録過程と、当該登録したファイル記述子の無効の通知を前記ファイル記述子状態検出手段から受け付けて前記監視対象プロセスの故障を検出する故障検出過程とを有することを特徴とする故障検出方法である。
【0011】
また本発明は、上述の故障検出方法であって、前記監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルを有し、前記無効の通知を受けた監視対象プロセスの起動コマンド名を前記起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動過程を有することを特徴とする。
【0012】
また本発明は、上述の故障検出方法であって、前記監視対象プロセス名記述ファイルが同一のプロセス名を複数記述し、前記プロセスID取得過程において、前記複数の同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得することを特徴とする。
【0013】
また本発明は、上述の故障検出方法であって、前記監視対象プロセス名記述ファイルが前記監視対象プロセスの起動に用いる引数を前記プロセス名に対応付けて記述し、前記プロセスID取得過程において、前記監視対象プロセスのプロセス名と前記引数とに基づいて、前記プロセス一覧から前記プロセスIDを取得することを特徴とする。
【0014】
また本発明は、監視対象プロセスに対応するファイル記述子を記録したプロセス情報格納ファイルと、前記監視対象プロセスの故障に基づいて前記ファイル記述子の無効を通知するファイル記述子状態検出手段とを有するコンピュータに実行させるプログラムであって、プロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得するプロセスID取得過程と、前記取得したプロセスIDに基づいて前記プロセス情報格納ファイルから前記ファイル記述子を読み取るファイル記述子取読み取り過程と、前記読み取ったファイル記述子を前記ファイル記述子状態検出手段に登録するファイル記述子登録過程と、当該登録したファイル記述子の無効の通知を前記ファイル記述子状態検出手段から受け付けて前記監視対象プロセスの故障を検出する故障検出過程との処理を実行させるプログラムである。
【0015】
また本発明は、上述のプログラムに、前記無効の通知を受けた監視対象プロセスの起動コマンド名を、前記監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動過程の処理を実行させることを特徴とする。
【0016】
また本発明は、上述のプログラムの前記プロセスID取得過程において、前記監視対象プロセス名記述ファイルに複数記述された同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得する処理を実行させることを特徴とする。
【0017】
また本発明は、上述のプログラムの前記プロセスID取得過程において、前記監視対象プロセス名記述ファイルに記述された前記監視対象プロセスのプロセス名とその監視対象プロセスの起動に用いる引数とに基づいて、前記プロセス一覧から前記プロセスIDを取得する処理を実行させることを特徴とする。
【0018】
【発明の実施の形態】
以下、本発明の一実施形態による故障検出機能(故障検出装置)を備えたコンピュータを図面を参照して説明する。
図1は、この発明の一実施形態による故障検出機能を備えたコンピュータのソフトウェア構成を示す概略ブロック図である。
この図において、符号1は監視対象プロセスの故障を検出する故障検出機能である。なお、本実施形態における故障検出機能1を備えたコンピュータはOS(Operating System)としてUNIX(登録商標)を採用している。そして故障検出機能1において、符号11は監視対象プロセス(監視対象のアプリケーションプロセス)の故障を検出する監視プロセスである。符号12はコンピュータ上で起動されたプログラムのプロセスのうちの監視対象となるプロセス(監視対象プロセス)である。
【0019】
また13は監視対象プロセス12のプロセスIDやCPU使用時間やファイル記述子などのプロセス情報を格納するプロセス情報格納ファイルである。なお、プロセス情報格納ファイル13には、psコマンド(プロセスID取得コマンド)を実行することによって取得できるプロセスIDやCPU使用時間などの情報と、psコマンドを実行しても取得できないファイル記述子などの情報が格納されている。また14は登録を受けたファイル記述子に対応する監視対象プロセス12の故障に基づいて、ファイル記述子の無効を監視プロセス11に通知するファイル記述子状態検出プログラム(ファイル記述子状態検出手段)である。
【0020】
なおファイル記述子とはファイルディスクリプタとも呼ばれ、プログラムがファイルやデバイスにアクセスする際に使用する整数の数値である。そしてファイル記述子はプロセス毎に割り当てられ、コンピュータはファイル記述子を用いて各プロセスへのデータの受け渡しを行なう。またファイル記述子状態検出プログラム14は、例えば、UNIX(登録商標)のシステムコールのコマンドとして備えられたPoll関数などであり、登録を受けたファイル記述子が格納されているプロセス情報格納ファイル13が削除された場合に、ファイル記述子の無効を判断し、監視プロセス11に当該無効を通知するプログラムである。また15は予めコンピュータのユーザが決定した監視対象プロセス12のプロセス名や、当該監視対象プロセス12を再起動するための起動パス(起動コマンド名)を記述した監視対象プロセス記述ファイル(起動コマンド名記述ファイル)である。
【0021】
また監視プロセス11において、符号101はpsコマンドを利用してプロセス情報格納ファイル13に格納されている監視対象プロセス12のプロセスIDを取得するプロセスID取得手段である。また102は監視対象プロセス12のプロセスIDに基づいて、プロセス情報格納ファイル13からファイル記述子を読み取るファイル記述子読み取り手段である。また103はファイル記述子読み取り手段102がプロセス情報格納ファイル13から読み取ったファイル記述子をファイル記述子状態検出プログラム14に登録するファイル記述子登録手段である。ここで、ファイル記述子をファイル記述子状態検出プログラム14に登録するとは、ファイル記述子状態検出プログラム14にファイル記述子を通知して、当該ファイル記述子の状態を検出するように設定することを言う。また104はファイル記述子状態検出プログラム14からのファイル記述子の無効の通知を受け付けて監視対象プロセス12の故障を検出する故障検出手段である。また105は故障した監視対象プロセス12を強制終了させるプロセス強制終了手段である。また106はプロセス強制終了手段105が強制終了した監視対象プロセス12を再起動する再起動手段である。
【0022】
そして、コンピュータにおいてプロセスが起動された場合、起動されたプロセス毎に、例えば/procディレクトリ配下にプロセス情報格納ファイル13が作成される。そして監視プロセス11は、後述する処理によりコンピュータ上で起動しているプロセスのうちの監視対象プロセス12に対応するファイル記述子を、プロセスIDに基づいて取得し、当該取得したファイル記述子をファイル記述子状態検出プログラム14に登録する。そしてファイル記述子状態検出プログラム14は通知を受けたファイル記述子の無効を検出し、監視プロセス11に通知する。これにより監視プロセス11は監視対象プロセス12の故障を検出する。
【0023】
図2は監視プロセス11がファイル記述子を取得する処理のイメージを示す図である。この図が示すように、監視プロセス11は、コンピュータが例えばUNIX(登録商標)をOSとして採用している場合、/procディレクトリに作成された監視対象プロセス12の各プロセス情報格納ファイル13からファイル記述子を読み取る。また図3は監視プロセス11が監視対象プロセス12の故障を検出する際の処理のイメージを示す図である。この図が示すように、例えば、プロセス情報格納ファイル(c)が抹消され、ファイル記述子(c)が無効となると、当該無効が監視プロセス11に通知される。これにより監視プロセス11はファイル記述子(c)に対応する監視対象プロセスの故障を検出する。
【0024】
次に、故障検出機能の処理を図4を用いて順を追って説明する。図4は故障検出機能の処理フローを示す図である。
まず、監視プロセス11のプロセスID取得手段101が監視対象プロセス記述ファイル15から監視対象のプロセス名を読み取り、またプロセス名に対応する起動パスが記述されている場合にはその起動パスとを読み取り、psコマンドを実行して(ステップS1)、コンピュータ上で起動しているプロセスの一覧を取得する。なおプロセスの一覧には、プロセス名とそのプロセスを起動した際の引数(プロセスの起動時に引数が指定されていない場合にはプロセス名のみ)とプロセスIDが対応付けられて表示されている。そしてプロセスID取得手段101は、監視対象プロセス記述ファイル15から読み取った監視対象プロセス名と同一のプロセス名に対応付けられたプロセスIDをプロセスの一覧から取得する(ステップS2)。
【0025】
なお、監視対象プロセス記述ファイル15で監視対象プロセス名と引数が対応付けられて記述されている場合には、プロセスID取得手段101は、監視対象のプロセス名と引数とに対応付けられたプロセスIDを一覧から読み取る。また、監視対象プロセス記述ファイル15に同一の監視対象プロセス名が複数記述されている場合には、プロセスID取得手段101は、記述されている数だけの同一監視対象プロセス12のプロセスIDを一覧から読み取る。ここで、本実施形態においては、監視対象プロセス記述ファイル15に記述されている同一の監視対象プロセス12の数と、該監視対象プロセス12がコンピュータ上で起動されている数は同一であることを前提とする。
【0026】
次に、ファイル記述子読み取り手段102は、/procディレクトリ配下に記録されている各プロセスのプロセス情報格納ファイル13を1つずつ読み込んで、プロセスIDが格納されているか否かを判断する。そしてファイル記述子読み取り手段102は、プロセスID取得手段101の読み取ったプロセスIDを格納しているプロセス情報格納ファイル13からファイル記述子を読み取る(ステップS3)。なお、監視プロセス11は監視対象プロセス記述ファイル15から読み取った監視対象プロセス名と、その監視対象プロセスのプロセスIDと、当該プロセスIDに基づいたファイル記述子を対応付けてメモリなどの記憶部に記憶しておく。
【0027】
次にファイル記述子登録手段103はファイル記述子読み取り手段102の読み取ったファイル記述子をファイル記述子状態検出プログラム14に登録する(ステップS4)。ここで、ステップ2からステップ4までの処理は、監視対象プロセス記述ファイル15に記述されている監視対象プロセス名分繰り返し行なわれる。するとファイル記述子状態検出プログラム14は、登録を受けたファイル記述子が無効か否かを常時監視する(ステップS5)。そして、ファイル記述子状態検出プログラム14は、OSからのファイル記述子の抹消の通知待ちを行なう。
【0028】
次に、監視対象プロセス12に故障が発生した場合、該当するプロセス情報格納ファイル13がOSにより抹消される。すると、ファイル記述子状態検出プログラム14は、抹消されたプロセス情報格納ファイル13に記録されているファイル記述子を無効と判断し、当該ファイル記述子の無効を監視プロセス11に通知する(ステップS6)。そして、監視プロセス11の故障検出手段104は、無効となったファイル記述子に対応付けられて記憶部に記録されている監視対象プロセス名のプロセスが故障したことを検出する(ステップS7)。
【0029】
次に、監視プロセス11の故障検出手段104が、監視対象プロセス12の故障を検出すると、プロセス強制終了手段105が監視対象プロセス名に対応付けれれて記憶部に記録されているプロセスIDを用いて監視対象プロセス12を強制終了する。なおプロセス強制終了手段105は例えば、UNIX(登録商標)システムに備えられているKillコマンドなどを用いて監視対象プロセス12を強制終了する(ステップS8)。そして再起動手段106が、ステップS1においてプロセスID取得手段101が起動パスを読み取っているか否かを確認する(ステップS9)。そして、強制終了した監視対象プロセス12の起動パスを読み取っている場合には、再起動手段106はその起動パスを用いて、強制終了した監視対象プロセス12を再起動する(ステップS10)。
【0030】
以上、監視対象プロセス12の故障検出方法について説明したが、ファイル記述子読み取り手段102が同一名の監視対象プロセス12に関わるプロセスIDを複数取得した場合には、最も値が大きい(若番の)プロセスIDが格納されているプロセス情報格納ファイル13に記載のファイル記述子を読み取るようにしてもよいし、また、各プロセスIDがそれぞれ記述されたプロセス情報格納ファイル13から各ファイル記述子をそれぞれ読み取るようにして、それらすべてのファイル記述子をファイル記述子状態検出プログラム14に登録するようにしてもよい。
【0031】
なお、上述した処理の過程は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータが読み出して実行することによって、上記処理が行われる。ここでコンピュータ読み取り可能な記録媒体とは、磁気ディスク、光磁気ディスク、CD−ROM、DVD−ROM、半導体メモリ等をいう。また、このコンピュータプログラムを通信回線によってコンピュータに配信し、この配信を受けたコンピュータが当該プログラムを実行するようにしても良い。
また、上述のプロセスとはプログラムのOSの管理下での実行単位のことである。そして、コンピュータの処理において、主記憶がハードディスクなどの記録媒体に記録されたプログラムを読み取って記憶し、CPUが主記憶の記憶するプログラムを実行する。またCPUは当該実行したプログラム用のデータを主記憶から読み込み、また前記実行したプログラム用のデータを主記憶に書き込む処理を行なう。そして、コンピュータのプログラム毎の処理の実行単位であるプロセスがOSの管理下で並列に複数処理される。
【0032】
【発明の効果】
以上説明したように、この発明によれば、プロセスID取得手段がプロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得する。そしてファイル記述子取読み取り手段が、取得したプロセスIDに基づいてプロセス情報格納ファイルからファイル記述子を読み取り、ファイル記述子登録手段が、読み取ったファイル記述子をファイル記述子状態検出手段に登録する。また故障検出手段が、登録したファイル記述子の無効の通知をファイル記述子状態検出手段から受け付けて監視対象プロセスの故障を検出する。
これにより、psコマンドなどを何度も実行しなくてもプロセスの故障を検出することができる。また、監視対象プロセスが故障した時点でファイル記述子状態検出手段よりファイル記述子の無効が通知されるので、リアルタイムにプロセスの故障を検出することができる。
【0033】
また本発明によれば、監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルと、無効の通知を受けた監視対象プロセスの起動コマンド名を起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動手段とを備えることを特徴とする。
これにより、起動コマンド名を起動コマンド名記述ファイルに記述しておけば、故障した監視対象プロセスの再起動を直ちに行うことができる。
【0034】
また本発明によれば、監視対象プロセス名記述ファイルが同一のプロセス名を複数記述し、プロセスID取得手段は複数の同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得することを特徴とする。これにより、プロセス名が同一の監視対象プロセスが複数起動される場合でも、プロセス名が同一の監視対象プロセスそれぞれの異なるプロセスIDを読みとるので、複数の同一プロセス名の各監視対象プロセスの故障を検出することが出来る。
【0035】
また本発明によれば、監視対象プロセス名記述ファイルが監視対象プロセスの起動に用いる引数をプロセス名に対応付けて記述し、プロセスID取得手段は監視対象プロセスのプロセス名と引数とに基づいて、プロセス一覧からプロセスIDを取得することを特徴とする。これにより、同じ引数で起動された同一プロセス名の監視対象プロセスが複数ある場合でも、同一プロセス名の各監視対象プロセスの故障をそれぞれ検出することが出来る。
【図面の簡単な説明】
【図1】この発明の一実施形態による故障検出機能を備えたコンピュータのソフトウェア構成を示す概略ブロック図である。
【図2】本実施形態による監視プロセスがファイル記述子を取得する処理のイメージを示す図である。
【図3】本実施形態による監視プロセスが監視対象プロセスの故障を検出する際の処理のイメージを示す図である。
【図4】本実施形態による故障検出機能の処理フローを示す図である。
【符号の説明】
1 故障検出機能
11 監視プロセス
12 監視対象プロセス
13 プロセス情報格納ファイル
14 ファイル記述子状態検出プログラム
15 監視対象プロセス記述ファイル
101 プロセスID取得手段
102 ファイル記述子読み取り手段
103 ファイル記述子登録手段
104 故障検出手段
105 プロセス強制終了手段
106 再起動手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a computer system, and more particularly to a failure detection apparatus, failure detection method, and program thereof.
[0002]
[Prior art]
Conventionally, when acquiring information related to a process of a program running in a UNIX (registered trademark) system, the information may be acquired using a ps (Report Process Status) command provided in the UNIX (registered trademark) OS. is there. And the technique which acquires the process information of the program currently started in the UNIX (trademark) system using this ps command is disclosed (for example, refer patent document 1).
[0003]
[Patent Document 1]
Japanese Patent Laid-Open No. 2002-342107
[Problems to be solved by the invention]
However, in the case of the method of acquiring process information by the above-described technique, it is necessary to execute the ps command in a short cycle in order to detect a process failure in real time. Here, in the method of detecting a process failure by obtaining process information using the ps command, only the state of the process at the time when the ps command is executed can be detected, so the failure cannot be detected in real time. In addition, the method of acquiring process information by executing the ps command many times in a short cycle places a load on the UNIX (registered trademark) system, and thus is not suitable as a means for causing a process failure.
Therefore, the present invention can detect a process failure without repeatedly executing a ps command or the like, and has a function capable of detecting a process failure in real time. It is another object of the present invention to provide a failure detection method and a program therefor.
[0005]
[Means for Solving the Problems]
The present invention has been made to solve the above-described problems. A process information storage file in which a file descriptor corresponding to a monitored process is recorded, and the invalidation of the file descriptor is determined based on the failure of the monitored process. A failure detection apparatus for a computer having a file descriptor state detection means for notifying, wherein a monitoring target process name description file in which a process name of the monitoring target process is described, a process ID acquisition command, and a process name and process are executed. A process ID acquisition unit that acquires a process list that is described in association with an ID, acquires a process ID corresponding to a process name described in the monitored process name description file from the process list, and the acquired process The file descriptor from the process information storage file based on the ID A file descriptor reading unit for reading, a file descriptor registration unit for registering the read file descriptor in the file descriptor state detection unit, and a notification of invalidity of the registered file descriptor in the file descriptor state detection And a failure detection unit that receives from the unit and detects a failure of the process to be monitored.
[0006]
According to the above configuration, in the present invention, the process ID acquisition unit executes the process ID acquisition command to acquire the process list in which the process name and the process ID are associated with each other, and the monitoring target process name from the process list The process ID corresponding to the process name described in the description file is acquired. The file descriptor reading / reading unit reads the file descriptor from the process information storage file based on the acquired process ID, and the file descriptor registration unit registers the read file descriptor in the file descriptor state detection unit. Further, the failure detection unit receives a notification of invalidity of the registered file descriptor from the file descriptor state detection unit, and detects a failure of the monitored process. As a result, it is possible to detect a process failure without repeatedly executing the ps command or the like. In addition, since the file descriptor status detection means notifies the invalidity of the file descriptor when the monitored process fails, it is possible to detect a process failure in real time.
[0007]
According to the present invention, in the above-described failure detection apparatus, a startup command name description file that describes a startup command name of the monitored process, and a startup command name description of the startup command name of the monitored process that has received the invalid notification Reboot means for reading from a file and executing a start command based on the read start command name is provided. Thus, if the start command name is described in the start command name description file, the failed monitored process can be restarted immediately.
[0008]
According to the present invention, in the above-described failure detection apparatus, the monitoring target process name description file describes a plurality of the same process names, and the process ID acquisition means has the same process name based on the plurality of the same process names. Each process ID of a plurality of monitoring target processes is acquired. As a result, even when multiple monitored processes with the same process name are started, different process IDs of the monitored processes with the same process name are read, so that a failure of each monitored process with the same process name is detected. I can do it.
[0009]
According to the present invention, in the above-described failure detection apparatus, the monitoring target process name description file describes an argument used for starting the monitoring target process in association with the process name, and the process ID acquisition unit includes the monitoring target process. The process ID is obtained from the process list based on the process name and the argument. Thereby, even when there are a plurality of monitoring target processes with the same process name activated with the same argument, it is possible to detect a failure of each monitoring target process with the same process name.
[0010]
The present invention also includes a process information storage file in which a file descriptor corresponding to a monitored process is recorded, and a file descriptor state detecting unit that notifies invalidity of the file descriptor based on a failure of the monitored process. A failure detection method for a computer, which executes a process ID acquisition command to acquire a process list in which process names and process IDs are described in association with each other, and is described in the monitored process name description file from the process list A process ID acquisition process for acquiring a process ID corresponding to the process name, a file descriptor read process for reading the file descriptor from the process information storage file based on the acquired process ID, and the read file descriptor Is registered in the file descriptor state detecting means. A failure detection process comprising: a file descriptor registration process; and a failure detection process for receiving a notification of invalidity of the registered file descriptor from the file descriptor state detection means and detecting a failure of the monitored process Is the method.
[0011]
Further, the present invention is the above-described failure detection method, comprising a startup command name description file describing a startup command name of the monitored process, wherein the startup command name of the monitored process that has received the invalid notification is It has a restarting process of reading from the startup command name description file and executing the startup command based on the read startup command name.
[0012]
Further, the present invention is the above-described failure detection method, wherein the monitoring target process name description file describes a plurality of the same process names, and in the process ID acquisition process, the process name is based on the plurality of the same process names. The process IDs of a plurality of monitoring target processes having the same value are acquired.
[0013]
The present invention is the above-described failure detection method, wherein the monitoring target process name description file describes an argument used for starting the monitoring target process in association with the process name, and in the process ID acquisition process, The process ID is acquired from the process list based on a process name of the process to be monitored and the argument.
[0014]
The present invention also includes a process information storage file in which a file descriptor corresponding to a monitored process is recorded, and a file descriptor state detecting unit that notifies invalidity of the file descriptor based on a failure of the monitored process. A program to be executed by a computer, which executes a process ID acquisition command to acquire a process list in which process names and process IDs are described in association with each other, and is described in the monitored process name description file from the process list A process ID acquisition process for acquiring a process ID corresponding to the process name, a file descriptor read process for reading the file descriptor from the process information storage file based on the acquired process ID, and the read file descriptor Is registered in the file descriptor state detection means. And a failure detection step for receiving a notification of invalidity of the registered file descriptor from the file descriptor state detection means and detecting a failure of the monitored process. .
[0015]
Further, the present invention reads the startup command name of the monitored process that has received the notification of invalidity from the startup command name description file describing the startup command name of the monitored process, and reads the startup A restarting process for executing a start command based on a command name is executed.
[0016]
Further, according to the present invention, in the process ID acquisition process of the above program, each process ID of a plurality of monitoring target processes having the same process name based on the same process name described in the monitoring target process name description file. It is characterized in that a process for acquiring the above is executed.
[0017]
According to the present invention, in the process ID acquisition process of the program described above, based on the process name of the monitoring target process described in the monitoring target process name description file and an argument used to start the monitoring target process, A process for obtaining the process ID from a process list is executed.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a computer having a failure detection function (failure detection device) according to an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a schematic block diagram showing a software configuration of a computer having a failure detection function according to an embodiment of the present invention.
In this figure, reference numeral 1 denotes a failure detection function for detecting a failure in a monitored process. The computer having the failure detection function 1 in the present embodiment employs UNIX (registered trademark) as an OS (Operating System). In the failure detection function 1, reference numeral 11 denotes a monitoring process for detecting a failure of the monitoring target process (monitoring target application process). Reference numeral 12 denotes a process to be monitored (a process to be monitored) among the processes of the program started on the computer.
[0019]
Reference numeral 13 denotes a process information storage file for storing process information such as the process ID, CPU usage time, and file descriptor of the monitoring target process 12. The process information storage file 13 includes information such as a process ID and CPU usage time that can be acquired by executing a ps command (process ID acquisition command), a file descriptor that cannot be acquired by executing the ps command, and the like. Information is stored. Reference numeral 14 denotes a file descriptor state detection program (file descriptor state detection means) for notifying the monitoring process 11 of invalidity of the file descriptor based on the failure of the monitoring target process 12 corresponding to the registered file descriptor. is there.
[0020]
A file descriptor is also called a file descriptor, and is an integer value used when a program accesses a file or device. A file descriptor is assigned to each process, and the computer passes data to each process using the file descriptor. The file descriptor state detection program 14 is, for example, a poll function provided as a command of a UNIX (registered trademark) system call, and the process information storage file 13 in which the registered file descriptor is stored. This is a program that, when deleted, determines whether a file descriptor is invalid and notifies the monitoring process 11 of the invalidity. Reference numeral 15 denotes a monitoring target process description file (starting command name description) that describes the process name of the monitoring target process 12 determined in advance by the computer user and the starting path (starting command name) for restarting the monitoring target process 12. File).
[0021]
In the monitoring process 11, reference numeral 101 denotes a process ID acquisition unit that acquires the process ID of the monitoring target process 12 stored in the process information storage file 13 using the ps command. Reference numeral 102 denotes file descriptor reading means for reading a file descriptor from the process information storage file 13 based on the process ID of the monitoring target process 12. Reference numeral 103 denotes file descriptor registration means for registering the file descriptor read by the file descriptor reading means 102 from the process information storage file 13 in the file descriptor state detection program 14. Here, registering a file descriptor in the file descriptor state detection program 14 means notifying the file descriptor state detection program 14 of the file descriptor and setting so as to detect the state of the file descriptor. say. Reference numeral 104 denotes failure detection means for receiving a notification of invalidity of the file descriptor from the file descriptor state detection program 14 and detecting a failure of the monitored process 12. Reference numeral 105 denotes process forced termination means for forcibly terminating the failed monitored process 12. Reference numeral 106 denotes restarting means for restarting the monitored process 12 forcibly terminated by the process forcibly terminating means 105.
[0022]
When a process is activated in the computer, a process information storage file 13 is created for each activated process, for example, under the / proc directory. Then, the monitoring process 11 acquires a file descriptor corresponding to the monitoring target process 12 among processes activated on the computer by processing to be described later based on the process ID, and uses the acquired file descriptor as a file description. Register in the child state detection program 14. Then, the file descriptor state detection program 14 detects the invalidity of the received file descriptor and notifies the monitoring process 11 of it. As a result, the monitoring process 11 detects a failure of the monitoring target process 12.
[0023]
FIG. 2 is a diagram showing an image of processing in which the monitoring process 11 acquires a file descriptor. As shown in this figure, the monitoring process 11 has a file description from each process information storage file 13 of the monitoring target process 12 created in the / proc directory when the computer employs, for example, UNIX (registered trademark) as the OS. Read the child. FIG. 3 is a diagram showing an image of processing when the monitoring process 11 detects a failure of the monitoring target process 12. As shown in this figure, for example, when the process information storage file (c) is deleted and the file descriptor (c) becomes invalid, the invalidation is notified to the monitoring process 11. As a result, the monitoring process 11 detects a failure of the monitoring target process corresponding to the file descriptor (c).
[0024]
Next, the process of the failure detection function will be described step by step with reference to FIG. FIG. 4 is a diagram showing a processing flow of the failure detection function.
First, the process ID acquisition unit 101 of the monitoring process 11 reads the monitoring target process name from the monitoring target process description file 15, and if the activation path corresponding to the process name is described, reads the activation path, A ps command is executed (step S1) to obtain a list of processes running on the computer. In the process list, a process name and an argument at the time of starting the process (only the process name when no argument is specified when starting the process) and a process ID are displayed in association with each other. Then, the process ID acquisition unit 101 acquires, from the process list, a process ID associated with the same process name as the monitoring target process name read from the monitoring target process description file 15 (step S2).
[0025]
When the monitoring target process name and the argument are described in the monitoring target process description file 15 in association with each other, the process ID acquisition unit 101 uses the process ID associated with the monitoring target process name and the argument. From the list. When a plurality of the same monitoring target process names are described in the monitoring target process description file 15, the process ID acquisition unit 101 lists the process IDs of the same monitoring target process 12 as many as described from the list. read. Here, in this embodiment, the number of the same monitoring target processes 12 described in the monitoring target process description file 15 is the same as the number of the monitoring target processes 12 activated on the computer. It is assumed.
[0026]
Next, the file descriptor reading unit 102 reads one process information storage file 13 of each process recorded under the / proc directory, and determines whether or not a process ID is stored. Then, the file descriptor reading unit 102 reads the file descriptor from the process information storage file 13 that stores the process ID read by the process ID acquisition unit 101 (step S3). The monitoring process 11 stores the monitoring target process name read from the monitoring target process description file 15, the process ID of the monitoring target process, and the file descriptor based on the process ID in a storage unit such as a memory in association with each other. Keep it.
[0027]
Next, the file descriptor registration unit 103 registers the file descriptor read by the file descriptor reading unit 102 in the file descriptor state detection program 14 (step S4). Here, the processing from step 2 to step 4 is repeated for the monitoring target process name described in the monitoring target process description file 15. Then, the file descriptor state detection program 14 constantly monitors whether or not the registered file descriptor is invalid (step S5). Then, the file descriptor state detection program 14 waits for notification of deletion of the file descriptor from the OS.
[0028]
Next, when a failure occurs in the monitoring target process 12, the corresponding process information storage file 13 is deleted by the OS. Then, the file descriptor state detection program 14 determines that the file descriptor recorded in the erased process information storage file 13 is invalid, and notifies the monitoring process 11 of the invalidity of the file descriptor (step S6). . Then, the failure detection unit 104 of the monitoring process 11 detects that the process having the monitoring target process name associated with the invalid file descriptor and recorded in the storage unit has failed (step S7).
[0029]
Next, when the failure detection unit 104 of the monitoring process 11 detects a failure of the monitoring target process 12, the process forced termination unit 105 uses the process ID recorded in the storage unit in association with the monitoring target process name. The monitored process 12 is forcibly terminated. Note that the process forcible termination unit 105 forcibly terminates the monitoring target process 12 using a Kill command provided in the UNIX (registered trademark) system, for example (step S8). Then, the restarting means 106 confirms whether or not the process ID acquisition means 101 has read the startup path in step S1 (step S9). If the startup path of the monitoring target process 12 that has been forcibly terminated is read, the restarting unit 106 restarts the monitoring target process 12 that has been forcibly terminated using the startup path (step S10).
[0030]
The failure detection method of the monitoring target process 12 has been described above. However, when the file descriptor reading unit 102 acquires a plurality of process IDs related to the monitoring target process 12 having the same name, the largest value (the youngest) is obtained. The file descriptor described in the process information storage file 13 in which the process ID is stored may be read, or each file descriptor is read from the process information storage file 13 in which each process ID is described. In this way, all these file descriptors may be registered in the file descriptor state detection program 14.
[0031]
The process described above is stored in a computer-readable recording medium in the form of a program, and the above process is performed by the computer reading and executing this program. Here, the computer-readable recording medium means a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, a semiconductor memory, or the like. Alternatively, the computer program may be distributed to the computer via a communication line, and the computer that has received the distribution may execute the program.
The above-mentioned process is an execution unit under the management of the OS of the program. In the processing of the computer, the main memory reads and stores a program recorded on a recording medium such as a hard disk, and the CPU executes the program stored in the main memory. Further, the CPU reads the data for the executed program from the main memory and writes the data for the executed program into the main memory. A plurality of processes, which are processing execution units for each computer program, are processed in parallel under the management of the OS.
[0032]
【The invention's effect】
As described above, according to the present invention, the process ID acquisition unit executes the process ID acquisition command to acquire the process list in which the process name and the process ID are associated with each other, and the monitoring target process is acquired from the process list. The process ID corresponding to the process name described in the name description file is acquired. The file descriptor reading / reading unit reads the file descriptor from the process information storage file based on the acquired process ID, and the file descriptor registration unit registers the read file descriptor in the file descriptor state detection unit. Further, the failure detection unit receives a notification of invalidity of the registered file descriptor from the file descriptor state detection unit, and detects a failure of the monitored process.
As a result, it is possible to detect a process failure without repeatedly executing the ps command or the like. In addition, since the file descriptor status detection means notifies the invalidity of the file descriptor when the monitored process fails, it is possible to detect a process failure in real time.
[0033]
Further, according to the present invention, the startup command name description file describing the startup command name of the monitoring target process and the startup command name of the monitoring target process that has received the invalid notification are read from the startup command name description file and read. And restarting means for executing a start command based on the start command name.
Thus, if the start command name is described in the start command name description file, the failed monitored process can be restarted immediately.
[0034]
Further, according to the present invention, the monitoring target process name description file describes a plurality of the same process name, and the process ID acquisition unit is configured to process each of the monitoring target processes having the same process name based on the plurality of the same process names. The process ID is acquired. As a result, even when multiple monitored processes with the same process name are started, different process IDs of the monitored processes with the same process name are read, so that a failure of each monitored process with the same process name is detected. I can do it.
[0035]
Further, according to the present invention, the monitoring target process name description file describes the argument used to start the monitoring target process in association with the process name, and the process ID acquisition means is based on the process name and the argument of the monitoring target process. The process ID is obtained from the process list. Thereby, even when there are a plurality of monitoring target processes with the same process name activated with the same argument, it is possible to detect a failure of each monitoring target process with the same process name.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram showing a software configuration of a computer having a failure detection function according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an image of processing in which a monitoring process according to the present embodiment acquires a file descriptor.
FIG. 3 is a diagram showing an image of processing when a monitoring process according to the present embodiment detects a failure of a process to be monitored.
FIG. 4 is a diagram illustrating a processing flow of a failure detection function according to the present embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Failure detection function 11 Monitoring process 12 Monitoring object process 13 Process information storage file 14 File descriptor state detection program 15 Monitoring object process description file 101 Process ID acquisition means 102 File descriptor reading means 103 File descriptor registration means 104 Failure detection means 105 process forced termination means 106 restart means

Claims (12)

監視対象プロセスに対応するファイル記述子を記録したプロセス情報格納ファイルと、前記監視対象プロセスの故障に基づいて前記ファイル記述子の無効を通知するファイル記述子状態検出手段とを有するコンピュータの故障検出装置であって、
前記監視対象プロセスのプロセス名を記述した監視対象プロセス名記述ファイルと、
プロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から前記監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得するプロセスID取得手段と、
前記取得したプロセスIDに基づいて前記プロセス情報格納ファイルから前記ファイル記述子を読み取るファイル記述子取読み取り手段と、
前記読み取ったファイル記述子を前記ファイル記述子状態検出手段に登録するファイル記述子登録手段と、
当該登録したファイル記述子の無効の通知を前記ファイル記述子状態検出手段から受け付けて前記監視対象プロセスの故障を検出する故障検出手段と、
を備えることを特徴とする故障検出装置。
A failure detection apparatus for a computer, comprising: a process information storage file in which a file descriptor corresponding to a monitored process is recorded; and a file descriptor state detection unit that notifies invalidity of the file descriptor based on a failure of the monitored process Because
A monitored process name description file describing the process name of the monitored process;
A process ID acquisition command is executed to acquire a process list in which process names and process IDs are described in association with each other, and a process ID corresponding to the process name described in the monitored process name description file is obtained from the process list. Process ID acquisition means for acquiring;
File descriptor reading means for reading the file descriptor from the process information storage file based on the acquired process ID;
File descriptor registration means for registering the read file descriptor in the file descriptor state detection means;
A failure detection unit that receives a notification of invalidity of the registered file descriptor from the file descriptor state detection unit and detects a failure of the monitored process; and
A failure detection apparatus comprising:
前記監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルと、
前記無効の通知を受けた監視対象プロセスの起動コマンド名を前記起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動手段と、
を備えることを特徴とする請求項1に記載の故障検出装置。
A startup command name description file describing the startup command name of the monitored process;
A restart unit that reads the startup command name of the monitored process that has received the notification of invalidity from the startup command name description file, and executes the startup command based on the read startup command name;
The failure detection apparatus according to claim 1, comprising:
前記監視対象プロセス名記述ファイルが同一のプロセス名を複数記述し、
前記プロセスID取得手段は前記複数の同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得する
ことを特徴とする請求項1または請求項2のいずれかに記載の故障検出装置。
The monitoring target process name description file describes a plurality of the same process name,
The process ID acquisition unit acquires each process ID of a plurality of monitoring target processes having the same process name based on the plurality of the same process names. The failure detection device described.
前記監視対象プロセス名記述ファイルが前記監視対象プロセスの起動に用いる引数を前記プロセス名に対応付けて記述し、
前記プロセスID取得手段は前記監視対象プロセスのプロセス名と前記引数とに基づいて、前記プロセス一覧から前記プロセスIDを取得する
ことを特徴とする請求項1から請求項3のいずれかに記載の故障検出装置。
The monitoring target process name description file describes an argument used to start the monitoring target process in association with the process name,
The failure according to any one of claims 1 to 3, wherein the process ID acquisition unit acquires the process ID from the process list based on a process name of the monitoring target process and the argument. Detection device.
監視対象プロセスに対応するファイル記述子を記録したプロセス情報格納ファイルと、前記監視対象プロセスの故障に基づいて前記ファイル記述子の無効を通知するファイル記述子状態検出手段とを有するコンピュータの故障検出方法であって、
プロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得するプロセスID取得過程と、
前記取得したプロセスIDに基づいて前記プロセス情報格納ファイルから前記ファイル記述子を読み取るファイル記述子取読み取り過程と、
前記読み取ったファイル記述子を前記ファイル記述子状態検出手段に登録するファイル記述子登録過程と、
当該登録したファイル記述子の無効の通知を前記ファイル記述子状態検出手段から受け付けて前記監視対象プロセスの故障を検出する故障検出過程と、
を有することを特徴とする故障検出方法。
A failure detection method for a computer, comprising: a process information storage file in which a file descriptor corresponding to a monitored process is recorded; and a file descriptor state detection unit that notifies invalidity of the file descriptor based on a failure of the monitored process Because
Execute the process ID acquisition command to acquire a process list in which the process name and process ID are described in association with each other, and acquire the process ID corresponding to the process name described in the monitored process name description file from the process list Process ID acquisition process,
A file descriptor reading process for reading the file descriptor from the process information storage file based on the acquired process ID;
A file descriptor registration process for registering the read file descriptor in the file descriptor state detection means;
A failure detection step of receiving a notification of invalidity of the registered file descriptor from the file descriptor state detection means and detecting a failure of the monitored process;
A failure detection method comprising:
前記監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルを有し、
前記無効の通知を受けた監視対象プロセスの起動コマンド名を前記起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動過程
を有することを特徴とする請求項5に記載の故障検出方法。
A start command name description file describing a start command name of the monitored process;
The restart process of reading the start command name of the monitored process that has received the invalid notification from the start command name description file and executing the start command based on the read start command name Item 6. The fault detection method according to Item 5.
前記監視対象プロセス名記述ファイルが同一のプロセス名を複数記述し、
前記プロセスID取得過程において、前記複数の同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得する
ことを特徴とする請求項5または請求項6のいずれかに記載の故障検出方法。
The monitoring target process name description file describes a plurality of the same process name,
7. The process ID acquisition process according to claim 5, wherein each process ID of a plurality of monitoring target processes having the same process name is acquired based on the plurality of the same process names. Failure detection method described in 1.
前記監視対象プロセス名記述ファイルが前記監視対象プロセスの起動に用いる引数を前記プロセス名に対応付けて記述し、
前記プロセスID取得過程において、前記監視対象プロセスのプロセス名と前記引数とに基づいて、前記プロセス一覧から前記プロセスIDを取得する
ことを特徴とする請求項5から請求項7のいずれかに記載の故障検出方法。
The monitoring target process name description file describes an argument used to start the monitoring target process in association with the process name,
8. The process ID acquisition process according to claim 5, wherein the process ID is acquired from the process list based on a process name of the process to be monitored and the argument in the process ID acquisition process. 9. Fault detection method.
監視対象プロセスに対応するファイル記述子を記録したプロセス情報格納ファイルと、前記監視対象プロセスの故障に基づいて前記ファイル記述子の無効を通知するファイル記述子状態検出手段とを有するコンピュータに実行させるプログラムであって、
プロセスID取得コマンドを実行してプロセス名とプロセスIDとを対応付けて記述したプロセス一覧を取得し、当該プロセス一覧から監視対象プロセス名記述ファイルに記述されているプロセス名に対応するプロセスIDを取得するプロセスID取得過程と、
前記取得したプロセスIDに基づいて前記プロセス情報格納ファイルから前記ファイル記述子を読み取るファイル記述子取読み取り過程と、
前記読み取ったファイル記述子を前記ファイル記述子状態検出手段に登録するファイル記述子登録過程と、
当該登録したファイル記述子の無効の通知を前記ファイル記述子状態検出手段から受け付けて前記監視対象プロセスの故障を検出する故障検出過程と、
の処理を実行させるプログラム。
A program for causing a computer to execute a process information storage file in which a file descriptor corresponding to a monitored process is recorded, and a file descriptor state detecting unit that notifies invalidity of the file descriptor based on a failure of the monitored process Because
Execute the process ID acquisition command to acquire a process list in which the process name and process ID are described in association with each other, and acquire the process ID corresponding to the process name described in the monitored process name description file from the process list Process ID acquisition process,
A file descriptor reading process for reading the file descriptor from the process information storage file based on the acquired process ID;
A file descriptor registration process for registering the read file descriptor in the file descriptor state detection means;
A failure detection step of receiving a notification of invalidity of the registered file descriptor from the file descriptor state detection means and detecting a failure of the monitored process;
A program that executes the process.
前記無効の通知を受けた監視対象プロセスの起動コマンド名を、前記監視対象プロセスの起動コマンド名を記述した起動コマンド名記述ファイルから読み取って、当該読み取った起動コマンド名に基づいて起動コマンドを実行する再起動過程
の処理を実行させる請求項9に記載のプログラム。
The startup command name of the monitored process that has received the invalid notification is read from the startup command name description file that describes the startup command name of the monitored process, and the startup command is executed based on the read startup command name The program according to claim 9, which causes a restart process to be executed.
前記プロセスID取得過程において、前記監視対象プロセス名記述ファイルに複数記述された同一プロセス名に基づいて、プロセス名が同一となる複数の監視対象プロセスの各プロセスIDを取得する
処理を実行させる請求項9または請求項10のいずれかに記載のプログラム。
The process of acquiring each process ID of a plurality of monitoring target processes having the same process name based on the same process name described in the monitoring target process name description file in the process ID acquisition process. The program according to claim 9 or claim 10.
前記プロセスID取得過程において、前記監視対象プロセス名記述ファイルに記述された前記監視対象プロセスのプロセス名とその監視対象プロセスの起動に用いる引数とに基づいて、前記プロセス一覧から前記プロセスIDを取得する
処理を実行させる請求項9から請求項11のいずれかに記載のプログラム。
In the process ID acquisition process, the process ID is acquired from the process list based on the process name of the monitoring target process described in the monitoring target process name description file and an argument used for starting the monitoring target process. The program according to any one of claims 9 to 11, wherein the program is executed.
JP2003209784A 2003-08-29 2003-08-29 Failure detection system and method and its program Pending JP2005078123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003209784A JP2005078123A (en) 2003-08-29 2003-08-29 Failure detection system and method and its program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003209784A JP2005078123A (en) 2003-08-29 2003-08-29 Failure detection system and method and its program

Publications (1)

Publication Number Publication Date
JP2005078123A true JP2005078123A (en) 2005-03-24

Family

ID=34402600

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003209784A Pending JP2005078123A (en) 2003-08-29 2003-08-29 Failure detection system and method and its program

Country Status (1)

Country Link
JP (1) JP2005078123A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100440160C (en) * 2005-11-07 2008-12-03 富士通株式会社 Monotoring device, monotiring method, and monotoring system
CN102200941A (en) * 2010-03-25 2011-09-28 杭州华三通信技术有限公司 Method and unit for monitoring process state
CN110968472A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Process processing method and device, storage medium and processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100440160C (en) * 2005-11-07 2008-12-03 富士通株式会社 Monotoring device, monotiring method, and monotoring system
CN102200941A (en) * 2010-03-25 2011-09-28 杭州华三通信技术有限公司 Method and unit for monitoring process state
CN110968472A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Process processing method and device, storage medium and processor

Similar Documents

Publication Publication Date Title
CN101809540A (en) Network context triggers for activating virtualized computer applications
WO2020224238A1 (en) Blockchain node depolyment method, device and equipment, and storage medium
CN111324423B (en) Method and device for monitoring processes in container, storage medium and computer equipment
WO2014183534A1 (en) Method and apparatus of automatically backing up application data and performing restoration as required
CN109739619B (en) Processing method and device based on containerized application and storage medium
WO2016000298A1 (en) System exception capturing method, main system, shadow system and intelligent device
JP2005078123A (en) Failure detection system and method and its program
CN109922014B (en) Method and system for judging cold and hot start of switch
JP2006065440A (en) Process management system
CN115617263A (en) Method for automatic discovery and real-time copy of changed data for block device and storage medium
JP2002108698A (en) Memory managing system and memory managing method
CN113918407A (en) Method and device for managing service process and readable storage medium
CN110532160B (en) Method for BMC to record server system hot restart event
JP2004310514A (en) Information processing terminal and history information saving method
JP4773715B2 (en) How to get checkpoint
JPH09212470A (en) Multiprocessor system
JPH09223046A (en) Computer system having damp collecting function
JP2005018179A (en) Obstacle monitoring device
JPH11259160A (en) Computer starting method, computer and storage medium recording starting processing program
JP2007249634A (en) Lock management method and lock management system
KR100803822B1 (en) Multithread System Loader for the mobile communication system
WO2015176455A1 (en) Hadoop-based hard disk damage handling method and device
JPH103403A (en) Computer system and debugging method
JPH11134284A (en) Information processor
JP2004030092A (en) Application restoration system