Network forwarding equipment problem positioning method and device and processing equipment

By monitoring the CPU usage rate of the network forwarding device and the CPU time slice difference of the forwarding process, compressed packet files are generated for problem location, which solves the problem of abnormal and difficult to quickly locate network devices on the existing network, and improves the positioning capability and network security performance of network devices.

CN119520250APending Publication Date: 2025-02-25WUHAN SIPU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411968549.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-02-25

Smart Images

  • Figure CN119520250A_ABST
    Figure CN119520250A_ABST
Patent Text Reader

Abstract

The invention provides a network forwarding equipment problem positioning method, a network forwarding equipment problem positioning device and processing equipment, which are used for focusing on network forwarding equipment, provide a set of novel problem positioning processing mechanism, and can quickly perform problem positioning, remarkably compress required performance debugging time and conveniently perform performance optimization work. According to the method, the capability of positioning the problem of the existing network by the equipment can be remarkably improved no matter in a laboratory environment or an existing network environment, the root cause of the problem can be quickly positioned, and a high-quality problem solving effect is achieved, so that a good guarantee is provided for the safety performance of the network forwarding equipment and the network to which the network forwarding equipment belongs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a method, device and processing equipment for locating problems in a network forwarding device. Background Art

[0002] Network security equipment is generally deployed at the network exit, so once the network equipment has an abnormality, it will affect the entire network, and sometimes may cause significant economic and property losses. Therefore, the stability of network equipment is very important. Network equipment will undergo rigorous testing before leaving the factory, but in actual situations, for the network environment that can be involved, the laboratory may not be able to achieve full coverage, so some problems will only occur in the existing network environment, and often after the problem occurs, many debugging operations cannot be performed due to limited business requirements.

[0003] In addition, there are various problems in the existing network itself. The fault phenomenon is not necessarily continuous, or may be sporadic, which will make it impossible to quickly locate and solve such problems. If the problem is not solved for one day, the network equipment will have corresponding security risks, which will in turn affect the security performance of the overall network. Summary of the invention

[0004] The present application provides a method, apparatus and processing equipment for locating problems in a network forwarding device, which are used to focus on the network forwarding device and provide a set of novel problem locating and processing mechanisms, which can quickly locate problems, significantly reduce the required performance debugging time, and conveniently carry out performance optimization work. Whether in a laboratory environment or in a live network environment, the ability of the device to locate live network problems can be significantly improved, the root cause of the problem can be quickly located, and high-quality problem solving results can be achieved, thereby providing good protection for the security performance of the network forwarding device and the network to which it belongs.

[0005] In a first aspect, the present application provides a method for locating a problem of a network forwarding device, the method comprising:

[0006] Collecting CPU usage of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is used to forward traffic messages in a corresponding network architecture;

[0007] If it is monitored that the CPU usage of the target CPU core is greater than the first threshold, determine a first target forwarding process corresponding to the target CPU core;

[0008] By sending a preset signal to the first target forwarding process, the first target forwarding process is triggered to save the stack file and the currently processed message, and then the whole is packaged to generate a target compressed package file, wherein different forwarding processes corresponding to different CPU cores pre-register the preset signal to trigger the generation of the corresponding compressed package file when the preset signal is received during the working process. The target network forwarding device specifically performs the traffic message forwarding work through different forwarding processes, and the target compressed package file is used for problem locating and processing of the network forwarding device.

[0009] In combination with the first aspect of the present application, in a first possible implementation of the first aspect of the present application, the CPU usage specifically includes the real-time CPU usage and the CPU usage in the last minute.

[0010] In combination with the first possible implementation of the first aspect of the present application, in the second possible implementation of the first aspect of the present application, the first threshold corresponds to the real-time CPU usage and the CPU usage in the last minute, both of which are 95%.

[0011] In combination with the first aspect of the present application, in a third possible implementation manner of the first aspect of the present application, determining a first target forwarding process corresponding to a target CPU core includes:

[0012] According to the CPU ID of the target CPU core, determine the process ID of the corresponding target forwarding process;

[0013] According to the process identifier, the first target forwarding process is located in different forwarding processes.

[0014] In combination with the first aspect of the present application, in a fourth possible implementation manner of the first aspect of the present application, the method further includes:

[0015] The second monitoring component collects the start CPU time slice and the current CPU time slice of the message processing cycle of different forwarding processes respectively, and calculates the difference between the two;

[0016] If it is monitored that the difference is greater than the second threshold, a preset signal is sent to the corresponding second target forwarding process to trigger the second target forwarding process to generate a new target compressed package file.

[0017] In combination with the first aspect of the present application, in the fifth possible implementation method of the first aspect of the present application, for the compressed package files generated by different forwarding processes, at most the latest 10 files are saved according to the time point when the files were generated.

[0018] In combination with the first aspect of the present application, in a sixth possible implementation manner of the first aspect of the present application, the method further includes:

[0019] For the compressed package files generated by different forwarding processes, the network forwarding device problem location processing is performed to locate the corresponding problem code.

[0020] In a second aspect, the present application provides a network forwarding device problem location device, the device comprising:

[0021] A collection unit, used for collecting CPU usage of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is used for forwarding traffic messages in a corresponding network architecture;

[0022] a determining unit, configured to determine a first target forwarding process corresponding to the target CPU core if it is monitored that the CPU usage of the target CPU core is greater than a first threshold;

[0023] A generation unit is used to trigger the first target forwarding process to save the stack file and the currently processed message by sending a preset signal to the first target forwarding process, and then package the whole to generate a target compressed package file, wherein different forwarding processes corresponding to different CPU cores pre-register preset signals to trigger the generation of corresponding compressed package files when the preset signals are received during the working process. The target network forwarding device specifically performs traffic message forwarding work through different forwarding processes, and the target compressed package file is used for problem locating and processing of the network forwarding device.

[0024] In combination with the second aspect of the present application, in a first possible implementation of the second aspect of the present application, the CPU usage specifically includes the real-time CPU usage and the CPU usage in the last minute.

[0025] In combination with the first possible implementation of the second aspect of the present application, in the second possible implementation of the second aspect of the present application, the first threshold corresponds to the real-time CPU usage and the CPU usage in the last minute, both of which are 95%.

[0026] In combination with the second aspect of the present application, in a third possible implementation manner of the second aspect of the present application, the determining unit is specifically configured to:

[0027] According to the CPU ID of the target CPU core, determine the process ID of the corresponding target forwarding process;

[0028] According to the process identifier, the first target forwarding process is located in different forwarding processes.

[0029] In combination with the second aspect of the present application, in a fourth possible implementation manner of the second aspect of the present application, the collection unit is further used to:

[0030] The second monitoring component collects the start CPU time slice and the current CPU time slice of the message processing cycle of different forwarding processes respectively, and calculates the difference between the two;

[0031] Generates units, also used to:

[0032] If it is monitored that the difference is greater than the second threshold, a preset signal is sent to the corresponding second target forwarding process to trigger the second target forwarding process to generate a new target compressed package file.

[0033] In combination with the second aspect of the present application, in the fifth possible implementation method of the second aspect of the present application, for the compressed package files generated by different forwarding processes, at most the latest 10 files are saved according to the time point when the files were generated.

[0034] In combination with the second aspect of the present application, in a sixth possible implementation manner of the second aspect of the present application, the apparatus further includes a positioning unit, which is used to:

[0035] For the compressed package files generated by different forwarding processes, the network forwarding device problem location processing is performed to locate the corresponding problem code.

[0036] In a third aspect, the present application provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method provided in the first aspect of the present application or any possible implementation method of the first aspect of the present application is executed.

[0037] In a fourth aspect, the present application provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the method provided by the first aspect of the present application or any possible implementation of the first aspect of the present application.

[0038] From the above content, it can be concluded that the present application has the following beneficial effects:

[0039] Under the goal of problem location, focusing on network forwarding equipment, this application provides a set of novel problem location processing mechanisms, which can quickly locate problems, significantly reduce the required performance debugging time, and conveniently carry out performance optimization work. Whether in a laboratory environment or in a live network environment, it can significantly improve the equipment's ability to locate live network problems, quickly locate the root cause of the problem, and achieve high-quality problem-solving results, thereby providing good protection for the security performance of network forwarding equipment and its network. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A flowchart of a method for locating a problem in a network forwarding device according to the present application;

[0042] Figure 2 This is a schematic diagram of an example of the processing logic of the present application solution;

[0043] Figure 3 A schematic diagram of the structure of the device for locating a problem in a network forwarding device of the present application;

[0044] Figure 4 A schematic diagram of the structure of the processing equipment of this application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0046] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0047] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.

[0048] Before introducing the network forwarding device problem locating method provided by the present application, the background content involved in the present application is first introduced.

[0049] The network forwarding device problem locating method, device and computer-readable storage medium provided in the present application can be applied to processing equipment to focus on network forwarding equipment, and provide a set of novel problem locating and processing mechanisms, which can quickly locate problems, significantly reduce the required performance debugging time, and conveniently carry out performance optimization work. Whether in a laboratory environment or in a live network environment, it can significantly improve the ability of the equipment to locate live network problems, can quickly locate the root cause of the problem, and achieve high-quality problem solving results, thereby providing good protection for the security performance of network forwarding equipment and its network.

[0050] The network forwarding device problem location method mentioned in the present application can be executed by a network forwarding device problem location device, or a server, physical host or user equipment (UE) and other different types of processing devices integrated with the network forwarding device problem location device. The network forwarding device problem location device can be implemented in hardware or software, and the UE can be a terminal device such as a smart phone, tablet computer, laptop computer, desktop computer or personal digital assistant (PDA), and the processing device can be set in a device cluster.

[0051] Specifically, the processing device that executes the network forwarding device problem locating method of the present application or is equipped with the application service corresponding to the network forwarding device problem locating method of the present application is a device on the side of the relevant staff responsible for network security work, usually a relevant device node in the enterprise network architecture, or even the network forwarding device itself. In addition, in some cases, it may also be configured as a third-party device outside the enterprise network architecture according to actual needs. The specific device type and device deployment form are relatively flexible. When the network forwarding device processes an abnormality, it can be processed through the solution of the present application to achieve the problem locating goal. The present application does not make any specific limitations.

[0052] Next, the network forwarding device problem locating method provided by the present application is introduced.

[0053] First, see Figure 1 , Figure 1 A schematic diagram of a flow chart of the method for locating a problem of a network forwarding device of the present application is shown. The method for locating a problem of a network forwarding device provided by the present application may specifically include the following steps S101 to S10:

[0054] Step S101, collecting CPU usage rates of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is used to forward traffic messages in a corresponding network architecture;

[0055] It can be understood that the network forwarding device itself belongs to the existing concept in the network architecture, and it is responsible for forwarding network messages, such as a typical gateway device. Of course, in specific applications, it can also be other types of device nodes.

[0056] For the message forwarding process involved in network forwarding devices, most devices adopt a polling method, that is, they keep reading messages from the network card in a loop, and then go through the relevant processes (policy, NAT, etc.) to process the messages, forward the messages, and then read the messages from the network card again. In this way, the three stages of packet reception, message processing and packet sending are completed in one cycle. Therefore, the shorter the time consumed in one cycle, the more efficient the performance of the device in processing messages.

[0057] For the convenience of explanation, the network forwarding device currently configured with the problem location service involved in this application to perform solution processing is recorded as the target network forwarding device.

[0058] In terms of specific solution processing, the solution of this application is specifically based on CPU usage (a device can have one or more CPUs, and a CPU can have one or more CPU cores). Correspondingly, the CPU usage of different / multiple CPU cores of the target network forwarding device can be collected through the configured relevant monitoring components.

[0059] Among them, it can be understood that the CPU usage indicator parameter is itself a parameter often involved in the equipment operation status monitoring process, so there are ready-made monitoring components that can be used directly. Of course, when applying the present application scheme in actual applications, it is also possible to use monitoring components that are further optimized and improved on the basis of existing monitoring components, or to use novel self-developed monitoring components.

[0060] As an example, the CPU usage of the CPU core may be collected through a sysmon process (a watchdog process).

[0061] In addition, this application will also involve another aspect of the problem location mechanism in the future. In order to conveniently distinguish the monitoring components here from the monitoring components involved in the future (the monitoring objects are different, and the corresponding monitoring logic is also different), "first" and "second" are used as prefixes to distinguish them. The same applies to the first / second thresholds involved in the future.

[0062] Step S102, if it is monitored that the CPU usage of the target CPU core is greater than a first threshold, determining a first target forwarding process corresponding to the target CPU core;

[0063] It can be understood that the CPU utilization rate reflects the use of CPU resources through a percentage value. Correspondingly, the present application can be combined with the corresponding threshold value (which can also be referred to as the CPU utilization rate threshold value / critical value) to determine whether the CPU utilization rate of the target CPU exceeds the critical state or exceeds the normal range. If so, the corresponding target forwarding process can be determined to promote the generation and processing of the corresponding compressed package file. On the contrary, if not, it means that the CPU is in a normal state and no special processing of the present application is required.

[0064] As an example, the forwarding process may be denoted as dplane-index.

[0065] Further, as an exemplary embodiment, the CPU usage involved in the present application may specifically include two indicator parameters: real-time CPU usage and CPU usage in the last minute.

[0066] The former can also be called the dynamically updated current CPU usage.

[0067] The latter is calculated based on the CPU usage at each time point within a span of 1 minute. It can be the average CPU usage in the last minute, the highest CPU usage in the last minute, or the lowest CPU usage in the last minute. The specific CPU usage under which strategy / rule is used to represent the CPU usage in the last minute to be used can be adaptively adjusted according to actual needs.

[0068] As an example, in actual situations, the real-time CPU usage can be recorded as percent_current, and the CPU usage in the last minute can be recorded as percent_1min.

[0069] In addition to the above two types of CPU usage, in specific operations, CPU usage can also be configured based on other considerations to reflect specific parameter indicators of different CPU usage situations. This is also possible in actual applications and can be adaptively configured according to actual needs.

[0070] At the same time, for the corresponding thresholds of the two, as an exemplary embodiment, the first threshold corresponds to the real-time CPU usage rate and the CPU usage rate in the last minute, and specifically, both may be 95%.

[0071] Of course, the specific thresholds used may be different. In addition, the numerical value of the specific threshold, in addition to 95%, may also be 85%, 88%, 90%, 97% and other specific values. This can also be flexibly adjusted according to actual conditions, and this application does not make specific limitations.

[0072] Further, as an exemplary embodiment herein, determining the first target forwarding process corresponding to the target CPU core may specifically include:

[0073] According to the CPU ID of the target CPU core, determine the process ID of the corresponding target forwarding process;

[0074] According to the process identifier, the first target forwarding process is located in different forwarding processes.

[0075] In specific applications, the CPU identifier / name can be specifically recorded as index, the process identifier / name can be specifically recorded as dplane-index, and the forwarding process can also be specifically referred to by the process number. The process number (Process ID, PID) is a unique identifier assigned by the operating system to each running process.

[0076] Step S103, by sending a preset signal to the first target forwarding process, triggering the first target forwarding process to save the stack file and the currently processed message, and then packaging the whole to generate a target compressed package file, wherein different forwarding processes corresponding to different CPU cores pre-register preset signals to trigger the generation of corresponding compressed package files when receiving the preset signals during the working process. The target network forwarding device specifically performs traffic message forwarding work through different forwarding processes, and the target compressed package file is used for problem locating and processing of the network forwarding device.

[0077] Based on the CPU usage rate, when the first threshold involved is used to determine that the current target CPU core / target forwarding process is in an abnormal working state, the compressed package file generation mechanism involved in this application can be used to package and generate the corresponding target compressed package file required for subsequent positioning of device problems.

[0078] This involves the preset signal working mechanism pre-registered in this application. Specifically, for the forwarding process that performs traffic message forwarding on the network forwarding device, this application pre-registers a designed preset signal. When the forwarding process receives the preset signal, it can trigger the collection of the current processing stack, save the generated stack file, and save the file of the message currently being processed, and package the two to form a corresponding compressed package file.

[0079] Among them, the call stack is a basic concept in computer science, which is used to record the order and status of function calls during program execution. It is an asynchronous notification mechanism involved in preset signals and is used to handle system events or abnormal situations. It can be sent to the current process by the operating system or other processes. The process can capture and process these signals by registering signal processing functions.

[0080] As an example, the preset signal may specifically be a SIGWINCH signal.

[0081] Since the preset signal is sent when the CPU usage of the forwarding process is monitored to be in an abnormal working state (or fault state), the information causing the current process abnormality / fault can be collected and used in the form of a compressed package file for subsequent problem location / troubleshooting.

[0082] As an example, the sysmon process can send a SIGWINCH signal to the corresponding process through the kill function to trigger the generation of the compressed package file.

[0083] It is worth mentioning that, for the collection of stack, the present application does not adopt the time-consuming method of gdb in the prior art, but collects the data through the kill function to generate a signal, which can also greatly reduce the system resource loss of the collected stack.

[0084] For the above settings, generally speaking, in actual network scenarios, traffic is relatively complex, and there will be some special abnormal traffic that causes abnormal device processing and instantaneous high CPU usage. Under the design of this application solution, there is no need to wait for the problem to recur. The device will directly and automatically collect relevant stack information and messages, which is convenient for subsequent simulation and positioning in the internal environment or for reproducing the specific problem code / code logic through internal analysis, so as to facilitate software optimization and avoid positioning and troubleshooting in the existing network scenario. In internal performance testing scenarios, it can also promote the rapid and accurate realization of problem location goals, greatly reducing the related investment in manpower and material resources associated with problem troubleshooting.

[0085] In addition, on the other hand, the present application can also automatically collect stack and message information of functions that run for too long based on the running time of the calculation function, so as to promote accurate exception detection.

[0086] Specifically, as an exemplary embodiment, the method of the present application may further include:

[0087] The second monitoring component collects the start CPU time slice and the current CPU time slice of the message processing cycle of different forwarding processes respectively, and calculates the difference between the two;

[0088] If it is monitored that the difference is greater than the second threshold, a preset signal is sent to the corresponding second target forwarding process to trigger the second target forwarding process to generate a new target compressed package file.

[0089] Among them, the starting CPU time slice can be recorded as flow_cpu_cycles_start, and the current CPU time slice can be recorded as cpu_cycle. The difference between the two is the cpu time slice used by the current cycle.

[0090] The second monitoring component here is similar to the description of the first monitoring component above. The second monitoring component can specifically adopt the dplane_control control process.

[0091] As for the CPU time slice, it can be understood as the basic unit used by the operating system scheduler to allocate processor time. In a multi-tasking operating system, the time slice mechanism enables multiple processes or threads to share processor resources, thereby achieving concurrent execution.

[0092] The second threshold here is the duration threshold. As an example, it can be 200 milliseconds (ms). Of course, similar to the first threshold, in specific applications, the specific numerical value can be flexibly configured according to actual conditions, such as 150 milliseconds, 180 milliseconds, 220 milliseconds, etc.

[0093] Under the setting of the embodiment here, generally speaking, in an actual network scenario, the traffic is relatively complex, and there may be some special abnormal traffic that causes abnormal device processing, which is time-consuming and causes packet loss. Under the design of the present application, there is no need to wait for the problem to recur. The device will directly and automatically collect relevant stack information and messages, which is convenient for subsequent simulation and positioning in the internal environment or reproduction through internal analysis to the specific problem code / code logic, so as to facilitate software optimization work and avoid positioning and troubleshooting in the existing network scenario.

[0094] At the same time, in the internal performance testing scenario, any redundant execution process (such as writing debugging code, configuring debugging tools, etc.) will affect the overall performance of the device. By setting a reasonable CPU processing time slice, the embodiment here can automatically collect which relatively time-consuming calls are relatively time-consuming, and thus locate the specific problem code / code logic according to the stack, greatly improving the time and resource cost required for performance optimization (the effect here also exists in the previous embodiment).

[0095] Furthermore, for the above solution content, in terms of details, in order to promote better solution application effects and lower application costs, this application can also focus on the configuration of compressed package files in lightweight storage.

[0096] Specifically, as an exemplary embodiment, the present application may also be configured with respect to the compressed package files generated by different forwarding processes: based on the time point at which the files are generated, a maximum of the 10 latest files are saved.

[0097] That is to say, there are at most 10 compressed package files at the same time. When a newly generated file needs to be stored, if 10 files already exist, the earliest generated file will be deleted according to the date when the file was generated. In this way, by restricting the number of compressed package files, the number of compressed package files and their file size can be effectively controlled, which to a certain extent promotes the effect of lightweight application solutions.

[0098] In addition, the above solution content is mainly introduced from the perspective of real-time processing of the solution. When applying the present application solution in actual situations, it is easy to understand that it may also involve the preliminary configuration work of the solution regarding application services / codes, such as registering preset signals, configuring interfaces, etc.

[0099] Next, in Figure 2 Based on the schematic diagram of an example of the processing logic of the present application solution, a more vivid explanation is given in combination with the following set of examples.

[0100] Define and save the CPU structure

[0101]

[0102] Define and save the CPU information of each core

[0103] struct cpu_entry cpus[MAX_CPU_NUM]; / / MAX_CPU_NUM device core number, 48 core device, MAX_CPU_NUM = 48

[0104] Define and save the time slice of each core, the start of the current packet receiving cycle, and the current execution time slice of each forwarding process

[0105] FLOW_SHARED uint64_t flow_cpu_cycles_start[MAX_CPU_NUM];

[0106] FLOW_SHARED uint64_t cpu_cycle[MAX_CPU_NUM];

[0107] 1. Forward the process registration signal SIGWINCH to implement the corresponding interface for saving the function call stack and the message file being processed

[0108] X001: forward process registration signal SIGWINCH

[0109] Example:

[0110]

[0111] X002: Implement the interface for saving function call stack and message file

[0112] Example:

[0113]

[0114] 2. The sysmon process calculates the current CPU usage of each core and the CPU usage of the last minute in real time, and the forwarding process records the time slice at the beginning of each loop processing message

[0115] X101: The sysmon process calculates the current CPU utilization of each core and the CPU utilization of the last minute

[0116] Example:

[0117]

[0118] X102: The forwarding process records the time slice at the beginning of each loop to process the message, as well as the current CPU time slice update example:

[0119]

[0120] 3. Check the CPU usage of each core and the CPU time slice of the forwarding process X201: The sysmon process loop checks the CPU usage of each core

[0121] Example:

[0122]

[0123] X202: The dplane_control process cyclically checks the time taken by each forwarding process to process the current packet reception. Example:

[0124]

[0125]

[0126] X203: Based on X201 or X202, a signal is sent to the corresponding forwarding process to trigger the saving of the stack and message example:

[0127]

[0128] X204: After the corresponding forwarding process receives the corresponding signal, it saves the stack and message, and only retains 10 compressed package files at most

[0129] Example:

[0130]

[0131] Furthermore, as mentioned above, based on the generated compressed package file, the internal environment can be simulated and located, or the specific problem code / code logic can be reproduced through internal analysis. In this regard, the present application scheme may also involve further compressed package file application processing in this regard.

[0132] Correspondingly, the present application method may further include:

[0133] For the compressed package files generated by different forwarding processes, the network forwarding device problem location processing is performed to locate the corresponding problem code.

[0134] Among them, it can be understood that the network forwarding equipment problem location processing here can be completed manually or autonomously by the system according to the corresponding processing logic, and on the basis of the stack and corresponding message contained in the compressed package file, the overall situation including the corresponding situation that caused the processing exception can be restored, as well as the tracking and location of the specific problem code / code logic that caused the processing exception. It can be conveniently implemented based on relevant existing technologies, or in other words, it belongs to the scope of existing technologies, so no further explanation will be given here.

[0135] In addition, for the specific problem code / code logic that has been identified and causes processing exceptions, relevant response processing such as recording, outputting reminders, making further corrections, deleting codes, etc. can be performed. This can also be adaptively adjusted according to the specific application requirements in the actual situation, and this application does not impose too many restrictions.

[0136] Finally, for the above solution content, in general, under the goal of problem location, focusing on network forwarding equipment, this application provides a set of novel problem location processing mechanisms, which can quickly locate problems, significantly reduce the required performance debugging time, and conveniently carry out performance optimization work. Whether in a laboratory environment or in a live network environment, it can significantly improve the equipment's ability to locate live network problems, quickly locate the root cause of the problem, and achieve high-quality problem-solving results, thereby providing good protection for the security performance of network forwarding equipment and its network.

[0137] The above is an introduction to the network forwarding device problem locating method provided by the present application. To facilitate better implementation of the network forwarding device problem locating method provided by the present application, the present application also provides a network forwarding device problem locating device from the perspective of a functional module.

[0138] See also Figure 3 , Figure 3 This is a schematic diagram of a structure of a network forwarding device problem location device of the present application. In the present application, the network forwarding device problem location device 300 may specifically include the following structure:

[0139] A collection unit 301 is used to collect CPU usage of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is used to forward traffic messages in a corresponding network architecture;

[0140] The determining unit 302 is configured to determine a first target forwarding process corresponding to the target CPU core if it is detected that the CPU usage of the target CPU core is greater than a first threshold;

[0141] The generation unit 303 is used to trigger the first target forwarding process to save the stack file and the currently processed message by sending a preset signal to the first target forwarding process, and then package the whole to generate a target compressed package file, wherein different forwarding processes corresponding to different CPU cores pre-register preset signals to trigger the generation of corresponding compressed package files when receiving the preset signals during the working process. The target network forwarding device specifically performs traffic message forwarding work through different forwarding processes, and the target compressed package file is used for problem location processing of the network forwarding device.

[0142] In an exemplary embodiment, the CPU usage specifically includes the real-time CPU usage and the CPU usage in the last minute.

[0143] In yet another exemplary embodiment, the first threshold corresponds to the real-time CPU usage and the CPU usage in the last minute, both of which are 95%.

[0144] In yet another exemplary embodiment, the determining unit 302 is specifically configured to:

[0145] According to the CPU ID of the target CPU core, determine the process ID of the corresponding target forwarding process;

[0146] According to the process identifier, the first target forwarding process is located in different forwarding processes.

[0147] In another exemplary embodiment, the collection unit 301 is further configured to:

[0148] The second monitoring component collects the start CPU time slice and the current CPU time slice of the message processing cycle of different forwarding processes respectively, and calculates the difference between the two;

[0149] The generating unit 303 is further configured to:

[0150] If it is monitored that the difference is greater than the second threshold, a preset signal is sent to the corresponding second target forwarding process to trigger the second target forwarding process to generate a new target compressed package file.

[0151] In another exemplary embodiment, for compressed package files generated by different forwarding processes, at most the latest 10 files are saved according to the time point when the files are generated.

[0152] In yet another exemplary embodiment, the apparatus further includes a positioning unit 304, configured to:

[0153] For the compressed package files generated by different forwarding processes, the network forwarding device problem location processing is performed to locate the corresponding problem code.

[0154] This application also provides a processing device from the perspective of hardware structure, see Figure 4 , Figure 4 401, a computer program stored in the memory 402, and an input / output device 403. The processor 401 is used to execute the computer program stored in the memory 402. Figure 1 The steps of the method for locating a problem of a network forwarding device in the corresponding embodiment; or, the processor 401 is used to execute the computer program stored in the memory 402 to implement the following Figure 3 Corresponding to the functions of each unit in the embodiment, the memory 402 is used to store the processor 401 executing the above Figure 1 The computer program required by the method for locating a problem of a network forwarding device in the corresponding embodiment.

[0155] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 402, and executed by the processor 401 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0156] The processing device may include, but is not limited to, a processor 401, a memory 402, and an input / output device 403. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation on the processing device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the processing device may also include a network access device, a bus, etc., and the processor 401, the memory 402, the input / output device 403, etc. are connected via a bus.

[0157] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the processing device, and uses various interfaces and lines to connect various parts of the entire device.

[0158] The memory 402 can be used to store computer programs and / or modules. The processor 401 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 402 and calling the data stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the processing device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0159] When the processor 401 is used to execute the computer program stored in the memory 402, the following functions can be implemented:

[0160] Collecting CPU usage of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is used to forward traffic messages in a corresponding network architecture;

[0161] If it is monitored that the CPU usage of the target CPU core is greater than the first threshold, determining a first target forwarding process corresponding to the target CPU core;

[0162] By sending a preset signal to the first target forwarding process, the first target forwarding process is triggered to save the stack file and the currently processed message, and then the whole is packaged to generate a target compressed package file, wherein different forwarding processes corresponding to different CPU cores pre-register the preset signal to trigger the generation of the corresponding compressed package file when the preset signal is received during the working process. The target network forwarding device specifically performs the traffic message forwarding work through different forwarding processes, and the target compressed package file is used for problem locating and processing of the network forwarding device.

[0163] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the network forwarding device problem locating device, the processing device and its corresponding units described above can refer to the following. Figure 1 The description of the method for locating a problem of a network forwarding device in the corresponding embodiment will not be repeated here in detail.

[0164] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0165] To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figure 1 The steps of the method for locating a problem of a network forwarding device in the corresponding embodiment, for specific operations, refer to the following Figure 1 The description of the method for locating a problem of a network forwarding device in the corresponding embodiment will not be repeated here.

[0166] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0167] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figure 1 The steps of the method for locating a problem of a network forwarding device in the corresponding embodiment, therefore, the present application can be implemented as follows Figure 1 The beneficial effects that can be achieved by the method for locating a problem of a network forwarding device in the corresponding embodiment are detailed in the previous description and will not be repeated here.

[0168] The network forwarding device problem locating method, device, processing device and computer-readable storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the core idea of ​​the present application; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for locating a problem of a network forwarding device, characterized in that: The method comprises: Collecting CPU usage of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is used to forward traffic messages in the network architecture to which it belongs; If it is monitored that the CPU usage of the target CPU core is greater than a first threshold, determining a first target forwarding process corresponding to the target CPU core; By sending a preset signal to the first target forwarding process, the first target forwarding process is triggered to save the stack file and the currently processed message, and then the whole is packaged to generate a target compressed package file, wherein the different forwarding processes corresponding to the different CPU cores pre-register the preset signal to trigger the generation of the corresponding compressed package file when the preset signal is received during the working process. The target network forwarding device specifically performs the traffic message forwarding work through the different forwarding processes, and the target compressed package file is used for problem locating and processing of the network forwarding device.

2. The method according to claim 1, characterized in that The CPU usage specifically includes the real-time CPU usage and the CPU usage in the last minute.

3. The method according to claim 2, characterized in that The first threshold corresponds to the real-time CPU usage and the CPU usage in the last minute, both of which are 95%.

4. The method according to claim 1, characterized in that: The determining the first target forwarding process corresponding to the target CPU core includes: Determine the process identifier of the corresponding target forwarding process according to the CPU identifier of the target CPU core; The first target forwarding process is located in the different forwarding processes according to the process identifier.

5. The method according to claim 1, characterized in that The method further comprises: The second monitoring component collects the start CPU time slice and the current CPU time slice of the message processing cycle of the different forwarding processes respectively, and calculates the difference between the two; If it is monitored that the difference is greater than the second threshold, the preset signal is sent to the corresponding second target forwarding process to trigger the second target forwarding process to generate a new target compressed package file.

6. The method according to claim 1, characterized in that For the compressed package files generated by the different forwarding processes, at most the latest 10 files are saved according to the time point when the files are generated.

7. The method according to claim 1, characterized in that The method further comprises: The compressed package files generated by the different forwarding processes are subjected to the network forwarding device problem location processing to locate the corresponding problem code.

8. A network forwarding equipment problem location device, characterized in that: The device comprises: A collection unit, configured to collect CPU usage of different CPU cores of a target network forwarding device through a first monitoring component, wherein the target network forwarding device is configured to forward traffic packets in a corresponding network architecture; a determining unit, configured to determine a first target forwarding process corresponding to the target CPU core if it is monitored that the CPU usage rate of the target CPU core is greater than a first threshold; A generating unit is used to trigger the first target forwarding process to save the stack file and the currently processed message by sending a preset signal to the first target forwarding process, and then package the whole to generate a target compressed package file, wherein the different forwarding processes corresponding to the different CPU cores pre-register the preset signal to trigger the generation of the corresponding compressed package file when the preset signal is received during the working process, and the target network forwarding device specifically performs the traffic message forwarding work through the different forwarding processes, and the target compressed package file is used for problem locating and processing of the network forwarding device.

9. A processing device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the method according to any one of claims 1 to 7 when calling the computer program in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 7.