CN103645962A - Watch-dog implementation method and device based on Nios II system - Google Patents

Watch-dog implementation method and device based on Nios II system Download PDF

Info

Publication number
CN103645962A
CN103645962A CN201310700948.3A CN201310700948A CN103645962A CN 103645962 A CN103645962 A CN 103645962A CN 201310700948 A CN201310700948 A CN 201310700948A CN 103645962 A CN103645962 A CN 103645962A
Authority
CN
China
Prior art keywords
application program
unit
feeding
backstage
dog
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
CN201310700948.3A
Other languages
Chinese (zh)
Inventor
甄维良
房帅
霍启强
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.)
Beijing Huahuan Electronics Co Ltd
Original Assignee
Beijing Huahuan Electronics Co 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 Beijing Huahuan Electronics Co Ltd filed Critical Beijing Huahuan Electronics Co Ltd
Priority to CN201310700948.3A priority Critical patent/CN103645962A/en
Publication of CN103645962A publication Critical patent/CN103645962A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

An embodiment of the invention provides a watch-dog implementation method and device based on a Nios II system. The watch-dog implementation method based on the Nios II system comprises the steps as follows: a background guard unit receives a first dog feeding signal sent by an application program, and performs restart operation on the application program according to the first dog feeding signal and registration information of the application program; and the guard unit receives a second dog feeding signal sent by the background guard unit, and performs restart on the Nios II system according to the second dog feeding signal. According to the watch-dog implementation method and device based on the Nios II system, the watch-dog system with a multi-task processing system structure is realized, the universality is high, the method and the device can be applicable to various operation systems, and the system stability is improved.

Description

House dog implementation method and device based on NiosII system
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of house dog implementation method and device based on NiosII system.
Background technology
NiosII microprocessor is 32 RISC(Reduced Instruction Set Computer of a kind of configurable general that altera corp designs and develops, Reduced Instruction Set Computer) soft-core processor, can be applied in polytype FPGA(Field Programmable Gate Array, field programmable gate array) on chip, as a kind of configurable general RSIC soft-core processor, user can to soft-core processor, carry out cutting as required and interpolation (is mainly the peripheral interface of CPU, the elements such as bus), to meet different needs.In NiosII system, can move uC/OS-II, the conventional embedded OS such as uClinux, makes NiosII can adapt to the application of multiple fields, facilitates the exploitation of application software simultaneously.
Because NiosII is a kind of soft-core processor, its structure, peripheral interface and bus structure are unfixing, so the more special-purpose ASIC(Application Specific of stability Integrated Circuits of whole system, special IC) chip has certain gap, therefore a kind of stable, watchdog system is most important for having used the system of NiosII reliably, but for the house dog software of NiosII+linux environment, does not have at present a kind of general and obtain the standards of most tissue approvals.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of house dog implementation method and device based on NiosII system, improves the stability of system.
The object of the embodiment of the present invention is achieved through the following technical solutions:
A house dog implementation method based on NiosII system, comprising:
Backstage is guarded unit and is received the first feeding-dog signal that application program sends, and according to the log-on message of described the first feeding-dog signal and described application program, described application program is carried out to reboot operation;
Guard unit and receive the second feeding-dog signal that unit transmission is guarded on described backstage, according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation.
A house dog implement device based on NiosII system, comprise guard unit, unit and application program are guarded in backstage:
Described application program, sends the first feeding-dog signal for guarding unit to described backstage;
Unit is guarded on described backstage, and the first feeding-dog signal sending for receiving described application program, carries out reboot operation according to the log-on message of described the first feeding-dog signal and described application program to described application program;
The described unit of guarding, guards for receiving described backstage the second feeding-dog signal that unit sends, and according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation.
The technical scheme being provided by the invention described above embodiment can be found out, house dog implementation method and device based on NiosII system, realize the watchdog system of processing multitask system structure, highly versatile, can adapt to several operation systems, improve the stability of NiosII system.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain other accompanying drawings according to these accompanying drawings.
The house dog implementation method schematic flow sheet based on NiosII system that Fig. 1 provides for the embodiment of the present invention.
The house dog implement device formation schematic diagram based on NiosII system that Fig. 2 provides for the embodiment of the present invention.
The house dog implementation method application schematic diagram based on NiosII system that Fig. 3 provides for the embodiment of the present invention.
Finger daemon application schematic diagram in backstage in the house dog implementation method based on NiosII system that Fig. 4 provides for the embodiment of the present invention.
Application programming interfaces application schematic diagram in the house dog implementation method based on NiosII system that Fig. 5 provides for the embodiment of the present invention.
Application program registration in the house dog implementation method based on NiosII system that Fig. 6 provides for the embodiment of the present invention, nullify, feed dog, frame is resolved application schematic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on embodiments of the invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to protection scope of the present invention.
As shown in Figure 1, the embodiment of the present invention provides a kind of house dog implementation method based on NiosII system, comprising:
Step 11, backstage are guarded unit and are received the first feeding-dog signal that application program sends, and according to the log-on message of described the first feeding-dog signal and described application program, described application program are carried out to reboot operation.
Step 12, guard unit and receive described backstage and guard the second feeding-dog signal that unit sends, according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation.
The house dog implementation method of the embodiment of the present invention based on NiosII system, application program can be for a plurality of, realize the watchdog system of processing multitask system structure, the stability of raising system, highly versatile, designs for multitask system, can monitor a plurality of application programs simultaneously, modular design, interface is simple, flexible, can change according to different demands.Can adapt to several operation systems, as linux, uC/OS-II, uClinux.
Wherein, the transmission cycle of described the second feeding-dog signal can be less than the transmission cycle of the first feeding-dog signal.
The house dog implementation method of the embodiment of the present invention based on NiosII system, NiosII is configured on fpga chip, guarding unit is also integrated on fpga chip, guard unit major function and be the second feeding-dog signal of guarding unit according to backstage NiosII system is carried out to reboot operation, its similar " hardware watchdog ", major function is realized by fpga chip.Wherein, hello the dog time interval of cell location hardware watchdog is guarded on backstage, and the dog time interval of feeding of hardware watchdog should be designed length as far as possible, and minimum be take " second " as unit conventionally.
The house dog implementation method of the embodiment of the present invention based on NiosII system, it is backstage finger daemon that unit core is guarded on backstage, its similar one " software watchdog ", key property is running background.Also have, backstage finger daemon need to its operation before environment keep apart, guarantee the independence of software watchdog process, the impact of some elements before not moved.Unit major function is guarded on backstage: realize on the one hand the dog feeding operation to hardware watchdog, receive on the other hand the feeding-dog signal of a plurality of application programs, each application program is carried out to reboot operation, or operating system (as linux) is carried out to reboot operation, or whole NiosII system (comprising FPGA) is carried out to reboot operation.
The house dog implementation method of the embodiment of the present invention based on NiosII system, also comprises:
Described application program is guarded unit transmission log-on message and is registered to described backstage, described log-on message comprises transmission cycle (feeding dog frequency information), the Process identifier pid of program name, the first feeding-dog signal, reset pattern information, wherein, program name comprises routing information length, routing information parameter, reset pattern information comprises re-launching applications, reboot operation system or restarts NiosII system, and reboot operation system also comprises the threshold value of re-launching applications;
And described backstage is guarded unit, according to the transmission cycle application programs of the first feeding-dog signal, timer is set.
It will be understood by those skilled in the art that restarting operating systems, be equivalent to carry out reboot order.Restart NiosII system: can realize restarting of whole NiosII system by restarting CPU.The condition of reboot operation system can be set: when some program process being restarted to number of times, reach 5 times, think that current operation system operation is undesired, carry out the action of reboot operation system.
Explanation by above-mentioned log-on message is visible, in step 11, according to the log-on message of described the first feeding-dog signal and described application program, described application program is carried out to reboot operation, can comprise:
When described timer expiry, described backstage is guarded unit and is not received described the first feeding-dog signal,, according to re-launching applications in reset pattern and program name Process identifier pid, restarts described application program;
Or, when restarting the number of times of described application program, reach threshold value, reboot operation system or restart NiosII system;
Or, after reboot operation system, and described timer expiry, do not receive described the first feeding-dog signal, restart NiosII system.
Namely, the application program that unit is monitored registration is in real time guarded on backstage, and the time block of application deployment (timer) to each registration receives the first feeding-dog signal that application program sends.Time block arranges pre-threshold value according to the transmission cycle of the first feeding-dog signal.If it is overtime to feed dog, time block is overtime, does not receive the first feeding-dog signal, and backstage is guarded the reset pattern of unit can be according to registration time and restarted, and comprises re-launching applications, reboot operation system, restarts NiosII system.
Exemplary, software watchdog (unit is guarded on backstage), all program process of registration will have been monitored in real time, when a certain application program is not carried out dog feeding operation to software watchdog in 2 minutes, software watchdog judges that this application program operation is undesired, starts and restarts application flow; When software watchdog carries out repeatedly (5 times) reboot operation to a certain application program, and this application program still work undesired (software watchdog not being carried out to dog feeding operation), the operation of software watchdog decision operation system is undesired, starts reboot operation system flow.
The house dog implementation method of the embodiment of the present invention based on NiosII system, also comprises:
Whether described backstage is guarded unit and is initiatively regularly inquired about special application program and move, when described special application program is not moved, according to the configuration parameter of described special application program, described special application program is restarted, wherein, described backstage is guarded and when unit starts, from configuration file, is read described configuration parameter at every turn.
Special application program can be understood as for some non-independently developed programs (process), backstage is guarded unit and is adopted the mode of active monitoring to realize the monitoring of these application programs and operation, , backstage finger daemon is regularly monitored the process of needs monitoring, the mode of monitoring is for whether normally whether this process of inquiry at operation (but being indifferent to operation), if find that this process does not exist, according to the configuration parameter of realizing, this process is restarted, or whole system (NiosII system) is restarted, correlation parameter (process name, path, restart correlation parameter) be all kept in a configuration file, when backstage finger daemon starts at every turn, from configuration file, reading the parameter needing safeguards these special processes.This part relates to reading of file, and xml formatted file is used in suggestion.
The house dog implementation method of the embodiment of the present invention based on NiosII system, described backstage is guarded between unit and application program and is adopted unix socket mode to communicate by letter, described backstage is guarded unit and is held as server, described application program is held as client, and communication data adopts msdh proprietary protocol frame structure.Backstage is guarded unit and is realized a server module, and corresponding application program realizes a client module, processes corresponding packet.Unix socket communication mode can be understood with reference to prior art, and therefore not to repeat here.
The house dog implementation method of the embodiment of the present invention based on NiosII system, can also comprise:
Described backstage is guarded unit and is sent configuration information to the described unit of guarding, and described configuration information comprises the transmission cycle of the second feeding-dog signal, described in guard unit, according to the transmission cycle of the second feeding-dog signal, timer be set.
Visible, in step 12, according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation, can comprise:
When described timer expiry, described in guard unit and do not receive described the second feeding-dog signal, described NiosII system is carried out reboot operation.
Exemplary, software watchdog (unit is guarded on backstage), to in every 5 seconds, hardware watchdog be carried out to dog feeding operation one time, if the operation of software watchdog process is undesired, in 10 seconds, hardware watchdog is not carried out to dog feeding operation, the operation of hardware watchdog judgement software watchdog is undesired, starts and restarts hardware operation (reset CPU), and then restart whole NiosII system.
The house dog implementation method of the embodiment of the present invention based on NiosII system, can also comprise:
Described application program is guarded unit and is sent to close and guard order to described backstage, notify described backstage to guard unit and stop described application program to monitor;
Or described application program is guarded unit and sent to close and guard cell command to described backstage, notify described backstage to guard to guard unit described in unit controls to stop monitoring.
Exemplary, when application program does not need software watchdog to monitor it, can send an order to software watchdog, notice software watchdog stops the monitoring to it, close software watchdog, close software watchdog and a certain application program is not monitored and reset operation with regard to sign.
When whole system (NiosII system) does not need in the situation of watchdog function, application program can send an order to software watchdog, inform that software watchdog closes hardware watchdog, software watchdog is configured the control register of hardware watchdog, is closed.Closing after hardware watchdog whole system (NiosII system) is just in and there is no the state of watchdog function (generally under debugging mode, needing this function).
Namely, application program can opening and closing software watchdog, hardware watchdog.Guard unit and can realize " On/Off " operation, and be defaulted as " closing " state, by backstage finger daemon, come to guarding unit, to carry out " unlatching " operation as required, to mask the impact of house dog on these operations in system debug and escalation process.
As shown in Figure 2, the embodiment of the present invention provides a kind of house dog implement device based on NiosII system, comprise guard unit 21, unit 22 and application program 23 are guarded in backstage:
Application program 23, sends the first feeding-dog signal for guard unit 21 to backstage;
Unit 22 is guarded on backstage, and the first feeding-dog signal sending for receiving application program 23, carries out reboot operation according to the log-on message of described the first feeding-dog signal and application program 23 to described application program;
Guard unit 21, for receiving backstage, guard the second feeding-dog signal that unit 22 sends, according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation.
The house dog implement device of the embodiment of the present invention based on NiosII system, application program can be for a plurality of, realize the watchdog system of processing multitask system structure, the stability of raising system, highly versatile, designs for multitask system, can monitor a plurality of application programs simultaneously, modular design, interface is simple, flexible, can change according to different demands.Can adapt to several operation systems, as linux, uC/OS-II, uClinux.
Wherein, the transmission cycle of described the second feeding-dog signal is less than the transmission cycle of the first feeding-dog signal.
The house dog implement device of the embodiment of the present invention based on NiosII system, NiosII is configured on fpga chip, guarding unit is also integrated on fpga chip, guard unit major function and be the second feeding-dog signal of guarding unit according to backstage NiosII system is carried out to reboot operation, its similar " hardware watchdog ", major function is realized by fpga chip.Wherein, hello the dog time interval of cell location hardware watchdog is guarded on backstage, and the dog time interval of feeding of hardware watchdog should be designed length as far as possible, and minimum be take " second " as unit conventionally.
The house dog implement device of the embodiment of the present invention based on NiosII system, it is backstage finger daemon that unit core is guarded on backstage, its similar one " software watchdog ", key property is running background.Also have, backstage finger daemon need to its operation before environment keep apart, guarantee the independence of software watchdog process, the impact of some elements before not moved.Unit major function is guarded on backstage: realize on the one hand the dog feeding operation to hardware watchdog, receive on the other hand the feeding-dog signal of a plurality of application programs, each application process is carried out to reboot operation, or operating system (as linux) is carried out to reboot operation, or whole NiosII system (comprising FPGA) is carried out to reboot operation.
Further, described application program, also for guard unit transmission log-on message to described backstage, register, described log-on message comprises transmission cycle, the Process identifier pid of program name, the first feeding-dog signal, reset pattern information, wherein, program name comprises routing information length, routing information parameter, reset pattern information comprises re-launching applications, reboot operation system or restarts NiosII system, and reboot operation system also comprises the threshold value of re-launching applications.
Unit is guarded on described backstage, also for the transmission cycle application programs according to the first feeding-dog signal, timer is set, when described timer expiry, do not receive described the first feeding-dog signal,, according to re-launching applications in reset pattern and program name Process identifier pid, restart described application program; Or, when restarting the number of times of described application program, reach threshold value, reboot operation system or restart NiosII system; Or, after reboot operation system, and described timer expiry, do not receive described the first feeding-dog signal, restart NiosII system.
For non-independently developed program (process), be regarded as special application program, unit is guarded on described backstage, also for initiatively regularly inquiring about special application program, whether move, when described special application program is not moved, according to the configuration parameter of described special application program, described special application program is restarted, wherein, described backstage is guarded and when unit starts, from configuration file, is read described configuration parameter at every turn.
Unit is guarded on described backstage, also for sending configuration information to the described unit of guarding;
The described unit of guarding, also for timer is set, when described timer expiry, does not receive described the second feeding-dog signal, and described NiosII system is carried out reboot operation.
Described application program, also sends to close and guards order for guard unit to described backstage, notifies described backstage to guard unit and stops described application program to monitor;
Or described application program, also sends to close and guard cell command for guard unit to described backstage, notify described backstage to guard to guard unit described in unit controls to stop monitoring.
As shown in Figure 3, the house dog implement device of the embodiment of the present invention based on NiosII system, is mainly divided into three parts:
Hardware watchdog 31: realized the basic function of a hardware watchdog by FPGA, receive the feeding-dog signal of software watchdog, can carry out reset operation to whole system (NiosII system).
Backstage finger daemon 32: a similar software watchdog, reception needs the registration of the corresponding program (process) of house dog operation, realize on the one hand the dog feeding operation to hardware watchdog, receive on the one hand the feeding-dog signal of a plurality of common applications, and the operation of each application program in real-time monitoring system, according to the ruuning situation of software watchdog, each application process is carried out to reboot operation, also can carry out reboot operation to linux system, if needed, also can to whole system (comprising FPGA), carry out reboot operation by stopping feeding dog to hardware watchdog.
Common application program 33: register to backstage finger daemon (software watchdog), submit necessary information to, registered rear periodicity software watchdog is carried out to dog feeding operation; Can " close/open " as required the software watchdog (timer) relevant to self, or " close/open " hardware watchdog.
In addition, the mutual needs communication protocol reasonable in design between common applications and backstage finger daemon, the communication between the two adopts unix socket to realize, that is and, background process is server end, and common applications is client end.
For the design of the non-self-developing of the process of moving in some systems, or some process and program be not real time execution, adopts the mode of software watchdog rhetorical question (or initiatively monitoring) these processes and program to realize the corresponding function of house dog.
Particularly:
(1), hardware watchdog.
This part major function has FPGA to realize, should the designing of the dog time interval of feeding of hardware watchdog tried one's best long, suggestion is minimum take " second " as unit, or this parameter designing is configurable, so that system arranges according to actual needs, in addition hardware watchdog should be realized " On/Off " operation, and be defaulted as " closing " state, by backstage finger daemon, come as required hardware watchdog to be carried out to " unlatching " operation, to mask the impact of house dog on these operations in system debug and escalation process.
(2), backstage finger daemon.
Adopt the corresponding literary style of finger daemon to design, finger daemon most important characteristic in backstage is running background; Secondly, backstage finger daemon must with its operation before environment keep apart.These environment comprise the filec descriptor of not closing, control terminal, session and process group, working directory and document creation mask etc.
Backstage finger daemon receives the registration from application program (process), the content of registration should comprise following contents: program name (comprising absolute path information), feed dog frequency information, process pid, restart relevant information (whether directly restarting system, the number of times of re-launching applications etc.).This partial content can need to be done corresponding expansion and cutting according to real system.
Backstage finger daemon for example completes, to the associative operation of hardware watchdog and control: startup/shutoff operation, and dog feeding operation, dog frequency etc. is fed in configuration.
Backstage finger daemon is monitored the corresponding application programs of registration in real time, time block of application deployment that will be to each registration, receive the feeding-dog signal of application program, and according to correlation parameter and the feeding-dog signal of registration, this application program is safeguarded to (restarting).
Backstage finger daemon will carry out corresponding record for processing and the operation (restarting) of each application programs (process), and is saved in journal file, for system-level reboot operation is also needed to record.
Between backstage finger daemon and application program (process), communicate by letter and adopt unix socket mode, finger daemon need to design a server module and process corresponding packet, and communication data adopts msdh(proprietary protocol) frame structure.
For some non-independently developed programs (process), the mode of backstage finger daemon active monitoring realizes the monitoring of these application programs and operation, , background process is regularly monitored the process of needs monitoring, the mode of monitoring is for whether normally whether this process of inquiry at operation (but being indifferent to operation), if find that this process does not exist, according to the configuration parameter of realizing, this process is restarted, or whole system is restarted, correlation parameter (process name, path, restart correlation parameter) be all kept in a configuration file, when backstage finger daemon starts at every turn, from configuration file, reading the parameter needing safeguards these special processes.This part relates to reading of file, and xml formatted file is used in suggestion.
As shown in Figure 4, finger daemon operational scheme in backstage comprises:
40, initialization.
After initialization, enter respectively 421,411,431.
411, receive the registration of other processes.
Receive the registration of other processes, this process is common process.
412, extract log-on message, and start a timer.
413, this process is monitored.
Receive feeding-dog signal, this process is monitored.
414, whether process initiation condition meets.
Process initiation condition meets, and enters 415, otherwise gets back to 413.
415, corresponding process is restarted to operating process.
416, process is restarted counting.
417, process is restarted condition and whether is reached threshold value.
Process is restarted condition and is reached threshold value,, enters 418, otherwise, enter 419.
418, system reboot flag is set.
Enter 422.
419, restart process.
Visible, backstage finger daemon has been realized the process of restarting to common process.
421, hardware watchdog is carried out to dog feeding operation.
Whether 422, system is restarted condition satisfied.
System is restarted condition and is met, and enters 423, otherwise, get back to 421.
423, stop feeding dog, restart system.
Visible, backstage finger daemon has been realized the process of restarting to system.
431, monitoring special processing.
432, whether special processing exists.
Special processing does not exist, and enters 433, otherwise, return to 431.
433, restart process.
Visible, backstage finger daemon has been realized the process of restarting to special processing.
(3), common applications.
As shown in Figure 5, common applications part-structure and interface:
Because this partial function is a general utility functions, in design, adopt modular mode, according to the mode of general-purpose library, design.
Common applications completes to backstage finger daemon registration, is about to necessary information and parameter and passes to background process.
Common applications completes the dog feeding operation to background process (software watchdog).
Between common applications and backstage finger daemon, communicate by letter and adopt unix socket mode, need to design a client module and process corresponding packet, communication protocol adopts msdh frame structure.
Common applications need to provide the interface of the correlation parameter of configuration background process, for example: " On/Off " house dog, dog frequency is fed in configuration, dog feeding operation, registration operation etc.
As shown in Figure 6, common applications software flow pattern:
Registration is transmitted PID, reset pattern, reset number, is fed dog time-out time, routing information length, routing information parameter to software watchdog.After succeeding in registration, software watchdog can be monitored the operation of this application program.And realize and restarting when hello dog is overtime.Cancellation is transmitted PID, routing information length, routing information parameter to software watchdog.After nullifying successfully, this application program departs from the monitoring of software watchdog.
Dog feeding operation: the mode by poll is periodically fed dog.If it is overtime to feed dog, the reset pattern in the time of can be according to registration is restarted, and comprises restarting application, restart system, restarting hardware.
Switch house dog: application program can opening and closing soft and hardware house dog, facilitates software development and software maintenance personnel debugged program.This operation can make house dog out of service, thereby can make all application programs depart from the monitoring of house dog.
Reboot operation: realize reboot operation by stopping feeding dog.If it is overtime to feed dog, the reset pattern in the time of can be according to registration is restarted, and comprises restarting application, restart system, restarting hardware.
Version querying: by checking that current house dog version understands the characteristic of current version house dog, be convenient to version management and the maintenance of house dog.
The above; be only the present invention's embodiment preferably, but protection scope of the present invention is not limited to this, is anyly familiar with in technical scope that those skilled in the art disclose in the present invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (10)

1. the house dog implementation method based on NiosII system, is characterized in that, comprising:
Backstage is guarded unit and is received the first feeding-dog signal that application program sends, and according to the log-on message of described the first feeding-dog signal and described application program, described application program is carried out to reboot operation;
Guard unit and receive the second feeding-dog signal that unit transmission is guarded on described backstage, according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation.
2. the house dog implementation method based on NiosII system according to claim 1, is characterized in that, described method also comprises:
Described application program is guarded unit transmission log-on message and is registered to described backstage, described log-on message comprises transmission cycle, the Process identifier pid of program name, the first feeding-dog signal, reset pattern information, wherein, program name comprises routing information length, routing information parameter, reset pattern information comprises re-launching applications, reboot operation system or restarts NiosII system, and reboot operation system also comprises the threshold value of re-launching applications;
Described backstage is guarded unit, according to the transmission cycle application programs of the first feeding-dog signal, timer is set;
According to the log-on message of described the first feeding-dog signal and described application program, described application program is carried out to reboot operation, comprising:
When described timer expiry, described backstage is guarded unit and is not received described the first feeding-dog signal,, according to re-launching applications in reset pattern and program name Process identifier pid, restarts described application program;
Or, when restarting the number of times of described application program, reach threshold value, reboot operation system or restart NiosII system;
Or, after reboot operation system, and described timer expiry, described backstage is guarded unit and is not received described the first feeding-dog signal, restarts NiosII system.
3. the house dog implementation method based on NiosII system according to claim 1 and 2, is characterized in that, described method also comprises:
Whether described backstage is guarded unit and is initiatively regularly inquired about special application program and move, when described special application program is not moved, according to the configuration parameter of described special application program, described special application program is restarted, wherein, described backstage is guarded and when unit starts, from configuration file, is read described configuration parameter at every turn.
4. the house dog implementation method based on NiosII system according to claim 1 and 2, is characterized in that, described method also comprises:
Described backstage is guarded unit and is sent configuration information to the described unit of guarding, and described configuration information comprises the transmission cycle of the second feeding-dog signal, described in guard unit, according to the transmission cycle of the second feeding-dog signal, timer be set;
According to described the second feeding-dog signal, described NiosII system is carried out to reboot operation, comprising:
When described timer expiry, do not receive described the second feeding-dog signal, described NiosII system is carried out reboot operation.
5. the house dog implementation method based on NiosII system according to claim 1 and 2, is characterized in that, described method also comprises:
Described application program is guarded unit and is sent to close and guard order to described backstage, notify described backstage to guard unit and stop described application program to monitor;
Or described application program is guarded unit and sent to close and guard cell command to described backstage, notify described backstage to guard to guard unit described in unit controls to stop monitoring.
6. the house dog implement device based on NiosII system, is characterized in that, comprise guard unit, unit and application program are guarded in backstage:
Described application program, sends the first feeding-dog signal for guarding unit to described backstage;
Unit is guarded on described backstage, and the first feeding-dog signal sending for receiving described application program, carries out reboot operation according to the log-on message of described the first feeding-dog signal and described application program to described application program;
The described unit of guarding, guards for receiving described backstage the second feeding-dog signal that unit sends, and according to described the second feeding-dog signal, described NiosII system is carried out to reboot operation.
7. the house dog implement device based on NiosII system according to claim 6, it is characterized in that, described application program, also for guard unit transmission log-on message to described backstage, register, described log-on message comprises program name, the transmission cycle of the first feeding-dog signal, Process identifier pid, reset pattern information, wherein, program name comprises routing information length, routing information parameter, reset pattern information comprises re-launching applications, reboot operation system or restart NiosII system, reboot operation system also comprises several threshold values of re-launching applications,
Unit is guarded on described backstage, also for the transmission cycle application programs according to the first feeding-dog signal, timer is set, when described timer expiry, do not receive described the first feeding-dog signal,, according to re-launching applications in reset pattern and program name Process identifier pid, restart described application program; Or, when restarting the number of times of described application program, reach threshold value, reboot operation system or restart NiosII system; Or, after reboot operation system, and described timer expiry, do not receive described the first feeding-dog signal, restart NiosII system.
8. according to the house dog implement device based on NiosII system described in claim 6 or 7, it is characterized in that, unit is guarded on described backstage, also for initiatively regularly inquiring about special application program, whether move, when described special application program is not moved, according to the configuration parameter of described special application program, described special application program is restarted, wherein, described backstage is guarded and when unit starts, from configuration file, is read described configuration parameter at every turn.
9. according to the house dog implement device based on NiosII system described in claim 6 or 7, it is characterized in that, unit is guarded on described backstage, also for sending configuration information to the described unit of guarding;
The described unit of guarding, also arranges timer for the transmission cycle according to the second feeding-dog signal, when described timer expiry, does not receive described the second feeding-dog signal, and described NiosII system is carried out reboot operation.
10. according to the house dog implement device based on NiosII system described in claim 6 or 7, it is characterized in that, described application program, also sends to close and guards order for guard unit to described backstage, notifies described backstage to guard unit and stops described application program to monitor;
Or described application program, also sends to close and guard cell command for guard unit to described backstage, notify described backstage to guard to guard unit described in unit controls to stop monitoring.
CN201310700948.3A 2013-12-18 2013-12-18 Watch-dog implementation method and device based on Nios II system Pending CN103645962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310700948.3A CN103645962A (en) 2013-12-18 2013-12-18 Watch-dog implementation method and device based on Nios II system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310700948.3A CN103645962A (en) 2013-12-18 2013-12-18 Watch-dog implementation method and device based on Nios II system

Publications (1)

Publication Number Publication Date
CN103645962A true CN103645962A (en) 2014-03-19

Family

ID=50251183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310700948.3A Pending CN103645962A (en) 2013-12-18 2013-12-18 Watch-dog implementation method and device based on Nios II system

Country Status (1)

Country Link
CN (1) CN103645962A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138345A (en) * 2015-07-10 2015-12-09 上海斐讯数据通信技术有限公司 Mobile terminal based multi-system starting system and method
CN105389249A (en) * 2015-10-29 2016-03-09 Tcl集团股份有限公司 Exception log generation configuring method and exception log generation configuring apparatus
CN106789280A (en) * 2016-12-27 2017-05-31 Tcl集团股份有限公司 A kind of upgrade protecting method and system, mobile terminal based on android system
CN109710441A (en) * 2018-12-20 2019-05-03 北京东土军悦科技有限公司 A kind of software watchdog, electronic equipment and computer storage medium
CN110032487A (en) * 2018-11-09 2019-07-19 阿里巴巴集团控股有限公司 Keep Alive supervision method, apparatus and electronic equipment
CN111555949A (en) * 2019-10-30 2020-08-18 江苏云涌电子科技股份有限公司 VPN application development platform and monitoring method thereof
CN114791835A (en) * 2022-03-16 2022-07-26 青岛海尔科技有限公司 Program restarting method and device, storage medium and electronic device
CN117112284A (en) * 2023-10-25 2023-11-24 西安热工研究院有限公司 DCS controller trusted state sensing method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080091970A1 (en) * 2006-10-12 2008-04-17 Takehiro Hanai Information processing system and method
CN101178662A (en) * 2006-11-08 2008-05-14 中兴通讯股份有限公司 Monitoring method of embedded LINUX applications progress
CN101996106A (en) * 2010-12-17 2011-03-30 南京中兴力维软件有限公司 Method for monitoring software running state
CN102081573A (en) * 2010-02-01 2011-06-01 杭州华三通信技术有限公司 Device and method for recording equipment restart reason
CN102231124A (en) * 2011-07-18 2011-11-02 深圳市科陆电子科技股份有限公司 Method for guarding tasks of embedded system
CN102637139A (en) * 2012-04-13 2012-08-15 华为技术有限公司 Method, device and single panel for feeding watchdog by embedded system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080091970A1 (en) * 2006-10-12 2008-04-17 Takehiro Hanai Information processing system and method
CN101178662A (en) * 2006-11-08 2008-05-14 中兴通讯股份有限公司 Monitoring method of embedded LINUX applications progress
CN102081573A (en) * 2010-02-01 2011-06-01 杭州华三通信技术有限公司 Device and method for recording equipment restart reason
CN101996106A (en) * 2010-12-17 2011-03-30 南京中兴力维软件有限公司 Method for monitoring software running state
CN102231124A (en) * 2011-07-18 2011-11-02 深圳市科陆电子科技股份有限公司 Method for guarding tasks of embedded system
CN102637139A (en) * 2012-04-13 2012-08-15 华为技术有限公司 Method, device and single panel for feeding watchdog by embedded system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138345A (en) * 2015-07-10 2015-12-09 上海斐讯数据通信技术有限公司 Mobile terminal based multi-system starting system and method
CN105389249A (en) * 2015-10-29 2016-03-09 Tcl集团股份有限公司 Exception log generation configuring method and exception log generation configuring apparatus
CN105389249B (en) * 2015-10-29 2019-04-16 Tcl集团股份有限公司 Abnormal log generates configuration method and abnormal log generates configuration device
CN106789280A (en) * 2016-12-27 2017-05-31 Tcl集团股份有限公司 A kind of upgrade protecting method and system, mobile terminal based on android system
CN110032487A (en) * 2018-11-09 2019-07-19 阿里巴巴集团控股有限公司 Keep Alive supervision method, apparatus and electronic equipment
CN109710441A (en) * 2018-12-20 2019-05-03 北京东土军悦科技有限公司 A kind of software watchdog, electronic equipment and computer storage medium
CN111555949A (en) * 2019-10-30 2020-08-18 江苏云涌电子科技股份有限公司 VPN application development platform and monitoring method thereof
CN114791835A (en) * 2022-03-16 2022-07-26 青岛海尔科技有限公司 Program restarting method and device, storage medium and electronic device
CN114791835B (en) * 2022-03-16 2023-11-28 青岛海尔科技有限公司 Program restarting method and device, storage medium and electronic device
CN117112284A (en) * 2023-10-25 2023-11-24 西安热工研究院有限公司 DCS controller trusted state sensing method and related device
CN117112284B (en) * 2023-10-25 2024-02-02 西安热工研究院有限公司 DCS controller trusted state sensing method and related device

Similar Documents

Publication Publication Date Title
CN103645962A (en) Watch-dog implementation method and device based on Nios II system
US20210182136A1 (en) Fault Processing Method, Related Apparatus, and Computer
US8677185B2 (en) Information processing apparatus
CN102761439B (en) Device and method for detecting and recording abnormity on basis of watchdog in PON (Passive Optical Network) access system
CN111831488B (en) TCMS-MPU control unit with safety level design
CN105740139B (en) A kind of debugging embedded software method based on virtual environment
CN107315656A (en) The Embedded PLC software rejuvenation method and PLC of many kernels
CN103778049A (en) Embedded system development log system
CN108762886B (en) Fault detection recovery method and system for virtual machine
CN107168773A (en) Positioning problems and the processing method and processing device of application recovery after a kind of JVM collapses
CN109766197A (en) A kind of 4G module stability working method based on android system
CN105426263A (en) Implementation method and system for secure operation of cashbox system
CN114237990A (en) FPGA chip-based two-multiplication redundancy switching method and device
CN109947576B (en) Method for managing internal agent program of virtual machine
CN202153352U (en) Watchdog device capable of preventing computer control system from failure
CN107273291B (en) Processor debugging method and system
CN114257492A (en) Fault processing method and device of intelligent network card, computer equipment and medium
US20230221940A1 (en) Methods and systems for dynamically creating upgrade specifications based on per device capabilities
CN104580135A (en) UEFI-based terminal real-time control system and method
CN114764227A (en) Control method and device for microprocessor of vehicle, vehicle and storage medium
CN112068980A (en) Method and device for sampling information before CPU hang-up, equipment and storage medium
CN105391575A (en) Treasury control method and system
JP2002182951A (en) Maintenance method for information processor and information processor
CN108549553B (en) 3ds Max process daemon method and device based on three-dimensional model cloud manufacturing
CN102819508A (en) Method for responding to signals from security monitoring subsystem

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140319

RJ01 Rejection of invention patent application after publication