JP2011065513A - Device and method for storing operation history information - Google Patents

Device and method for storing operation history information Download PDF

Info

Publication number
JP2011065513A
JP2011065513A JP2009216764A JP2009216764A JP2011065513A JP 2011065513 A JP2011065513 A JP 2011065513A JP 2009216764 A JP2009216764 A JP 2009216764A JP 2009216764 A JP2009216764 A JP 2009216764A JP 2011065513 A JP2011065513 A JP 2011065513A
Authority
JP
Japan
Prior art keywords
history information
operation history
input
log
priority
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
JP2009216764A
Other languages
Japanese (ja)
Inventor
Shuji Nagao
周司 長尾
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2009216764A priority Critical patent/JP2011065513A/en
Publication of JP2011065513A publication Critical patent/JP2011065513A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a possibility to lose operation history information which is temporarily saved in a volatile storage element, without giving influence on the saving interval of an operation history information. <P>SOLUTION: An unsaved log processing part 205 temporarily saves an input log into a memory being the volatile storage element when a passage time from the last log recording time into a flash memory to the input time of the input log is less than a prescribed time interval. Also, when the input of an event is detected and also the log is temporarily saved into the memory, a log recording processing part 206 stores the temporarily saved log in the flash memory. Also, the log recording processing part 206 stores the temporarily saved log in the flash memory together with the input log when the passage time is determined to be equal to or more than a prescribed log interval and also the log is temporarily saved into the memory, and stores the input log in the flash memory when the log is not temporarily saved. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は動作履歴情報記憶装置及び動作履歴情報記憶方法に係り、特に装置の稼動状態などの動作履歴情報を不揮発性記憶素子に保存する動作履歴情報記憶装置及び動作履歴情報記憶方法に関する。   The present invention relates to an operation history information storage device and an operation history information storage method, and more particularly to an operation history information storage device and an operation history information storage method for storing operation history information such as an operation state of the device in a nonvolatile storage element.

従来、永続的なデータ保存が可能な不揮発性記憶素子として、フラッシュメモリなどの書き換え回数に制限がある記憶素子を持つ装置において、装置のエラー情報や警告情報などの稼動状態を表す動作履歴情報(以下、この情報を本明細書では「ログ」ともいう)をフラッシュメモリに保存することが行われる。   Conventionally, in a device having a storage element with a limited number of rewrites such as a flash memory as a non-volatile storage element capable of permanent data storage, operation history information (such as error information and warning information of the device) Hereinafter, this information is also referred to as “log” in this specification.

しかし、情報出力の度にフラッシュメモリに保存するとフラッシュメモリの寿命が短くなるため、特許文献1記載の記録方法では、フラッシュメモリに比べて書き換え回数が多いRAM(ランダム・アクセス・メモリ)などの揮発性記憶素子(以下、揮発性メモリともいう)にログを一時保存し、異常発生時や書き換え回数の制限を考慮した一定間隔で上記揮発性メモリに保存しているログをフラッシュメモリに記録することが行われる。   However, since the life of the flash memory is shortened if it is stored in the flash memory each time information is output, the recording method described in Patent Document 1 causes volatilization of a RAM (random access memory) or the like that is rewritten more times than the flash memory. Log is temporarily stored in a volatile memory element (hereinafter also referred to as volatile memory), and the log stored in the volatile memory is recorded in the flash memory at regular intervals in consideration of the occurrence of an abnormality or limitation on the number of rewrites. Is done.

また、特許文献2には、転送されたデータを順次タイマーでタイミングを計りながら、各々フラグを備えたリンクで継いで中断なくメモリに書き戻しを行う書き戻し方式が開示されている。この書き戻し方式では、例えば、図16(A)に示す一定の時間間隔の時刻t1、t5、t9、t13で、同図(B)にe1、e2、e3、e4でそれぞれ模式的に示すようにタイマーイベントを発生させる。そして、図16(C)にi1、i2、i3で模式的に示すように、タイマーイベントe1からe2までの一定時間間隔内に入力されたログを、揮発性メモリに図16(D)にL1、L2、L3で模式的に示すように記憶した後、それらを記憶直後のタイマーイベントe2のタイミングで、図16(E)に示すように、ログ記録領域であるメモリにそれぞれSL1、SL2、SL3として書き戻す。   Patent Document 2 discloses a write-back method in which the transferred data is timed by a sequential timer, and the data is continuously written back to the memory without interruption by using links with flags. In this write-back method, for example, as shown schematically at times t1, t5, t9, and t13 at regular time intervals shown in FIG. 16A and as e1, e2, e3, and e4 in FIG. Generate a timer event. Then, as schematically indicated by i1, i2, and i3 in FIG. 16C, logs input within a fixed time interval from timer events e1 to e2 are stored in volatile memory as L1 in FIG. , L2, and L3 are stored, and at the timing of the timer event e2 immediately after the storage, they are stored in the memory that is the log recording area, SL1, SL2, and SL3, respectively, as shown in FIG. Write back as.

特開2002−108719号公報JP 2002-108719 A 特開昭64−7143号公報JP-A 64-71143

しかし、特許文献1記載の記録方法のように、異常検出後に揮発性メモリから不揮発性メモリにログを転送する方法では、電源異常などのハードウェア障害が発生しシステム動作不能となると、ログを転送することもできないため、ログが失われてしまう。   However, in the method of transferring the log from the volatile memory to the non-volatile memory after the abnormality is detected as in the recording method described in Patent Document 1, the log is transferred when a hardware failure such as a power failure occurs and the system becomes inoperable. You can't do that, so the log is lost.

また、特許文献2記載の書き戻し方式では、図16(C)に示すように、時刻t10で入力されたログi4を、揮発性メモリに同図(D)にL4で模式的に示すように記憶しても、その直後のタイマーイベントe4の発生時刻t13に到達する前に、装置に障害が発生した場合は、メモリに書き戻されずに、そのログは失われてしまう。特に、障害発生直前は障害発生原因となるエラーなどのログが出力されることが多いため、障害解析のためにもログの喪失可能性を減少させることが必要である。   In the write-back method described in Patent Document 2, as shown in FIG. 16C, the log i4 input at time t10 is schematically shown in the volatile memory as L4 in FIG. Even if it is stored, if a failure occurs in the device before reaching the time t13 when the timer event e4 immediately after that is reached, the log is lost without being written back to the memory. In particular, since logs such as errors that cause failures are often output immediately before a failure occurs, it is necessary to reduce the possibility of log loss for failure analysis.

本発明は以上の点に鑑みなされたもので、動作履歴情報を、揮発性記憶素子に一時記憶した後に不揮発性記憶素子に書き込むことで、不揮発性記憶素子への書き込み回数を抑制しつつ、揮発性記憶素子に一時記憶されている動作履歴情報の喪失可能性を減少させることが可能な動作履歴情報記憶装置及び動作履歴情報記憶方法を提供することを目的とする。   The present invention has been made in view of the above points, and the operation history information is temporarily stored in the volatile memory element and then written to the nonvolatile memory element, thereby reducing the number of times of writing to the nonvolatile memory element, and volatile. It is an object of the present invention to provide an operation history information storage device and an operation history information storage method capable of reducing the possibility of loss of operation history information temporarily stored in a sexual storage element.

上記の目的を達成するため、第1の発明の動作履歴情報記憶装置は、所定処理の実行タイミングを示す情報であるイベントを発生するイベント発生手段と、動作履歴情報を入力する動作履歴情報入力手段と、イベント及び動作履歴情報の入力を検出する検出手段と、動作履歴情報を記憶するための、所定回数の書き換えが可能な不揮発性記憶素子と、動作履歴情報を一時記憶するための、所定回数よりも多い回数の書き換えが可能な揮発性記憶素子と、不揮発性記憶素子に動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新保存する時刻保存手段と、検出手段により動作履歴情報の入力が検出されたとき、記憶時刻情報が示す時刻から動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する経過時間判定手段と、経過時間判定手段により経過時間が所定の時間間隔未満であると判定されたときに、入力された動作履歴情報を揮発性記憶素子に一時保存する未保存情報記憶手段と、検出手段によりイベントの入力が検出されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を不揮発性記憶素子に記憶する第1の保存情報記憶手段と、経過時間判定手段により経過時間が所定の時間間隔以上であると判定されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された動作履歴情報と共に不揮発性記憶素子に記憶し、一時保存されていないときは、入力された動作履歴情報を不揮発性記憶素子に記憶する第2の保存情報記憶手段とを有することを特徴とする。   To achieve the above object, an operation history information storage device according to a first aspect of the present invention is an event generation means for generating an event that is information indicating the execution timing of a predetermined process, and an operation history information input means for inputting operation history information. Detection means for detecting the input of event and operation history information; a non-volatile memory element capable of rewriting a predetermined number of times for storing operation history information; and a predetermined number of times for temporarily storing operation history information A volatile storage element that can be rewritten more times, a time storage unit that updates and stores information indicating the time when the operation history information is stored in the nonvolatile storage element, and a storage unit that stores the operation history information. When an input is detected, the elapsed time from the time indicated by the stored time information to the input time when the input of the operation history information is detected is calculated, and the elapsed time is set in advance. The elapsed time determination means for determining whether or not the elapsed time is less than the predetermined time interval, and when the elapsed time determination means determines that the elapsed time is less than the predetermined time interval, the input operation history information is volatilized. When the event input is detected by the detection means and the non-saved information storage means for temporarily saving in the volatile memory element, it is confirmed whether the operation history information is temporarily saved in the volatile memory element, and is temporarily saved. If the elapsed time is determined to be equal to or greater than the predetermined time interval by the first storage information storage means for storing the temporary storage operation history information in the nonvolatile storage element and the elapsed time determination means, It is checked whether the operation history information is temporarily stored in the volatile memory element. If the operation history information is temporarily stored, the temporary storage operation history information is stored together with the input operation history information in a nonvolatile memory. Stored in the device, when not temporarily stored, and having a second storage information memory means for storing operation history information inputted to the non-volatile storage element.

また、上記の目的を達成するため、第2の発明の動作履歴情報記憶装置は、所定処理の実行タイミングを示す情報であるイベントを発生するイベント発生手段と、優先度情報が付加された動作履歴情報を入力する動作履歴情報入力手段と、イベント及び動作履歴情報の入力を検出する検出手段と、動作履歴情報を記憶するための、所定回数の書き換えが可能な不揮発性記憶素子と、動作履歴情報を一時記憶するための、所定回数よりも多い回数の書き換えが可能な揮発性記憶素子と、不揮発性記憶素子に動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新保存する時刻保存手段と、検出手段により動作履歴情報の入力が検出されたとき、記憶時刻情報が示す時刻から動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する経過時間判定手段と、入力された動作履歴情報の優先度情報が、不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する優先度判定手段と、経過時間判定手段により経過時間が所定の時間間隔未満であると判定されたとき、または経過時間判定手段により経過時間が所定の時間間隔以上であると判定され、かつ、優先度判定手段により入力された動作履歴情報の優先度情報が所定の優先度より低いと判定されたときに、入力された動作履歴情報を揮発性記憶素子に一時保存する未保存情報記憶手段と、検出手段によりイベントの入力が検出されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を不揮発性記憶素子に記憶する第1の保存情報記憶手段と、経過時間判定手段により経過時間が所定の時間間隔以上であると判定され、かつ、優先度判定手段により入力された動作履歴情報の優先度情報が所定の優先度以上であると判定されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された動作履歴情報と共に不揮発性記憶素子に記憶し、一時保存されていないときは、入力された動作履歴情報を不揮発性記憶素子に記憶する第2の保存情報記憶手段とを有することを特徴とする。   In order to achieve the above object, an operation history information storage device according to a second aspect of the invention includes an event generation means for generating an event which is information indicating execution timing of a predetermined process, and an operation history to which priority information is added. Operation history information input means for inputting information, detection means for detecting an input of an event and operation history information, a non-volatile memory element capable of rewriting a predetermined number of times for storing operation history information, and operation history information Volatile storage element that can be rewritten more than a predetermined number of times, and time storage means that updates and stores information indicating the time when operation history information is stored in the nonvolatile storage element as storage time information When the operation history information input is detected by the detecting means, the elapsed time from the time indicated by the stored time information to the input time when the operation history information input is detected is calculated. The elapsed time determination means for determining whether the elapsed time is less than a predetermined time interval set in advance and the priority information of the input operation history information are preferentially stored in the nonvolatile memory element. Priority determining means for determining whether or not a setting priority that is a threshold and a storage priority that is a threshold indicating whether or not to store in the nonvolatile storage element are lower than a predetermined priority of at least one of the two; The elapsed time determining means determines that the elapsed time is less than the predetermined time interval, or the elapsed time determining means determines that the elapsed time is greater than or equal to the predetermined time interval and is input by the priority determining means Unstored information storage means for temporarily storing the input operation history information in the volatile storage element when it is determined that the priority information of the received operation history information is lower than a predetermined priority; When an event input is detected by the means, it is checked whether or not the operation history information is temporarily stored in the volatile storage element. If the operation history information is temporarily stored, the temporary storage operation history information is stored in the nonvolatile storage element. The priority information of the operation history information input by the priority determination unit is determined to be predetermined by the first saved information storage unit stored in the storage unit and the elapsed time determination unit. When it is determined that the priority is higher than the priority, it is checked whether the operation history information is temporarily stored in the volatile memory element. If the operation history information is temporarily stored, the temporary operation history information is input. A second storage information storage means for storing the input operation history information in the nonvolatile storage element when the operation history information is stored in the nonvolatile storage element together with the operation history information and is not temporarily stored; It is characterized by that.

また、上記の目的を達成するため、第3の発明の動作履歴情報記憶装置は、所定処理の実行タイミングを示す情報であるイベントを発生するイベント発生手段と、優先度情報が付加された動作履歴情報を入力する動作履歴情報入力手段と、イベント及び前記動作履歴情報の入力を検出する検出手段と、動作履歴情報を記憶するための、所定回数の書き換えが可能な不揮発性記憶素子と、動作履歴情報を一時保存するための、前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子と、不揮発性記憶素子に前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新保存する時刻保存手段と、検出手段により前記動作履歴情報の入力が検出されたとき、入力された前記動作履歴情報の優先度情報が、前記不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、前記不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する優先度判定手段と、優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度より低いと判定されたときに、前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する経過時間判定手段と、経過時間判定手段により前記経過時間が前記所定の時間間隔未満であると判定されたときに、入力された前記動作履歴情報を前記揮発性記憶素子に一時保存する未保存情報記憶手段と、優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶するか、または前記経過時間判定手段により前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第2の保存情報記憶手段とを有することを特徴とする。   In order to achieve the above object, an operation history information storage device according to a third aspect of the present invention is an event generation means for generating an event which is information indicating execution timing of a predetermined process, and an operation history to which priority information is added. An operation history information input means for inputting information, a detection means for detecting an input of an event and the operation history information, a non-volatile memory element capable of rewriting a predetermined number of times for storing the operation history information, and an operation history A volatile storage element that can be rewritten more times than the predetermined number for temporarily storing information, and information indicating the time when the operation history information is stored in the nonvolatile storage element is updated and stored as storage time information. When the input of the operation history information is detected by the time storage unit and the detection unit, the priority information of the input operation history information is stored in the nonvolatile memory element. It is determined whether or not it is lower than a predetermined priority of at least one of a setting priority that is a threshold value to be stored in advance and a storage priority that is a threshold value indicating whether to store in the nonvolatile memory element And the operation history information from the time indicated by the stored time information when it is determined that the priority information of the operation history information input by the priority determination unit is lower than the predetermined priority. The elapsed time until the input time when the input is detected is calculated, and the elapsed time is determined by the elapsed time determination means for determining whether the elapsed time is less than a predetermined time interval set in advance. Is determined to be less than the predetermined time interval, the input operation history information is temporarily stored in the volatile storage element, the unsaved information storage means, and the priority judgment means When it is determined that the priority information of the input operation history information is equal to or higher than the predetermined priority, the input operation history information is stored in the nonvolatile memory element, or the elapsed time determination The elapsed time is determined by the means to be equal to or greater than the predetermined time interval, and the priority information of the operation history information input by the priority determination means is determined to be greater than or equal to the predetermined priority. When the operation history information is temporarily stored in the volatile storage element, and if temporarily stored, the temporary storage operation history information together with the input operation history information is non-volatile A second storage information storage means for storing the input operation history information in the nonvolatile storage element when stored in the storage element and not temporarily stored; To do.

また、上記の目的を達成するため、第4の発明の動作履歴情報記憶方法は、所定処理の実行タイミングを示す情報であるイベントまたは動作履歴情報の入力を検出する第1のステップと、第1のステップにより動作履歴情報の入力が検出されたときに、動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新記憶される所定回数の書き換えが可能な不揮発性記憶素子の記憶時刻情報が示す時刻から動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する第2のステップと、第2のステップにより経過時間が所定の時間間隔未満であると判定されたときに、入力された動作履歴情報を、所定回数よりも多い回数の書き換えが可能な揮発性記憶素子に一時保存する第3のステップと、第1のステップによりイベントの入力が検出されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を不揮発性記憶素子に記憶する第4のステップと、第2のステップにより経過時間が所定の時間間隔以上であると判定されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された動作履歴情報と共に不揮発性記憶素子に記憶し、一時保存されていないときは、入力された動作履歴情報を不揮発性記憶素子に記憶する第5のステップと、不揮発性記憶素子に記憶時刻情報を更新保存する第6のステップとを含むことを特徴とする。   In order to achieve the above object, an operation history information storage method according to a fourth aspect of the invention includes a first step of detecting an input of an event or operation history information that is information indicating execution timing of a predetermined process, Storage time information of a non-volatile storage element that can be rewritten a predetermined number of times, which is updated and stored as information indicating the time when the operation history information is stored when the input of operation history information is detected in the step A second step of calculating an elapsed time from an indicated time to an input time at which an input of operation history information is detected, and determining whether the elapsed time is less than a predetermined time interval set in advance; When the elapsed time is determined to be less than the predetermined time interval by the step, the volatile memory element that can rewrite the input operation history information more than the predetermined number of times When the event input is detected in the third step and the first step for temporarily saving, it is checked whether the operation history information is temporarily saved in the volatile memory element. The fourth step of storing the temporary storage operation history information in the nonvolatile storage element and the operation history stored in the volatile storage element when it is determined by the second step that the elapsed time is equal to or greater than the predetermined time interval. Check whether the information is temporarily saved, and if temporarily saved, store the temporarily saved operation history information together with the inputted operation history information in the nonvolatile storage element, and if not temporarily saved, And a fifth step of storing the input operation history information in the nonvolatile memory element, and a sixth step of updating and storing the storage time information in the nonvolatile memory element. To.

また、上記の目的を達成するため、第5の発明の動作履歴情報記憶方法は、所定処理の実行タイミングを示す情報であるイベントまたは優先度情報が付加された動作履歴情報の入力を検出する第1のステップと、第1のステップにより動作履歴情報の入力が検出されたときに、動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新記憶される所定回数の書き換えが可能な不揮発性記憶素子の記憶時刻情報が示す時刻から動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する第2のステップと、第2のステップにより経過時間が所定の時間間隔未満であると判定されたときに、入力された動作履歴情報を、所定回数よりも多い回数の書き換えが可能な揮発性記憶素子に一時保存する第3のステップと、第1のステップによりイベントの入力が検出されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を不揮発性記憶素子に記憶する第4のステップと、入力された動作履歴情報の優先度情報が、不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する第5のステップと、第2のステップにより経過時間が所定の時間間隔未満であると判定されたとき、または第2のステップにより経過時間が所定の時間間隔以上であると判定され、かつ、第5のステップにより入力された動作履歴情報の優先度情報が所定の優先度より低いと判定されたときに、入力された動作履歴情報を揮発性記憶素子に一時保存する第6のステップと、第2のステップにより経過時間が所定の時間間隔以上であると判定され、かつ、第5のステップにより入力された動作履歴情報の優先度情報が所定の優先度以上であると判定されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された動作履歴情報と共に不揮発性記憶素子に記憶し、一時保存されていないときは、入力された動作履歴情報を不揮発性記憶素子に記憶する第7のステップと、不揮発性記憶素子に記憶時刻情報を更新保存する第8のステップとを含むことを特徴とする。   In order to achieve the above object, an operation history information storage method according to a fifth aspect of the present invention detects the input of operation history information to which an event or priority information, which is information indicating the execution timing of a predetermined process, is added. Non-volatile that can be rewritten a predetermined number of times as information indicating the time at which the operation history information is stored as the storage time information when the input of the operation history information is detected in step 1 and the first step The elapsed time from the time indicated by the storage time information of the storage element to the input time when the input of the operation history information is detected is calculated, and it is determined whether the elapsed time is less than a predetermined time interval set in advance. When the elapsed time is determined to be less than the predetermined time interval by the step 2 and the second step, the input operation history information is rewritten more times than the predetermined number of times. A third step of temporarily storing data in a volatile memory element, and checking whether operation history information is temporarily stored in the volatile memory element when an input of an event is detected in the first step; When temporarily stored, the fourth step of storing the temporarily stored operation history information in the nonvolatile memory element and the priority information of the input operation history information are preferentially stored in the nonvolatile memory element. A fifth step of determining whether or not a setting priority that is a threshold value and a storage priority that is a threshold value indicating whether or not to store in a nonvolatile storage element is lower than a predetermined priority of at least one of the thresholds; The elapsed time is determined to be less than the predetermined time interval by the second step, or the elapsed time is determined to be greater than or equal to the predetermined time interval by the second step, and A sixth step of temporarily storing the input operation history information in the volatile storage element when it is determined that the priority information of the operation history information input in step 5 is lower than a predetermined priority; When the elapsed time is determined to be greater than or equal to the predetermined time interval in step 2 and the priority information of the operation history information input in the fifth step is determined to be greater than or equal to the predetermined priority, Check whether the operation history information is temporarily stored in the volatile memory element. If temporarily stored, the temporary storage operation history information is stored in the nonvolatile memory element together with the input operation history information. When not stored, the seventh step of storing the input operation history information in the nonvolatile memory element and the eighth step of updating and storing the storage time information in the nonvolatile memory element are included. It is characterized by that.

更に、上記の目的を達成するため、第6の発明の動作履歴情報記憶方法は、所定処理の実行タイミングを示す情報であるイベントまたは優先度情報が付加された動作履歴情報の入力を検出する第1のステップと、第1のステップにより動作履歴情報の入力が検出されたときに、入力された動作履歴情報の優先度情報が、所定回数の書き換えが可能な不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する第2のステップと、第2のステップにより入力された動作履歴情報の優先度情報が所定の優先度より低いと判定されたときに、動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新記憶される不揮発性記憶素子の記憶時刻情報が示す時刻から動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する第3のステップと、第3のステップにより経過時間が所定の時間間隔未満であると判定されたときに、入力された動作履歴情報を所定回数よりも多い回数の書き換えが可能な揮発性記憶素子に一時保存する第4のステップと、第2のステップにより入力された動作履歴情報の優先度情報が所定の優先度以上であると判定されたときに、入力された動作履歴情報を不揮発性記憶素子に記憶するか、または第3のステップにより経過時間が所定の時間間隔以上であると判定され、かつ、第2のステップにより入力された動作履歴情報の優先度情報が所定の優先度以上であると判定されたときに、揮発性記憶素子に動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された動作履歴情報と共に不揮発性記憶素子に記憶し、一時保存されていないときは、入力された動作履歴情報を不揮発性記憶素子に記憶する第5のステップと、不揮発性記憶素子に記憶時刻情報を更新保存する第6のステップとを含むことを特徴とする。   Furthermore, in order to achieve the above object, an operation history information storage method according to a sixth aspect of the invention detects the input of operation history information to which an event or priority information that is information indicating the execution timing of a predetermined process is added. When the input of the operation history information is detected by the first step and the first step, the priority information of the input operation history information is preferentially stored in a nonvolatile memory element that can be rewritten a predetermined number of times. A second step of determining whether or not the priority is lower than a predetermined priority of at least one of a setting priority that is a threshold to be stored and a storage priority that is a threshold indicating whether or not to store in the nonvolatile memory element When the priority information of the operation history information input in the second step is determined to be lower than a predetermined priority, information indicating the time when the operation history information is stored is stored time information. The elapsed time from the time indicated by the storage time information of the nonvolatile storage element updated and stored to the input time when the input of the operation history information is detected is calculated, and the elapsed time is less than a predetermined time interval set in advance. A third step for determining whether or not there is, and when it is determined by the third step that the elapsed time is less than a predetermined time interval, the input operation history information is rewritten more than a predetermined number of times Is input when it is determined that the priority information of the operation history information input by the fourth step and the second step is higher than a predetermined priority. The operation history information is stored in the non-volatile memory element, or the operation history information is input in the second step when the elapsed time is determined to be equal to or greater than the predetermined time interval in the third step. When it is determined that the priority information is equal to or higher than the predetermined priority level, it is checked whether the operation history information is temporarily stored in the volatile memory element. Information is stored in the nonvolatile memory element together with the input operation history information, and when the information is not temporarily stored, a fifth step of storing the input operation history information in the nonvolatile memory element; And a sixth step of updating and storing the stored time information.

本発明によれば、動作履歴情報を、揮発性記憶素子に一時記憶した後に不揮発性記憶素子に書き込むことで、不揮発性記憶素子への書き込み回数を抑制しつつ、揮発性記憶素子に一時記憶されている動作履歴情報の喪失可能性を減少させることができる。   According to the present invention, the operation history information is temporarily stored in the volatile storage element while being temporarily stored in the volatile storage element and then written in the nonvolatile storage element, thereby suppressing the number of times of writing to the nonvolatile storage element. The possibility of losing operation history information can be reduced.

本発明の動作履歴情報記憶装置の一実施の形態の全体構成を示すブロック図である。It is a block diagram which shows the whole structure of one Embodiment of the operation | movement history information storage device of this invention. 図1中のCPUの一実施の形態のブロック図である。It is a block diagram of one Embodiment of CPU in FIG. 図2中のイベント発生部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the event generation part in FIG. 本発明の動作履歴情報記憶装置の第1の実施の形態の動作説明用フローチャートである。It is a flowchart for operation | movement description of 1st Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第1の実施の形態の動作説明用タイミングチャートである。It is a timing chart for operation explanation of a 1st embodiment of an operation history information storage device of the present invention. 本発明の動作履歴情報記憶装置の第2の実施の形態の動作説明用フローチャートである。It is a flowchart for operation | movement description of 2nd Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第2の実施の形態の動作説明用タイミングチャートである。It is a timing chart for operation explanation of a 2nd embodiment of the operation history information storage device of the present invention. 本発明の動作履歴情報記憶装置の第3の実施の形態の動作説明用フローチャートである。It is a flowchart for operation | movement description of 3rd Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第3の実施の形態の動作説明用タイミングチャートである。It is a timing chart for operation explanation of a 3rd embodiment of the operation history information storage device of the present invention. 本発明の動作履歴情報記憶装置の第4の実施の形態の動作説明用フローチャートである。It is a flowchart for operation | movement description of 4th Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第4の実施の形態の動作説明用タイミングチャートである。It is a timing chart for operation explanation of a 4th embodiment of an operation history information storage device of the present invention. 本発明の動作履歴情報記憶装置の第5の実施の形態の動作説明用フローチャートである。It is a flowchart for operation | movement description of 5th Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第6の実施の形態の動作説明用フローチャートである。It is a flowchart for operation | movement description of 6th Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第2の実施の形態と第3の実施の形態の動作の相違を説明するタイミングチャートである。It is a timing chart explaining the difference of operation | movement of 2nd Embodiment and 3rd Embodiment of the operation | movement history information storage device of this invention. 本発明の動作履歴情報記憶装置の第2の実施の形態と第4の実施の形態の動作の相違を説明するタイミングチャートである。It is a timing chart explaining the difference of operation | movement of 2nd Embodiment and 4th Embodiment of the operation | movement history information storage device of this invention. 特許文献2記載の従来方法の動作の一例を説明するタイミングチャートである。10 is a timing chart for explaining an example of the operation of the conventional method described in Patent Document 2.

以下、本発明の実施の形態について図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明になる動作履歴情報記憶装置の一実施の形態の全体構成のブロック図を示す。本実施の形態の動作履歴情報記憶装置100は、中央処理装置(CPU)101と、不揮発性記憶素子の一例のフラッシュメモリ102と、揮発性記憶素子の一例のRAM等のメモリ103とが、互いに外部メモリバス110に接続された構成である。フラッシュメモリ102は、所定回数の書き換えが可能な不揮発性記憶素子であり、電源断後も永続的なデータ保存が可能である。一方、メモリ103は、少なくともフラッシュメモリ102の書き換え回数よりも多い回数の書き換えが可能で、実質上書き換え回数には制限がないが、電源断により保存データが消失する揮発性記憶素子である。   FIG. 1 is a block diagram showing the overall configuration of an embodiment of an operation history information storage device according to the present invention. The operation history information storage device 100 of this embodiment includes a central processing unit (CPU) 101, a flash memory 102 as an example of a nonvolatile storage element, and a memory 103 such as a RAM as an example of a volatile storage element. The configuration is connected to the external memory bus 110. The flash memory 102 is a nonvolatile memory element that can be rewritten a predetermined number of times, and can store permanent data even after the power is turned off. On the other hand, the memory 103 is a volatile memory element that can be rewritten more times than the number of rewrites of the flash memory 102 and has virtually no limit on the number of rewrites, but the stored data is lost when the power is turned off.

図2は、CPU101の一実施の形態のブロック図を示す。同図に示すように、CPU101は、ログ入力部201とイベント発生部202、優先度判定部203及び経過時間判定部204からなる2つの判定部と、ログ処理部200、未保存ログ処理部205及びログ記録処理部206からなる3つの処理部とから構成される。   FIG. 2 shows a block diagram of an embodiment of the CPU 101. As shown in the figure, the CPU 101 includes two determination units including a log input unit 201, an event generation unit 202, a priority determination unit 203, and an elapsed time determination unit 204, a log processing unit 200, and an unsaved log processing unit 205. And three processing units including a log recording processing unit 206.

ログ入力部201は、動作履歴情報記憶装置100と接続された装置(図示せず)からログ(動作履歴情報)を入力する。   The log input unit 201 inputs a log (operation history information) from a device (not shown) connected to the operation history information storage device 100.

イベント発生部202は、所定処理の実行タイミングを示す情報として定期的な同期イベントや非同期イベントを発生してログ処理部200へ出力する。   The event generation unit 202 generates a periodic synchronous event or asynchronous event as information indicating the execution timing of the predetermined process, and outputs it to the log processing unit 200.

ログ処理部200は、ログ入力部201からログが入力されたか否か、及びイベント発生部202からイベントが入力されたか否かを判定処理する。   The log processing unit 200 determines whether a log is input from the log input unit 201 and whether an event is input from the event generation unit 202.

図3は、イベント発生部202でイベントとして周期タイマーを使用したときの処理のフローチャートを示す。図3において、イベント発生部202は、タイマーに設定された時刻まで待機する(ステップS11)。タイマーに設定された時刻になると、イベント発生部202は、タイマーイベントを発生させる(ステップS12)。以下、イベント発生部202は、上記の動作を繰り返す。   FIG. 3 shows a flowchart of processing when the event generator 202 uses a periodic timer as an event. In FIG. 3, the event generating unit 202 waits until the time set in the timer (step S11). When the time set in the timer comes, the event generating unit 202 generates a timer event (step S12). Thereafter, the event generation unit 202 repeats the above operation.

再び図2に戻って説明する。優先度判定部203は、ログ処理部200からログを取得し、そのログに設定された優先度と予め設定された設定優先度とを比較し、ログに設定された優先度が設定優先度未満であるか否かを判定する。また、優先度判定部203は、ログ処理部200からログを取得し、そのログが予め設定された保存優先度未満であるか否かを判定する。更に、優先度判定部203は、未保存ログ領域から未保存ログを取得し、その未保存ログに設定された優先度と予め設定された設定優先度とを比較し、未保存ログに設定された優先度が設定優先度未満であるか否かを判定する。   Returning again to FIG. The priority determination unit 203 acquires a log from the log processing unit 200, compares the priority set in the log with a preset setting priority, and the priority set in the log is less than the setting priority. It is determined whether or not. Moreover, the priority determination part 203 acquires a log from the log process part 200, and determines whether the log is less than the preset storage priority. Furthermore, the priority determination unit 203 acquires an unsaved log from the unsaved log area, compares the priority set for the unsaved log with a preset setting priority, and sets the unsaved log. It is determined whether the priority is lower than the set priority.

なお、優先度は、装置の動作にとって影響が重要なログほど優先度が高く設定される。例えば、ログがハードウェアの異常を示すクリティカルエラーの場合は最も優先度が高く設定される。また、ログがアプリケーションソフトやシステム動作の異常を示す深刻な動作継続性が危ぶまれるエラーはクリティカルエラーの次の優先度に設定される。更に、ログがシステムが回復可能な異常を示すウォーニングの場合は、上記のエラーの次の優先度に設定される。ログが不具合修正のために用いるデバッグなどの場合は、開発の時しか使わないので最も低い優先度に設定される。また、保存優先度は、後述するようにログ記録領域に記録するか否かの閾値を示す。   It should be noted that the priority is set higher for a log whose influence on the operation of the apparatus is important. For example, when the log is a critical error indicating a hardware abnormality, the highest priority is set. In addition, an error that causes serious operation continuity in which the log indicates an abnormal operation of the application software or the system is set to the next priority of the critical error. Furthermore, in the case of a warning indicating that the log indicates an abnormality that can be recovered by the system, the log is set to the next priority after the above error. In the case of debugging that logs are used to fix bugs, it is used only during development, so it is set to the lowest priority. Further, the storage priority indicates a threshold value as to whether or not to record in the log recording area, as will be described later.

経過時間判定部204は、ログ記録処理部206から最後にログを記録したログ記録時刻を取得し、そのログ記録時刻から現在の時刻までの経過時間が所定のログ間隔より大きいかどうかを判定する。   The elapsed time determination unit 204 acquires the log recording time at which the log was last recorded from the log recording processing unit 206, and determines whether the elapsed time from the log recording time to the current time is greater than a predetermined log interval. .

未保存ログ処理部205は、メモリ103の記憶領域である未保存ログ領域に未保存ログが存在するかどうかを確認する。また、未保存ログ処理部205は、メモリ103の未保存ログ領域に未処理の未保存ログが存在するかどうかを確認し、未保存ログ領域に未保存ログが存在する場合は、その未保存ログのうち、優先度を確認していない未保存ログが存在するかを確認する。   The unsaved log processing unit 205 confirms whether an unsaved log exists in the unsaved log area that is a storage area of the memory 103. In addition, the unsaved log processing unit 205 checks whether there is an unprocessed unsaved log in the unsaved log area of the memory 103. If an unsaved log exists in the unsaved log area, the unsaved log area Check if there are unsaved logs whose priority has not been confirmed.

ログ記録処理部206は、未保存ログ処理部205により存在を確認された未保存ログを未保存ログ領域から取得し、フラッシュメモリ102の記録領域であるログ記録領域に保存する。また、ログ記録処理部206は、ログ処理部200からログを取得し、フラッシュメモリ102のログ記録領域に保存する。更に、ログ記録処理部206は、ログがログ記録領域に保存された最新の時刻である現在時刻をログ記録時刻として更新する。   The log recording processing unit 206 acquires the unsaved log confirmed to exist by the unsaved log processing unit 205 from the unsaved log area, and saves it in the log recording area that is the recording area of the flash memory 102. Further, the log recording processing unit 206 acquires a log from the log processing unit 200 and stores it in the log recording area of the flash memory 102. Furthermore, the log recording processing unit 206 updates the current time, which is the latest time when the log is stored in the log recording area, as the log recording time.

(第1の実施の形態)
次に、図1及び図2に示した構成の動作履歴情報記録装置の第1の実施の形態の動作について、図4のフローチャートと図5のタイミングチャートと共に説明する。
(First embodiment)
Next, the operation of the first embodiment of the operation history information recording apparatus having the configuration shown in FIGS. 1 and 2 will be described with reference to the flowchart of FIG. 4 and the timing chart of FIG.

図2に示したイベント発生部202は、図5(A)に示す時刻t1、t5、t9、t13、t17、t21、t25で図5(B)に模式的に示すように定期的なタイマーイベントe1、e2、e3、e4、e5、e6、e7を発生する。なお、タイマーイベント発生時間間隔(t5−t1)、(t9−t5)、(t13−t9)、(t17−t13)、(t21−t17)、(t25−t21)は同じ時間間隔である(以下、この時間間隔をログ間隔というものとする。)。このログ間隔は、書き換え回数に制限のあるフラッシュメモリ102の寿命を考慮して設定されている。一方、図2に示したログ処理部200は、ログ入力待ちまたはイベント待ちの監視状態にある(ステップS21)。   The event generation unit 202 shown in FIG. 2 performs a periodic timer event as schematically shown in FIG. 5B at times t1, t5, t9, t13, t17, t21, and t25 shown in FIG. e1, e2, e3, e4, e5, e6, e7 are generated. Note that the timer event occurrence time intervals (t5-t1), (t9-t5), (t13-t9), (t17-t13), (t21-t17), and (t25-t21) are the same time intervals (hereinafter referred to as “time intervals”). This time interval is called the log interval.) This log interval is set in consideration of the lifetime of the flash memory 102 with a limited number of rewrites. On the other hand, the log processing unit 200 shown in FIG. 2 is in a monitoring state waiting for log input or waiting for an event (step S21).

ログ処理部200は、時刻t1で図5(B)に示すタイマーイベントe1が入力されると、イベント受信を判断してその旨を未保存ログ処理部205及びログ記録処理部206に通知する。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS28)。このときには、未保存ログ領域には図5(D)に示すように未保存ログが存在しないので、未保存ログ処理部205は、未保存ログが存在しないとの判定結果を得る(ステップS28のN)。そして、再びステップS21の監視状態に戻る。   When the timer event e1 shown in FIG. 5B is input at time t1, the log processing unit 200 determines event reception and notifies the unsaved log processing unit 205 and the log recording processing unit 206 to that effect. Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S28). At this time, since there is no unsaved log in the unsaved log area as shown in FIG. 5D, the unsaved log processing unit 205 obtains a determination result that there is no unsaved log (step S28). N). And it returns to the monitoring state of step S21 again.

なお、ログ記録処理部206は、起動後最初に発生したタイマーイベントe1に対しては、その発生時刻に対応した時刻LT0を、図5(F)に示すようにログ記録時刻としてフラッシュメモリ102に記録する。   Note that, for the timer event e1 that occurs first after activation, the log recording processing unit 206 stores the time LT0 corresponding to the generation time in the flash memory 102 as the log recording time as shown in FIG. Record.

続いて、ログ処理部200は、時刻t2で図5(C)に模式的に示すように、ログ入力部201からログi1が入力されると、その旨を経過時間判定部204に通知する。これにより経過時間判定部204は、前回のログ記録時刻LT0からログi1の入力時刻t2までの経過時間を算出し、その経過時間が、一定のログ間隔未満であるかどうかを判定する(ステップS22)。この時点では、経過時間判定部204は、経過時間がログ間隔未満であると判定し(ステップS22のY)、その旨を未保存ログ処理部205に通知する。これにより、未保存ログ処理部205は、入力されたログi1を図5(D)に模式的に示すように、L1としてメモリ103の未保存ログ領域に保存する(ステップS23)。   Subsequently, when the log i1 is input from the log input unit 201 as schematically illustrated in FIG. 5C at time t2, the log processing unit 200 notifies the elapsed time determination unit 204 to that effect. Thereby, the elapsed time determination unit 204 calculates the elapsed time from the previous log recording time LT0 to the input time t2 of the log i1, and determines whether the elapsed time is less than a certain log interval (step S22). ). At this point, the elapsed time determination unit 204 determines that the elapsed time is less than the log interval (Y in step S22), and notifies the unsaved log processing unit 205 to that effect. As a result, the unsaved log processing unit 205 saves the input log i1 as L1 in the unsaved log area of the memory 103 as schematically shown in FIG. 5D (step S23).

続いて、図5(C)に示すように時刻t3で入力されるログi2、及び時刻t4で入力されるi3に対しては、ログi1入力時と同様の条件が成立するので、ログi1入力時と同様の処理が行われる。これにより、未保存ログ領域には、図5(D)に模式的に示すように、L2、L3が順次に保存される。   Subsequently, as shown in FIG. 5C, for log i2 input at time t3 and i3 input at time t4, the same conditions as when log i1 is input are satisfied. Processing similar to that at the time is performed. As a result, L2 and L3 are sequentially stored in the unsaved log area as schematically shown in FIG.

続いて、時刻t5で図5(B)に模式的に示すようにイベント発生部202でタイマーイベントe2が発生して、ログ処理部200に入力されると、ログ処理部200はステップS21でイベント受信を判断して、その旨を未保存ログ処理部205及びログ記録処理部206に通知する。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS28)。このときには、未保存ログ領域には図5(D)に示すように未保存ログL1、L2及びL3が存在するので、未保存ログの存在を確認する(ステップS28のY)。ログ記録処理部206は、未保存ログ処理部205の確認結果に基づき、未保存ログL1、L2及びL3をメモリ103から読み出してフラッシュメモリ102のログ記録領域に、図5(E)に模式的に示すようにSL1、SL2及びSL3として記録する(ステップS29)。続いて、ログ記録処理部206は、ログ記録時刻を図5(F)に示すようにLT1に更新する(ステップS27)。   Subsequently, when the timer event e2 occurs in the event generation unit 202 and is input to the log processing unit 200 as schematically illustrated in FIG. 5B at time t5, the log processing unit 200 causes the event in step S21. Judgment of reception is made, and the fact is notified to the unsaved log processing unit 205 and log recording processing unit 206. Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S28). At this time, since there are unsaved logs L1, L2, and L3 in the unsaved log area as shown in FIG. 5D, the existence of unsaved logs is confirmed (Y in step S28). Based on the confirmation result of the unsaved log processing unit 205, the log recording processing unit 206 reads out the unsaved logs L1, L2, and L3 from the memory 103 and stores them in the log recording area of the flash memory 102 as schematically shown in FIG. Are recorded as SL1, SL2, and SL3 (step S29). Subsequently, the log recording processing unit 206 updates the log recording time to LT1 as shown in FIG. 5F (step S27).

続いて、時刻t9で図5(B)に模式的に示すようにイベント発生部202でタイマーイベントe3が発生して、ログ処理部200に入力されると、ログ処理部200はステップS21でイベント受信を判断して、その旨を未保存ログ処理部205及びログ記録処理部206に通知する。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS28)。このときには、未保存ログ領域には図5(D)に示すように未保存ログが存在しないので、ログ処理部200はこの判定結果に基づき(ステップS28のN)、再びステップS21の監視状態に戻る。   Subsequently, when the timer event e3 occurs in the event generation unit 202 and is input to the log processing unit 200 as schematically shown in FIG. 5B at time t9, the log processing unit 200 displays the event in step S21. Judgment of reception is made, and the fact is notified to the unsaved log processing unit 205 and the log recording processing unit 206. Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S28). At this time, as shown in FIG. 5D, there is no unsaved log in the unsaved log area, so that the log processing unit 200 returns to the monitoring state of step S21 again based on this determination result (N in step S28). Return.

その後、時刻t9で図5(B)に模式的に示すように入力されるタイマーイベントe3に対しては、ステップS21、S28のNの各処理が行われ、何の記録も行われず、ログ処理部200は、再びステップS21の監視状態に戻る。   After that, for the timer event e3 input as shown schematically in FIG. 5B at time t9, each processing of N in steps S21 and S28 is performed, no recording is performed, and log processing is performed. The unit 200 returns to the monitoring state in step S21 again.

続いて、ログ処理部200は、時刻t10で図5(C)に模式的に示すように、ログ入力部201からログi4が入力されると、その旨を経過時間判定部204に通知する。これにより経過時間判定部204は、前回のログ記録時刻LT1からログi4の入力時刻t10までの経過時間et1を算出し、その経過時間et1が、一定のログ間隔未満であるかどうかを判定する(ステップS22)。経過時間判定部204は、経過時間et1がログ間隔以上であると判定し(ステップS22のN)、その旨を未保存ログ処理部205に通知する。   Subsequently, when the log i4 is input from the log input unit 201 as schematically illustrated in FIG. 5C at time t10, the log processing unit 200 notifies the elapsed time determination unit 204 to that effect. Thereby, the elapsed time determination unit 204 calculates the elapsed time et1 from the previous log recording time LT1 to the input time t10 of the log i4, and determines whether the elapsed time et1 is less than a certain log interval ( Step S22). The elapsed time determination unit 204 determines that the elapsed time et1 is greater than or equal to the log interval (N in step S22), and notifies the unsaved log processing unit 205 to that effect.

これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS24)。このときには、未保存ログ領域には図5(D)に示すように未保存ログが存在しないという確認結果が得られる(ステップS24のN)。ログ記録処理部206は、上記の確認結果に基づいて、入力されたログi4をフラッシュメモリ102のログ記録領域に、図5(E)に模式的に示すようにSL4として記録する(ステップS26)。続いて、ログ記録処理部206は、ログ記録時刻を図5(F)に示すようにLT2に更新する(ステップS27)。   Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S24). At this time, a confirmation result that there is no unsaved log is obtained as shown in FIG. 5D in the unsaved log area (N in step S24). Based on the confirmation result, the log recording processing unit 206 records the input log i4 in the log recording area of the flash memory 102 as SL4 as schematically shown in FIG. 5E (step S26). . Subsequently, the log recording processing unit 206 updates the log recording time to LT2 as shown in FIG. 5F (step S27).

次に、図5(C)に模式的に示すように時刻t11で入力されるログi5、及び時刻t12で入力されるログi6に対しては、ログi1入力時と同様の条件が成立するので、ログi1入力時と同様の処理が行われる。これにより、未保存ログ領域には、図5(D)に模式的に示すように、L4、L5が順次に保存される。   Next, as schematically shown in FIG. 5C, the same condition as when log i1 is input is satisfied for log i5 input at time t11 and log i6 input at time t12. , The same processing as when the log i1 is input is performed. As a result, L4 and L5 are sequentially stored in the unsaved log area as schematically shown in FIG.

次の時刻t13で図5(B)に模式的に示すように入力されるタイマーイベントe4に対しては、タイマーイベントe2入力時と同様の条件が成立するので、タイマーイベントe2入力時と同様の処理が行われる。これにより、ログ記録処理部206は、未保存ログL4、L5を、図5(E)に模式的に示すようにログSL5、SL6としてログ記録領域に記録すると共に、ログ記録時刻を図5(F)に模式的に示すようにLT3に更新する。   As for the timer event e4 input as shown schematically in FIG. 5B at the next time t13, the same conditions as when the timer event e2 is input are satisfied. Processing is performed. As a result, the log recording processing unit 206 records the unsaved logs L4 and L5 in the log recording area as logs SL5 and SL6 as schematically shown in FIG. Update to LT3 as shown schematically in F).

その後、時刻t17で発生したタイマーイベントe5、時刻t21で発生したタイマーイベントe6に対しては、タイマーイベントe3入力時と同様の条件が成立するので、タイマーイベントe3入力時と同様の処理が行われる。また、時刻t19で入力されるログi7に対しては、ログi4入力時と同様の条件が成立するので、ログi4入力時と同様の処理が行われる。これにより、ログi4は未保存領域に記録されることなく、図5(E)に模式的に示すように直接にログ記録領域にSL7として記録される。また、このときのログ記録時刻が図5(F)に示すようにLT4に更新される。   Thereafter, for the timer event e5 that occurs at time t17 and the timer event e6 that occurs at time t21, the same conditions as when the timer event e3 is input are satisfied, so the same processing as when the timer event e3 is input is performed. . Further, for the log i7 input at time t19, the same conditions as when the log i4 is input are satisfied, so the same processing as when the log i4 is input is performed. As a result, the log i4 is not recorded in the unsaved area, but is directly recorded as SL7 in the log recording area as schematically shown in FIG. Further, the log recording time at this time is updated to LT4 as shown in FIG.

図5(C)に模式的に示すように時刻t22で入力されるログi8に対しては、ログi1入力時と同様の条件が成立するので、ログi1入力時と同様の処理が行われる。これにより、未保存ログ領域には、図5(D)に模式的に示すように、L6が保存される。   As schematically shown in FIG. 5C, for the log i8 input at time t22, the same conditions as when the log i1 is input are satisfied, and therefore, the same processing as when the log i1 is input is performed. As a result, L6 is saved in the unsaved log area, as schematically shown in FIG.

続いて、ログ処理部200は、時刻t24で図5(C)に模式的に示すように、ログ入力部201からログi9が入力されると、その旨を経過時間判定部204に通知する。これにより経過時間判定部204は、前回のログ記録時刻LT4からログi9の入力時刻t24までの経過時間et3を算出し、その経過時間et3が、一定のログ間隔未満であるかどうかを判定する(ステップS22)。経過時間判定部204は、経過時間et1がログ間隔未満であると判定し(ステップS22のY)、その旨を未保存ログ処理部205に通知する。   Subsequently, when the log i9 is input from the log input unit 201 as schematically illustrated in FIG. 5C at time t24, the log processing unit 200 notifies the elapsed time determination unit 204 to that effect. Thereby, the elapsed time determination unit 204 calculates the elapsed time et3 from the previous log recording time LT4 to the input time t24 of the log i9, and determines whether the elapsed time et3 is less than a certain log interval ( Step S22). The elapsed time determination unit 204 determines that the elapsed time et1 is less than the log interval (Y in step S22), and notifies the unsaved log processing unit 205 to that effect.

これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS24)。このときには、未保存ログ領域には図5(D)に示すように未保存ログL6が存在するという確認結果が得られる(ステップS24のY)。ログ記録処理部206は、上記の確認結果に基づいて、未保存ログL6をメモリ103から読み出してフラッシュメモリ102のログ記録領域に、図5(E)に模式的に示すようにSL8として記録する(ステップS25)。続いて、ログ記録処理部206は、入力されたログi9をフラッシュメモリ102のログ記録領域に、図5(E)に模式的に示すようにSL9として記録する(ステップS26)。更に、ログ記録処理部206は、ログ記録時刻を図5(F)に示すようにこのときのログ記録時刻LT5に更新する(ステップS27)。   Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S24). At this time, a confirmation result is obtained that an unsaved log L6 exists in the unsaved log area as shown in FIG. 5D (Y in step S24). Based on the confirmation result, the log recording processing unit 206 reads the unsaved log L6 from the memory 103 and records it in the log recording area of the flash memory 102 as SL8 as schematically shown in FIG. (Step S25). Subsequently, the log recording processing unit 206 records the input log i9 in the log recording area of the flash memory 102 as SL9 as schematically shown in FIG. 5E (step S26). Further, the log recording processing unit 206 updates the log recording time to the log recording time LT5 at this time as shown in FIG. 5F (step S27).

これにより、本実施の形態によれば、例えば、図5(A)に示す時刻t25で障害が発生しても、障害発生直前の時刻t24の時点でログ入力i8、i9はログ記録領域にSL8、SL9として保存されているため、ログが失われることはない。   Thus, according to the present embodiment, for example, even if a failure occurs at time t25 shown in FIG. 5A, log inputs i8 and i9 are stored in the log recording area at time t24 immediately before the failure. , The log is not lost because it is stored as SL9.

このように、本実施の形態によれば、フラッシュメモリ102のログ記録領域への記録間隔は必ずログ間隔以上となるため、ログ間隔で想定されるログ記録領域の書換え回数に影響を与えることなく、またログ入力時に直前のログ記録領域の記録時刻からそのログ入力時刻までの経過時間がログ間隔以上あいているときには、未保存ログ領域ではなく、ログ記録領域に入力ログを直接に記録するようにしたため、従来に比べてログがメモリ103の未保存領域に保存されている期間を短縮することができ、それにより障害によってログが喪失する割合を従来よりも低減することができる。   As described above, according to the present embodiment, since the recording interval to the log recording area of the flash memory 102 is always equal to or greater than the log interval, the number of times of rewriting the log recording area assumed in the log interval is not affected. If the elapsed time from the recording time of the previous log recording area to the log input time is more than the log interval at the time of log input, the input log is recorded directly in the log recording area instead of the unsaved log area. Therefore, it is possible to shorten the period during which the log is stored in the unsaved area of the memory 103 as compared with the conventional case, and thereby reduce the rate of loss of the log due to a failure.

(第2の実施の形態)
次に、図1及び図2に示した構成の動作履歴情報記録装置の第2の実施の形態の動作について、図6のフローチャートと図7のタイミングチャートと共に説明する。
(Second Embodiment)
Next, the operation of the second embodiment of the operation history information recording apparatus having the configuration shown in FIGS. 1 and 2 will be described with reference to the flowchart of FIG. 6 and the timing chart of FIG.

図2に示したイベント発生部202は、図7(A)に示す一定の時間間隔(ログ間隔)の時刻t1、t5、t9、t13、t17で図7(B)に模式的に示すように定期的なタイマーイベントe1、e2、e3、e4、e5を発生する。一方、図2に示したログ処理部200は、ログ入力待ちまたはイベント待ちの監視状態にある(ステップS31)。   The event generation unit 202 shown in FIG. 2 is schematically shown in FIG. 7B at times t1, t5, t9, t13, and t17 at a constant time interval (log interval) shown in FIG. Periodic timer events e1, e2, e3, e4, e5 are generated. On the other hand, the log processing unit 200 shown in FIG. 2 is in a monitoring state waiting for log input or waiting for an event (step S31).

ログ処理部200は、時刻t1で図7(B)に示すタイマーイベントe1が入力されると、イベント受信を判断してその旨を未保存ログ処理部205及びログ記録処理部206に通知する。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS40)。このときには、未保存ログ領域には図7(D)に示すように未保存ログが存在しないので、未保存ログ処理部205は、未保存ログが存在しないとの判定結果を得る(ステップS40のN)。そして、ステップS31の監視状態に戻る。   When the timer event e1 shown in FIG. 7B is input at time t1, the log processing unit 200 determines event reception and notifies the unsaved log processing unit 205 and log recording processing unit 206 to that effect. Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S40). At this time, since there is no unsaved log in the unsaved log area as shown in FIG. 7D, the unsaved log processing unit 205 obtains a determination result that there is no unsaved log (in step S40). N). And it returns to the monitoring state of step S31.

なお、ログ記録処理部206は、起動後最初に発生したタイマーイベントe1に対しては、その発生時刻に対応した時刻LT0を、図7(F)に示すようにログ記録時刻としてフラッシュメモリ102に記録する。時刻t5でタイマーイベントe2が入力された時も、タイマーイベントe1の入力時と同様の動作が行われる(ただし、ログ記録時刻の更新は行われない。)。   Note that, for the timer event e1 that occurs first after activation, the log recording processing unit 206 stores the time LT0 corresponding to the generation time in the flash memory 102 as the log recording time as shown in FIG. Record. When the timer event e2 is input at time t5, the same operation as when the timer event e1 is input is performed (however, the log recording time is not updated).

続いて、ログ処理部200は、時刻t6で図7(C)に模式的に示すように、ログ入力部201からログi1p7が入力されると、その旨を経過時間判定部204に通知する。ここで、「i1p7」は、優先度が「7」のログであることを示し、文字pの後の数値が大きいほど優先度が小さいことを示している。従って、後述するように優先度が設定優先度未満であるということは、その優先度の値が設定優先度の値よりも大きな値であり、優先度としては設定優先度よりも低いことを意味する。本実施の形態では、設定優先度を「5」として説明する。なお、優先度は数値の大小だけでなく、複数の識別子による判定も可能である。   Subsequently, when the log i1p7 is input from the log input unit 201 as schematically illustrated in FIG. 7C at time t6, the log processing unit 200 notifies the elapsed time determination unit 204 to that effect. Here, “i1p7” indicates that the log has a priority of “7”, and the larger the numerical value after the letter p, the lower the priority. Therefore, as described later, the fact that the priority is lower than the setting priority means that the priority value is larger than the setting priority value, and the priority is lower than the setting priority. To do. In the present embodiment, the setting priority is described as “5”. The priority can be determined not only by the numerical value but also by a plurality of identifiers.

経過時間判定部204は、前回のログ記録時刻LT0からログi1p7の入力時刻t6までの経過時間et1を算出し、その経過時間et1が、一定のログ間隔未満であるかどうかを判定する(ステップS32)。この時点では、経過時間判定部204は、経過時間がログ間隔以上であると判定し(ステップS32のN)、その旨を優先度判定部203に通知する。これにより、優先度判定部203は、入力されたログの優先度が設定優先度未満であるかどうかを判定する(ステップS34)。ここでは、優先度判定部203は、入力されたログi1p7の優先度は設定優先度未満であるとの判定結果を得る(ステップS34のY)。   The elapsed time determination unit 204 calculates an elapsed time et1 from the previous log recording time LT0 to the input time t6 of the log i1p7, and determines whether the elapsed time et1 is less than a certain log interval (step S32). ). At this time, the elapsed time determination unit 204 determines that the elapsed time is equal to or greater than the log interval (N in step S32), and notifies the priority determination unit 203 accordingly. Thereby, the priority determination part 203 determines whether the priority of the input log is less than a setting priority (step S34). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i1p7 is less than the set priority (Y in step S34).

未保存ログ処理部205は、上記の優先度判定部203の判定結果に基づき、入力されたログi1p7を図7(D)に模式的に示すように、L1P7としてメモリ103の未保存ログ領域に保存する(ステップS35)。   Based on the determination result of the priority determination unit 203, the unsaved log processing unit 205 stores the input log i1p7 as L1P7 in the unsaved log area of the memory 103 as schematically shown in FIG. Save (step S35).

続いて、図7(C)に示すように時刻t9で入力されるタイマーイベントe3に基づき、ログ処理部200がイベント受信と判断する(ステップS31)。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS40)。このときには、未保存ログ領域には図7(D)に示すように未保存ログL1P7が存在するとの確認結果が得られる。   Subsequently, as shown in FIG. 7C, based on the timer event e3 input at time t9, the log processing unit 200 determines that the event has been received (step S31). Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S40). At this time, a confirmation result that the unsaved log L1P7 exists in the unsaved log area as shown in FIG. 7D is obtained.

ログ記録処理部206は、上記の確認結果に基づいて、入力されたログL1P7をフラッシュメモリ102のログ記録領域に、図7(E)に模式的に示すようにSL1として記録する(ステップS41)。続いて、ログ記録処理部206は、ログ記録時刻を図7(F)に示すようにLT1に更新する(ステップS39)。   Based on the confirmation result, the log recording processing unit 206 records the input log L1P7 in the log recording area of the flash memory 102 as SL1 as schematically shown in FIG. 7E (step S41). . Subsequently, the log recording processing unit 206 updates the log recording time to LT1 as shown in FIG. 7F (step S39).

次に、図5(C)に模式的に示すように時刻t13で入力されるタイマーイベントe4、同図(C)に模式的に示すように時刻t14で入力されるログi2p6に対しては、上記のタイマーイベントe2、ログi1p7の入力時と同様の処理が行われる。これにより、未保存ログ処理部205は、入力されたログi2p6を図7(D)に模式的に示すように、L2p6としてメモリ103の未保存ログ領域に保存する(ステップS35)。   Next, for the timer event e4 input at time t13 as schematically shown in FIG. 5C and the log i2p6 input at time t14 as schematically shown in FIG. 5C, Processing similar to that at the time of inputting the timer event e2 and the log i1p7 is performed. As a result, the unsaved log processing unit 205 saves the input log i2p6 as L2p6 in the unsaved log area of the memory 103 as schematically shown in FIG. 7D (step S35).

次に、図7(C)に模式的に示すように時刻t16でログi3p3が入力されると、経過時間判定部204は、前回のログ記録時刻LT1からログi3p3の入力時刻t16までの経過時間et3を算出し、その経過時間et3が、一定のログ間隔未満であるかどうかを判定する(ステップS32)。この時点では、経過時間判定部204は、経過時間がログ間隔以上であると判定し(ステップS32のN)、その旨を優先度判定部203に通知する。これにより、優先度判定部203は、入力されたログの優先度が設定優先度未満であるかどうかを判定する(ステップS34)。ここでは、優先度判定部203は、入力されたログi3p3の優先度は設定優先度以上であるとの判定結果を得る(ステップS34のN)。   Next, when the log i3p3 is input at time t16 as schematically illustrated in FIG. 7C, the elapsed time determination unit 204 causes the elapsed time from the previous log recording time LT1 to the input time t16 of the log i3p3. et3 is calculated, and it is determined whether or not the elapsed time et3 is less than a certain log interval (step S32). At this time, the elapsed time determination unit 204 determines that the elapsed time is equal to or greater than the log interval (N in step S32), and notifies the priority determination unit 203 accordingly. Thereby, the priority determination part 203 determines whether the priority of the input log is less than a setting priority (step S34). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i3p3 is equal to or higher than the set priority (N in step S34).

未保存ログ処理部205は、上記の優先度判定部203の判定結果に基づき、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS36)。このときには、未保存ログ領域には図7(D)に示すように未保存ログL2P6が存在するとの確認結果が得られる。ログ記録処理部206は、上記の確認結果に基づいて、メモリ103に保存されている未保存ログL2P6を読み出して、フラッシュメモリ102のログ記録領域に、図7(E)に模式的に示すようにSL2として記録する(ステップS37)。続いて、ログ記録処理部206は、入力されたログi3p3をフラッシュメモリ102のログ記録領域に、図7(E)に模式的に示すようにSL3として記録する(ステップS38)。更に、ログ記録処理部206は、ログ記録時刻を図7(F)に示すようにこのときのログ記録時刻LT2に更新する(ステップS39)。   The unsaved log processing unit 205 checks whether there is an unsaved log in the unsaved log area of the memory 103 based on the determination result of the priority determination unit 203 (step S36). At this time, a confirmation result that the unsaved log L2P6 exists in the unsaved log area as shown in FIG. 7D is obtained. Based on the confirmation result, the log recording processing unit 206 reads the unsaved log L2P6 stored in the memory 103 and stores it in the log recording area of the flash memory 102 as schematically shown in FIG. Is recorded as SL2 (step S37). Subsequently, the log recording processing unit 206 records the input log i3p3 as SL3 in the log recording area of the flash memory 102 as schematically shown in FIG. 7E (step S38). Further, the log recording processing unit 206 updates the log recording time to the log recording time LT2 at this time as shown in FIG. 7F (step S39).

これにより、本実施の形態によれば、例えば、図7(A)に示す時刻t17で障害が発生しても、障害発生直前の時刻t16の時点でログ入力i2p6、i3p3はログ記録領域にSL2、SL3として保存されているため、ログが失われることはない。   Thus, according to the present embodiment, for example, even if a failure occurs at time t17 shown in FIG. 7A, the log inputs i2p6 and i3p3 are stored in the log recording area at time t16 immediately before the failure. , The log is not lost because it is stored as SL3.

このように、本実施の形態によれば、書き換え回数に制限のあるフラッシュメモリ102の寿命を考慮して設定されたログ間隔に影響を与えることなく一時保存されているログの喪失可能性を減少させる効果と、重要度に応じて優先度付けされたログのうち設定優先度以上のログの喪失可能性を減少させる効果を得ることができる。   As described above, according to the present embodiment, the possibility of losing a temporarily stored log is reduced without affecting the log interval set in consideration of the lifetime of the flash memory 102 with a limited number of rewrites. And an effect of reducing the possibility of losing logs that are higher than the set priority among the logs that are prioritized according to the importance.

また、本実施の形態によれば、上記経過時間がログ間隔以上あいているときの入力ログのうち、優先度が設定優先度以上の高い優先度である入力ログのみログ記録領域に直接に記録するようにしたため、第1の実施の形態に比べてログ記録領域の書換え回数を少なくすることができる。   Further, according to the present embodiment, among the input logs when the elapsed time is equal to or longer than the log interval, only the input logs whose priority is higher than the set priority are directly recorded in the log recording area. As a result, the number of times of rewriting the log recording area can be reduced as compared with the first embodiment.

(第3の実施の形態)
次に、図1及び図2に示した構成の動作履歴情報記録装置の第3の実施の形態の動作について、図8のフローチャートと図9のタイミングチャートと共に説明する。本実施の形態は、第2の実施の形態がログ入力時にまず経過時間を確認した後、経過時間がログ間隔以上の入力ログの優先度を確認するようにしていたのに対し、ログ入力時にまず入力されたログの優先度を確認した後、設定優先度未満の入力ログの経過時間を確認する点で異なる。本実施の形態では、設定優先度を「5」として説明する。なお、優先度は数値の大小だけでなく、複数の識別子による判定も可能である。
(Third embodiment)
Next, the operation of the third embodiment of the operation history information recording apparatus having the configuration shown in FIGS. 1 and 2 will be described with reference to the flowchart of FIG. 8 and the timing chart of FIG. In this embodiment, the second embodiment first checks the elapsed time at the time of log input, and then checks the priority of the input log whose elapsed time is equal to or greater than the log interval. First, the priority of the input log is confirmed, and then the elapsed time of the input log less than the set priority is confirmed. In the present embodiment, the setting priority is described as “5”. The priority can be determined not only by the numerical value but also by a plurality of identifiers.

図2に示したイベント発生部202は、図9(A)に示す一定の時間間隔(ログ間隔)の時刻t1、t5、t9、t13、t17で図9(B)に模式的に示すように定期的なタイマーイベントe1、e2、e3、e4、e5を発生する。一方、図2に示したログ処理部200は、ログ入力待ちまたはイベント待ちの監視状態にある(ステップS51)。   The event generation unit 202 shown in FIG. 2 is schematically shown in FIG. 9B at times t1, t5, t9, t13, and t17 at a constant time interval (log interval) shown in FIG. Periodic timer events e1, e2, e3, e4, e5 are generated. On the other hand, the log processing unit 200 shown in FIG. 2 is in a monitoring state waiting for log input or waiting for an event (step S51).

ログ処理部200は、時刻t1で図9(B)に示すタイマーイベントe1が入力されると、イベント受信を判断してその旨を未保存ログ処理部205及びログ記録処理部206に通知する。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS59)。このときには、未保存ログ領域には図9(D)に示すように未保存ログが存在しないので、未保存ログ処理部205は、未保存ログが存在しないとの判定結果を得る(ステップS59のN)。そして、再びステップS51の監視状態に戻る。   When the timer event e1 shown in FIG. 9B is input at time t1, the log processing unit 200 determines event reception and notifies the unsaved log processing unit 205 and the log recording processing unit 206 to that effect. Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S59). At this time, since there is no unsaved log in the unsaved log area as shown in FIG. 9D, the unsaved log processing unit 205 obtains a determination result that there is no unsaved log (in step S59). N). And it returns to the monitoring state of step S51 again.

なお、ログ記録処理部206は、起動後最初に発生したタイマーイベントe1に対しては、その発生時刻に対応した時刻LT0を、図9(F)に示すようにログ記録時刻としてフラッシュメモリ102に記録する。時刻t5でタイマーイベントe2が入力された時も、タイマーイベントe1の入力時と同様の動作が行われる(ただし、ログ記録時刻の更新は行われない。)。   Note that, for the timer event e1 that occurs first after activation, the log recording processing unit 206 stores the time LT0 corresponding to the occurrence time in the flash memory 102 as the log recording time as shown in FIG. 9F. Record. When the timer event e2 is input at time t5, the same operation as when the timer event e1 is input is performed (however, the log recording time is not updated).

続いて、ログ処理部200は、時刻t8で図9(C)に模式的に示すように、ログ入力部201からログi1p7が入力されると、その旨を優先度判定部203に通知する。優先度判定部203は、入力されたログの優先度が設定優先度未満であるかどうかを判定する(ステップS52)。ここでは、優先度判定部203は、入力されたログi1p7の優先度は設定優先度未満であるとの判定結果を得る(ステップS52のY)。   Subsequently, when the log i1p7 is input from the log input unit 201 as schematically illustrated in FIG. 9C at time t8, the log processing unit 200 notifies the priority determination unit 203 to that effect. The priority determination unit 203 determines whether or not the priority of the input log is less than the set priority (step S52). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i1p7 is less than the set priority (Y in step S52).

経過時間判定部204は、優先度判定部203の上記の判定結果があると、前回のログ記録時刻LT0からログi1p7の入力時刻t8までの経過時間et1を算出し、その経過時間et1が、一定のログ間隔未満であるかどうかを判定する(ステップS53)。この時点では、経過時間判定部204は、経過時間がログ間隔以上であると判定する(ステップS53のN)。   The elapsed time determination unit 204 calculates the elapsed time et1 from the previous log recording time LT0 to the input time t8 of the log i1p7 when the determination result of the priority determination unit 203 is present, and the elapsed time et1 is constant. It is determined whether it is less than the log interval (step S53). At this time, the elapsed time determination unit 204 determines that the elapsed time is equal to or greater than the log interval (N in step S53).

未保存ログ処理部205は、上記の経過時間判定部204の判定結果があると、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS55)。このときには、未保存ログ領域には図9(D)に示すように未保存ログが存在しないとの判定結果が得られる(ステップS55のN)。ログ記録処理部206はこの判定結果に基づき、入力されたログi1p7を図9(E)に模式的に示すように、SL1としてログ記録領域に記録する(ステップS57)。続いて、ログ記録処理部206は、ログ記録時刻を図9(F)に示すようにこのときのログ記録時刻LT1に更新する(ステップS58)。   If there is a determination result of the elapsed time determination unit 204 described above, the unsaved log processing unit 205 checks whether there is an unsaved log in the unsaved log area of the memory 103 (step S55). At this time, a determination result that there is no unsaved log is obtained in the unsaved log area as shown in FIG. 9D (N in step S55). Based on the determination result, the log recording processing unit 206 records the input log i1p7 as SL1 in the log recording area as schematically shown in FIG. 9E (step S57). Subsequently, the log recording processing unit 206 updates the log recording time to the log recording time LT1 at this time as shown in FIG. 9F (step S58).

その後の時刻t9で図9(B)に示すようにタイマーイベントe3が入力され、タイマーイベントe2の入力時と同様の動作が行われる。続いて、ログ処理部200は、時刻t10で図9(C)に模式的に示すように、ログ入力部201からのログi2p6の入力を検出する(ステップS51)。優先度判定部203は、ログ処理部200に入力されたログi2p6の優先度が設定優先度未満であるかどうかを判定する(ステップS52)。ここでは、優先度判定部203は、入力されたログi2p6の優先度は設定優先度未満であるとの判定結果を得る(ステップS52のY)。   Thereafter, at time t9, a timer event e3 is input as shown in FIG. 9B, and the same operation as when the timer event e2 is input is performed. Subsequently, the log processing unit 200 detects the input of the log i2p6 from the log input unit 201 as schematically illustrated in FIG. 9C at time t10 (step S51). The priority determination unit 203 determines whether the priority of the log i2p6 input to the log processing unit 200 is less than the set priority (step S52). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i2p6 is less than the set priority (Y in step S52).

経過時間判定部204は、優先度判定部203の上記の判定結果があると、前回のログ記録時刻LT1からログi2p6の入力時刻t10までの経過時間et2を算出し、その経過時間et2が、一定のログ間隔未満であるかどうかを判定する(ステップS53)。この時点では、経過時間判定部204は、経過時間がログ間隔未満であると判定する(ステップS53のY)。この判定結果に基づき、未保存ログ処理部205は入力されたログi2p6を図9(D)に模式的に示すように、L2P6として未保存ログ領域に記録する(ステップS54)。   The elapsed time determination unit 204 calculates the elapsed time et2 from the previous log recording time LT1 to the input time t10 of the log i2p6 when the determination result of the priority determination unit 203 is present, and the elapsed time et2 is constant. It is determined whether it is less than the log interval (step S53). At this time, the elapsed time determination unit 204 determines that the elapsed time is less than the log interval (Y in step S53). Based on the determination result, the unsaved log processing unit 205 records the input log i2p6 as L2P6 in the unsaved log area as schematically shown in FIG. 9D (step S54).

続いて、ログ処理部200は、時刻t11で図9(C)に模式的に示すように、ログ入力部201からのログi3p3の入力を検出する(ステップS51)。優先度判定部203は、ログ処理部200に入力されたログi3p3の優先度が設定優先度未満であるかどうかを判定する(ステップS52)。ここでは、優先度判定部203は、入力されたログi3p3の優先度は設定優先度以上であるとの判定結果を得る(ステップS52のN)。   Subsequently, the log processing unit 200 detects the input of the log i3p3 from the log input unit 201 as schematically illustrated in FIG. 9C at time t11 (step S51). The priority determination unit 203 determines whether the priority of the log i3p3 input to the log processing unit 200 is less than the set priority (step S52). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i3p3 is equal to or higher than the set priority (N in step S52).

この場合は、経過時間判定部204の経過時間の判定結果を確認することなく、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS55)。このときには、未保存ログ領域には図9(D)に示すように未保存ログL2P6が存在するとの判定結果が得られる(ステップS55のY)。ログ記録処理部206はこの判定結果に基づき、未保存ログL2P6をメモリ103の未保存領域から読み出して、図9(E)に模式的に示すようにフラッシュメモリ102のSL2としてログ記録領域に記録する(ステップS56)。   In this case, the unsaved log processing unit 205 checks whether there is an unsaved log in the unsaved log area of the memory 103 without checking the elapsed time judgment result of the elapsed time judgment unit 204 (step S55). At this time, a determination result that the unsaved log L2P6 exists in the unsaved log area is obtained as shown in FIG. 9D (Y in step S55). Based on this determination result, the log recording processing unit 206 reads the unsaved log L2P6 from the unsaved area of the memory 103 and records it in the log recording area as SL2 of the flash memory 102 as schematically shown in FIG. (Step S56).

続いて、ログ記録処理部は、入力されたログi3p3を図9(E)に模式的に示すように、SL3としてログ記録領域に記録する(ステップS57)。続いて、ログ記録処理部206は、ログ記録時刻を図9(F)に示すようにこのときのログ記録時刻LT2に更新する(ステップS58)。   Subsequently, the log recording processing unit records the input log i3p3 as SL3 in the log recording area as schematically shown in FIG. 9E (step S57). Subsequently, the log recording processing unit 206 updates the log recording time to the log recording time LT2 at this time as shown in FIG. 9F (step S58).

これにより、本実施の形態によれば、例えば、図9(A)に示す時刻t12で障害が発生しても、障害発生直前の時刻t11の時点でログ入力i2p6、i3p3はログ記録領域にSL2、SL3として保存されているため、ログが失われることはない。   Thus, according to the present embodiment, for example, even if a failure occurs at time t12 shown in FIG. 9A, log inputs i2p6 and i3p3 are stored in the log recording area at time t11 immediately before the failure. , The log is not lost because it is stored as SL3.

このように、本実施の形態によれば、入力ログの優先度が設定優先度よりも高いときには、未保存ログ領域ではなく、ログ記録領域に直接に記録するようにしたため、ログ間隔で想定されるログ記録領域の書換え回数による影響よりも、その入力ログの保存を優先することができ、ログが喪失する割合を従来よりも低減することができる。   As described above, according to the present embodiment, when the priority of the input log is higher than the set priority, it is recorded directly in the log recording area instead of the unsaved log area. The storage of the input log can be prioritized over the influence of the number of times the log recording area is rewritten, and the rate of log loss can be reduced as compared with the conventional case.

(第4の実施の形態)
次に、図1及び図2に示した構成の動作履歴情報記録装置の第4の実施の形態の動作について、図10のフローチャートと図11のタイミングチャートと共に説明する。本実施の形態では、設定優先度を「5」として説明する。なお、優先度は数値の大小だけでなく、複数の識別子による判定も可能である。
(Fourth embodiment)
Next, the operation of the fourth embodiment of the operation history information recording apparatus having the configuration shown in FIGS. 1 and 2 will be described with reference to the flowchart of FIG. 10 and the timing chart of FIG. In the present embodiment, the setting priority is described as “5”. The priority can be determined not only by the numerical value but also by a plurality of identifiers.

図2に示したイベント発生部202は、図11(A)に示す一定の時間間隔(ログ間隔)の時刻t1、t5、t9、t13、t17で図11(B)に模式的に示すように定期的なタイマーイベントe1、e2、e3、e4、e5を発生する。一方、図2に示したログ処理部200は、ログ入力待ちまたはイベント待ちの監視状態にある(ステップS71)。   The event generation unit 202 shown in FIG. 2 is schematically shown in FIG. 11B at times t1, t5, t9, t13, and t17 at a constant time interval (log interval) shown in FIG. Periodic timer events e1, e2, e3, e4, e5 are generated. On the other hand, the log processing unit 200 shown in FIG. 2 is in a monitoring state waiting for log input or waiting for an event (step S71).

ログ処理部200は、時刻t1で図11(B)に示すタイマーイベントe1が入力されると、イベント受信を判断してその旨を未保存ログ処理部205及びログ記録処理部206に通知する。これにより、未保存ログ処理部205は、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS79)。このときには、未保存ログ領域には図11(D)に示すように未保存ログが存在しないので、未保存ログ処理部205は、未保存ログが存在しないと判定する(ステップS79のN)。そして、再びステップS71の監視状態に戻る。   When the timer event e1 shown in FIG. 11B is input at time t1, the log processing unit 200 determines event reception and notifies the unsaved log processing unit 205 and the log recording processing unit 206 to that effect. Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved log area of the memory 103 (step S79). At this time, since there is no unsaved log in the unsaved log area as shown in FIG. 11D, the unsaved log processing unit 205 determines that there is no unsaved log (N in step S79). And it returns to the monitoring state of step S71 again.

なお、ログ記録処理部206は、起動後最初に発生したタイマーイベントe1に対しては、その発生時刻に対応した時刻LT0を、図11(F)に示すようにログ記録時刻としてフラッシュメモリ102に記録する。   Note that, for the timer event e1 that occurs first after activation, the log recording processing unit 206 stores the time LT0 corresponding to the generation time in the flash memory 102 as the log recording time as shown in FIG. Record.

続いて、ログ処理部200は、時刻t4で図11(C)に模式的に示すように、ログ入力部201からログi1p7が入力されると、その旨を優先度判定部203に通知する。優先度判定部203は、入力されたログの優先度が設定優先度未満であるかどうかを判定する(ステップS72)。ここでは、優先度判定部203は、入力されたログi1p7の優先度は設定優先度未満であるとの判定結果を得る(ステップS72のY)。   Subsequently, when the log i1p7 is input from the log input unit 201 as schematically illustrated in FIG. 11C at time t4, the log processing unit 200 notifies the priority determination unit 203 to that effect. The priority determination unit 203 determines whether or not the priority of the input log is less than the set priority (step S72). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i1p7 is less than the set priority (Y in step S72).

経過時間判定部204は、優先度判定部203の上記の判定結果があると、前回のログ記録時刻LT0からログi1p7の入力時刻t4までの経過時間et1を算出し、その経過時間et1が、一定のログ間隔未満であるかどうかを判定する(ステップS73)。この時点では、経過時間判定部204は、経過時間et1がログ間隔未満であると判定する(ステップS73のY)。   The elapsed time determination unit 204 calculates the elapsed time et1 from the previous log recording time LT0 to the input time t4 of the log i1p7 when the determination result of the priority determination unit 203 is present, and the elapsed time et1 is constant. It is determined whether it is less than the log interval (step S73). At this time, the elapsed time determination unit 204 determines that the elapsed time et1 is less than the log interval (Y in step S73).

未保存ログ処理部205は、上記の経過時間判定部204の判定結果があると、入力されたログi1p7を図11(E)に模式的に示すように、L1P7としてメモリ103の未保存ログ領域に記録する(ステップS74)。   When the determination result of the elapsed time determination unit 204 is present, the unsaved log processing unit 205 displays the input log i1p7 as L1P7 as schematically shown in FIG. (Step S74).

続いて、ログ処理部200は、時刻t5で発生するタイマーイベントe2が入力されたことを検出する(ステップS71)。これにより、未保存ログ処理部205は、未保存領域に未保存ログが存在するかどうかを確認する(ステップS79)。このときには、未保存ログ領域には図11(D)に示すように未保存ログL1P7が存在するとの判定結果が得られる(ステップS79のY)。   Subsequently, the log processing unit 200 detects that the timer event e2 that occurs at time t5 is input (step S71). Thereby, the unsaved log processing unit 205 checks whether or not an unsaved log exists in the unsaved area (step S79). At this time, a determination result that the unsaved log L1P7 exists in the unsaved log area is obtained as shown in FIG. 11D (Y in step S79).

ログ記録処理部206はこの判定結果に基づき、未保存ログL1P7をメモリ103の未保存領域から読み出して、図11(E)に模式的に示すようにフラッシュメモリ102のログ記録領域にSL1として記録する(ステップS80)。続いて、ログ記録処理部206は、ログ記録時刻を図11(F)に示すようにこのときのログ記録時刻LT1に更新する(ステップS78)。   Based on this determination result, the log recording processing unit 206 reads the unsaved log L1P7 from the unsaved area of the memory 103 and records it as SL1 in the log recording area of the flash memory 102 as schematically shown in FIG. (Step S80). Subsequently, the log recording processing unit 206 updates the log recording time to the log recording time LT1 at this time as shown in FIG. 11F (step S78).

その後の時刻t9で図11(B)に示すようにタイマーイベントe3が入力され、タイマーイベントe1の入力時と同様の動作が行われる。ただし、ログ記録時刻の更新は行われない。続いて、ログ処理部200は、時刻t10で図11(C)に模式的に示すように、ログ入力部201からのログi2p6の入力を検出する(ステップS51)。優先度判定部203は、ログ処理部200に入力されたログi2p6の優先度が設定優先度未満であるかどうかを判定する(ステップS72)。ここでは、優先度判定部203は、入力されたログi2p6の優先度は設定優先度未満であるとの判定結果を得る(ステップS72のY)。   At a subsequent time t9, a timer event e3 is input as shown in FIG. 11B, and the same operation as when the timer event e1 is input is performed. However, the log recording time is not updated. Subsequently, the log processing unit 200 detects the input of the log i2p6 from the log input unit 201 as schematically illustrated in FIG. 11C at time t10 (step S51). The priority determination unit 203 determines whether the priority of the log i2p6 input to the log processing unit 200 is less than the set priority (step S72). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i2p6 is less than the set priority (Y in step S72).

経過時間判定部204は、優先度判定部203の上記の判定結果があると、前回のログ記録時刻LT1からログi2p6の入力時刻t10までの経過時間et2を算出し、その経過時間et2が、一定のログ間隔未満であるかどうかを判定する(ステップS73)。この時点では、経過時間判定部204は、経過時間et2がログ間隔以上であると判定する(ステップS73のN)。   The elapsed time determination unit 204 calculates the elapsed time et2 from the previous log recording time LT1 to the input time t10 of the log i2p6 when the determination result of the priority determination unit 203 is present, and the elapsed time et2 is constant. It is determined whether it is less than the log interval (step S73). At this point, the elapsed time determination unit 204 determines that the elapsed time et2 is greater than or equal to the log interval (N in step S73).

未保存ログ処理部205は、上記の経過時間判定部204の判定結果があると、メモリ103の未保存ログ領域に未保存ログが存在するかどうかを確認する(ステップS75)。このときには、未保存ログ領域には図11(D)に示すように未保存ログが存在しないとの判定結果が得られる(ステップS75のN)。   When there is a determination result of the elapsed time determination unit 204 described above, the unsaved log processing unit 205 checks whether there is an unsaved log in the unsaved log area of the memory 103 (step S75). At this time, a determination result that there is no unsaved log is obtained as shown in FIG. 11D in the unsaved log area (N in step S75).

ログ記録処理部206はこの判定結果に基づき、入力ログi2p6を図11(E)に模式的に示すようにフラッシュメモリ102のログ記録領域にSL2として記録する(ステップS77)。続いて、ログ記録処理部206は、ログ記録時刻を図11(F)に示すようにこのときのログ記録時刻LT2に更新する(ステップS78)。   Based on the determination result, the log recording processing unit 206 records the input log i2p6 as SL2 in the log recording area of the flash memory 102 as schematically shown in FIG. 11E (step S77). Subsequently, the log recording processing unit 206 updates the log recording time to the log recording time LT2 at this time as shown in FIG. 11F (step S78).

続いて、ログ処理部200は、時刻t11で図11(C)に模式的に示すように、ログ入力部201からのログi3p3の入力を検出する(ステップS71)。すると、優先度判定部203は、ログ処理部200に入力されたログi3p3の優先度が設定優先度未満であるかどうかを判定する(ステップS72)。ここでは、優先度判定部203は、入力されたログi3p3の優先度は設定優先度以上であるとの判定結果を得る(ステップS72のN)。   Subsequently, the log processing unit 200 detects the input of the log i3p3 from the log input unit 201 as schematically shown in FIG. 11C at time t11 (step S71). Then, the priority determination unit 203 determines whether the priority of the log i3p3 input to the log processing unit 200 is less than the set priority (step S72). Here, the priority determination unit 203 obtains a determination result that the priority of the input log i3p3 is equal to or higher than the set priority (N in step S72).

この場合は、経過時間判定部204による経過時間の判定結果と、未保存ログ処理部205による未保存ログ領域に未保存ログが存在するかどうかの確認結果を得ることなく、ログ記録処理部は、入力されたログi3p3を図11(E)に模式的に示すように、SL3としてログ記録領域に記録する(ステップS77)。続いて、ログ記録処理部206は、ログ記録時刻を図11(F)に示すようにこのときのログ記録時刻LT3に更新する(ステップS78)。   In this case, without obtaining the determination result of the elapsed time by the elapsed time determination unit 204 and the confirmation result of whether the unsaved log area exists in the unsaved log area by the unsaved log processing unit 205, the log recording processing unit The input log i3p3 is recorded in the log recording area as SL3 as schematically shown in FIG. 11E (step S77). Subsequently, the log recording processing unit 206 updates the log recording time to the log recording time LT3 at this time as shown in FIG. 11F (step S78).

これにより、本実施の形態によれば、例えば、図11(A)に示す時刻t12で障害が発生しても、障害発生直前の時刻t11の時点でログ入力i2p6、i3p3はログ記録領域にSL2、SL3として保存されているため、ログが失われることはない。   Thus, according to the present embodiment, for example, even if a failure occurs at time t12 shown in FIG. 11A, log inputs i2p6 and i3p3 are stored in the log recording area at time t11 immediately before the failure. , The log is not lost because it is stored as SL3.

このように、本実施の形態によれば、入力ログの優先度が設定優先度よりも高いときには、未保存ログ領域ではなく、ログ記録領域に直接に記録するようにしたため、ログ間隔で想定されるログ記録領域の書換え回数による影響よりも、その入力ログの保存を優先することができ、ログが喪失する割合を従来よりも低減することができる。   As described above, according to the present embodiment, when the priority of the input log is higher than the set priority, it is recorded directly in the log recording area instead of the unsaved log area. The storage of the input log can be prioritized over the influence of the number of times the log recording area is rewritten, and the rate of log loss can be reduced as compared with the conventional case.

(第5の実施の形態)
次に、図1及び図2に示した構成の動作履歴情報記録装置の第5の実施の形態の動作について、図12のフローチャートと共に説明する。本実施の形態は、上述した第1〜第4の実施の形態におけるステップS25、S29、S37、S41、S56、S60、S76、S80の「未保存ログをログ記録領域に記録する」という処理を、図12に示すフローチャートの処理に置き換えたものである。
(Fifth embodiment)
Next, the operation of the fifth embodiment of the operation history information recording apparatus having the configuration shown in FIGS. 1 and 2 will be described with reference to the flowchart of FIG. In the present embodiment, the process of “recording an unsaved log in a log recording area” in steps S25, S29, S37, S41, S56, S60, S76, and S80 in the first to fourth embodiments described above is performed. FIG. 12 is replaced with the process of the flowchart shown in FIG.

すなわち、図12に示すように、まず、未保存ログ処理部205が未保存ログ領域に未処理の未保存ログが存在するかどうかを確認する(ステップS91)。未処理の未保存ログが存在する場合は、優先度判定部203がその未処理の未保存ログの優先度が保存優先度未満かどうかを判定する(ステップS92)。   That is, as shown in FIG. 12, first, the unsaved log processing unit 205 checks whether there is an unprocessed unsaved log in the unsaved log area (step S91). If there is an unprocessed unsaved log, the priority determination unit 203 determines whether the priority of the unprocessed unsaved log is less than the storage priority (step S92).

ここで、「保存優先度」は、前述した「設定優先度」とは異なり、ログ記録領域に記録するかどうかを示す閾値である。これに対し「設定優先度」は、ログ記録領域に優先的に記録する閾値である。従って、保存優先度未満のログはログ記録領域に記録されないが、設定優先度未満のログであってもログ記録領域に記録される。   Here, the “storage priority” is a threshold value indicating whether or not to record in the log recording area, unlike the “setting priority” described above. On the other hand, the “setting priority” is a threshold for preferentially recording in the log recording area. Accordingly, logs with a storage priority lower than that are not recorded in the log recording area, but even logs with a priority lower than the setting priority are recorded in the log recording area.

ステップS92で保存優先度以上であると判定されたときには、ログ記録処理部206が未保存ログをログ記録領域に記録する(ステップS93)。ステップS92で保存優先度未満であると判定されたとき、またはステップS93の記録終了後、ステップS91に戻る。未処理の未保存ログが存在しない場合は次の処理に移行する(ステップS94)。   When it is determined in step S92 that the storage priority is higher than the storage priority, the log recording processing unit 206 records an unsaved log in the log recording area (step S93). When it is determined in step S92 that it is less than the storage priority, or after the recording in step S93 is completed, the process returns to step S91. If there is no unprocessed unsaved log, the process proceeds to the next process (step S94).

(第6の実施の形態)
次に、図1及び図2に示した構成の動作履歴情報記録装置の第6の実施の形態の動作について、図13のフローチャートと共に説明する。本実施の形態は、上述した第1〜第4の実施の形態におけるステップS26、S38、S57、S77の「入力されたログをログ記録領域に記録する」という処理を、図13に示すフローチャートの処理に置き換えたものである。
(Sixth embodiment)
Next, the operation of the sixth embodiment of the operation history information recording apparatus having the configuration shown in FIGS. 1 and 2 will be described with reference to the flowchart of FIG. In the present embodiment, the process of “recording the input log in the log recording area” in steps S26, S38, S57, and S77 in the first to fourth embodiments described above is shown in the flowchart of FIG. It is replaced with processing.

すなわち、図13のフローチャートに示すように、まず、優先度判定部203が入力されたログが保存優先度未満であるかどうかを判定する(ステップS101)。続いて、ステップS101で入力されたログが保存優先度以上であると判定された場合に、ログ記録処理部206が入力されたログをログ記録領域に記録する(ステップS102)。   That is, as shown in the flowchart of FIG. 13, first, the priority determination unit 203 determines whether the input log is less than the storage priority (step S101). Subsequently, when it is determined that the log input in step S101 is equal to or higher than the storage priority, the log recording processing unit 206 records the input log in the log recording area (step S102).

ステップS101で入力されたログが保存優先度未満であると判定された場合、またはステップS102でログ記録領域への記録が行われた場合は次の処理に移行する(ステップS103)。   If it is determined that the log input in step S101 is less than the storage priority, or if recording in the log recording area is performed in step S102, the process proceeds to the next process (step S103).

次に、各実施の形態の動作の相違について更に説明する。   Next, the difference in operation between the embodiments will be further described.

図14は、第2の実施の形態と第3の実施の形態の動作の違いを説明するタイミングチャートを示す。図6のフローチャート及び図7のタイミングチャートと共に説明した第2の実施の形態では、ログi1p7が図14(A)に示す時刻t6で図14(C)に模式的に示すように入力されたとき、ログi1p7は設定優先度未満であるため、経過時間et1がログ間隔以上あいていても図14(D)に示すように未保存ログ領域にL1P7として保存される。その後に、時刻t9で図14(B)に模式的に示すようにタイマーイベントe3が発生すると、未保存ログL1P7が同図(E)に示すようにログ記録領域にSL2として保存される。   FIG. 14 is a timing chart for explaining the difference in operation between the second embodiment and the third embodiment. In the second embodiment described together with the flowchart of FIG. 6 and the timing chart of FIG. 7, when the log i1p7 is input as shown schematically in FIG. 14C at time t6 shown in FIG. Since the log i1p7 is less than the set priority, the log i1p7 is saved as L1P7 in the unsaved log area as shown in FIG. 14D even if the elapsed time et1 is longer than the log interval. Thereafter, when a timer event e3 occurs at time t9 as schematically shown in FIG. 14B, the unsaved log L1P7 is saved as SL2 in the log recording area as shown in FIG.

これに対し、図8のフローチャート及び図9のタイミングチャートと共に説明した第3の実施の形態では、ログi1p7が図14(A)に示す時刻t6で図14(C)に模式的に示すように入力されたとき、経過時間et1がログ間隔以上あいているため、ログi1p7は優先度に関係なく、図14(E)に示すようにログ記録領域にSL1として直接保存される。   On the other hand, in the third embodiment described together with the flowchart of FIG. 8 and the timing chart of FIG. 9, the log i1p7 is schematically shown in FIG. 14C at time t6 shown in FIG. When input, since the elapsed time et1 is longer than the log interval, the log i1p7 is directly stored as SL1 in the log recording area as shown in FIG. 14E regardless of the priority.

このため、例えば図14に示すように、ログi1p7入力後でタイマーイベントe3発生以前の時刻t8で障害が発生した場合、第2の実施の形態では、未保存ログ領域に未保存ログL1P7として記憶されていた入力ログi1p7は失われる。しかし、第3の実施の形態ではログ記録領域にログSL1として記録されている入力ログi1p7は失われない。   Therefore, for example, as shown in FIG. 14, when a failure occurs at time t8 after the input of the log i1p7 and before the timer event e3 occurs, in the second embodiment, the unsaved log area is stored as the unsaved log L1P7. The input log i1p7 that has been made is lost. However, in the third embodiment, the input log i1p7 recorded as the log SL1 in the log recording area is not lost.

図15は、第2の実施の形態と第4の実施の形態の動作の違いを説明するタイミングチャートを示す。図6のフローチャート及び図7のタイミングチャートと共に説明した第2の実施の形態では、設定優先度以上の優先度のログi3p3が図15(A)に示す時刻t15で図15(C)に模式的に示すように入力されたとき、経過時間et3がログ間隔以上あいているため、図15(E)に模式的に示すように、優先度に関係なく入力されたログi3p3はSL3としてログ記録領域に記録され、そのときに図15(D)に示す未保存ログ領域にログL2P6として記録されている入力ログi2p6も、SL2としてログ記録領域に記録される。   FIG. 15 is a timing chart for explaining the difference in operation between the second embodiment and the fourth embodiment. In the second embodiment described together with the flowchart of FIG. 6 and the timing chart of FIG. 7, the log i3p3 having a priority equal to or higher than the set priority is schematically shown in FIG. 15C at time t15 shown in FIG. Since the elapsed time et3 is greater than or equal to the log interval, the log i3p3 that is input regardless of the priority is the log recording area as SL3, as schematically shown in FIG. The input log i2p6 recorded as log L2P6 in the unsaved log area shown in FIG. 15D at that time is also recorded in the log recording area as SL2.

これに対し、図10のフローチャート及び図11のタイミングチャートと共に説明した第4の実施の形態では、設定優先度以上の優先度のログi3p3が図15(A)に示す時刻t15で図15(C)に模式的に示すように入力されたとき、図15(E)に模式的に示すように、優先度が設定優先度以上であるためログi3p3のみがログ記録領域にSL3として記録される。しかし、このとき未保存ログ領域に保存されている未保存ログL2P6はログ記録領域に記録されず、その後にタイマーイベントe3が発生した時に、図15(E)に模式的に示すように、ログ記録領域にSL4として記録される。   On the other hand, in the fourth embodiment described together with the flowchart of FIG. 10 and the timing chart of FIG. 11, the log i3p3 having a priority level equal to or higher than the set priority level is displayed at time t15 shown in FIG. ), As shown schematically in FIG. 15E, since the priority is equal to or higher than the set priority, only the log i3p3 is recorded as SL3 in the log recording area. However, at this time, the unsaved log L2P6 saved in the unsaved log area is not recorded in the log recording area, and when a timer event e3 occurs thereafter, as schematically shown in FIG. Recorded as SL4 in the recording area.

このため、図15において、ログi3p3入力後でタイマーイベントe3発生以前の時刻t16で障害が発生した場合、第4の実施の形態では、未保存ログ領域に未保存ログL2P6として記録されていた入力ログi2p6が失われる。しかし、第2の実施の形態では、入力ログi2p6はSL2として時刻t15にログ記録領域に記録されているため、上記の障害が発生しても失われない。   Therefore, in FIG. 15, when a failure occurs at time t16 before the timer event e3 occurs after the log i3p3 is input, in the fourth embodiment, the input recorded as the unsaved log L2P6 in the unsaved log area Log i2p6 is lost. However, in the second embodiment, since the input log i2p6 is recorded in the log recording area at time t15 as SL2, it is not lost even if the above failure occurs.

なお、本発明は以上の実施の形態に限定されるものではなく、例えばフラッシュメモリ102以外の不揮発性記憶素子を使用したり、メモリ103としてRAM以外の揮発性記憶素子を使用することも可能である。ただし、揮発性記憶素子は不揮発性記憶素子に比べて書き換え回数が多いことが必要である。また、第1〜第4の実施の形態において、設定優先度に替えて保存優先度だけを使用してもよい。   Note that the present invention is not limited to the above embodiment, and for example, a nonvolatile memory element other than the flash memory 102 can be used, or a volatile memory element other than the RAM can be used as the memory 103. is there. However, the volatile memory element needs to be rewritten more times than the nonvolatile memory element. In the first to fourth embodiments, only the storage priority may be used instead of the setting priority.

100 動作履歴情報記録装置
101 中央処理装置(CPU)
102 フラッシュメモリ
103 メモリ
110 外部メモリバス
200 ログ処理部
201 ログ入力部
203 優先度判定部
204 経過時間判定部
205 未保存ログ処理部
206 ログ記録処理部
100 Operation History Information Recording Device 101 Central Processing Unit (CPU)
102 flash memory 103 memory 110 external memory bus 200 log processing unit 201 log input unit 203 priority determination unit 204 elapsed time determination unit 205 unsaved log processing unit 206 log recording processing unit

Claims (6)

所定処理の実行タイミングを示す情報であるイベントを発生するイベント発生手段と、
動作履歴情報を入力する動作履歴情報入力手段と、
前記イベント及び前記動作履歴情報の入力を検出する検出手段と、
前記動作履歴情報を記憶するための、所定回数の書き換えが可能な不揮発性記憶素子と、
前記動作履歴情報を一時記憶するための、前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子と、
前記不揮発性記憶素子に前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新保存する時刻保存手段と、
前記検出手段により前記動作履歴情報の入力が検出されたとき、前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する経過時間判定手段と、
前記経過時間判定手段により前記経過時間が前記所定の時間間隔未満であると判定されたときに、入力された前記動作履歴情報を前記揮発性記憶素子に一時保存する未保存情報記憶手段と、
前記検出手段により前記イベントの入力が検出されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を前記不揮発性記憶素子に記憶する第1の保存情報記憶手段と、
前記経過時間判定手段により前記経過時間が前記所定の時間間隔以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第2の保存情報記憶手段と
を有することを特徴とする動作履歴情報記憶装置。
Event generating means for generating an event which is information indicating execution timing of the predetermined process;
Operation history information input means for inputting operation history information;
Detecting means for detecting input of the event and the operation history information;
A non-volatile storage element capable of rewriting a predetermined number of times for storing the operation history information;
A volatile memory element capable of rewriting more than the predetermined number of times for temporarily storing the operation history information; and
Time storage means for updating and storing information indicating the time when the operation history information is stored in the nonvolatile storage element as storage time information;
When the input of the operation history information is detected by the detection means, an elapsed time from the time indicated by the stored time information to the input time at which the input of the operation history information is detected is calculated, and the elapsed time is set in advance. Elapsed time determining means for determining whether or not the predetermined time interval is less than,
Unstored information storage means for temporarily storing the input operation history information in the volatile storage element when the elapsed time determination means determines that the elapsed time is less than the predetermined time interval;
When the input of the event is detected by the detection means, it is checked whether or not the operation history information is temporarily stored in the volatile memory element, and if temporarily stored, the temporary storage operation history information is stored. First storage information storage means for storing the data in the nonvolatile storage element;
When the elapsed time determining means determines that the elapsed time is equal to or greater than the predetermined time interval, it checks whether the operation history information is temporarily stored in the volatile storage element, and is temporarily stored. The temporary storage operation history information is stored in the nonvolatile memory element together with the input operation history information, and when the temporary storage is not temporarily stored, the input operation history information is stored in the nonvolatile storage element. An operation history information storage device comprising: a second stored information storage means for storing.
所定処理の実行タイミングを示す情報であるイベントを発生するイベント発生手段と、
優先度情報が付加された動作履歴情報を入力する動作履歴情報入力手段と、
前記イベント及び前記動作履歴情報の入力を検出する検出手段と、
前記動作履歴情報を記憶するための、所定回数の書き換えが可能な不揮発性記憶素子と、
前記動作履歴情報を一時記憶するための、前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子と、
前記不揮発性記憶素子に前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新保存する時刻保存手段と、
前記検出手段により前記動作履歴情報の入力が検出されたとき、前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する経過時間判定手段と、
入力された前記動作履歴情報の優先度情報が、前記不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、前記不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する優先度判定手段と、
前記経過時間判定手段により前記経過時間が前記所定の時間間隔未満であると判定されたとき、または前記経過時間判定手段により前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度より低いと判定されたときに、入力された前記動作履歴情報を前記揮発性記憶素子に一時保存する未保存情報記憶手段と、
前記検出手段により前記イベントの入力が検出されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を前記不揮発性記憶素子に記憶する第1の保存情報記憶手段と、
前記経過時間判定手段により前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第2の保存情報記憶手段と
を有することを特徴とする動作履歴情報記憶装置。
Event generating means for generating an event which is information indicating execution timing of the predetermined process;
Operation history information input means for inputting operation history information to which priority information is added;
Detecting means for detecting input of the event and the operation history information;
A non-volatile storage element capable of rewriting a predetermined number of times for storing the operation history information;
A volatile memory element capable of rewriting more than the predetermined number of times for temporarily storing the operation history information; and
Time storage means for updating and storing information indicating the time when the operation history information is stored in the nonvolatile storage element as storage time information;
When the input of the operation history information is detected by the detection means, an elapsed time from the time indicated by the stored time information to the input time at which the input of the operation history information is detected is calculated, and the elapsed time is set in advance. Elapsed time determining means for determining whether or not the predetermined time interval is less than,
The priority information of the input operation history information is a setting priority that is a threshold value that is preferentially stored in the nonvolatile memory element, and a storage priority that is a threshold value that indicates whether to be stored in the nonvolatile memory element Priority determination means for determining whether the priority is lower than a predetermined priority of at least one of
When the elapsed time determining means determines that the elapsed time is less than the predetermined time interval, or the elapsed time determining means determines that the elapsed time is greater than or equal to the predetermined time interval, and When the priority information of the operation history information input by the priority determination unit is determined to be lower than the predetermined priority, the input operation history information is temporarily stored in the volatile storage element. Information storage means;
When the input of the event is detected by the detection means, it is checked whether or not the operation history information is temporarily stored in the volatile memory element, and if temporarily stored, the temporary storage operation history information is stored. First storage information storage means for storing the data in the nonvolatile storage element;
The elapsed time determining means determines that the elapsed time is not less than the predetermined time interval, and the priority information of the operation history information input by the priority determining means is not less than the predetermined priority. When it is determined that the operation history information is temporarily stored in the volatile memory element, and if the operation history information is temporarily stored, the operation history information to which the temporarily stored operation history information is input And the second storage information storage means for storing the input operation history information in the nonvolatile storage element when it is not temporarily stored. History information storage device.
所定処理の実行タイミングを示す情報であるイベントを発生するイベント発生手段と、
優先度情報が付加された動作履歴情報を入力する動作履歴情報入力手段と、
前記イベント及び前記動作履歴情報の入力を検出する検出手段と、
前記動作履歴情報を記憶するための、所定回数の書き換えが可能な不揮発性記憶素子と、
前記動作履歴情報を一時保存するための、前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子と、
前記不揮発性記憶素子に前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新保存する時刻保存手段と、
前記検出手段により前記動作履歴情報の入力が検出されたとき、入力された前記動作履歴情報の優先度情報が、前記不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、前記不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する優先度判定手段と、
前記優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度より低いと判定されたときに、前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する経過時間判定手段と、
前記経過時間判定手段により前記経過時間が前記所定の時間間隔未満であると判定されたときに、入力された前記動作履歴情報を前記揮発性記憶素子に一時保存する未保存情報記憶手段と、
前記優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶するか、または前記経過時間判定手段により前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記優先度判定手段により入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第2の保存情報記憶手段と
を有することを特徴とする動作履歴情報記憶装置。
Event generating means for generating an event which is information indicating execution timing of the predetermined process;
Operation history information input means for inputting operation history information to which priority information is added;
Detecting means for detecting input of the event and the operation history information;
A non-volatile storage element capable of rewriting a predetermined number of times for storing the operation history information;
A volatile memory element that can be rewritten more times than the predetermined number for temporarily storing the operation history information;
Time storage means for updating and storing information indicating the time when the operation history information is stored in the nonvolatile storage element as storage time information;
When the input of the operation history information is detected by the detection means, the priority information of the input operation history information is a set priority that is a threshold value stored preferentially in the nonvolatile memory element, and the nonvolatile memory Priority determination means for determining whether or not the storage priority that is a threshold indicating whether or not to store in the sex memory element is lower than a predetermined priority of at least one of the storage priority;
When it is determined that the priority information of the operation history information input by the priority determination means is lower than the predetermined priority, the input of the operation history information is detected from the time indicated by the storage time information. An elapsed time determination means for calculating an elapsed time until an input time and determining whether the elapsed time is less than a predetermined time interval set in advance;
Unstored information storage means for temporarily storing the input operation history information in the volatile storage element when the elapsed time determination means determines that the elapsed time is less than the predetermined time interval;
Whether the input operation history information is stored in the nonvolatile memory element when it is determined that the priority information of the operation history information input by the priority determination means is equal to or higher than the predetermined priority. Or, it is determined by the elapsed time determination means that the elapsed time is not less than the predetermined time interval, and the priority information of the operation history information input by the priority determination means is not less than the predetermined priority. When it is determined that the operation history information is temporarily stored in the volatile storage element, and if the operation history information is temporarily stored, the temporary storage operation history information is input. Second storage information storage for storing the input operation history information in the nonvolatile memory element when the history information is stored in the nonvolatile memory element and is not temporarily stored Operation history information storage apparatus characterized by having a stage.
所定処理の実行タイミングを示す情報であるイベントまたは動作履歴情報の入力を検出する第1のステップと、
前記第1のステップにより前記動作履歴情報の入力が検出されたときに、前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新記憶される所定回数の書き換えが可能な不揮発性記憶素子の前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する第2のステップと、
前記第2のステップにより前記経過時間が前記所定の時間間隔未満であると判定されたときに、入力された前記動作履歴情報を、前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子に一時保存する第3のステップと、
前記第1のステップにより前記イベントの入力が検出されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を前記不揮発性記憶素子に記憶する第4のステップと、
前記第2のステップにより前記経過時間が前記所定の時間間隔以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第5のステップと、
前記不揮発性記憶素子に前記記憶時刻情報を更新保存する第6のステップと
を含むことを特徴とする動作履歴情報記憶方法。
A first step of detecting an input of an event or operation history information that is information indicating an execution timing of a predetermined process;
A non-volatile memory element capable of rewriting a predetermined number of times, wherein information indicating the time when the operation history information is stored is updated and stored as storage time information when the input of the operation history information is detected in the first step The elapsed time from the time indicated by the stored time information to the input time when the input of the operation history information is detected is calculated, and it is determined whether the elapsed time is less than a predetermined time interval set in advance. Two steps,
A volatile memory element capable of rewriting the input operation history information more times than the predetermined number of times when the elapsed time is determined to be less than the predetermined time interval by the second step. A third step of temporarily storing in
When the input of the event is detected in the first step, it is checked whether or not the operation history information is temporarily stored in the volatile storage element. If the operation history information is temporarily stored, the temporary storage operation is performed. A fourth step of storing history information in the nonvolatile memory element;
When it is determined by the second step that the elapsed time is equal to or greater than the predetermined time interval, it is confirmed whether the operation history information is temporarily stored in the volatile storage element, and is temporarily stored. The temporary storage operation history information is stored in the nonvolatile memory element together with the input operation history information, and when the temporary storage is not temporarily stored, the input operation history information is stored in the nonvolatile storage element. A fifth step of storing;
And a sixth step of updating and storing the storage time information in the nonvolatile storage element.
所定処理の実行タイミングを示す情報であるイベントまたは優先度情報が付加された動作履歴情報の入力を検出する第1のステップと、
前記第1のステップにより前記動作履歴情報の入力が検出されたときに、前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新記憶される所定回数の書き換えが可能な不揮発性記憶素子の前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する第2のステップと、
前記第2のステップにより前記経過時間が前記所定の時間間隔未満であると判定されたときに、入力された前記動作履歴情報を、前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子に一時保存する第3のステップと、
前記第1のステップにより前記イベントの入力が検出されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を前記不揮発性記憶素子に記憶する第4のステップと、
入力された前記動作履歴情報の優先度情報が、前記不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、前記不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する第5のステップと、
前記第2のステップにより前記経過時間が前記所定の時間間隔未満であると判定されたとき、または前記第2のステップにより前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記第5のステップにより入力された前記動作履歴情報の優先度情報が前記所定の優先度より低いと判定されたときに、入力された前記動作履歴情報を前記揮発性記憶素子に一時保存する第6のステップと、
前記第2のステップにより前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記第5のステップにより入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第7のステップと、
前記不揮発性記憶素子に前記記憶時刻情報を更新保存する第8のステップと
を含むことを特徴とする動作履歴情報記憶方法。
A first step of detecting an input of operation history information to which an event or priority information, which is information indicating execution timing of a predetermined process, is added;
A non-volatile memory element capable of rewriting a predetermined number of times, wherein information indicating the time when the operation history information is stored is updated and stored as storage time information when the input of the operation history information is detected in the first step Calculating the elapsed time from the time indicated by the stored time information to the input time when the input of the operation history information is detected, and determining whether the elapsed time is less than a predetermined time interval set in advance. Two steps,
A volatile storage element capable of rewriting the input operation history information more times than the predetermined number of times when the elapsed time is determined to be less than the predetermined time interval by the second step. A third step of temporarily storing in
When the input of the event is detected in the first step, it is checked whether or not the operation history information is temporarily stored in the volatile storage element. A fourth step of storing history information in the nonvolatile memory element;
The priority information of the input operation history information is a setting priority that is a threshold value that is preferentially stored in the nonvolatile memory element, and a storage priority that is a threshold value that indicates whether to be stored in the nonvolatile memory element A fifth step of determining whether at least one of the predetermined priority is lower than the predetermined priority;
When the second step determines that the elapsed time is less than the predetermined time interval, or the second step determines that the elapsed time is greater than or equal to the predetermined time interval, and When the priority information of the operation history information input by the fifth step is determined to be lower than the predetermined priority, the input operation history information is temporarily stored in the volatile storage element. And the steps
It is determined in the second step that the elapsed time is greater than or equal to the predetermined time interval, and the priority information of the operation history information input in the fifth step is greater than or equal to the predetermined priority. When it is determined that the operation history information is temporarily stored in the volatile memory element, and if the operation history information is temporarily stored, the operation history information to which the temporarily stored operation history information is input Together with the nonvolatile memory element, and when not temporarily stored, the seventh step of storing the input operation history information in the nonvolatile memory element;
And an eighth step of updating and storing the storage time information in the non-volatile storage element.
所定処理の実行タイミングを示す情報であるイベントまたは優先度情報が付加された動作履歴情報の入力を検出する第1のステップと、
前記第1のステップにより前記動作履歴情報の入力が検出されたときに、入力された前記動作履歴情報の優先度情報が、所定回数の書き換えが可能な不揮発性記憶素子に優先的に記憶する閾値である設定優先度と、前記不揮発性記憶素子に記憶するかどうかを示す閾値である保存優先度とのうちの少なくともどちらか一方の所定の優先度より低いかどうかを判定する第2のステップと、
前記第2のステップにより入力された前記動作履歴情報の優先度情報が前記所定の優先度より低いと判定されたときに、前記動作履歴情報を記憶した時刻を示す情報を記憶時刻情報として更新記憶される前記不揮発性記憶素子の前記記憶時刻情報が示す時刻から前記動作履歴情報の入力が検出された入力時刻までの経過時間を算出し、その経過時間が予め設定した所定の時間間隔未満であるか否かを判定する第3のステップと、
前記第3のステップにより前記経過時間が前記所定の時間間隔未満であると判定されたときに、入力された前記動作履歴情報を前記所定回数よりも多い回数の書き換えが可能な揮発性記憶素子に一時保存する第4のステップと、
前記第2のステップにより入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶するか、または前記第3のステップにより前記経過時間が前記所定の時間間隔以上であると判定され、かつ、前記第2のステップにより入力された前記動作履歴情報の優先度情報が前記所定の優先度以上であると判定されたときに、前記揮発性記憶素子に前記動作履歴情報が一時保存されているかどうかを確認し、一時保存されているときは、その一時保存動作履歴情報を入力された前記動作履歴情報と共に前記不揮発性記憶素子に記憶し、一時保存されていないときは、入力された前記動作履歴情報を前記不揮発性記憶素子に記憶する第5のステップと、
前記不揮発性記憶素子に前記記憶時刻情報を更新保存する第6のステップと
を含むことを特徴とする動作履歴情報記憶方法。
A first step of detecting an input of operation history information to which an event or priority information, which is information indicating execution timing of a predetermined process, is added;
A threshold for preferentially storing the priority information of the input operation history information in a non-volatile storage element that can be rewritten a predetermined number of times when the input of the operation history information is detected in the first step. A second step of determining whether or not the setting priority is lower than a predetermined priority of at least one of a setting priority and a storage priority that is a threshold indicating whether or not to store in the nonvolatile memory element; ,
When it is determined that the priority information of the operation history information input in the second step is lower than the predetermined priority, information indicating the time when the operation history information is stored is updated and stored as storage time information. The elapsed time from the time indicated by the storage time information of the nonvolatile storage element to the input time when the input of the operation history information is detected is calculated, and the elapsed time is less than a predetermined time interval set in advance. A third step of determining whether or not
When it is determined in the third step that the elapsed time is less than the predetermined time interval, the input operation history information is converted into a volatile memory element that can be rewritten more times than the predetermined number of times. A fourth step of temporary storage;
Whether to store the input operation history information in the nonvolatile memory element when it is determined that the priority information of the operation history information input in the second step is equal to or higher than the predetermined priority. Or, it is determined in the third step that the elapsed time is not less than the predetermined time interval, and the priority information of the operation history information input in the second step is not less than the predetermined priority. When it is determined that the operation history information is temporarily stored in the volatile storage element, and if the operation history information is temporarily stored, the temporary storage operation history information is input. Storing in the nonvolatile memory element together with history information, and when not temporarily stored, the fifth step of storing the input operation history information in the nonvolatile memory element;
And a sixth step of updating and storing the storage time information in the nonvolatile storage element.
JP2009216764A 2009-09-18 2009-09-18 Device and method for storing operation history information Pending JP2011065513A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009216764A JP2011065513A (en) 2009-09-18 2009-09-18 Device and method for storing operation history information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009216764A JP2011065513A (en) 2009-09-18 2009-09-18 Device and method for storing operation history information

Publications (1)

Publication Number Publication Date
JP2011065513A true JP2011065513A (en) 2011-03-31

Family

ID=43951670

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009216764A Pending JP2011065513A (en) 2009-09-18 2009-09-18 Device and method for storing operation history information

Country Status (1)

Country Link
JP (1) JP2011065513A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016118864A (en) * 2014-12-19 2016-06-30 富士ゼロックス株式会社 Information processing device and program
CN116744168A (en) * 2022-09-01 2023-09-12 荣耀终端有限公司 Log storage method and related device
CN116744168B (en) * 2022-09-01 2024-05-14 荣耀终端有限公司 Log storage method and related device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016118864A (en) * 2014-12-19 2016-06-30 富士ゼロックス株式会社 Information processing device and program
CN116744168A (en) * 2022-09-01 2023-09-12 荣耀终端有限公司 Log storage method and related device
CN116744168B (en) * 2022-09-01 2024-05-14 荣耀终端有限公司 Log storage method and related device

Similar Documents

Publication Publication Date Title
JP5623593B2 (en) Rack and method for simultaneously updating a basic input / output system
CN110442473B (en) Nonvolatile data storage method and device, electronic equipment and medium
US20080016415A1 (en) Evaluation system and method
JP5981906B2 (en) Image forming apparatus
US10474121B2 (en) Control device and editing device
JP2011065513A (en) Device and method for storing operation history information
JP2010097432A (en) Ram diagnosis apparatus and program thereof
JP2004234720A (en) Semiconductor device, and state transition checking method therefor
JP2014006772A (en) Failure monitoring type communication apparatus, failure monitoring recording method for communication apparatus, and program therefor
JP6021597B2 (en) Information processing apparatus, information processing method, and computer program
JP2007304972A (en) Microprocessor system
JP6423282B2 (en) Memory control device and memory control method
JP2013161429A (en) Trace control device and trace control method
JP6137659B2 (en) Weighing device and weighing data recording method
JP2019159882A (en) Controller and data storage method
CN110838314A (en) Method and device for reinforcing stored data
JP2012203642A (en) Memory system
JP7477328B2 (en) Control device and control program rewriting method
JP2005071124A (en) Non-volatile memory system
CN117851234A (en) Method for determining initial error reporting version in software test and related product
JP2016206981A (en) Controller, control method, and program for memory controller loading type non-volatile memory device
JP2023177118A (en) Abnormal log acquisition device, abnormal log storage method, and program
JP6311525B2 (en) Storage medium management device
JP6429196B2 (en) Storage device using NAND flash memory and method of using NAND flash memory
JP2013125435A (en) Data reading/writing device and method for reading/writing data

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012