CN106209456A - A kind of kernel state lower network fault detection method and device - Google Patents
A kind of kernel state lower network fault detection method and device Download PDFInfo
- Publication number
- CN106209456A CN106209456A CN201610551725.9A CN201610551725A CN106209456A CN 106209456 A CN106209456 A CN 106209456A CN 201610551725 A CN201610551725 A CN 201610551725A CN 106209456 A CN106209456 A CN 106209456A
- Authority
- CN
- China
- Prior art keywords
- event
- failure
- fault
- error message
- message
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
Abstract
The invention discloses a kind of kernel state lower network fault detection method and device.The method comprises the following steps: when there is error message by protocol layer events collection module in fault collection function being detected, according to error message, generating event of failure, error message is the error message in transmission of data packets;By event sending module, event of failure is packaged, and the event of failure after encapsulation is added in event of failure list;Monitoring event of failure list by event receiver module, and resolve the event of failure in event of failure list, it is thus achieved that fault details, output fault message, to system user, carries fault details in fault message.The application technical scheme that provided of the embodiment of the present invention, it is achieved that under kernel state, packet loading error occurring detects automatically, facilitates the timely awareness network of system user to make mistakes details.
Description
Technical field
The present invention relates to operation system technology field, particularly relate to a kind of kernel state lower network fault detection method and dress
Put.
Background technology
In the information age, network shows very important effect.Either at individual's main frame the most in the server,
The availability of network and reliability all directly affect systematic function, determine the quality of communication between main frame.
When network failure occurs in computer system, user would generally detect network by outside network-management tool
Problem, conventional network-management tool, such as ping, netstat, ip etc., is all to network problem from the angle of User space
Detecting, need user to be familiar with corresponding network-management tool and just can carry out the detection of network problem, operation is relatively more passive, no
The timely awareness network of user is facilitated to make mistakes details.
Summary of the invention
For solving above-mentioned technical problem, the present invention provides a kind of kernel state lower network fault detection method and device.
A kind of kernel state lower network fault detection method, including:
When there is error message by protocol layer events collection module in fault collection function being detected, according to described difference
Misrepresenting deliberately literary composition, generate event of failure, described error message is the error message in transmission of data packets;
By event sending module, described event of failure is packaged, and adds the event of failure after encapsulation to fault
In list of thing;
Described event of failure list is monitored by event receiver module, and to the event of failure in described event of failure list
Resolving, it is thus achieved that fault details, output fault message, to system user, carries described fault details in described fault message.
In a kind of detailed description of the invention of the present invention, described according to described error message, generate event of failure, including:
Utilize fault processing function that described error message is resolved;
According to the header information of described error message, generate event of failure.
In a kind of detailed description of the invention of the present invention, described will encapsulation after event of failure add event of failure list to
In, including:
Call the event of failure after registered event transmission function will encapsulate and add in event of failure list, described thing
It is that the registration of described event receiver module is called for described event sending module that part sends function.
In a kind of detailed description of the invention of the present invention, described event of failure comprises event of failure chained list pointer information,
The order of severity letter of IP version information, type of message information, type of message subcode information, error code information and error message
Breath.
A kind of kernel state lower network failure detector, including:
Protocol layer events collection module, during for there is error message in fault collection function being detected, according to described
Error message, generates event of failure, and described error message is the error message in transmission of data packets;
Event sending module, for being packaged described event of failure, and adds the event of failure after encapsulation to event
In barrier list of thing;
Event receiver module, is used for monitoring described event of failure list, and to the fault thing in described event of failure list
Part resolves, it is thus achieved that fault details, and output fault message, to system user, carries described fault detailed in described fault message
Feelings.
In a kind of detailed description of the invention of the present invention, described protocol layer events collection module, specifically for:
Utilize fault processing function that described error message is resolved;
According to the header information of described error message, generate event of failure.
In a kind of detailed description of the invention of the present invention, described event sending module, specifically for:
Call the event of failure after registered event transmission function will encapsulate and add in event of failure list, described thing
It is that the registration of described event receiver module is called for described event sending module that part sends function.
In a kind of detailed description of the invention of the present invention, described event of failure comprises event of failure chained list pointer information,
The order of severity letter of IP version information, type of message information, type of message subcode information, error code information and error message
Breath.
The technical scheme that the application embodiment of the present invention is provided, can detect fault by protocol layer events collection module and receive
Whether set function existing error message, when there is error message, event of failure can be generated according to error message, pass through
Event of failure can be packaged by event sending module, and adds in event of failure list by the event of failure after encapsulation,
Event of failure list can be monitored by event receiver module, and the event of failure listened to is resolved, it is thus achieved that fault is detailed
Feelings, export fault message to system user.Achieve packet loading error occurring under kernel state automatically to detect, facilitate system user and
Time awareness network make mistakes details.
Accompanying drawing explanation
For the clearer explanation embodiment of the present invention or the technical scheme of prior art, below will be to embodiment or existing
In technology description, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to root
Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the implementing procedure figure of a kind of kernel state lower network fault detection method in the embodiment of the present invention;
Fig. 2 is the structural representation of a kind of kernel state lower network failure detector in the embodiment of the present invention.
Detailed description of the invention
In order to make those skilled in the art be more fully understood that the present invention program, below in conjunction with the accompanying drawings and detailed description of the invention
The present invention is described in further detail.Obviously, described embodiment be only 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 are not making creative work premise
Lower obtained every other embodiment, broadly falls into the scope of protection of the invention.
Shown in Figure 1, by the enforcement of a kind of kernel state lower network fault detection method that the embodiment of the present invention is provided
Flow chart, the method may comprise steps of:
S110: when there is error message by protocol layer events collection module in fault collection function being detected, according to
Error message, generates event of failure.
Error message is the error message in transmission of data packets.
In embodiments of the present invention, can be by amendment fault processing function err_handler, in amendment Linux is original
The error handling method of each agreement in core protocol layer.Concrete, fault can be added at fault processing function and collect function, be allowed to
There is fault collecting function.
In transmission of data packets, if encountered problems, by the fault processing of invocation protocol structure net_protocol
Function err_handler, can record error message in the fault collection function of fault processing function, and this error message is
Error message in transmission of data packets.
Can detect fault collects in function whether there is error message, if deposited by protocol layer events collection module
, then protocol layer events collection module can generate event of failure according to this error message.
In a kind of detailed description of the invention of the present invention, according to error message, the step generating event of failure is the most permissible
Comprise the following steps:
Step one: utilize fault processing function that error message is resolved;
Step 2: according to the header information of error message, generates event of failure.
For ease of describing, above-mentioned two step is combined and illustrates.
In actual applications, when there is error message during protocol layer events collection module detects fault collection function,
Its member fault processing function err_ can be utilized based on structure struct net_protocol in kernel code
Handler, resolves error message, is i.e. analyzed error message packet, it is thus achieved that the head letter of this error message
Breath.According to the header information of error message, event of failure can be generated.
In embodiments of the present invention, event of failure comprises event of failure chained list pointer information, IP version information, message
The order of severity information of type information, type of message subcode information, error code information and error message.
Event of failure structure is defined as follows:
In this event of failure structure, list is event of failure chain list index;Ipv represents IP version number;Type is report
Literary composition type, wherein, in ipv4, ICMP_TIME_EXCEEDED, ICMP_SOURCE_QUENCH, ICMP_
PARAMETERPROB, ICMP_DEST_UNREACH are error message, in ipv6, ICMPV6_DEST_UNREACH,
ICMPV6_PKT_TOOBIG, ICMPV6_TIME_EXCEED, ICMPV6_PARAMPROB are error message;Code is message class
Type subcode, may further determine that type of error by this information;Err is error code, the mistake of different types of error message
Code is different, illustrates that fault type is different;Harderr represents the order of severity of error message, if can repair.
Error message is resolved by protocol layer events collection module, it is thus achieved that after the header information of error message, Ke Yigen
According to the header information of this error message, the member in event of failure structure protocol_evt is carried out assignment, generate fault
Event.Such as, in UDP, err_handler is assigned _ _ udp4_lib_err (), adds in _ _ udp4_lib_err ()
Add respective code, it is possible to achieve the assignment to member each in protocol_evt.
After generating event of failure by protocol layer events collection module, the operation of step S120 can be continued executing with.
S120: event of failure is packaged by event sending module, and add the event of failure after encapsulation to event
In barrier list of thing.
In step S110, after generating event of failure by protocol layer events collection module, can be sent out by event further
Send module that event of failure is packaged, and the event of failure after encapsulation is added in event of failure list.
In a kind of detailed description of the invention of the present invention, the event of failure after encapsulation is added in event of failure list
Step specifically may comprise steps of:
Calling the event of failure after registered event transmission function will encapsulate to add in event of failure list, event is sent out
Sending function is that the registration of event receiver module is called for event sending module.
Event sending module calls the event of failure after registered event transmission function will encapsulate and adds event of failure to
In list, this event of failure list can be monitored by event receiver module.
For example, event transmission function protocol_post_error can be expressed as follows:
In above-mentioned code, protocol_evt_post is concrete transmission function, external module realize.In reality
In application, above-mentioned code can be loaded onto Core Operational with the dynamic patch mechanism of kpatch.
External module realize send event of failure function, with the form loading work of ko module, be specifically referred to
Lower code:
S130: monitor event of failure list by event receiver module, and the event of failure in event of failure list is entered
Row resolves, it is thus achieved that fault details, and output fault message, to system user, carries fault details in fault message.
In step S110 and step S120, event of failure can be generated by protocol layer events collection module, pass through thing
Event of failure can be packaged by part sending module, and is added in event of failure list by the event of failure after encapsulation.
In embodiments of the present invention, event of failure list can be monitored by event receiver module.When listening to fault thing
When part list exists event of failure, event of failure can be resolved, it is thus achieved that fault details, and fault message is exported to
System user, carries fault details in fault message.
For example, the specific works process of event receiver module is referred to code below:
Wherein, structure protocol_evt_u is the event structure under User space, and errmsg_parse () can basis
The member value of event of failure, resolves fault details, exports fault message.
In embodiments of the present invention, kpatch runtime kernel patching mode is utilized, in amendment Linux original core protocol layer
The error handling method of each agreement, adds fault and collects function, it is achieved that packet loading error occurring detects.
The method that the application embodiment of the present invention is provided, can detect fault by protocol layer events collection module and collect letter
Whether number existing error message, when there is error message, event of failure can be generated according to error message, pass through event
Event of failure can be packaged by sending module, and is added in event of failure list by the event of failure after encapsulation, passes through
Event receiver module can monitor event of failure list, and resolves the event of failure listened to, it is thus achieved that fault details, to
System user output fault message.Achieve packet loading error occurring under kernel state automatically to detect, facilitate system user timely
Solve network error details.
Corresponding to above method embodiment, present invention also offers a kind of kernel state lower network failure detector.
Shown in Figure 2, this device can include with lower module:
Protocol layer events collection module 210, during for there is error message in fault collection function being detected, according to difference
Misrepresenting deliberately literary composition, generate event of failure, error message is the error message in transmission of data packets;
Event sending module 220, for being packaged event of failure, and adds the event of failure after encapsulation to fault
In list of thing;
Event receiver module 230, is used for monitoring event of failure list, and carries out the event of failure in event of failure list
Resolving, it is thus achieved that fault details, output fault message, to system user, carries fault details in fault message.
The device that the application embodiment of the present invention is provided, can detect fault by protocol layer events collection module and collect letter
Whether number existing error message, when there is error message, event of failure can be generated according to error message, pass through event
Event of failure can be packaged by sending module, and is added in event of failure list by the event of failure after encapsulation, passes through
Event receiver module can monitor event of failure list, and resolves the event of failure listened to, it is thus achieved that fault details, to
System user output fault message.Achieve packet loading error occurring under kernel state automatically to detect, facilitate system user timely
Solve network error details.
In a kind of detailed description of the invention of the present invention, protocol layer events collection module 210, specifically for:
Utilize fault processing function that error message is resolved;
According to the header information of error message, generate event of failure.
In a kind of detailed description of the invention of the present invention, event sending module 220, specifically for:
Calling the event of failure after registered event transmission function will encapsulate to add in event of failure list, event is sent out
Sending function is that event receiver module 230 is registered and called for event sending module 220.
In a kind of detailed description of the invention of the present invention, event of failure comprises event of failure chained list pointer information, IP version
This number information, type of message information, type of message subcode information, error code information and the order of severity information of error message.
In this specification, each embodiment uses the mode gone forward one by one to describe, and what each embodiment stressed is and other
The difference of embodiment, between each embodiment, same or similar part sees mutually.For filling disclosed in embodiment
For putting, owing to it corresponds to the method disclosed in Example, so describe is fairly simple, relevant part sees method part
Illustrate.
Professional further appreciates that, in conjunction with the unit of each example that the embodiments described herein describes
And algorithm steps, it is possible to electronic hardware, computer software or the two be implemented in combination in, in order to clearly demonstrate hardware and
The interchangeability of software, the most generally describes composition and the step of each example according to function.These
Function performs with hardware or software mode actually, depends on application-specific and the design constraint of technical scheme.Specialty
Technical staff specifically should can be used for using different methods to realize described function to each, but this realization should not
Think beyond the scope of this invention.
The method described in conjunction with the embodiments described herein or the step of algorithm can direct hardware, processor be held
The software module of row, or the combination of the two implements.Software module can be placed in random access memory (RAM), internal memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, depositor, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above a kind of kernel state lower network fault detection method provided by the present invention and device are described in detail.
Principle and the embodiment of the present invention are set forth by specific case used herein, and the explanation of above example is simply used
In helping to understand method and the core concept thereof of the present invention.It should be pointed out that, for those skilled in the art,
Under the premise without departing from the principles of the invention, it is also possible to the present invention is carried out some improvement and modification, these improve and modify also
Fall in the protection domain of the claims in the present invention.
Claims (8)
1. a kernel state lower network fault detection method, it is characterised in that including:
When there is error message by protocol layer events collection module in fault collection function being detected, according to described mistake report
Literary composition, generates event of failure, and described error message is the error message in transmission of data packets;
By event sending module, described event of failure is packaged, and adds the event of failure after encapsulation to event of failure
In list;
Monitor described event of failure list by event receiver module, and the event of failure in described event of failure list is carried out
Resolving, it is thus achieved that fault details, output fault message, to system user, carries described fault details in described fault message.
Method the most according to claim 1, it is characterised in that described according to described error message, generates event of failure, bag
Include:
Utilize fault processing function that described error message is resolved;
According to the header information of described error message, generate event of failure.
Method the most according to claim 1 and 2, it is characterised in that described will encapsulation after event of failure add fault to
In list of thing, including:
Calling the event of failure after registered event transmission function will encapsulate and add in event of failure list, described event is sent out
Sending function is that the registration of described event receiver module is called for described event sending module.
Method the most according to claim 3, it is characterised in that comprise event of failure chain list index letter in described event of failure
Breath, IP version information, type of message information, type of message subcode information, error code information and the order of severity of error message
Information.
5. a kernel state lower network failure detector, it is characterised in that including:
Protocol layer events collection module, during for there is error message in fault collection function being detected, according to described mistake
Message, generates event of failure, and described error message is the error message in transmission of data packets;
Event sending module, for being packaged described event of failure, and adds the event of failure after encapsulation to fault thing
In part list;
Event receiver module, is used for monitoring described event of failure list, and enters the event of failure in described event of failure list
Row resolves, it is thus achieved that fault details, and output fault message, to system user, carries described fault details in described fault message.
Device the most according to claim 5, it is characterised in that described protocol layer events collection module, specifically for:
Utilize fault processing function that described error message is resolved;
According to the header information of described error message, generate event of failure.
7. according to the device described in claim 5 or 6, it is characterised in that described event sending module, specifically for:
Calling the event of failure after registered event transmission function will encapsulate and add in event of failure list, described event is sent out
Sending function is that the registration of described event receiver module is called for described event sending module.
Device the most according to claim 7, it is characterised in that comprise event of failure chain list index letter in described event of failure
Breath, IP version information, type of message information, type of message subcode information, error code information and the order of severity of error message
Information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610551725.9A CN106209456B (en) | 2016-07-13 | 2016-07-13 | A kind of kernel state lower network fault detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610551725.9A CN106209456B (en) | 2016-07-13 | 2016-07-13 | A kind of kernel state lower network fault detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106209456A true CN106209456A (en) | 2016-12-07 |
CN106209456B CN106209456B (en) | 2019-08-02 |
Family
ID=57477543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610551725.9A Active CN106209456B (en) | 2016-07-13 | 2016-07-13 | A kind of kernel state lower network fault detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106209456B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107483287A (en) * | 2017-08-17 | 2017-12-15 | 郑州云海信息技术有限公司 | A kind of Auto Observation System mouth data pack receiving and transmitting failure system and method |
CN107766167A (en) * | 2017-10-23 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of fault log repeats to report an error the method for merger |
CN115396308A (en) * | 2022-07-27 | 2022-11-25 | 阿里巴巴(中国)有限公司 | System, method and device for maintaining network stability of data center |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103001811A (en) * | 2012-12-31 | 2013-03-27 | 北京启明星辰信息技术股份有限公司 | Method and device for fault locating |
CN104993584A (en) * | 2015-06-03 | 2015-10-21 | 广西电网有限责任公司 | Information preserving failure generating method and system |
-
2016
- 2016-07-13 CN CN201610551725.9A patent/CN106209456B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103001811A (en) * | 2012-12-31 | 2013-03-27 | 北京启明星辰信息技术股份有限公司 | Method and device for fault locating |
CN104993584A (en) * | 2015-06-03 | 2015-10-21 | 广西电网有限责任公司 | Information preserving failure generating method and system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107483287A (en) * | 2017-08-17 | 2017-12-15 | 郑州云海信息技术有限公司 | A kind of Auto Observation System mouth data pack receiving and transmitting failure system and method |
CN107483287B (en) * | 2017-08-17 | 2021-07-20 | 郑州云海信息技术有限公司 | System and method for automatically monitoring network port data packet receiving and sending faults |
CN107766167A (en) * | 2017-10-23 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of fault log repeats to report an error the method for merger |
CN115396308A (en) * | 2022-07-27 | 2022-11-25 | 阿里巴巴(中国)有限公司 | System, method and device for maintaining network stability of data center |
Also Published As
Publication number | Publication date |
---|---|
CN106209456B (en) | 2019-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11902120B2 (en) | Synthetic data for determining health of a network security system | |
US10686671B1 (en) | Methods, systems, and computer readable media for testing network elements of an in-band network telemetry capable network | |
US7774849B2 (en) | Methods, systems, and computer program products for detecting and mitigating denial of service attacks in a telecommunications signaling network | |
US11343281B2 (en) | Enhanced web application security communication protocol | |
CN110036600A (en) | The convergence service of network health data | |
EP2056559B1 (en) | Method and system for network simulation | |
Burschka et al. | Tranalyzer: Versatile high performance network traffic analyser | |
CN102098227B (en) | Packet capture method and kernel module | |
US20060198313A1 (en) | Method and device for detecting and blocking unauthorized access | |
EP3140960B1 (en) | Methods, systems, and computer readable media for providing fuzz testing functionality | |
US11336545B2 (en) | Network device measurements employing white boxes | |
CN112714013B (en) | Application fault positioning method in cloud environment | |
WO2019006008A1 (en) | Apparatus and method for monitoring network performance of virtualized resources | |
CN108718347A (en) | A kind of domain name analytic method, system, device and storage medium | |
CN109922026A (en) | Monitoring method, device, system and the storage medium of one OT system | |
CN106209456A (en) | A kind of kernel state lower network fault detection method and device | |
WO2022035454A1 (en) | Opentelemetry security extensions | |
Spiekermann et al. | Unsupervised packet-based anomaly detection in virtual networks | |
Gad et al. | Employing the CEP paradigm for network analysis and surveillance | |
CN109981377B (en) | Distributed data center link monitoring method and system | |
Wallschläger et al. | Automated anomaly detection in virtualized services using deep packet inspection | |
US8966321B2 (en) | Logical port and layer protocol test configuration resource manager | |
US10338544B2 (en) | Communication configuration analysis in process control systems | |
Varga et al. | Robustness and Reliability Provided by Deterministic Packet Networks (TSN and DetNet) | |
Mirkovic et al. | DDoS benchmarks and experimenter's workbench for the DETER testbed |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |