JP2019160155A - Information processing device, information processing method, and program - Google Patents
Information processing device, information processing method, and program Download PDFInfo
- Publication number
- JP2019160155A JP2019160155A JP2018049341A JP2018049341A JP2019160155A JP 2019160155 A JP2019160155 A JP 2019160155A JP 2018049341 A JP2018049341 A JP 2018049341A JP 2018049341 A JP2018049341 A JP 2018049341A JP 2019160155 A JP2019160155 A JP 2019160155A
- Authority
- JP
- Japan
- Prior art keywords
- unit
- logging information
- storage means
- information
- storage
- 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
Links
Images
Abstract
Description
本発明は、情報処理装置、情報処理方法、及びプログラムに関する。 The present invention relates to an information processing apparatus, an information processing method, and a program.
従来から、情報処理装置が実行するプロセスのスイッチングの態様(プロセスの実行順序)をロギングする技術が採用される。例えば、特許文献1には、プロセスのスイッチングの態様を特定可能なロギング情報を記憶する技術が開示される。以上の特許文献1では、情報処理装置の動作に異常が生じた場合、デバッグ作業においてロギング情報を解析することで、当該異常の原因を特定できる場合がある。
Conventionally, a technique of logging a switching mode (process execution order) of a process executed by an information processing apparatus has been adopted. For example,
プロセスの切替は頻繁(1ミリ秒〜10ミリ秒毎)に実行され、ロギング情報のデータ量は大きくなる。したがって、ロギング情報を記憶(蓄積)する記憶手段のデータ容量は比較的大きい必要がある。従来から、情報処理装置にロギング装置(外部装置)を接続可能な構成として、ロギング装置の記憶部にロギング情報を記憶する技術が採用される。 Process switching is executed frequently (every 1 to 10 milliseconds), and the amount of logging information increases. Therefore, the data capacity of the storage means for storing (accumulating) logging information needs to be relatively large. 2. Description of the Related Art Conventionally, a technique for storing logging information in a storage unit of a logging device has been adopted as a configuration in which a logging device (external device) can be connected to an information processing device.
従来から、ロギング装置を用いなくともロギング情報を蓄積できる構成が要望されていた。以上の事情を考慮して、本発明は、以上の要望に応じることを目的とする。 Conventionally, there has been a demand for a configuration capable of storing logging information without using a logging device. In view of the above circumstances, an object of the present invention is to meet the above demand.
上記課題を解決するたに、請求項1記載の発明は、処理手段が単位期間に実行したプロセスの順序を特定するためのロギング情報を単位期間毎に記憶する記憶手段であって、今回の単位期間に係るロギング情報を記憶する第1領域および次回の単位期間に係るロギング情報を記憶する第2領域を含む第1記憶手段と、第1記憶手段から転送されるロギング情報を記憶する第2記憶手段と、第2記憶手段から転送されるロギング情報を記憶する記憶手段であって、ロギング情報を記憶するための時間長が第1記憶手段および第2記憶手段よりも長くなり易く、第1記憶手段および第2記憶手段よりも記憶容量が大きい第3記憶手段と、単位期間における処理手段の使用率を算出する算出手段と、算出手段が算出した使用率が所定値以上の場合、第1記憶手段に記録されたロギング情報を第2記憶手段へ転送させ、使用率が所定値より小さい場合、第2記憶手段から第3記憶手段にロギング情報を転送させる転送制御手段と、を備えることを特徴とする。
In order to solve the above-mentioned problem, the invention according to
本発明によれば、外部の記憶装置(例えば上述のロギング装置)を用いなくとも、第3記憶手段に多くのロギング情報を記憶することができる。 According to the present invention, a large amount of logging information can be stored in the third storage means without using an external storage device (for example, the above-described logging device).
以下、本発明を図面に示した実施形態により詳細に説明する。 Hereinafter, the present invention will be described in detail with reference to embodiments shown in the drawings.
図1は、情報処理装置10のハードウェア構成を説明するための図である。図1に示す通り、情報処理装置10は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、BUF(Buff)13、BUF14、RAM(Random Access Memory)15、HDD(Hard Disk Drive)16、NVRAM(Non Volatile RAM)17およびI/F18を含む。各構成は、例えばデータバスを介して互いに通信可能である。なお、情報処理装置10のハードウェア構成は適宜に変更できる。
FIG. 1 is a diagram for explaining a hardware configuration of the
CPU11は、プログラムを実行することで各種の機能(例えば、後述の処理部100)を実現する。本実施形態では、CPU11は複数個のCPUを含む。なお、CPU11に替えてMPU(Micro Processing Unit)をプロセッサとして採用してもよい。ROM12は、CPU11が実行するプログラムを含む各種の情報を不揮発的に記憶する。ROM12が記憶するプログラムは、オペレーティングシステム(OS)および各種のアプリケーションプログラムを含む。
CPU11 implement | achieves various functions (for example, the
例えば、プリント機能、コピー機能およびスキャナ機能を有する複合機(MFP:Multifunction Peripheral)に情報処理装置10が設けられた構成を想定する。以上の情報処理装置10のROM12は、アプリケーションプログラムとして、プリント機能を実現するプログラム、コピー機能を実現するプログラム、スキャナ機能を実現するプログラムを記憶する。
For example, assume a configuration in which the
オペレーティングシステムは、各プロセスに必要なリソースを割当てる。各プロセスが干渉しあった場合、システム障害(例えばデッドロック)が生じ得る。また、ROM12が記憶するプログラムは、後述のロギングプロセスを実行するためのプログラムが含まれる。RAM15は、CPU11がプログラムを実行する場合に参照される情報が一時的に記憶される。I/F18は、SDカード19(外部装置)との通信を可能にする。NVRAM17は、各種の情報を不揮発的に記憶する。
The operating system allocates the necessary resources for each process. If each process interferes, a system failure (eg, deadlock) can occur. The program stored in the
BUF13は、各種の情報を揮発的に記憶する。BUF13の記憶容量は例えば128KB(キロバイト)である。また、BUF13には、ロギング情報が逐次記憶される。ロギング情報は、単位期間(100ms)で実行されたプロセスの実行順序を特定可能な情報である。情報処理装置10のデバッグ作業において、ロギング情報が解析される。BUF13は、後述の第1記憶部110として機能する。
The BUF 13 stores various information in a volatile manner. The storage capacity of the
BUF14は、各種の情報を揮発的に記憶する。BUF14の記憶容量は上述のBUF13より大きい。具体的には、BUF14の記憶容量は8MB(メガバイト)である。予め定められた契機で、BUF13のロギング情報がBUF14へ転送される。BUF14は、BUF13から転送されたロギング情報を記憶(蓄積)する。ただし、BUF14は、情報処理装置10への電源の供給が停止した場合、ロギング情報を保持できない。なお、BUF14の記憶容量をBUF13の記憶容量以下としてもよい。BUF14は、後述の第2記憶部120として機能する。
The BUF 14 stores various information in a volatile manner. The storage capacity of the
HDD16は、各種の情報を不揮発的に記憶する。HDD16の記憶容量は、BUF13およびBUF14より大きい。具体的には、HDD16の記憶容量は256MBである。また、HDD16に情報を記憶するのに要する時間長は、当該情報をBUF13またはBUF14に記憶するのに要する時間長より長くなり易い。すなわち、HDD16への情報の書込み速度は、BUF13およびBUF14の書込み速度より遅い。
The HDD 16 stores various information in a nonvolatile manner. The storage capacity of the
予め定められた契機で、BUF14のロギング情報がHDD16へ転送される。HDD16は、BUF14から転送されたロギング情報を記憶(蓄積)する。HDD16は、情報処理装置10への電源の供給が停止した場合であってもロギング情報を保持できる。デバッグ作業では、HDD16に蓄積されたロギング情報が読み出されて解析される。HDD16は、後述の第3記憶部130として機能する。
Logging information of the
図2は、本実施形態における情報処理装置10の機能ブロック図である。図2に示す通り、情報処理装置10は、処理部100、第1記憶部110、第2記憶部120および第3記憶部130を含む。以上の各構成は、上述のCPU11がプログラムを実行することで実現される。
FIG. 2 is a functional block diagram of the
処理部100(処理手段)は、各種のプロセスを実行する。具体的には、処理部100は、上述のオペレーションシステムおよびアプリケーションプログラムのプロセスを含む各種のプロセスを実行する。また、各種のプロセスには、上述のロギング情報の転送を制御するプロセス、ロギング情報を実際に転送するプロセス、および、処理部100(CPU11)の使用率を算出するためのプロセスを含む。
The processing unit 100 (processing means) executes various processes. Specifically, the
各種のプロセスには優先度が付与される。具体的には、リアルタイムプライオリティ、ユーザプライオリティおよびアイドルプライオリティを含む優先度がプロセスの各々に付与される。リアルタイムプライオリティのプロセスはユーザプライオリティのプロセスより優先して実行され、ユーザプライオリティのプロセスはアイドルプライオリティのプロセスより優先して実行される。アイドルプライオリティのプロセスは、他に実行するプロセスが無い場合に実行され、CPUの処理量を実質的に増加させない。 Priorities are assigned to various processes. Specifically, priorities including real-time priority, user priority, and idle priority are assigned to each process. The real-time priority process is executed in preference to the user priority process, and the user priority process is executed in preference to the idle priority process. The idle priority process is executed when there is no other process to be executed, and does not substantially increase the processing amount of the CPU.
図2に示す通り、処理部100は、ロギング実行部101、転送制御部102、算出部103およびプロセス実行部104を含む。ロギング実行部101は、ロギング情報を第1記憶部110に記憶させるためのロギングプロセスを実行する。具体的には、ロギング実行部101は、予め定められた時間間隔でログ情報(後述の図3参照)を生成し、第1記憶部110に記憶させる。ロギング情報は、複数のログ情報で構成される(後述の図4参照)。
As illustrated in FIG. 2, the
本実施形態では、ロギング実行部101は、10ms(ミリ秒)毎にログ情報を生成する。また、ロギング情報は、10個のログ情報で構成される。以上の構成では、100msの期間(以下「単位期間」という)毎に、1個のロギング情報が第1記憶部110に記憶される。なお、ログ情報が生成される契機は適宜に変更できる。例えば、1個のプロセスが終了する毎に1個のログ情報が生成される構成としてもよい。また、プログラムにおける1個のスレッドが実行される毎に1個のログ情報が生成される構成としてもよい。
In the present embodiment, the
図3は、ログ情報の概念図である。図3に示す通り、ログ情報は、タイムスタンプ、CPU−ID、プロセス−ID、プロセス名、スレッド−IDおよびスレッド名を含む。タイムスタンプは、例えば64バイトのデータであり、当該ログ情報が生成された時刻を示す。プロセス−IDは、例えば2バイトのデータであり、当該ログ情報の生成時点で実行していたプロセスを特定可能な情報である。 FIG. 3 is a conceptual diagram of log information. As shown in FIG. 3, the log information includes a time stamp, a CPU-ID, a process-ID, a process name, a thread-ID, and a thread name. The time stamp is, for example, 64-byte data and indicates the time when the log information is generated. The process-ID is, for example, 2-byte data, and is information that can identify the process that was being executed when the log information was generated.
スレッド−IDは、例えば2バイトのデータであり、当該ログ情報の生成時点で実行していたスレッドを特定可能な情報である。CPU−IDは、例えば1バイトのデータであり、当該ログ情報のプロセス−IDで特定されるプロセスを実行していたCPUを特定可能な情報である。プロセス名は、例えば16バイトのデータであり、プロセス−IDで特定されるプロセスの名称を示す。スレッド名は、例えば16バイトのデータであり、スレッド−IDで特定されるスレッドの名称を示す。以上のログ情報を構成する各情報を表示可能な表示装置を設けてもよい。 The thread-ID is, for example, 2-byte data, and is information that can identify the thread that was being executed when the log information was generated. The CPU-ID is, for example, 1-byte data, and is information that can identify the CPU that has executed the process specified by the process-ID of the log information. The process name is, for example, 16-byte data, and indicates the name of the process specified by the process-ID. The thread name is 16-byte data, for example, and indicates the name of the thread specified by the thread-ID. You may provide the display apparatus which can display each information which comprises the above log information.
図2に説明を戻す。処理部100の転送制御部102は、第1記憶部110が記憶するロギング情報を第2記憶部120へ転送するためのプロセス、および、第2記憶部120が記憶するロギング情報を第3記憶部130へ転送するためのプロセスを実行する。
Returning to FIG. The
処理部100の算出部103は、今回の単位期間における処理部100の使用率を算出する。具体的には、算出部103は、今回の単位期間におけるロギング情報から使用率を算出する。
The
例えば、今回の単位期間のロギング情報(各ログ情報の各プロセスID)で特定される全て(10個)のプロセスが、アイドルプライオリティのプロセス(実質的に処理量を増加させないプロセス)の場合、当該単位期間における処理部100の使用率は0%である。また、今回の単位期間のロギング情報で特定されるプロセスに、アイドルプライオリティのプロセスが9個含まれ、リアルタイムプライオリティまたはユーザプライオリティのプロセスが1個含まれる場合、処理部100の使用率は10%である。
For example, when all (10) processes specified by the logging information of this unit period (each process ID of each log information) are idle priority processes (a process that does not substantially increase the processing amount), The usage rate of the
処理部100のプロセス実行部104は、上述のロギング実行部101、転送制御部102および算出部103のプロセス以外のプロセスを実行する。例えば、プロセス実行部104は、アプリケーションプログラムのプロセスを実行する。
The
第1記憶部110は、ロギング情報を記憶する。具体的には、第1記憶部110は、第1領域111および第2領域112を含む。仮に、今回の単位期間でロギング情報が第1領域111に記憶された場合、次回の単位期間ではロギング情報が第2領域112に記憶される。一方、今回の単位期間でロギング情報が第2領域112に記憶された場合、次回の単位期間ではロギング情報が第1領域111に記憶される。すなわち、第1記憶部110は、連続する2回の単位期間のロギング情報を記憶する。
The
第2記憶部120は、第1記憶部110から転送されたロギング情報を記憶(蓄積)する。具体的には、今回の単位期間における処理部100の使用率が閾値NA(本発明の「所定値」)以上の場合、転送制御部102は、第1記憶部110に記録されたロギング情報を第2記憶部120へ転送させる。
The
本実施形態では、処理部100の使用率が100%以上の場合(閾値NA=100)、転送制御部102は、第1記憶部110に記録されたロギング情報を第2記憶部120へ転送させる。ただし、閾値NAが100%より小さい構成としてもよい。閾値NAは、例えば、NVRAM17に記憶される。
In the present embodiment, when the usage rate of the
第3記憶部130は、第2記憶部120から転送されたロギング情報を記憶(蓄積)する。具体的には、今回の単位期間における処理部100の使用率が100%(上述の閾値NA。本発明の「所定値」)より小さい場合、転送制御部は、第2記憶部120に記録されたロギング情報を第3記憶部130へ転送させる。
The
本実施形態では、処理部100の使用率が閾値NB以下の場合、ロギング情報が第3記憶部130へ転送される。具体的には、処理部100の使用率が10%以下の場合(閾値NB=10)、転送制御部102は、第2記憶部120に記録されたロギング情報を第3記憶部130へ転送させる。ただし、閾値NBは適宜に変更可能である。例えば、閾値NBが閾値NAと同じであってもよい。閾値NBは、例えば、NVRAM17に記憶される。
In the present embodiment, when the usage rate of the
以上の本実施形態によれば、外部の記憶装置を用いなくとも、第3記憶部130に多くのロギング情報を記憶することができる。
According to the above embodiment, a large amount of logging information can be stored in the
図4は、第1記憶部110に記憶されたロギング情報の具体例の概念図である。図4では、単位期間A(100ms)および単位期間B(100ms)において、プロセスPおよびプロセスKが交互に実行された場合の具体例を示す。プロセスPはアプリケーションプログラムのプロセスを想定し、プロセスKはオペレーティングシステム(カーネル)のプロセスを想定する。プロセスPは、スレッド1からスレッド6を少なくとも含む。プロセスKは、スレッド1およびスレッド2を含む。
FIG. 4 is a conceptual diagram of a specific example of logging information stored in the
プロセスPおよびプロセスKは、リアルタイムプライオリティまたはユーザプライオリティのプロセスである。図4の具体例では、単位期間Aおよび単位期間Bにおいて、アイドルプライオリティのプロセスのログ情報が記憶されない場合を想定する。以上の場合、単位期間Aでの処理部100の使用率は100%になる。同様に、単位期間Bでの処理部100の使用率は100%になる。
Process P and process K are real-time priority or user priority processes. In the specific example of FIG. 4, it is assumed that the log information of the idle priority process is not stored in the unit period A and the unit period B. In the above case, the usage rate of the
本実施形態では、例えば、プロセス−IDがプロセスP、スレッド−IDがスレッドn(nは正の整数)のログ情報をログ情報「P、n」と記載する場合がある。また、プロセスIDがプロセスK、スレッドIDがスレッドn(nは正の整数)のログ情報をログ情報「K、n」と記載する場合がある。 In the present embodiment, for example, log information of process-ID as process P and thread-ID as thread n (n is a positive integer) may be described as log information “P, n”. In addition, log information of process ID “process K” and thread ID “thread n” (n is a positive integer) may be described as log information “K, n”.
図4の具体例では、単位期間Aにおいて、プロセスPのスレッド1、プロセスPのスレッド2、プロセスPのスレッド3、プロセスKのスレッド1、プロセスPのスレッド4、プロセスKのスレッド1、プロセスPのスレッド2、プロセスPのスレッド3、プロセスKのスレッド2、プロセスPのスレッド4の順に実行された場合を想定する。
In the specific example of FIG. 4, in the unit period A, the
以上の場合、単位期間Aのロギング情報は、ログ情報「P、1」、ログ情報「P、2」、ログ情報「P、3」、ログ情報「K、1」、ログ情報「P、4」、ログ情報「K、1」、ログ情報「P、2」、ログ情報「P、3」、ログ情報「K、2」およびログ情報「P、4」で構成される。本実施形態の各図(図4、図6、図7、図8)では、第1領域111に記憶されたログ情報を、記憶された順に右側方向に示す。
In the above case, the logging information for the unit period A includes log information “P, 1”, log information “P, 2”, log information “P, 3”, log information “K, 1”, log information “P, 4”. ”, Log information“ K, 1 ”, log information“ P, 2 ”, log information“ P, 3 ”, log information“ K, 2 ”, and log information“ P, 4 ”. In each figure (FIGS. 4, 6, 7, and 8) of this embodiment, the log information stored in the
また、図4の具体例では、単位期間Bにおいて、プロセスPのスレッド5、プロセスPのスレッド6、プロセスKのスレッド2、プロセスKのスレッド1、プロセスPのスレッド1、プロセスPのスレッド2、プロセスKのスレッド1、プロセスPのスレッド3、プロセスPのスレッド4、プロセスPのスレッド6の順に実行された場合を想定する。
In the specific example of FIG. 4, in the unit period B, the
以上の場合、単位期間Bのロギング情報は、ログ情報「P、5」、ログ情報「P、6」、ログ情報「K、2」、ログ情報「K、1」、ログ情報「P、1」、ログ情報「P、2」、ログ情報「K、1」、ログ情報「P、3」、ログ情報「P、4」およびログ情報「P、6」で構成される。本実施形態の各図(図4、図6、図7、図8)では、第2領域112に記憶されたログ情報を、記憶された順に右側方向に示す。
In the above case, the logging information for the unit period B includes log information “P, 5”, log information “P, 6”, log information “K, 2”, log information “K, 1”, log information “P, 1”. ”, Log information“ P, 2 ”, log information“ K, 1 ”, log information“ P, 3 ”, log information“ P, 4 ”, and log information“ P, 6 ”. In each figure (FIGS. 4, 6, 7, and 8) of this embodiment, the log information stored in the
図5は、ロギング情報が転送される契機を説明するための図である。上述した通り、第1記憶部110の第1領域111または第2領域112には、ログ情報が常時(10ms毎に)記憶される(図5のSa1)。また、今回の単位期間で第1領域111にログ情報が記憶された場合、次回の単位期間で第2領域112にログ情報が記憶される。一方、今回の単位期間で第2領域112にログ情報が記憶された場合、次回の単位期間で第1領域111にログ情報が記憶される。
FIG. 5 is a diagram for explaining an opportunity for transferring the logging information. As described above, log information is always stored (every 10 ms) in the
今回の単位期間の処理部100の使用率が100%である場合、第1記憶部110からロギング情報が第2記憶部120に転送される(図5のSa2)。詳細には後述するが、今回の単位期間の処理部100の使用率が100%である場合、今回の単位期間のロギング情報に加え、前回の単位期間のロギング情報、および、次回の単位期間のロギング情報が第1記憶部110から第2記憶部120に送信される。
When the usage rate of the
ところで、処理部100の使用率が100%の単位期間でロギング情報を転送する構成では、ロギング情報を転送するためのプロセスが他のプロセスに影響する(例えば他のプロセスの終了が遅延する)不都合が生じ易い。以上の不都合は、ロギング情報を第2記憶部120に書込む速度が遅い場合に顕在化し易い。
By the way, in the configuration in which the logging information is transferred in a unit period where the usage rate of the
以上の事情を考慮して、本実施形態では、処理部100の使用率が100%の単位期間でロギング情報が転送される第2記憶部120を、データの書込み速度が比較的速いBUF14とした。以上の本実施形態では、例えば第2記憶部120を、データの書込み速度がBUFよりも遅い記憶装置(例えば、HDD)とした構成と比較して、上述の不都合が抑制されるという効果が奏せられる。
In view of the above circumstances, in the present embodiment, the
第2記憶部120に記憶されたロギング情報は第3記憶部130に転送される(図5のSa3)。上述した通り、第3記憶部130はHDD16で構成される。したがって、第3記憶部130のロギング情報は不揮発的に記憶され、情報処理装置10への電源が遮断された場合であっても、当該ロギング情報が保持される。しかし、HDDにロギング情報を書き込む場合、例えばBUFにロギング情報を書き込む場合と比較して、長い時間長を要する。したがって、第3記憶部130をHDDとした構成では、HDDにロギング情報を書き込むプロセスが他のプロセスに影響する不都合が生じ易い。
The logging information stored in the
以上の事情を考慮して、本実施形態では、処理部100の使用率が10%以下の単位期間において、ロギング情報が第3記憶部130に転送される。すなわち、処理部100が実行しているプロセスが比較的少ない期間において、ロギング情報を第3記憶部130に転送するプロセス(以下「転送プロセス」という)が実行される。
Considering the above circumstances, in the present embodiment, logging information is transferred to the
以上の構成によれば、例えば、転送プロセスが処理部100の使用率に関係なく実行される構成と比較して、転送プロセスが他のプロセスに影響を与える不都合が抑制される。なお、詳細には後述するが、転送プロセスは、アイドルプライオリティのプロセスIDLE1として単位期間の最後に実行される。
According to the above configuration, for example, compared to a configuration in which the transfer process is executed regardless of the usage rate of the
図6は、第1記憶部110(第1領域111、第2領域112)にロギング情報が記憶されるまでの具体例を説明するための図である。本実施形態では、例えばN回目(Nは正の整数)の単位期間を「単位期間N」と記載する。図6には、N回目(今回)の単位期間Nにおいて、第2領域112にログ情報が記憶されている具体例を示す。以上の場合、第1領域111のログ情報(ロギング情報)は、N−1回目(前回)の単位期間N−1で記憶されたものである。
FIG. 6 is a diagram for describing a specific example until logging information is stored in the first storage unit 110 (the
図6の具体例では、単位期間N−1のロギング情報に、上述のプロセスPおよびプロセスKに加え、プロセスIDLEのログ情報が含まれる場合を想定する。上述した通り、プロセスPおよびプロセスKは、リアルタイムプライオリティまたはユーザプライオリティのプロセスである。一方、プロセスIDLEはアイドルプライオリティのプロセス(処理部100の使用率を増加させないプロセス)である。本実施形態では、プロセスIDLEのログ情報をログ情報「IDLE」と記載する場合がある。 In the specific example of FIG. 6, it is assumed that the log information of the unit period N−1 includes log information of the process IDLE in addition to the process P and the process K described above. As described above, the process P and the process K are real-time priority or user priority processes. On the other hand, the process IDLE is an idle priority process (a process that does not increase the usage rate of the processing unit 100). In the present embodiment, the log information of the process IDLE may be described as log information “IDLE”.
図6の具体例では、単位期間Nが開始されてから70msが経過した時点を示す。以上の場合、図6に示す通り、7個のログ情報が第2領域112に記憶される。上述した通り、ロギング情報は、10個のログ情報で構成される。すなわち、図6の具体例では、ロギング情報の一部が第2領域112に記憶された状態とも換言される。図6に示す時点から30msが経過した場合、第2領域112に10個のログ情報が記憶され、第2領域112にロギング情報が記憶される。
In the specific example of FIG. 6, a point in time when 70 ms has elapsed since the unit period N was started is shown. In the above case, seven pieces of log information are stored in the
図7(a)から図7(c)は、第1記憶部110から第2記憶部120へロギング情報が転送されるまでの一例を説明するための図である。図7(a)は、N回目の単位期間Nが終了した直後において第1記憶部110に記憶されるロギング情報(X、Y)の概念図である。図7(a)の具体例では、N−1回目の単位期間N−1における処理部100の使用率が100%でない場合を想定する。
FIG. 7A to FIG. 7C are diagrams for explaining an example until logging information is transferred from the
図7(a)の具体例では、単位期間Nにおいて第2領域112にログ情報が記憶される。以上の場合、単位期間Nが終了すると、第2領域112のロギング情報Yを用いて、単位期間Nにおける処理部100の使用率が算出される。図7(a)に示す通り、単位期間Nにおいて、アイドルプライオリティのプロセスIDLEが実行された場合のログ情報「IDLE」は記憶されない。したがって、図7(a)の具体例では、単位期間Nにおける処理部100の使用率は100%である。
In the specific example of FIG. 7A, log information is stored in the
図7(b)は、上述の図7(a)の具体例の直後において第1記憶部110に記憶されるロギング情報の概念図である。上述した通り、今回の単位期間Nにおいて、処理部100の使用率が100%の場合、ロギング情報が第2記憶部120に転送される。具体的には、今回の単位期間Nにおいて、処理部100の使用率が100%の場合、前回の単位期間N−1において記憶されたロギング情報Xが第2記憶部120に送信される。
FIG. 7B is a conceptual diagram of the logging information stored in the
図7(b)の具体例では、前回の単位期間N−1において第1領域111にロギング情報Xが記憶されている。したがって、処理部100の使用率が100%である単位領域Nが終了した場合、単位領域N−1で記憶された第1領域111のロギング情報Xが第2記憶部120に転送される。本実施形態では、図7(b)に示す通り、第2記憶部120に転送したロギング情報は、第1記憶部110から消去される。ただし、第2記憶部120に転送したロギング情報が第1記憶部110から消去されない構成としてもよい。
In the specific example of FIG. 7B, the logging information X is stored in the
図7(c)は、上述の図7(b)の具体例において、N+1回目の単位期間N+1が終了した直後の第1記憶部110に記憶されるロギング情報(Y、Z)の概念図である。単位期間Nにおいて第2領域112にロギング情報Yが記憶された場合、次回の単位期間N+1では、第1領域111にロギング情報Zが記憶される。以上の場合、単位期間N+1が終了した時点で、単位期間N+1における処理部100の使用率を第1領域111のロギング情報Zから算出する。図7(c)の具体例では、単位期間N+1における処理部100の使用率が60%である場合を想定する。
FIG. 7C is a conceptual diagram of logging information (Y, Z) stored in the
前回の単位期間における処理部100の使用率が100%の場合であって、今回の単位期間における処理部100の使用率が100%未満の場合、前回の単位期間のロギング情報、および、今回の単位期間のロギング情報を第1記憶部110から第2記憶部120に転送する。例えば、図7(c)の具体例では、今回の単位期間N+1における処理部100の使用率は100%未満であり、前回の単位期間Nにおける処理部100の使用率は100%である。以上の場合、単位期間N+1のロギング情報Zおよび単位期間Nのロギング情報Yの双方が転送される。
When the usage rate of the
以上の説明から理解される通り、今回の単位期間(例えば図7の単位期間N)において処理部100の使用率が100%であった場合、今回の単位期間のロギング情報(図7のY)に加え、前回の単位期間(単位期間N−1)のロギング情報(図7のX)および前回の単位期間のロギング情報(図7のZ)のロギング情報が第2記憶部120に転送される。
As understood from the above description, when the usage rate of the
ところで、システム障害の原因を特定するため、第2記憶部120(第3記憶部130)に全ての単位期間のロギング情報が転送され解析可能な構成が理想である。しかし、以上の構成では、大容量の第2記憶部120を使用する必要があり、コストが増加するという不都合がある。以上の事情を考慮して、本実施形態では、第1記憶部110に記憶されたロギング情報のうち処理部100の使用率が100%の単位期間のロギング情報を抜粋して転送する構成とした。以上の構成によれば、全てのロギング情報が第2記憶部120に転送される構成と比較して、上述の不都合を抑制できる。
By the way, in order to identify the cause of the system failure, an ideal configuration is possible in which logging information of all unit periods is transferred to the second storage unit 120 (third storage unit 130) and can be analyzed. However, in the above configuration, it is necessary to use the large-capacity
しかし、一部のロギング情報が解析可能になる構成では、システム障害の原因を特定するために解析すべきロギング情報が転送されないという不都合が想定される。以上の事情を考慮して、本実施形態では、処理部100の使用率が100%の単位期間のロギング情報が転送され解析可能になる構成とした。
However, in the configuration in which a part of the logging information can be analyzed, there is a disadvantage that the logging information to be analyzed to identify the cause of the system failure is not transferred. In view of the above circumstances, in the present embodiment, the logging information of the unit period in which the usage rate of the
処理部100の使用率が大きい期間ほど、システム障害が発生し易いという事情がある。したがって、処理部100の使用率が100%の単位期間のロギング情報が転送される構成では、処理部100の使用率が100%の単位期間のロギング情報が転送されない構成と比較して、システム障害の原因の特定に要するロギング情報が転送されないという不都合が抑制される。
There is a situation that a system failure is more likely to occur as the usage rate of the
また、本実施形態では、処理部100の使用率が100%の単位期間に加え、当該単位期間の前後の単位期間のロギング情報が第2記憶部120に転送される。以上の構成によれば、仮に、処理部100の使用率が100%の単位期間の直前にシステム障害の原因が生じたとしても、当該原因を特定できる。また、処理部100の使用率が100%の単位期間の直後にシステム障害の原因が生じたとしても、当該原因を特定できる。
In this embodiment, in addition to a unit period in which the usage rate of the
図7(d)は、第1記憶部110から第2記憶部120へロギング情報が転送されない場合の一例を説明するための図である。図7(d)の具体例は、今回の単位期間Mが終了した直後に第1記憶部110に記憶されるロギング情報が示される。
FIG. 7D is a diagram for explaining an example of a case where logging information is not transferred from the
図7(d)の具体例では、前回の単位期間M−1のロギング情報Aには、ログ情報「IDLE」が4個含まれる。したがって、単位期間M−1における処理部100の使用率は60%である。また、今回の単位期間Mのロギング情報Bには、ログ情報「IDLE」が5個含まれる。したがって、単位期間Mにおける処理部100の使用率は50%である。
In the specific example of FIG. 7D, the log information “IDLE” is included in the logging information A of the previous unit period M−1. Therefore, the usage rate of the
また、図7(d)の具体例では、前々回の単位期間M−2および次回の単位期間M+1における処理部100の使用率が100%未満である場合を想定する。以上の場合、ロギング情報Aおよびロギング情報Bは第2記憶部120に転送されない。2回先の単位期間M+1においてログ情報を記憶する場合、今回の単位期間Mにおけるログ情報が上書きされる。
Further, in the specific example of FIG. 7D, it is assumed that the usage rate of the
図8は、第2記憶部120から第3記憶部130へロギング情報が転送される場合の具体例を説明するための図である。上述した通り、第1記憶部110から第2記憶部120へは、処理部100の使用率が100%の場合にロギング情報が転送される。一方、第2記憶部120から第3記憶部130へは、処理部100の使用率が10%未満の場合にロギング情報が転送される。
FIG. 8 is a diagram for describing a specific example when logging information is transferred from the
本実施形態では、アイドルプライオリティのプロセスIDLEは、プロセスIDLE0およびプロセスIDLE1を含む。処理部100は、リアルタイムプライオリティのプロセスまたはユーザプライオリティのプロセスを実行しない場合、原則、プロセスIDLE0を実行する。
In the present embodiment, the process IDLE having the idle priority includes a process IDLE0 and a process IDLE1. When the
一方、処理部100は、単位期間が終了する場合、プロセスIDLE1(転送プロセス)を実行する。ただし、今回の単位期間の最後にプロセスIDLEより優先度が高いプロセス(リアルタイムプライオリティのプロセスまたはユーザプライオリティのプロセス)が実行される場合、今回の単位期間においてプロセスIDLE1は実行されない。プロセスIDLE1では、単位期間における処理部100の使用率が判定される。プロセスIDLE1において、使用率が10%以下であると判断された場合、ロギング情報が第3記憶部130へ転送される。
On the other hand, when the unit period ends, the
ところで、仮に1回のプロセスIDLE1において、第3記憶部130に転送可能なロギング情報の個数に上限を設けない構成を想定する。以上の構成では、第2記憶部120から第3記憶部130へ大量のロギング情報が一度に転送され、全てのロギング情報を第3記憶部130に書込む処理に過度な時間長を要する場合がある。以上の場合、第3記憶部130にロギング情報を書込む処理が他の処理に影響する不都合が生じ得る。
By the way, suppose a configuration in which an upper limit is not set for the number of logging information that can be transferred to the
以上の事情を考慮して、本実施形態では、プロセスIDLE1において、第2記憶部120から第3記憶部130に転送可能なロギング情報の個数に上限を設ける。例えば、1回のプロセスIDLE1において、最大で32個のロギングデータが第3記憶部130に転送可能な構成が好適である。以上の構成によれば、上述の不都合が抑制されるという効果が奏せられる。
Considering the above circumstances, in the present embodiment, an upper limit is set on the number of logging information that can be transferred from the
図8の具体例では、単位期間L−1における処理部100の使用率は20%である。したがって、単位期間L−1におけるプロセスIDLE1では、ロギング情報が第3記憶部130へ転送されない。一方、単位期間L−1における処理部100の使用率は10%である。したがって、単位期間LにおけるプロセスIDLE1では、ロギング情報が第3記憶部130へ転送される。
In the specific example of FIG. 8, the usage rate of the
図9(a)および図9(b)は、処理部100の第1転送制御処理および第2転送制御処理のフローチャートである。第1転送制御処理および第2転送制御処理は、例えばオペレーティングシステム(カーネル)により実行される処理に含まれる。
FIGS. 9A and 9B are flowcharts of the first transfer control process and the second transfer control process of the
図9(a)は、第1転送制御処理のフローチャートである。第1転送制御処理により、第1記憶部110から第2記憶部120へロギング情報が転送される。第1転送制御処理は、例えば、予め定められた時間間隔で発生するクロック割込みが所定回数発生する毎に実行される。具体的には、第1転送制御処理は、10ms毎に実行される。すなわち、1回の単位期間で10回の第1転送制御処理が実行される。ただし、第1転送制御処理が他の契機で実行される構成としてもよい。
FIG. 9A is a flowchart of the first transfer control process. Logging information is transferred from the
第1転送制御処理を開始すると、処理部100は、次回に実行するプロセスを決定する(S11)。具体的には、ステップS11では、次回に実行するプロセスに加え、当該プロセスのうち何れのスレッドを実行するかが決定される。処理部100は、ステップS11で決定したプロセスおよびスレッドに応じたログ情報を生成し、第1記憶部110に格納する(S12)。
When the first transfer control process is started, the
ログ情報を第1記憶部110に格納した後に、処理部100は、今回の単位期間が終了したか否かを判定する(S13)。具体的には、ステップS13において、前回の単位期間が終了したと判断されてから約100msが経過したか否かが判断される。今回の単位期間が終了していなと判断した場合(S13:NO)、処理部100は、第1転送制御処理を終了する。
After storing the log information in the
一方、今回の単位期間が終了したと判断した場合(S13:YES)、処理部100は、今回の単位期間における処理部100の使用率を算出する(S14)。その後、処理部100は、今回の単位期間における処理部100の使用率が100%であるか否かを判定する(S15)。
On the other hand, when it is determined that the current unit period has ended (S13: YES), the
ステップS15において、今回の単位期間における処理部100の使用率が100%であると判断した場合(S15:YES)、処理部100は、前回の単位期間におけるロギング情報を第2記憶部120に転送し(S16)、第1転送制御処理を終了する。
When it is determined in step S15 that the usage rate of the
一方、今回の単位期間における処理部100の使用率が100%ではないと判断した場合(S15:NO)、処理部100は、前回の単位期間における処理部100の使用率が100%であるか否かを判定する(S17)。前回の単位期間における処理部100の使用率が100%であると判断した場合(S18:YES)、処理部100は、前回の単位期間におけるロギング情報および今回の単位期間におけるロギング情報を第2記憶部120に転送する(S18)。
On the other hand, when it is determined that the usage rate of the
以上の構成によれば、処理部100の使用率が100%である単位期間の直前の単位期間のロギング情報が上述のステップS16で第2記憶部120へ転送され、且つ、処理部100の使用率が100%である単位期間のロギング情報および処理部100の使用率が100%である単位期間の直後の単位期間のロギング情報が上述のステップS18で第2記憶部120へ転送される。
According to the above configuration, the logging information of the unit period immediately before the unit period in which the usage rate of the
一方、前回の単位期間における処理部100の使用率が100%ではないと判断した場合(S18:NO)、処理部100は、第1転送処理を終了する。すなわち、前回および今回の連続した単位期間の双方において、処理部100の使用率が100%ではない場合、今回の第1転送制御処理ではロギング情報が転送されない。
On the other hand, when it is determined that the usage rate of the
図9(b)は、第2転送制御処理のフローチャートである。第2転送制御処理により、第2記憶部120から第3記憶部130へロギング情報が転送される。第2転送制御処理は、上述のプロセスIDLE1で実行される。第2転送制御処理を開始すると、処理部100は、上述のステップS14と同様に、今回の単位期間における処理部100の使用率を算出する(S21)。その後、処理部100は、今回の単位期間における処理部100の使用率が10%以下であるか否かを判定する(S22)。
FIG. 9B is a flowchart of the second transfer control process. Logging information is transferred from the
ステップS22において、今回の単位期間における処理部100の使用率が10%以下ではないと判断した場合(S22:NO)、処理部100は第2転送制御処理を終了する。一方、今回の単位期間における処理部100の使用率が10%以下であると判断した場合(S22:YES)、処理部100は、第2記憶部120に記憶されたロギング情報を第3記憶部130に転送する(S23)。
In step S22, when it is determined that the usage rate of the
上述した通り、第2記憶部120から第3記憶部130に一度に転送されるロギング情報の個数には上限が設けられる。具体的には、処理部100は、第2記憶部120に記憶されたロギング情報が32個以下の場合、全てのロギング情報を第3記憶部130へ転送する。
As described above, there is an upper limit on the number of logging information transferred from the
一方、第2記憶部120に記憶されたロギング情報が32個より多い場合、処理部100は、当該ロギング情報のうち古い順に32個のロギング情報が選択され、第3記憶部130へ転送する。今回の第2転送制御処理(S23)で転送れなかった第2記憶部120のロギング情報は、次回以降の第2転送制御処理で転送される。ロギング情報を第3記憶部130に転送した後に、処理部100は、第2転送制御処理を終了する。
On the other hand, when there are more than 32 pieces of logging information stored in the
<第2実施形態>
本発明の第2実施形態から第6実施形態を以下に説明する。なお、以下に例示する各形態において作用や機能が第1実施形態と同等である要素については、第1実施形態の説明で参照した符号を流用して各々の詳細な説明を適宜に省略する。
Second Embodiment
The second to sixth embodiments of the present invention will be described below. In addition, about the element which an effect | action and a function are equivalent to 1st Embodiment in each form illustrated below, the reference | standard referred by description of 1st Embodiment is diverted, and each detailed description is abbreviate | omitted suitably.
図10は、第2実施形態を説明するための図である。第2実施形態では、上述の第1実施形態と同様に、ロギング情報が第1記憶部110(第1領域111、第2領域112)に記憶される(図10のSb1)。また、第2実施形態では、上述の第1実施形態と同様に、処理部100の使用率が閾値NA(第1実施形態では100%)の場合、第1記憶部110から第2記憶部120にロギング情報が転送され(図10のSb2)、処理部100の使用率が閾値NB(第1実施形態では10%)以下の場合、第2記憶部120から第3記憶部130にロギング情報が転送される(図10のSb3)。
FIG. 10 is a diagram for explaining the second embodiment. In the second embodiment, the logging information is stored in the first storage unit 110 (the
上述の第1実施形態では、HDD16を第3記憶部130として機能させた。第2実施形態では、RAMDISKを第3記憶部130として機能させる点において、第1実施形態と相違する。例えば256MBのデータ容量のRAMDISKが採用され得る。RAMDISKは、各種の情報を揮発的に記憶する。
In the first embodiment described above, the
以上の第2実施形態によれば、HDDを具備しない情報処理装置10であっても、デバッグ作業で解析するためのロギング情報をRAMDISKに蓄積できる。しかし、RAMDISKは、情報処理装置10への電源の供給が停止した場合、ロギング情報を保持できないという不都合がある。
According to the second embodiment described above, even in the
以上の事情を考慮して、第2実施形態では、RAMDISKに蓄積されたロギング情報を、予め定められた外部転送契機で外部記憶装置に転送させる構成を採用した。以上の構成によれば、デバッグ作業に必要なロギング情報を外部記憶装置に記憶させることができる。外部記憶装置としては、例えば、第1実施形態におけるSDカード19(図1参照)が好適に採用される。ただし、SDカード19以外を外部記憶装置として採用してもよい。
In consideration of the above circumstances, the second embodiment employs a configuration in which logging information stored in the RAMDISK is transferred to an external storage device at a predetermined external transfer trigger. According to the above configuration, the logging information necessary for the debugging work can be stored in the external storage device. As the external storage device, for example, the SD card 19 (see FIG. 1) in the first embodiment is preferably employed. However, a device other than the
第2実施形態では、SDカード19が情報処理装置10に接続された場合、外部転送契機が成立し、RAMDISKのロギング情報がSDカード19に転送される(図10のSb4)。具体的には、SDカード19が情報処理装置10に接続された場合、RAMDISKのロギング情報をSDカード19に転送するためのプロセスが自動的に実行され、ロギング情報がSDカード19に転送される。ただし、SDカード19が情報処理装置10に接続され、且つ、ユーザの操作が受付けられた場合、ロギング情報がSDカード19に転送される構成としてもよい。
In the second embodiment, when the
ロギング情報をRAMDISKに転送する外部転送契機は適宜に設定できる。例えば、予め定められた時間間隔(例えば1時間毎)で、ロギング情報をRAMDISKに転送してもよい。また、単位期間における処理部100の使用率が予め定められた数値以下の場合、ロギング情報をRAMDISKに転送してもよい。さらに、情報処理装置10への電源の供給が停止する場合、ロギング情報をRAMDISKに転送してもよい。
An external transfer trigger for transferring the logging information to the RAMDISK can be set as appropriate. For example, the logging information may be transferred to the RAMDISK at a predetermined time interval (for example, every hour). Further, when the usage rate of the
<第3実施形態>
図11は、第3実施形態を説明するための図である。第3実施形態では、上述の第1実施形態および第2実施形態と同様に、ロギング情報が第1記憶部110に記憶され(図11のSc1)、処理部100の使用率が閾値NAの場合、第1記憶部110から第2記憶部120にロギング情報が転送され(図11のSc2)、処理部100の使用率が閾値NB以下の場合、第2記憶部120から第3記憶部130にロギング情報が転送される(図11のSc3)。
<Third Embodiment>
FIG. 11 is a diagram for explaining the third embodiment. In the third embodiment, as in the first and second embodiments described above, logging information is stored in the first storage unit 110 (Sc1 in FIG. 11), and the usage rate of the
第3実施形態の情報処理装置10は、上述の第2実施形態と同様に、RAMDISKが設けられ、該RAMDISKが第3記憶部130として機能する。また、第3実施形態の情報処理装置10は、NAND型フラッシュメモリを具備する。例えばデータ容量が256MB以上のNAND型フラッシュメモリが好適に採用される。NAND型フラッシュメモリは、各種の情報を不揮発的に記憶できる。
The
第3実施形態では、情報処理装置10への電源の供給が停止する場合、RAMDISKのロギング情報がNAND型フラッシュメモリに転送される。以上の第3実施形態によれば、NAND型フラッシュメモリに蓄積されたロギング情報によりデバッグ作業ができる。また、第3実施形態によれば、HDDを具備しない情報処理装置10であっても、ロギング情報を不揮発的に記憶する記憶装置に蓄積することができる。
In the third embodiment, when the supply of power to the
<第4実施形態>
第4実施形態では、上述の第1実施形態と同様に、ロギング情報が第1記憶部110に記憶され、処理部100の使用率が閾値NA以上の場合、第1記憶部110から第2記憶部120にロギング情報が転送され、処理部100の使用率が閾値NB以下の場合、第2記憶部120から第3記憶部130にロギング情報が転送される。
<Fourth embodiment>
In the fourth embodiment, as in the first embodiment described above, logging information is stored in the
ところで、処理部100の使用率が頻繁に閾値NAを超える場合、第2記憶部120にロギング情報が短期間で大量に蓄積され得る。以上の場合、ロギング情報が第3記憶部130に転送される以前に、第2記憶部120でオーバーフローが生じる不都合が想定される。
By the way, when the usage rate of the
以上の事情を考慮して、第4実施形態では、第2記憶部120が記憶可能な残りのデータ量(空き容量)が少ないほど、第2記憶部120から第3記憶部130へロギング情報が転送されることとなる処理部100の使用率(閾値NB)を高く変更可能な構成とした。具体的には、第2記憶部120の空き容量(以下「空き容量Df」という)が0MBまで減少した場合(オーバーフローが生じた場合)、閾値NBが加算される。
In view of the above circumstances, in the fourth embodiment, the smaller the remaining amount of data (free space) that can be stored in the
例えば、閾値NBが10%の期間において、空き容量Dfが0MBまで減少した場合、閾値NBが20%に加算される。閾値NBが加算された場合、第2記憶部120から第3記憶部130にロギング情報が転送される契機が成立し易くなるため、第2記憶部120でオーバーフローが生じる不都合が抑制される。
For example, when the free space Df decreases to 0 MB in the period in which the threshold NB is 10%, the threshold NB is added to 20%. When the threshold value NB is added, the trigger for transferring the logging information from the
図12(a)は、第1変更処理のフローチャートである。第1変更処理は、例えば予め定められた時間間隔で処理部100により実行される。ただし、第1変更処理が実行される契機は適宜に変更できる。第1変更処理を開始した場合、処理部100は、第2記憶部120の空き容量Dfが0MBであるか否かを判定する(S31)。第2記憶部120の空き容量Dfが0MBではないと判断した場合(S31:NO)、処理部は、第1変更処理を終了する。
FIG. 12A is a flowchart of the first change process. The first change process is executed by the
一方、第2記憶部120の空き容量Dfが0MBであると判断した場合(S31:YES)、処理部100は、閾値NB変更処理(S32)を実行する。第4実施形態では、閾値NBの初期値は例えば10%に設定される。閾値NB変更処理では、閾値NBに数値「10」が加算される。ただし、閾値NBが100%に達している場合、閾値NBは加算されない。
On the other hand, when it is determined that the free space Df of the
以上の第4実施形態では、第2記憶部120がオーバーフローし、デバッグ作業に必要なロギング情報が第3記憶部130に蓄積されないという不都合が抑制される。なお、閾値NBは適宜に減算される。例えば、第2記憶部120から第3記憶部130へロギング情報が転送された場合、閾値NBから数値「10」が減算される構成としてもよい。また、第2記憶部120から第3記憶部130へロギング情報が転送された場合、閾値NBが初期値(10%)にリセットされる構成としてもよい。
In the fourth embodiment described above, the inconvenience that the
<第5実施形態>
第5実施形態では、上述の第1実施形態と同様に、ロギング情報が第1記憶部110に記憶され、処理部100の使用率が閾値NA以上の場合、第1記憶部110から第2記憶部120にロギング情報が転送される。
<Fifth Embodiment>
In the fifth embodiment, as in the first embodiment described above, logging information is stored in the
第1実施形態では、ロギング情報が転送される閾値NAとして100%を採用した。しかし、閾値NAを100%とした構成では、処理部100の使用率が100%に達しない場合のロギング情報が転送されない(蓄積されない)。しかし、例えば処理部の使用率が80%を超えた場合のロギング情報であっても、デバッグ作業で解析を要する場合がある。ロギング情報が転送される閾値NAが100%で固定される構成では、解析可能となるロギング情報の範囲が狭すぎるという不都合(以下「第1の不都合」という)が生じ得る。
In the first embodiment, 100% is adopted as the threshold NA to which logging information is transferred. However, in the configuration in which the threshold NA is 100%, the logging information when the usage rate of the
以上の事情を考慮して、第5実施形態では、閾値NAが100%以下に変化可能な構成とした。閾値NAが100%より小さい場合、第1記憶部110から第2記憶部120にロギング情報が転送され易くなり、上述の第1の不都合が抑制される。
Considering the above circumstances, in the fifth embodiment, the threshold value NA can be changed to 100% or less. When the threshold value NA is smaller than 100%, the logging information is easily transferred from the
ただし、閾値NAが小さい場合、処理部100の使用率が頻繁に閾値NAを超え、第1記憶部110から頻繁にロギング情報が第2記憶部120に転送され、ロギング情報が第3記憶部130に転送される以前に、第2記憶部120でオーバーフローが生じる不都合(以下「第2の不都合」という)が生じ易くなる。
However, when the threshold NA is small, the usage rate of the
以上の事情を考慮して、第5実施形態では、第2記憶部120の空き容量Dfに応じて、閾値NAを変化させる構成を採用した。具体的には、第2記憶部120の空き容量Dfが多い程、閾値NAが小さくなる(ロギング情報が第2記憶部120に転送され易くなる)構成とした。以上の構成によれば、上述の第2の不都合が抑制される。
Considering the above circumstances, the fifth embodiment employs a configuration in which the threshold NA is changed according to the free capacity Df of the
図12(b)は、第2変更処理のフローチャートである。第2変更処理は、例えば予め定められた時間間隔で処理部100により実行される。ただし、第2変更処理が実行される契機は適宜に変更できる。第2変更処理を開始した場合、処理部100は、第2記憶部120の空き容量Dfが4MB以上であるか否かを判定する(S41)。上述した通り、第2記憶部120(BUF14)のデータ容量は8MBである。したがって、第2記憶部120に50%以上の空きがあるか否かがステップS41で判断されるとも換言される。
FIG. 12B is a flowchart of the second change process. The second change process is executed by the
第2記憶部120の空き容量Dfが4MB以上であると判断した場合(S41:YES)、処理部100は、閾値NAを80%に変更する(S42)。一方、第2記憶部120の空き容量Dfが4MB以上ではないと判断した場合(S41:NO)、処理部100は、空き容量Dfが2MB以上であるか否かを判定する(S43)。空き容量Dfが2MB以上であると判断した場合(S43:YES)、処理部100は、閾値NAを90%に変更する(S44)。空き容量Dfが2MB以上ではないと判断した場合(S43:NO)、処理部100は、閾値NAを100%に変更する(S45)。
When it is determined that the free capacity Df of the
以上の説明から理解される通り、第5実施形態では、第2記憶部120が記憶可能な残りのデータ量が少ないほど、第2記憶部120から第3記憶部130へロギング情報が転送されることとなる処理部100の使用率(閾値NA)を高く変更可能である。以上の構成によれば、上述の第1の不都合を抑制するとともに、第2の不都合が抑制できる。
As understood from the above description, in the fifth embodiment, the logging information is transferred from the
なお、閾値NAが変更される空き容量Df(図12(b)の例では、8MB、2MB)は、適宜に変更してもよい。また、閾値NAが変化する数値(図12(b)の例では、80%、90%、100%)は、適宜に変更してもよい。 The free space Df in which the threshold value NA is changed (8 MB and 2 MB in the example of FIG. 12B) may be changed as appropriate. In addition, the numerical value at which the threshold value NA changes (in the example of FIG. 12B, 80%, 90%, 100%) may be changed as appropriate.
<第6実施形態>
第6実施形態では、上述の第1実施形態と同様に、ロギング情報が第1記憶部110に記憶され、処理部100の使用率が閾値NA以上の場合、第1記憶部110から第2記憶部120にロギング情報が転送され、処理部100の使用率が閾値NB以下の場合、第2記憶部120から第3記憶部130にロギング情報が転送される。
<Sixth Embodiment>
In the sixth embodiment, as in the first embodiment described above, logging information is stored in the
上述の第1実施形態では、第2記憶部120から第3記憶部130へロギング情報を転送するためのプロセスIDLE1(転送プロセス)は、他のプロセスより優先度が低いアイドルプライオリティのプロセスである。
In the first embodiment described above, the process IDLE1 (transfer process) for transferring logging information from the
しかし、以上の構成では、転送プロセスより優先度が高いプロセス(ユーザプライオリティのプロセスなど)が実行され続けた場合、転送プロセスが長期間に亘り実行されない場合がある。以上の場合、第2記憶部120に蓄積されたロギング情報が第3記憶部130に転送される以前に、第2記憶部120でオーバーフローが生じる不都合が想定される。
However, in the above configuration, when a process having a higher priority than the transfer process (such as a user priority process) continues to be executed, the transfer process may not be executed for a long period of time. In the above case, it is assumed that the
以上の事情を考慮して、第6実施形態では、第2記憶部120の空き容量Dfに応じて、転送プロセスの優先度を変化させる構成とした。具体的には、第2記憶部120の空き容量Dfが少ない程、転送プロセスの優先度が高くなる構成とした。以上の構成によれば、第2記憶部120の空き容量Dfが少ない程(オーバーフローが生じるまでの期間が短い程)、転送プロセスが実行され易くなる。したがって、第2記憶部120でオーバーフローが生じる不都合が抑制される。
Considering the above circumstances, in the sixth embodiment, the priority of the transfer process is changed according to the free capacity Df of the
図12(c)は、第3変更処理のフローチャートである。第3変更処理は、例えば予め定められた時間間隔で処理部100により実行される。ただし、第3変更処理が実行される契機は適宜に変更できる。
FIG. 12C is a flowchart of the third change process. The third change process is executed by the
第3変更処理を開始した場合、処理部100は、第2記憶部120の空き容量Dfが6.4MB以上であるか否かを判定する(S51)。上述した通り、第2記憶部120(BUF14)のデータ容量は8MBである。したがって、第2記憶部120に80%以上の空きがあるか否かがステップS51で判断されるとも換言される。
When the third change process is started, the
第2記憶部120の空き容量Dfが6.4MB以上であると判断した場合(S51:YES)、処理部100は、転送プロセスの優先度(Pr)をアイドルプライオリティ(Pi)に変更する(S52)。一方、第2記憶部120の空き容量Dfが6.4MB以上ではないと判断した場合(S51:NO)、処理部100は、空き容量Dfが4MB以上であるか否かを判定する(S53)。
When determining that the free space Df of the
空き容量Dfが4MB以上であると判断した場合(S53:YES)、処理部100は、転送プロセスの優先度(Pr)をユーザプライオリティの中間値(Pum)に変更する(S54)。空き容量Dfが4MB未満であると判断した場合(S53:NO)、処理部100は、転送プロセスの優先度(Pr)をユーザプライオリティの最高値(Puh)に変更する(S55)。
If it is determined that the free space Df is 4 MB or more (S53: YES), the
以上の構成によれば、第2記憶部120でオーバーフローが生じる不都合が抑制される。なお、転送プロセスの優先度が変更される空き容量Df(図12(c)の例では、6.4MB、4MB)は、適宜に変更してもよい。また、転送プロセスの変更後の優先度(図12(c)の例では、Pi、Pum、Puh)は、適宜に変更してもよい。
According to the above configuration, inconvenience that overflow occurs in the
<本実施形態の態様例の作用、効果のまとめ>
<第1態様>
本態様の情報処理装置は、処理手段が単位期間に実行したプロセスの順序を特定にするためのロギング情報を単位期間毎に記憶する記憶手段であって、今回の単位期間に係るロギング情報を記憶する第1領域および次回の単位期間に係るロギング情報を記憶する第2領域を含む第1記憶手段と、第1記憶手段から転送されるロギング情報を記憶する第2記憶手段と、第2記憶手段から転送されるロギング情報を記憶する記憶手段であって、ロギング情報を記憶するための時間長が第1記憶手段および第2記憶手段よりも長くなり易く、第1記憶手段および第2記憶手段よりも記憶容量が大きい第3記憶手段と、単位期間における処理手段の使用率を算出する算出手段と、算出手段が算出した使用率が所定値以上の場合、第1記憶手段に記録されたロギング情報を第2記憶手段へ転送させ、使用率が所定値より小さい場合、第2記憶手段から第3記憶手段にロギング情報を転送させる転送制御手段と、を備えることを特徴とする。
本態様によれば、外部の記憶装置を用いなくとも、第3記憶手段に多くのロギング情報を記憶することができる。
<Summary of Actions and Effects of Aspect Examples of this Embodiment>
<First aspect>
The information processing apparatus according to this aspect is a storage unit that stores, for each unit period, logging information for specifying the order of processes executed by the processing unit during the unit period, and stores the logging information related to the current unit period. First storage means including a first area to be stored and a second area for storing logging information relating to the next unit period, second storage means for storing logging information transferred from the first storage means, and second storage means Storage means for storing logging information transferred from the first storage means and the second storage means, the time length for storing the logging information is likely to be longer than the first storage means and the second storage means. The third storage means having a large storage capacity, a calculation means for calculating the usage rate of the processing means in the unit period, and when the usage rate calculated by the calculation means is a predetermined value or more, are recorded in the first storage means. Logging information was transferred to the second storage unit, when usage is less than a predetermined value, characterized in that it comprises a transfer control means for transferring the logging information in the third storage means from the second storage means.
According to this aspect, a large amount of logging information can be stored in the third storage unit without using an external storage device.
<第2態様>
本態様の情報処理装置は、第3記憶手段は、ロギング情報を揮発的に記憶し、転送制御手段は、予め定められた外部転送契機が成立した場合、第3記憶手段が記憶するロギング情報を外部記憶装置に転送させることを特徴とする。
本態様によれば、不揮発的にロギング情報を記憶する記憶手段(例えばHDD)が設けられない構成においても、デバッグ作業で解析するためのロギング情報を蓄積できる。
<Second aspect>
In the information processing apparatus of this aspect, the third storage unit stores the logging information in a volatile manner, and the transfer control unit stores the logging information stored in the third storage unit when a predetermined external transfer trigger is established. It is characterized by being transferred to an external storage device.
According to this aspect, even in a configuration in which a storage unit (for example, HDD) for storing logging information in a nonvolatile manner is not provided, logging information for analysis in debugging work can be accumulated.
<第3態様>
本態様の情報処理装置は、外部転送契機には、電源の供給が停止されることが含まれることを特徴とする。
本態様によれば、電源の供給が停止された契機で、ロギング情報が自動的に外部記憶装置に転送される。仮に、ロギング情報を外部記憶装置に転送するための操作(以下「転送操作」)が必要な構成では、電源の供給を停止する前に転送操作を忘れた場合、第3記憶手段に記憶されたロギング情報は保持されない不都合が生じ得る。本態様によれば、以上の不都合が抑制される。
<Third aspect>
The information processing apparatus according to this aspect is characterized in that the external transfer trigger includes stopping power supply.
According to this aspect, the logging information is automatically transferred to the external storage device when the supply of power is stopped. In a configuration that requires an operation for transferring logging information to an external storage device (hereinafter referred to as “transfer operation”), if the transfer operation is forgotten before the power supply is stopped, it is stored in the third storage means. There may be a disadvantage that the logging information is not retained. According to this aspect, the above inconvenience is suppressed.
<第4態様>
本態様の情報処理装置は、第2記憶手段が記憶可能な残りのデータ量が多いほど、第1記憶手段から第2記憶手段へロギング情報が転送されることとなる処理手段の使用率を低く変更可能な変更手段を備えることを特徴とする。
本態様によれば、処理手段の使用率が低い場合のロギング情報をデバッグ作業のために蓄積できる。
<4th aspect>
In the information processing apparatus according to this aspect, the larger the remaining amount of data that can be stored in the second storage unit, the lower the usage rate of the processing unit that causes the logging information to be transferred from the first storage unit to the second storage unit. A change means that can be changed is provided.
According to this aspect, the logging information when the usage rate of the processing means is low can be accumulated for debugging work.
<第5態様>
本態様の情報処理装置は、第2記憶手段が記憶可能な残りのデータ量が少ないほど、第2記憶手段から第3記憶手段へロギング情報が転送されることとなる処理手段の使用率を高く変更可能な変更手段を備えることを特徴とする。
本態様によれば、第2記憶手段がオーバーフローする前に、第2記憶手段のロギング情報が第3記憶手段に転送され易くなる。
<5th aspect>
In the information processing apparatus according to this aspect, the smaller the remaining amount of data that can be stored in the second storage unit, the higher the usage rate of the processing unit that causes the logging information to be transferred from the second storage unit to the third storage unit. A change means that can be changed is provided.
According to this aspect, the logging information in the second storage unit is easily transferred to the third storage unit before the second storage unit overflows.
<第6態様>
本態様の情報処理装置は、第2記憶手段が記憶可能な残りのデータ量が少ないほど、ロギング情報を第3記憶手段に転送するためのプロセスの優先度を高く変更可能な変更手段を備えることを特徴とする。
本態様によれば、第2記憶手段がオーバーフローする前に、第2記憶手段のロギング情報が第3記憶手段に転送され易くなる。
<Sixth aspect>
The information processing apparatus according to this aspect includes a changing unit that can change the priority of a process for transferring logging information to the third storage unit as the remaining amount of data that can be stored in the second storage unit is smaller. It is characterized by.
According to this aspect, the logging information in the second storage unit is easily transferred to the third storage unit before the second storage unit overflows.
<第7態様>
本態様の情報処理方法は、処理手段が単位期間に実行したプロセスの順序を特定にするためのロギング情報を単位期間毎に第1記憶手段に記憶するステップであって、今回の単位期間に係るロギング情報を、第1記憶手段の第1領域に記憶し、次回の単位期間に係るロギング情報を、第1記憶手段の第2領域に記憶するステップと、第1記憶手段から転送されるロギング情報を第2記憶手段に記憶するステップと、ロギング情報を記憶するための時間長が第1記憶手段および第2記憶手段よりも長くなり易く、第1記憶手段および第2記憶手段よりも記憶容量が大きい第3記憶手段に、第2記憶手段から転送されるロギング情報を記憶するステップと、単位期間における処理手段の使用率を算出するステップと、使用率が所定値以上の場合、第1記憶手段に記録されたロギング情報を第2記憶手段へ転送させ、使用率が所定値より小さい場合、第2記憶手段から第3記憶手段にロギング情報を転送させるステップと、を備えることを特徴とする。
本態様によれば、上述の第1態様と同様な効果が奏せられる。」
<Seventh aspect>
The information processing method of this aspect is a step of storing logging information for specifying the order of processes executed by a processing unit in a unit period in a first storage unit for each unit period, and relates to the current unit period Logging information stored in the first area of the first storage means, logging information relating to the next unit period in the second area of the first storage means, and logging information transferred from the first storage means Is stored in the second storage means, and the time length for storing the logging information is likely to be longer than that of the first storage means and the second storage means, and the storage capacity is larger than that of the first storage means and the second storage means. A step of storing logging information transferred from the second storage means in a large third storage means, a step of calculating a usage rate of the processing means in a unit period, and a usage rate of a predetermined value or more, Transferring the logging information recorded in one storage means to the second storage means, and transferring the logging information from the second storage means to the third storage means when the usage rate is smaller than a predetermined value. And
According to this aspect, the same effects as those of the first aspect described above can be achieved. "
<第8態様>
本態様のプログラムは、第7態様に記載の情報処理方法における各ステップをコンピュータに実行させることを特徴とする。
本態様によれば、上述の第1態様と同様な効果が奏せられる。
<Eighth aspect>
A program according to this aspect causes a computer to execute each step in the information processing method according to the seventh aspect.
According to this aspect, the same effects as those of the first aspect described above can be achieved.
10…情報処理装置、100…処理部、101…ロギング実行部、102…転送制御部、103…算出部、104…プロセス実行部、110…第1記憶領域、111…第1領域、112…第2領域、120…第2記憶装置、130…第3記憶部。
DESCRIPTION OF
Claims (8)
前記第1記憶手段から転送される前記ロギング情報を記憶する第2記憶手段と、
前記第2記憶手段から転送される前記ロギング情報を記憶する記憶手段であって、前記ロギング情報を記憶するための時間長が前記第1記憶手段および前記第2記憶手段よりも長くなり易く、前記第1記憶手段および前記第2記憶手段よりも記憶容量が大きい第3記憶手段と、
前記単位期間における前記処理手段の使用率を算出する算出手段と、
前記算出手段が算出した前記使用率が所定値以上の場合、前記第1記憶手段に記録された前記ロギング情報を前記第2記憶手段へ転送させ、前記使用率が前記所定値より小さい場合、前記第2記憶手段から前記第3記憶手段に前記ロギング情報を転送させる転送制御手段と、を備えることを特徴とする情報処理装置。 Storage means for storing the logging information for specifying the order of processes executed by the processing means in the unit period for each unit period, the first area for storing the logging information relating to the current unit period and the next time First storage means including a second area for storing the logging information relating to the unit period of
Second storage means for storing the logging information transferred from the first storage means;
Storage means for storing the logging information transferred from the second storage means, the time length for storing the logging information is likely to be longer than the first storage means and the second storage means, Third storage means having a storage capacity larger than that of the first storage means and the second storage means;
Calculating means for calculating a usage rate of the processing means in the unit period;
When the usage rate calculated by the calculation means is a predetermined value or more, the logging information recorded in the first storage means is transferred to the second storage means, and when the usage rate is smaller than the predetermined value, An information processing apparatus comprising: transfer control means for transferring the logging information from the second storage means to the third storage means.
前記転送制御手段は、予め定められた外部転送契機が成立した場合、前記第3記憶手段が記憶する前記ロギング情報を外部記憶装置に転送させることを特徴とする請求項1に記載の情報処理装置。 The third storage means stores the logging information in a volatile manner;
2. The information processing apparatus according to claim 1, wherein the transfer control unit transfers the logging information stored in the third storage unit to an external storage device when a predetermined external transfer trigger is established. .
前記第1記憶手段から転送される前記ロギング情報を第2記憶手段に記憶するステップと、
前記ロギング情報を記憶するための時間長が前記第1記憶手段および前記第2記憶手段よりも長くなり易く、前記第1記憶手段および前記第2記憶手段よりも記憶容量が大きい第3記憶手段に、前記第2記憶手段から転送される前記ロギング情報を記憶するステップと、
前記単位期間における前記処理手段の使用率を算出するステップと、
前記使用率が所定値以上の場合、前記第1記憶手段に記録された前記ロギング情報を前記第2記憶手段へ転送させ、前記使用率が前記所定値より小さい場合、前記第2記憶手段から前記第3記憶手段に前記ロギング情報を転送させるステップと、を備えることを特徴とする情報処理方法。 Storing the logging information for specifying the order of the processes executed by the processing unit in the unit period in the first storage unit for each unit period, wherein the logging information relating to the unit period of the current time is stored in the first storage unit. Storing in a first area of one storage means, and storing the logging information relating to the next unit period in a second area of the first storage means;
Storing the logging information transferred from the first storage means in a second storage means;
The time length for storing the logging information tends to be longer than that of the first storage means and the second storage means, and the third storage means has a larger storage capacity than the first storage means and the second storage means. Storing the logging information transferred from the second storage means;
Calculating a usage rate of the processing means in the unit period;
When the usage rate is greater than or equal to a predetermined value, the logging information recorded in the first storage means is transferred to the second storage means, and when the usage rate is smaller than the predetermined value, the second storage means Transferring the logging information to a third storage means. An information processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018049341A JP2019160155A (en) | 2018-03-16 | 2018-03-16 | Information processing device, information processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018049341A JP2019160155A (en) | 2018-03-16 | 2018-03-16 | Information processing device, information processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019160155A true JP2019160155A (en) | 2019-09-19 |
Family
ID=67997116
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018049341A Pending JP2019160155A (en) | 2018-03-16 | 2018-03-16 | Information processing device, information processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019160155A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7396067B2 (en) | 2020-01-20 | 2023-12-12 | 株式会社リコー | Information processing device, log management method, and program |
JP7444223B2 (en) | 2021-03-01 | 2024-03-06 | 株式会社オートネットワーク技術研究所 | In-vehicle device, program and information processing method |
-
2018
- 2018-03-16 JP JP2018049341A patent/JP2019160155A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7396067B2 (en) | 2020-01-20 | 2023-12-12 | 株式会社リコー | Information processing device, log management method, and program |
JP7444223B2 (en) | 2021-03-01 | 2024-03-06 | 株式会社オートネットワーク技術研究所 | In-vehicle device, program and information processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8959515B2 (en) | Task scheduling policy for limited memory systems | |
KR20110048531A (en) | Interrupt Control of Virtual Processing Unit | |
US9916260B2 (en) | Computer system with memory aging for high performance | |
US20140082631A1 (en) | Preferential cpu utilization for tasks | |
CN108984104B (en) | Method and apparatus for cache management | |
JP7443195B2 (en) | Memory system and control method | |
KR101835604B1 (en) | Scheduler for memory | |
CN111324427A (en) | Task scheduling method and device based on DSP | |
JP6244949B2 (en) | Information processing apparatus, control method, and control program | |
CN114968099A (en) | NVM (non-volatile memory) access method and NVM controller | |
US9606923B2 (en) | Information processing device with shared memory, memory order guarantee method using counters fence instructions in relation to cache-oriented requests, and recording medium storing program | |
JP5391422B2 (en) | Memory management method, computer system, and program | |
JP2019160155A (en) | Information processing device, information processing method, and program | |
JP4170364B2 (en) | Processor | |
EP3252595A1 (en) | Method and device for running process | |
JP6193189B2 (en) | NAND background processing controller | |
JP5158576B2 (en) | I / O control system, I / O control method, and I / O control program | |
CN112732422A (en) | Norflash asynchronous erasing method, device, equipment and medium | |
JP6199782B2 (en) | Computer system | |
JP5278538B2 (en) | Compilation system, compilation method, and compilation program | |
JP4017005B2 (en) | Arithmetic unit | |
KR102288876B1 (en) | Scheduling independent and dependent actions for processing | |
CN108345428B (en) | Control intensive control system and method thereof | |
JP4631442B2 (en) | Processor | |
CN112805978A (en) | Enhanced anchor protocol for event stream processing |