CN106776178A - A kind of cpu fault method for implanting and its device and Fault Management System - Google Patents
A kind of cpu fault method for implanting and its device and Fault Management System Download PDFInfo
- Publication number
- CN106776178A CN106776178A CN201611170402.1A CN201611170402A CN106776178A CN 106776178 A CN106776178 A CN 106776178A CN 201611170402 A CN201611170402 A CN 201611170402A CN 106776178 A CN106776178 A CN 106776178A
- Authority
- CN
- China
- Prior art keywords
- cpu
- failure
- fault
- fileinfo
- associations
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2236—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Cpu fault type and corresponding failure file to be implanted is selected according to command line interface the invention discloses a kind of cpu fault method for implanting and its device based on linux, including User space cpu fault preparation module;Failure file is analyzed, the fileinfo that is out of order is extracted;In the cpu associations that be put into failure fileinfo in finj structures by User space cpu fault injection module, triggering submit function call write functions are set up and are communicated with the write functions in kernel state;Kernel state cpu fault injection module calls the write functions of self-contained rewriting to copy the failure fileinfo in cpu associations, in the failure fileinfo injection CPU that will be copied.The present invention can simulate various types of cpu faults and inject in CPU, be analyzed for the running status subsequently to CPU, so that for the cpu fault of subsequent treatment the type provides guidance;It is of the invention to also disclose a kind of Fault Management System including said apparatus, will not be repeated here.
Description
Technical field
The present invention relates to fault simulation technical field, more particularly to a kind of cpu fault method for implanting based on linux and
Its device.The invention further relates to a kind of Fault Management System.
Background technology
Arithmetic unit and controller in computer are referred to as central processor CPU, the core component of CPU computer system,
Can realize computing and control commander function, once CPU break down, can cause computer system cisco unity malfunction or
Delay machine.
Can in time be detected when CPU breaks down to ensure and correctly processed, therefore need to simulate what CPU was likely to occur
Various failures are analyzed, so that it is determined that various failures are corresponding and influenceing and providing guidance to the corresponding solution of failure.
Therefore, how a kind of cpu fault method for implanting and its device based on linux that can solve the problem that above mentioned problem is provided
And Fault Management System is the problem that those skilled in the art need to solve at present.
The content of the invention
It is an object of the invention to provide a kind of cpu fault method for implanting and its device based on linux, can simulate various
The cpu fault of type is simultaneously injected in CPU, is analyzed for the running status subsequently to CPU, so as to be subsequent treatment the type
Cpu fault provides guidance;It is a further object of the present invention to provide a kind of Fault Management System including said apparatus.
In order to solve the above technical problems, the invention provides a kind of cpu fault method for implanting based on linux, including:
User space cpu fault preparation module selects cpu fault type to be implanted and corresponding according to command line interface
Failure file;The failure file is analyzed, the fileinfo that is out of order is extracted;
In the cpu associations that be put into the failure fileinfo in finj structures by User space cpu fault injection module,
Triggering submit function call write functions are set up and are communicated with the write functions in kernel state;
Kernel state cpu fault injection module calls the write functions of self-contained rewriting to copy in the cpu associations
The failure fileinfo, the failure fileinfo that will be copied injected in the CPU.
Preferably, the process in the cpu associations that the failure fileinfo is put into finj structures is specific
For:
The CPU correlation preset functions of finj_parse structure memory storages are called, the failure fileinfo is put into
In cpu associations in finj structures.
Preferably, the write functions for calling self-contained rewriting copy the failure in the cpu associations
Fileinfo, the process that the failure fileinfo for copying is injected in the CPU is specially:
Selected CPU to be implanted;
The failure fileinfo for calling the write functions of self-contained rewriting to copy in the cpu associations, will
The failure fileinfo of copy is injected in the CPU to be implanted;
Interrupt processing flow is carried out using CPU to be implanted described in default inspection function pair.
In order to solve the above technical problems, present invention also offers a kind of cpu fault injection device based on linux, including:
User space cpu fault preparation module, for according to command line interface, select cpu fault type to be implanted and
Corresponding failure file;The failure file is analyzed, the fileinfo that is out of order is extracted;
User space cpu fault injection module, for the cpu joints being put into the failure fileinfo in finj structures
In vivo, triggering submit function call write functions are set up and are communicated with the write functions in kernel state;
Kernel state cpu fault injection module, the write functions for calling self-contained rewriting copy the cpu and join
The failure fileinfo in zoarium, the failure fileinfo that will be copied is injected in the CPU;
Communication module, for setting up the User space cpu fault injection module with the kernel state cpu fault injection module
Between communication.
Preferably, the User space cpu fault injection module is specifically included:
Storage unit, the CPU correlation preset functions for calling finj_parse structure memory storages, by failure text
Part information is put into the cpu associations in finj structures;
User space injection unit, adjusts for triggering the submit functions of the finj_parse structures memory storage
Set up with write functions and communicated with the write functions in kernel state, the failure fileinfo is copied to the kernel
In state.
Preferably, the kernel state cpu fault injection module is specifically included:
Selected unit, for selecting CPU to be implanted;
Kernel state injection unit, the write functions for calling self-contained rewriting are copied in the cpu associations
The failure fileinfo, the failure fileinfo that will be copied is injected in the CPU to be implanted;
Interrupt location, for carrying out interrupt processing flow using CPU to be implanted described in default inspection function pair.
In order to solve the above technical problems, present invention also offers a kind of Fault Management System, including CPU as described above
Fault injection device and subsequent analysis module;
The subsequent analysis module, for carrying out failure data analyzing to the CPU after injection failure.
Preferably, also include:
Diagnostic module, for carrying out fault diagnosis treatment to the CPU after injection direct fault location information, obtains diagnostic result.
Preferably, also include:
Collection module, the service data for collecting in the CPU runnings and after end of run.
The invention provides a kind of cpu fault method for implanting and its device based on linux, set in advance in User space side
Fault type and the corresponding direct fault location file of the type that CPU is likely to occur are put, is obtained by command line interface in User space
After taking the fault type and corresponding direct fault location file of a kind of CPU, copied after extraction is analyzed to the direct fault location file
To kernel state, it is then injected into CPU.It can be seen that, the present invention can in CPU simulated injection known type failure, so as to
It is enough that influence of this kind of fault type to CPU is determined according to the failure effect produced during CPU work under malfunction, and then be to solve
This kind of cpu fault provides guidance.Present invention also offers a kind of Fault Management System including said apparatus, it may have above-mentioned excellent
Point, will not be repeated here.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to institute in prior art and embodiment
The accompanying drawing for needing to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the invention
Example, for those of ordinary skill in the art, on the premise of not paying creative work, can also obtain according to these accompanying drawings
Obtain other accompanying drawings.
A kind of flow chart of the process of cpu fault method for implanting based on linux that Fig. 1 is provided for the present invention;
A kind of structural representation of cpu fault injection device based on linux that Fig. 2 is provided for the present invention;
A kind of structural representation of Fault Management System that Fig. 3 is provided for the present invention.
Specific embodiment
Core of the invention is to provide a kind of cpu fault method for implanting and its device based on linux, can simulate various
The cpu fault of type is simultaneously injected in CPU, is analyzed for the running status subsequently to CPU, so as to be subsequent treatment the type
Cpu fault provides guidance;Another core of the invention is to provide a kind of Fault Management System including said apparatus.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The invention provides a kind of cpu fault method for implanting based on linux, shown in Figure 1, Fig. 1 is carried for the present invention
A kind of flow chart of the process of the cpu fault method for implanting based on linux for supplying;The method includes:
Step s101:User space cpu fault preparation module selects cpu fault type to be implanted according to command line interface
And corresponding failure file;Failure file is analyzed, the fileinfo that is out of order is extracted;
Wherein, every kind of cpu fault type is provided with a failure file correspondingly in advance.
Step s102:Failure fileinfo is put into User space cpu fault injection module the cpu joints in finj structures
In vivo, triggering submit function call write functions are set up and are communicated with the write functions in kernel state;
Step s103:Kernel state cpu fault injection module calls the write functions of self-contained rewriting to copy cpu connection
Failure fileinfo in zoarium, in the failure fileinfo injection CPU that will be copied.
Wherein, the process in cpu associations failure fileinfo being put into finj structures is specially:
The CPU correlation preset functions of finj_parse structure memory storages are called, failure fileinfo is put into finj knots
In cpu associations in structure body.
Wherein, CPU correlation preset functions here include that CPU initialization functions, CPU analytical functions, CPU remove function
Deng certainly, specifically whether several functions or whether being not especially limited comprising other functions present invention comprising more than.
In addition, the process of step s103 is specially:
Selected CPU to be implanted;
The failure fileinfo for calling the write functions of self-contained rewriting to copy in cpu associations, the event that will be copied
Barrier fileinfo is injected in CPU to be implanted;
Interrupt processing flow is carried out using default inspection function pair CPU to be implanted.
It is understood that CPU to be implanted is carried out interrupt processing flow be in order to ensure CPU when breaking down,
Abnormality processing flow can be carried out, and guides a treatment to complete.
Introduced with reference to realizing that code skeleton work of the invention is specific:
The invention provides a kind of cpu fault method for implanting based on linux, pre-setting CPU in User space side can
The fault type and the corresponding direct fault location file of the type that can occur, obtain a kind of in User space by command line interface
After the fault type of CPU and corresponding direct fault location file, kernel is copied to after extraction is analyzed to the direct fault location file
In state, it is then injected into CPU.It can be seen that, the present invention can in CPU simulated injection known type failure such that it is able to according to
The failure effect produced when CPU works under malfunction determines influence of this kind of fault type to CPU, and then to solve this kind
Cpu fault provides guidance.
Shown in Figure 2 present invention also offers a kind of cpu fault injection device based on linux, Fig. 2 is the present invention
A kind of structural representation of the cpu fault injection device based on linux for providing;The device includes:
User space cpu fault preparation module 1, for according to command line interface, select cpu fault type to be implanted and
Corresponding failure file;Failure file is analyzed, the fileinfo that is out of order is extracted;
User space cpu fault injection module 2, for the cpu associations being put into failure fileinfo in finj structures
Interior, triggering submit function call write functions are set up and are communicated with the write functions in kernel state;
Kernel state cpu fault injection module 4, the write functions for calling self-contained rewriting copy cpu associations
Interior failure fileinfo, in the failure fileinfo injection CPU that will be copied;
Communication module 3, for setting up between User space cpu fault injection module 2 and kernel state cpu fault injection module 4
Communication.
Wherein, User space cpu fault injection module 2 is specifically included:
Storage unit 21, the CPU correlation preset functions for calling finj_parse structure memory storages, by failure file
Information is put into the cpu associations in finj structures;
User space injection unit 22, calls for triggering the submit functions of finj_parse structure memory storages
Write functions are set up and are communicated with the write functions in kernel state, and failure fileinfo is copied in kernel state.
In addition, kernel state cpu fault injection module 4 is specifically included:
Selected unit 41, for selecting CPU to be implanted;
Kernel state injection unit 42, the write functions for calling self-contained rewriting copy the event in cpu associations
Barrier fileinfo, the failure fileinfo that will be copied is injected in CPU to be implanted;
Interrupt location 43, for carrying out interrupt processing flow using default inspection function pair CPU to be implanted.
The invention provides a kind of cpu fault injection device based on linux, pre-setting CPU in User space side can
The fault type and the corresponding direct fault location file of the type that can occur, obtain a kind of in User space by command line interface
After the fault type of CPU and corresponding direct fault location file, kernel is copied to after extraction is analyzed to the direct fault location file
In state, it is then injected into CPU.It can be seen that, the present invention can in CPU simulated injection known type failure such that it is able to according to
The failure effect produced when CPU works under malfunction determines influence of this kind of fault type to CPU, and then to solve this kind
Cpu fault provides guidance.
Present invention also offers a kind of Fault Management System, including above cpu fault injection device and subsequent analysis module;
Subsequent analysis module 51, for carrying out failure data analyzing to the CPU after injection failure.
Preferably, the system also includes:
Diagnostic module 52, for carrying out fault diagnosis treatment to the CPU after injection direct fault location information, obtains diagnosis knot
Really.
Preferably, the system also includes:
Collection module 53, the service data for collecting in CPU runnings and after end of run.
Certainly, some other module for carrying out subsequent treatment is may also include in Fault Management System, the present invention is to this
It is not particularly limited.
It is shown in Figure 3, a kind of structural representation of Fault Management System that Fig. 3 is provided for the present invention.
It should be noted that in this manual, term " including ", "comprising" or its any other variant be intended to
Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or uses the present invention.
Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The scope most wide for causing.
Claims (9)
1. a kind of cpu fault method for implanting based on linux, it is characterised in that including:
User space cpu fault preparation module selects cpu fault type and corresponding failure to be implanted according to command line interface
File;The failure file is analyzed, the fileinfo that is out of order is extracted;
In the cpu associations that be put into the failure fileinfo in finj structures by User space cpu fault injection module, triggering
Submit function call write functions are set up and are communicated with the write functions in kernel state;
Kernel state cpu fault injection module calls the write functions of self-contained rewriting to copy the institute in the cpu associations
Failure fileinfo is stated, the failure fileinfo that will be copied is injected in the CPU.
2. method according to claim 1, it is characterised in that described that the failure fileinfo is put into finj structures
In cpu associations in process be specially:
The CPU correlation preset functions of finj_parse structure memory storages are called, the failure fileinfo is put into finj knots
In cpu associations in structure body.
3. method according to claim 1, it is characterised in that the write functions for calling self-contained rewriting are copied
The failure fileinfo in cpu associations described in shellfish, the mistake that the failure fileinfo that will be copied is injected in the CPU
Journey is specially:
Selected CPU to be implanted;
The failure fileinfo for calling the write functions of self-contained rewriting to copy in the cpu associations, will copy
The failure fileinfo inject in the CPU to be implanted;
Interrupt processing flow is carried out using CPU to be implanted described in default inspection function pair.
4. a kind of cpu fault injection device based on linux, it is characterised in that including:
User space cpu fault preparation module, for according to command line interface, selecting cpu fault type and correspondence to be implanted
Failure file;The failure file is analyzed, the fileinfo that is out of order is extracted;
User space cpu fault injection module, for the cpu associations being put into the failure fileinfo in finj structures
Interior, triggering submit function call write functions are set up and are communicated with the write functions in kernel state;
Kernel state cpu fault injection module, the write functions for calling self-contained rewriting copy the cpu associations
The interior failure fileinfo, the failure fileinfo that will be copied is injected in the CPU;
Communication module, for setting up between the User space cpu fault injection module and the kernel state cpu fault injection module
Communication.
5. device according to claim 4, it is characterised in that the User space cpu fault injection module is specifically included:
Storage unit, the CPU correlation preset functions for calling finj_parse structure memory storages, by failure file letter
Breath is put into the cpu associations in finj structures;
User space injection unit, calls for triggering the submit functions of the finj_parse structures memory storage
Write functions are set up and are communicated with the write functions in kernel state, and the failure fileinfo is copied into the kernel state
It is interior.
6. device according to claim 4, it is characterised in that the kernel state cpu fault injection module is specifically included:
Selected unit, for selecting CPU to be implanted;
Kernel state injection unit, described in the write functions copy cpu associations for calling self-contained rewriting
Failure fileinfo, the failure fileinfo that will be copied is injected in the CPU to be implanted;
Interrupt location, for carrying out interrupt processing flow using CPU to be implanted described in default inspection function pair.
7. a kind of Fault Management System, it is characterised in that including the cpu fault injection device as described in claim 3 or 4 and after
Continuous analysis module;
The subsequent analysis module, for carrying out failure data analyzing to the CPU after injection failure.
8. Fault Management System according to claim 7, it is characterised in that also include:
Diagnostic module, for carrying out fault diagnosis treatment to the CPU after injection direct fault location information, obtains diagnostic result.
9. Fault Management System according to claim 7, it is characterised in that also include:
Collection module, the service data for collecting in the CPU runnings and after end of run.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611170402.1A CN106776178A (en) | 2016-12-16 | 2016-12-16 | A kind of cpu fault method for implanting and its device and Fault Management System |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611170402.1A CN106776178A (en) | 2016-12-16 | 2016-12-16 | A kind of cpu fault method for implanting and its device and Fault Management System |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106776178A true CN106776178A (en) | 2017-05-31 |
Family
ID=58893298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611170402.1A Pending CN106776178A (en) | 2016-12-16 | 2016-12-16 | A kind of cpu fault method for implanting and its device and Fault Management System |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106776178A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115729724A (en) * | 2022-11-30 | 2023-03-03 | 中电金信软件有限公司 | Fault injection method, fault test system, electronic device and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270173A (en) * | 2011-07-21 | 2011-12-07 | 哈尔滨工业大学 | Fault injection tool based on SCSI (small computer system interface) driver layer |
GB201319987D0 (en) * | 2013-11-13 | 2013-12-25 | Ibm | Injecting lost packets and protocol errors in a simulation environment |
CN103529820A (en) * | 2013-09-26 | 2014-01-22 | 北京航天自动控制研究所 | Fault injection testing system and testing method applied to embedded equipment |
CN103678131A (en) * | 2013-12-18 | 2014-03-26 | 哈尔滨工业大学 | Software failure injection and analysis system of multi-core processor |
-
2016
- 2016-12-16 CN CN201611170402.1A patent/CN106776178A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270173A (en) * | 2011-07-21 | 2011-12-07 | 哈尔滨工业大学 | Fault injection tool based on SCSI (small computer system interface) driver layer |
CN103529820A (en) * | 2013-09-26 | 2014-01-22 | 北京航天自动控制研究所 | Fault injection testing system and testing method applied to embedded equipment |
GB201319987D0 (en) * | 2013-11-13 | 2013-12-25 | Ibm | Injecting lost packets and protocol errors in a simulation environment |
CN103678131A (en) * | 2013-12-18 | 2014-03-26 | 哈尔滨工业大学 | Software failure injection and analysis system of multi-core processor |
Non-Patent Citations (1)
Title |
---|
李金锋: "基于AER的PCIE总线故障注入工具研究", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115729724A (en) * | 2022-11-30 | 2023-03-03 | 中电金信软件有限公司 | Fault injection method, fault test system, electronic device and readable storage medium |
CN115729724B (en) * | 2022-11-30 | 2024-05-10 | 中电金信软件有限公司 | Fault injection method, fault test system, electronic device and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104536776B (en) | A kind of method and apparatus running plug-in application in the plug-in component operation environment of host end | |
CN105843694A (en) | Methods and apparatus for controlled recovery of error information between independently operable processors | |
EP1970807A1 (en) | Failsafe computer support assistant | |
US10235281B2 (en) | Automated test runs in an integrated development environment system and method | |
CN105955802A (en) | Application operation method for mobile terminal, and mobile terminal | |
CN110389834A (en) | A kind of method and apparatus for submitting deep learning training mission | |
CN111936972A (en) | Exception handling in transactions | |
CN105843697B (en) | A kind of the interruption restoration methods and system of browser control part | |
CN109032828A (en) | Using abnormality eliminating method and terminal | |
CN105138337B (en) | A kind of plug-in unit adaptation method and plug-in unit adaptive device | |
CN106598799A (en) | Fault injection simulation system and fault management system | |
CN106776180A (en) | A kind of PCIE fault filling methods and its device and Fault Management System | |
CN103595742A (en) | A method and an apparatus for debugging webpage CSS | |
CN106776178A (en) | A kind of cpu fault method for implanting and its device and Fault Management System | |
CN114184885A (en) | Fault detection method, device and storage medium | |
CN104486149B (en) | A kind of finite state machine method for ground test | |
US20160283050A1 (en) | Adaptive tour interface engine | |
CN106776175A (en) | A kind of failure management method of internal memory, system and Fault Management System | |
CN106598797B (en) | Multi-path IO fault injection method and system and fault management system | |
CN107908433A (en) | Verify method, apparatus, equipment and the computer-readable recording medium of input content | |
CN103777952B (en) | The method that security protection matrix is controlled based on macroprogramming | |
CN105700915A (en) | Method and device integrating watchdog function and monitoring software programming function | |
CN103777935A (en) | Webpage processing method and device | |
CN112363874B (en) | Equipment debugging method and device, heating and ventilation equipment and computer readable storage medium | |
US9691036B2 (en) | Decision making in an elastic interface environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |