Method and device for analyzing running state of embedded equipment

By deploying data acquisition tools on embedded devices and deploying data analysis tools externally, we automatically analyze the operating status of embedded devices, solving the problems of high cost and low efficiency in the existing technology, and achieving efficient and low-cost operating status analysis.

CN119883786APending Publication Date: 2025-04-25SHENZHEN MICROBT ELECTRONICS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311377169.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When analyzing the operating status of embedded devices, the prior art is costly and inefficient, and experienced staff need to conduct manual inspections.

Method used

Develop an operating state analysis method and device for embedded devices. By deploying data acquisition tools and data analysis tools, we automatically collect and analyze the operating data of embedded devices, judge the operating status and recommend further troubleshooting tools.

Benefits of technology

It reduces the cost of analyzing the operating status of embedded devices, improves analysis efficiency, and assists development and maintenance personnel in troubleshooting stability issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883786A_ABST
    Figure CN119883786A_ABST
Patent Text Reader

Abstract

The invention relates to a running state analysis method and device for embedded equipment. The method comprises the following steps: acquiring to-be-analyzed data from the embedded equipment; the to-be-analyzed data is calculated and obtained by the embedded device through a data acquisition tool deployed on the embedded device according to the state data; the state data is operation data collected by the embedded device in an operation state through a data acquisition tool; analyzing the to-be-analyzed data through a locally deployed data analysis tool to obtain a data analysis result, and outputting the data analysis result; wherein the data analysis result is that the running state of the embedded device is abnormal or normal; and if the running state is abnormal, outputting a recommended tool for further troubleshooting and analysis. According to the method and the device, the cost of analyzing the running state of the embedded equipment can be reduced, and the efficiency of analyzing the running state of the embedded equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to a method and apparatus for analyzing the operating status of an embedded device. Background Art

[0002] Embedded devices with ARM as the hardware core and Linux as the operating system are increasingly widely used in various industries as dedicated microcomputers, and their intelligence is becoming increasingly higher. However, the core hardware resources (CPU / DDR) of embedded devices are usually fixed and cannot be expanded; the premise of intelligence is the enrichment and complexity of business; when the functions meet the product requirements, stability is a major issue that cannot be ignored.

[0003] During the stability troubleshooting process, it is usually handled manually by staff; since the factors affecting stability are diverse and complex, experienced staff are required to conduct the troubleshooting, resulting in high cost and low efficiency in analyzing the operating status of embedded devices. Summary of the invention

[0004] In view of this, the present disclosure provides a method and apparatus for analyzing the operating status of an embedded device, which can reduce the cost of analyzing the operating status of the embedded device and improve the efficiency of analyzing the operating status of the embedded device.

[0005] The technical solution of the present disclosure is achieved as follows:

[0006] In one embodiment, a method for analyzing the operating status of an embedded device is provided, the method comprising:

[0007] Acquire data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to state data; the state data is operation data collected by the data acquisition tool from the embedded device in operation;

[0008] The data to be analyzed is analyzed by a locally deployed data analysis tool to obtain a data analysis result and output it; wherein the data analysis result is whether the operating status of the embedded device is abnormal or normal; if the operating status is abnormal, a recommended tool for further troubleshooting and analysis is also output.

[0009] Wherein, the data to be analyzed is stored in the flash of the embedded device;

[0010] The step of obtaining the data to be analyzed from the embedded device includes:

[0011] The data to be analyzed is obtained from the flash of the embedded device.

[0012] Wherein, when the data to be analyzed includes the total CPU usage and the sub-CPU usage, the data to be analyzed is analyzed by using a locally deployed data analysis tool to obtain a data analysis result, including:

[0013] Analyze the data to be analyzed by using a locally deployed data analysis tool;

[0014] If it is determined that the total CPU usage is greater than the preset CPU usage threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the usage of the sub-CPU with the largest usage;

[0015] Or, if it is determined that the total CPU usage is not greater than a preset CPU usage threshold, it is determined that the operating state of the embedded device is normal.

[0016] Wherein, when the data to be analyzed includes the total memory occupancy rate and the sub-memory occupancy rate, the data to be analyzed is analyzed by using a locally deployed data analysis tool to obtain a data analysis result, including:

[0017] Analyze the data to be analyzed by using a locally deployed data analysis tool;

[0018] If it is determined that the total memory occupancy rate is greater than a preset memory occupancy rate threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy rate with the largest occupancy rate;

[0019] Or, if it is determined that the total memory occupancy is not greater than a preset memory occupancy threshold, it is determined that the operating state of the embedded device is normal.

[0020] Wherein, when the data to be analyzed includes total CPU usage and sub-CPU usage, and total memory occupancy and sub-memory occupancy, analyzing the data to be analyzed by a locally deployed data analysis tool to obtain data analysis results includes:

[0021] Analyze the data to be analyzed by using a locally deployed data analysis tool;

[0022] If it is determined that the total CPU usage is greater than the preset CPU usage threshold, and the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-CPU usage with the largest usage, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy;

[0023] Or, if it is determined that the total CPU usage is greater than a preset CPU usage threshold, and the total memory occupancy is not greater than a preset memory occupancy threshold, it is determined that the operating state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the usage of the sub-CPU with the largest usage;

[0024] Or, if it is determined that the total CPU usage is not greater than the preset CPU usage threshold, and the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operating state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy;

[0025] Or, if it is determined that the total CPU usage is not greater than a preset CPU usage threshold, and the total memory occupancy is not greater than a preset memory occupancy threshold, it is determined that the operating state of the embedded device is normal.

[0026] in,

[0027] If the sub-CPU usage with the highest usage rate is the user business process usage rate, the tool used for further investigation and analysis is strace, htop, or perf;

[0028] Or, if the sub-CPU usage with the highest usage rate is the system kernel state usage rate, the tool used for further troubleshooting and analysis is perf or ftrace;

[0029] Or, if the sub-CPU usage with the highest usage rate is the iowait usage rate, the tool used for further troubleshooting and analysis is perf, iostat or fio;

[0030] Or, if the sub-CPU usage with the highest usage is the irq usage, the tool for further troubleshooting and analysis is perf or ftrace;

[0031] Or, if the sub-CPU usage with the highest usage is the softirq usage, the tool for further troubleshooting and analysis is perf or ftrace.

[0032] in,

[0033] If the sub-memory occupancy rate with the largest occupancy rate is the user task memory occupancy rate, the tool used for further investigation and analysis is mtrace, Valgrind or ASan;

[0034] Or, if the sub-memory occupancy rate with the largest occupancy rate is the Cache memory occupancy rate, the tool for further investigation and analysis is to prompt the user that the tmpfs file system occupies too much memory and that the file needs to be deleted in time;

[0035] Or, if the sub-memory occupancy with the largest occupancy is the Slab memory occupancy, the tool for further troubleshooting and analysis is slabtop, kmemleak or PAGE_OWNER.

[0036] Wherein, the method further comprises:

[0037] A problem-solving library is configured and maintained; wherein the problem-solving library is used to respond to query requests regarding problem-solving methods issued by the data analysis tool.

[0038] In another embodiment, a running status analysis device for an embedded device is provided, the device comprising:

[0039] The acquisition unit is configured to acquire data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through the data acquisition tool deployed thereon according to the state data; the state data is the operation data collected by the data acquisition tool from the embedded device in the running state; the analysis unit is configured to analyze the data to be analyzed through the locally deployed data analysis tool to obtain a data analysis result; wherein the data analysis result is that the running state of the embedded device is abnormal or the running state is normal; if the running state is abnormal, a recommended tool for further troubleshooting and analysis is also output;

[0040] The output unit is configured to output the data analysis result.

[0041] In another embodiment, an electronic device is provided, comprising:

[0042] processor;

[0043] a memory for storing executable instructions for the processor;

[0044] Wherein, the processor is configured to execute the executable instructions to implement the operating status analysis method of the embedded device as described in any one of the above items.

[0045] It can be seen from the above technical solution that in the embodiment of the present disclosure, a set of tools is developed, including a data acquisition tool and a data analysis tool; the data acquisition tool is deployed on the embedded device, and the data acquisition tool is used to collect operating data of the embedded device in operation; and calculate the data to be analyzed; the data analysis tool is used to analyze the data to be analyzed, and when the data analysis result is that the operating state is abnormal, a tool for further troubleshooting is recommended. This method can automatically realize the analysis of the operating state of the embedded device, and effectively assist the development and maintenance personnel in troubleshooting stability problems. Therefore, this method can reduce the cost of analyzing the operating state of the embedded device and improve the efficiency of analyzing the operating state of the embedded device. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 is a flow chart of a method for analyzing the operating status of an embedded device according to an exemplary embodiment;

[0048] Figure 2 is a flow chart showing an analysis of the CPU status of an embedded device according to an exemplary embodiment;

[0049] Figure 3 is a flow chart showing an analysis of the memory status of an embedded device according to an exemplary embodiment;

[0050] Figure 4 is a flow chart showing the analysis of the CPU and memory status of an embedded device according to an exemplary embodiment;

[0051] Figure 5 is a schematic diagram of a running status analysis device for an embedded device according to an exemplary embodiment;

[0052] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0053] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and examples.

[0054] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0055] The disclosed embodiments take into account the fixed and non-scalable nature of the core hardware resources of embedded devices in the related art, and usually the stability of embedded devices is monitored manually. Although the stability only involves the CPU and memory, the details of the core hardware resources are very many. Therefore, more professional technicians are generally required to obtain relevant data and perform data analysis. This will lead to increased labor costs. In addition, due to the working conditions of the technicians, the cost of analyzing the operating status of the embedded devices may be high and the efficiency may be low.

[0056] Based on the above problems, the embodiment of the present disclosure proposes a method for analyzing the running status of an embedded device, by developing a set of tools for automatically analyzing the running status of the embedded device, the tool includes: a data acquisition tool and a data analysis tool; the data acquisition tool is deployed on the embedded device, and the data analysis tool is usually deployed on a PC or other device other than the embedded device; wherein the data acquisition tool is used to collect running data of the embedded device in the running state; and calculate the data to be analyzed; the data analysis tool is used to analyze the data to be analyzed, and recommend tools for further troubleshooting when the data analysis result is that the running status is abnormal. This method can automatically realize the analysis of the running status of the embedded device, effectively assist the development and maintenance personnel in troubleshooting stability problems, thereby reducing the cost of analyzing the running status of the embedded device and improving the efficiency of analyzing the running status of the embedded device.

[0057] Figure 1 FIG. 1 is a flow chart of a method for analyzing the operating status of an embedded device according to an exemplary embodiment. Figure 1 As shown, the embedded device monitoring method of the embodiment of the present disclosure mainly includes the following steps 101 to 102.

[0058] Step 101, obtaining data to be analyzed from an embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to state data; the state data is operation data collected by the data acquisition tool from the embedded device in operation.

[0059] The embedded device collects the operation data of the embedded device in operation through a data acquisition tool deployed thereon;

[0060] When collecting operation data, the data collection cycle is set as needed; the operation time and operation times of the embedded device are not limited in this embodiment.

[0061] The embedded device calculates the data to be analyzed based on the data calculation formula and the collected operation data through the data acquisition tool deployed thereon.

[0062] The data to be analyzed may be CPU usage information and / or memory occupancy information.

[0063] The embedded device stores the calculated data to be analyzed in the flash;

[0064] The device deploying the data analysis tool obtains the data to be analyzed from the flash of the embedded device.

[0065] Step 102, analyze the data to be analyzed by using a locally deployed data analysis tool to obtain data analysis results and output them; wherein the data analysis results are abnormal or normal operating status of the embedded device; if the operating status is abnormal, a recommended tool for further troubleshooting and analysis is also output.

[0066] When the data analysis result shows that the operating status of the embedded device is normal, it is sufficient to directly output the normal operating status. When the data analysis result shows that the operating status of the embedded device is abnormal, a tool for further troubleshooting and analysis is also recommended.

[0067] The output method of the data analysis results is not limited in this embodiment, and can be output through a page, or through interactive tools such as email, WeChat, etc.

[0068] In the disclosed embodiment, the data to be analyzed is obtained by a data acquisition tool deployed on the embedded device, and the data to be analyzed on the embedded device is obtained and analyzed by a data analysis tool deployed on the data analysis device, and when the data analysis result is that the operating status is abnormal, a tool for further troubleshooting and analysis is recommended. This solution can reduce the cost of analyzing the operating status of the embedded device and improve the efficiency of analyzing the operating status of the embedded device.

[0069] The analysis of the running status of the embedded device can be achieved by analyzing the CPU usage information and / or memory occupancy information of the embedded device. The specific implementation process is given below for different situations.

[0070] Figure 2 FIG. 1 is a flow chart showing an exemplary embodiment of analyzing the CPU status of an embedded device. Figure 2 As shown, the analysis process mainly includes the following steps 201 to 204.

[0071] Step 201, obtaining data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to status data; the status data is operating data collected by the data acquisition tool from the embedded device in a running state; the data to be analyzed includes total CPU usage and sub-CPU usage.

[0072] The embedded device collects the operation data of the embedded device in operation through a data acquisition tool deployed thereon;

[0073] When collecting operation data, the data collection cycle is set as needed; the operation time and operation times of the embedded device are not limited in this embodiment.

[0074] The embedded device calculates the data to be analyzed based on the data calculation formula and the collected operation data through the data acquisition tool deployed thereon.

[0075] The embedded device stores the calculated data to be analyzed in the flash;

[0076] The device deploying the data analysis tool obtains the data to be analyzed from the flash of the embedded device.

[0077] Step 202: Analyze the data to be analyzed using a locally deployed data analysis tool.

[0078] Step 203, if it is determined that the total CPU usage is greater than the preset CPU usage threshold, it is determined that the operating state of the embedded device is abnormal, and the corresponding tool for further investigation and analysis is determined according to the usage of the sub-CPU with the largest usage; and output; end this process.

[0079] In this step, when it is determined that the operating status of the embedded device is abnormal, the sub-CPU usage rates in the data to be analyzed are sorted from large to small to determine the sub-CPU usage rate with the largest usage rate. The sub-CPU usage rate with the largest usage rate can also be determined by other methods, which are not limited.

[0080] Step 204: If it is determined that the total CPU usage is not greater than the preset CPU usage threshold, it is determined that the operating state of the embedded device is normal and output.

[0081] In the disclosed embodiment, the data to be analyzed is obtained by a data acquisition tool deployed on the embedded device, and the data to be analyzed includes the total CPU usage and the sub-CPU usage; the data to be analyzed on the embedded device is obtained and analyzed by a data analysis tool deployed on the data analysis device, and when the data analysis result shows that the operating status is abnormal, a tool for further troubleshooting and analysis is recommended according to the sub-CPU usage with the largest usage rate. This solution can reduce the cost of analyzing the operating status of the embedded device and improve the efficiency of analyzing the operating status of the embedded device.

[0082] Figure 3 FIG. 1 is a flow chart showing an example of analyzing the memory status of an embedded device according to an exemplary embodiment. Figure 3 As shown, the analysis process mainly includes the following steps 301 to 304.

[0083] Step 301, obtaining data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through the data acquisition tool deployed thereon according to the state data; the state data is the running data collected by the data acquisition tool from the embedded device in the running state; the data to be analyzed includes the total memory occupancy and the sub-memory occupancy.

[0084] The embedded device collects the operation data of the embedded device in operation through a data acquisition tool deployed thereon;

[0085] When collecting operation data, the data collection cycle is set as needed; the operation time and operation times of the embedded device are not limited in this embodiment.

[0086] The embedded device calculates the data to be analyzed based on the data calculation formula and the collected operation data through the data acquisition tool deployed thereon.

[0087] The embedded device stores the calculated data to be analyzed in the flash;

[0088] The device deploying the data analysis tool obtains the data to be analyzed from the flash of the embedded device.

[0089] Step 302: Analyze the data to be analyzed using a locally deployed data analysis tool.

[0090] Step 303, if it is determined that the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operating state of the embedded device is abnormal, and the corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy; and output; and end this process.

[0091] In this step, when it is determined that the operating status of the embedded device is abnormal, the sub-memory occupancy rates in the data to be analyzed are sorted from large to small to determine the sub-memory occupancy with the largest occupancy rate. The sub-memory occupancy with the largest occupancy rate may also be determined in other ways, which are not limited.

[0092] Step 304: If it is determined that the total memory occupancy is not greater than the preset memory occupancy threshold, it is determined that the operating state of the embedded device is normal and output.

[0093] In the disclosed embodiment, the data to be analyzed is obtained by a data acquisition tool deployed on the embedded device, and the data to be analyzed includes the total memory occupancy rate and the sub-memory occupancy rate; the data to be analyzed on the embedded device is obtained and analyzed by a data analysis tool deployed on the data analysis device, and when the data analysis result is that the operating status is abnormal, a tool for further investigation and analysis is recommended according to the sub-memory occupancy rate with the largest occupancy rate. This solution can reduce the cost of analyzing the operating status of the embedded device and improve the efficiency of analyzing the operating status of the embedded device.

[0094] Figure 4 FIG. 1 is a flowchart showing an exemplary embodiment of analyzing the CPU and memory status of an embedded device. Figure 4 As shown, the analysis process mainly includes the following steps 401 to 406.

[0095] Step 401, obtaining data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to status data; the status data is operation data collected by the data acquisition tool from the embedded device in operation; the data to be analyzed includes total CPU usage and sub-CPU usage, as well as total memory occupancy and sub-memory occupancy.

[0096] When an embedded device is running, the CPU and memory related data are stored as follows:

[0097] CPU-related data is stored in the / proc / stat file, which can be expressed as follows:

[0098] cat / proc / stat

[0099] cpu 23825 0 66839 170166 0 0 543 0 0 0

[0100] cpu0 10 0 3551 83017 0 0 543 0 0 0

[0101] cpu1 6 0 86 87034 0 0 0 0 0 0

[0102] cpu2 23809 0 63202 115 0 0 0 0 0 0

[0103] The above gives the total CPU usage and the usage of the three sub-CPUs; in this embodiment, the calculation of the total CPU usage is taken as an example. The status data obtained for the total CPU is:

[0104] cpu 23825 0 66839 170166 0 0 543 0 0 0

[0105] The unit of each value is jiffies[1];

[0106] user(23825) indicates the running time in user mode from system startup to the current time, excluding processes with negative nice values.

[0107] nice(0) indicates the CPU time occupied by processes with negative nice values, accumulated from system startup to the current time.

[0108] system(66839) indicates the running time in the kernel state accumulated from system startup to the current time.

[0109] idle(170166) indicates the waiting time other than IO waiting time accumulated from system startup to the current time.

[0110] iowait(0) indicates the IO wait time accumulated from system startup to the current time.

[0111] irq(0) indicates the hard interrupt time accumulated from system startup to the current time.

[0112] softirq(543) indicates the softirq time accumulated from system startup to the current time.

[0113] steal(0) indicates the time that was preempted because another virtual machine was running (only used in virtualized environments, unit: jiffies)

[0114] Guest(0) and guest_nice(0): Indicates how much CPU time the guest operating system spent on executing virtual machine processes and processes with higher priority than nice values ​​in a virtual machine environment.

[0115] Memory-related data is stored in the / proc / meminfo file:

[0116] oa8000: / userfs$cat / proc / meminfo

[0117] MemTotal: 83296kB

[0118] MemFree: 67824kB

[0119] MemAvailable: 66548kB

[0120] Buffers: 0kB

[0121] Cached: 6244kB

[0122] SwapCached: 0kB

[0123] Active: 1640kB

[0124] Inactive: 4740kB

[0125] Active(anon): 1480kB

[0126] Inactive(anon): 4704kB

[0127] Active(file): 160kB

[0128] Inactive(file): 36kB

[0129] Unevictable: 0kB

[0130] Mlocked: 0kB

[0131] SwapTotal: 0kB

[0132] SwapFree: 0kB

[0133] Dirty: 0kB

[0134] Writeback: 0kB

[0135] AnonPages: 176kB

[0136] Mapped: 784kB

[0137] Shmem: 6048kB

[0138] KReclaimable: 624kB

[0139] Slab: 2568kB

[0140] SReclaimable: 624kB

[0141] SUnreclaim: 1944kB

[0142] KernelStack: 376kB

[0143] PageTables: 32kB

[0144] NFS_Unstable: 0kB

[0145] Bounce: 0kB

[0146] WritebackTmp: 0kB

[0147] CommitLimit: 41648kB

[0148] Committed_AS: 6944kB

[0149] VmallocTotal: 950272kB

[0150] VmallocUsed: 3392kB

[0151] VmallocChunk: 0kB

[0152] Percpu: 180kB

[0153] CmaTotal: 32768kB

[0154] CmaFree: 31552kB

[0155] Among them, MemTotal represents the memory available to the system; MemFree represents the unused memory in the system, which is the sum of owFree and HighFree; MemAvailable represents the available memory for applications; Buffers represents the number of buffer memory, which is the temporary storage of raw disk blocks, that is, used to cache disk data; Cached represents the number of cache memory; SwapCached represents the memory in the swap file that has been swapped out, which is related to I / O; Active represents the memory that is frequently (recently) used; Active(anon) represents active anonymous memory; Inactive(anon) represents inactive anonymous memory; Active(file) represents active memory associated with a file; Inactive(file) represents inactive memory associated with a file; Unevictable represents memory pages that cannot be released; Mlocked: mlock() represents the size of memory locked by the system call; SwapTotal represents the total size of the swap space; SwapFree represents the size of the free swap space; Dirty represents the size waiting to be written back to the disk; Writeback represents the size being written back; AnonPages: represents the size of unmapped pages; Map ped indicates the size of device and file mapping; Shmem indicates the size of shared memory that has been allocated; Slab indicates the size of kernel data structure cache; SReclaimable indicates the size of reclaimable Slab; SUnreclaim indicates the size of unreclaimable Slab; KernelStack indicates the memory consumed by kernel; PageTables indicates the size of index table for managing memory paging; NFS_Unstable indicates the size of unstable page table; Bounce indicates that a temporary buffer is allocated in low memory as a jump, and cache data in high memory is copied to the memory consumed here; WritebackTmp indicates the memory used for temporary write back buffer; CommitLimit: the total amount of memory that can be actually allocated by the system; Committed_AS indicates the total amount of memory currently allocated; VmallocTotal indicates the size of virtual memory; VmallocUsed indicates the size of virtual memory that has been used; VmallocChunk indicates the size of the largest continuous memory block available in the vmalloc area; Percpu indicates the memory size occupied by prcpu variable; CmaTotal indicates the total amount of continuous available memory; CmaFree indicates free continuous available memory.

[0156] The above is the original data corresponding to the CPU and the memory, that is, an example of operating data, and there is no limitation on this in specific implementation.

[0157] The process of embedded devices obtaining data to be analyzed:

[0158] In the Linux system, a fairly rich debugging and system parameter interface is provided under the proc node. Based on the data acquisition tool deployed on the embedded device, the corresponding raw data is periodically acquired as status data through the relevant interface.

[0159] The cycle for acquiring status data, the operating time of the embedded device, and the number of operations are configured according to specific needs, and are not limited in this embodiment.

[0160] After obtaining the status data of the CPU and memory, the specific data to be analyzed can be calculated according to the theoretical formula.

[0161] For the CPU status data, the total CPU usage and the sub-CPU usage are calculated; for the sub-CPU usage, the sub-module status data of which is included in the status data is used to calculate the sub-CPU usage corresponding to the sub-module. The calculated sub-CPU usage may include any one or any combination of the following sub-CPU usages:

[0162] User business process utilization rate, system kernel state utilization rate, iowait utilization rate, irq utilization rate, and softirq occupancy rate.

[0163] For the memory status data, the total memory occupancy and the sub-memory occupancy are calculated; for the sub-memory occupancy, the sub-module whose status data is included in the status data is used to calculate the sub-memory occupancy corresponding to the sub-module. The calculated sub-memory occupancy may include any one or any combination of the following sub-memory occupancy:

[0164] User business process occupancy, cache memory occupancy, and slab memory occupancy.

[0165] Take calculating the total CPU usage as an example:

[0166] Get the total CPU activity time totalCPUTime from system startup:

[0167] totalCPUTime(jiffies)=user+nice+system+idle+iowait+irq+softirq+stealstolen+g uest+guestnice;

[0168] The total idle CPU time idleCPUTime is:

[0169] idleCPUTime(jiffies)=idle;

[0170] Calculate total CPU usage at any time interval

[0171] Assuming that the / proc / stat file is read twice, two different totalCPUTime values ​​can be obtained, which are recorded as totalCPUTime0 and totalCPUTime1.

[0172] Similarly, you can get idleCPUTime0 and idleCPUTime1;

[0173] Let deltaTotalCPUtime be the difference between totalCPUTime1 and totalCPUTime0;

[0174] Let deltaIdleCPUTime be the difference between idleCPUTime1 and idleCPUTime0.

[0175] Then, the CPU usage between these two reads can be calculated:

[0176]

[0177] Take the calculation of total memory usage as an example:

[0178] (MemTotal-MemFree) / MemTotal×100%.

[0179] The sub-CPU usage rate and sub-memory occupancy rate may be calculated in a similar manner, which is not limited in this embodiment.

[0180] After the embedded device obtains the data to be analyzed, the data to be analyzed is stored in the flash of the embedded device;

[0181] When obtaining the data to be analyzed from the embedded device in step 401, the data to be analyzed may be obtained from the flash of the embedded device.

[0182] Step 402: Analyze the data to be analyzed using a locally deployed data analysis tool.

[0183] Step 403: If it is determined that the total CPU usage is greater than the preset CPU usage threshold, and the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-CPU usage with the largest usage, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy; and output. This process ends.

[0184] If the sub-CPU usage with the highest usage is the user business process usage, the tool used for further troubleshooting and analysis is strace, htop, or perf;

[0185] Among them, strace is a Linux user space tracer that can be used for diagnosis, debugging and teaching;

[0186] htop is a Linux process viewer, similar to top;

[0187] Perf is a performance analysis tool set provided by the Linux system, which includes multiple sub-tools and can monitor various hardware and software performance indicators, including CPU, memory, IO, etc.

[0188] The sub-CPU usage with the highest utilization rate is the user business process utilization rate, which indicates that the problem of abnormally high total CPU utilization rate is that there are tasks in the user business process that have been occupying the CPU, causing high consumption. To determine which user business causes high CPU utilization rate, you need to use strace, htop, or perf to further check which business and which code block causes it.

[0189] If the sub-CPU usage with the highest usage is the system kernel usage, the tool used for further troubleshooting and analysis is perf or ftrace;

[0190] Among them, Ftrace is a tracing tool officially provided by Linux, which is used to trace functions in the kernel.

[0191] If the sub-CPU usage with the highest utilization rate is iowait utilization rate, the tool used for further troubleshooting and analysis is perf, iostat, or fio;

[0192] Among them, Iostat is used to monitor the system input / output device load;

[0193] Fio is an I / O tool used to stress test and verify hardware, supporting 13 different I / O engines.

[0194] If the sub-CPU usage rate is the highest for iowait, it means that the high total CPU usage rate may be caused by io related to storage modules such as writing to disks and SD cards. On the one hand, fio can be used to verify whether the io capability / io algorithm of the specific storage module driver is optimal and whether the storage module itself has good performance. On the other hand, iostat can be used to observe whether there are a large number of ios waiting to be processed in the queue during the reading and writing process of the storage module to determine whether the device io processing capacity is sufficient.

[0195] If the sub-CPU usage with the highest usage is irq usage, the tool used for further troubleshooting and analysis is perf or ftrace;

[0196] If the sub-CPU usage with the highest usage is the softirq usage, the tool used for further troubleshooting and analysis is perf or ftrace.

[0197] If the sub-memory occupancy rate with the largest occupancy rate is the user task memory occupancy rate, the tool used for further troubleshooting and analysis is mtrace, Valgrind, or ASan;

[0198] Among them, Mtrace memory problem detection tool can be used to help locate memory leak problems;

[0199] Valgrind is a tool for memory debugging, memory leak detection, and performance analysis;

[0200] Asan is the address sanitization technology. It can be used to detect memory problems, such as buffer overflows or illegal access to dangling pointers.

[0201] If the sub-memory usage with the largest occupancy is the user task memory usage, there may be a memory leak in the system or business process, or it may be memory waste caused by unreasonable code writing. You can use mtrace, Valgrind, or ASan tools to further check whether the memory consumption in the business process is reasonable and where the memory leak code is.

[0202] If the sub-memory occupancy rate with the largest occupancy rate is the Cache memory occupancy rate, the tool used for further troubleshooting and analysis is to prompt the user that the tmpfs file system occupies too much memory and that files need to be deleted in time;

[0203] If the sub-memory usage with the largest occupancy is the Slab memory usage, the tool used for further troubleshooting and analysis is slabtop, kmemleak, or PAGE_OWNER.

[0204] Among them, Slabtop displays detailed kernel slab cache information;

[0205] Kmemleak is a tool used by the Linux kernel to detect memory leaks;

[0206] PAGE_OWNER is known as the ultimate killer of memory leaks. It can be used to troubleshoot black hole memory leaks. It locates physical memory leaks by recording the process and call stack information of each page allocation.

[0207] If the sub-memory occupancy rate with the largest occupancy rate is the Slab memory occupancy rate, it means that there is a memory leak in the system layer. In this case, it is recommended to use the tools slabtop, kmemleak or enable the PAGE_OWNER configuration in the kernel to detect where each page is consumed and find the code module with the memory leak.

[0208] Step 404: If it is determined that the total CPU usage is greater than the preset CPU usage threshold, and the total memory occupancy is not greater than the preset memory occupancy threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-CPU usage with the largest usage, and outputted. This process ends.

[0209] If the sub-CPU usage with the highest usage is the user business process usage, the tool used for further troubleshooting and analysis is strace, htop, or perf;

[0210] If the sub-CPU usage with the highest usage is the system kernel usage, the tool used for further troubleshooting and analysis is perf or ftrace;

[0211] If the sub-CPU usage with the highest utilization rate is iowait utilization rate, the tool used for further troubleshooting and analysis is perf, iostat, or fio;

[0212] If the sub-CPU usage with the highest usage is irq usage, the tool used for further troubleshooting and analysis is perf or ftrace;

[0213] If the sub-CPU usage with the highest usage is the softirq usage, the tool used for further troubleshooting and analysis is perf or ftrace.

[0214] Step 405: If it is determined that the total CPU usage is not greater than the preset CPU usage threshold, and the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy, and outputted. This process ends.

[0215] If the sub-memory occupancy rate with the largest occupancy rate is the user task memory occupancy rate, the tool used for further troubleshooting and analysis is mtrace, Valgrind, or ASan;

[0216] If the sub-memory occupancy rate with the largest occupancy rate is the Cache memory occupancy rate, the tool used for further troubleshooting and analysis is to prompt the user that the tmpfs file system occupies too much memory and that files need to be deleted in time;

[0217] If the sub-memory usage with the largest occupancy is the Slab memory usage, the tool used for further troubleshooting and analysis is slabtop, kmemleak, or PAGE_OWNER.

[0218] Step 406: If it is determined that the total CPU usage is not greater than the preset CPU usage threshold, and the total memory occupancy is not greater than the preset memory occupancy threshold, it is determined that the operating state of the embedded device is normal; and output.

[0219] In the disclosed embodiment, the data to be analyzed is obtained by a data acquisition tool deployed on the embedded device, and the data to be analyzed includes the total CPU usage and sub-CPU usage, as well as the total memory occupancy and sub-memory occupancy; the data to be analyzed on the embedded device is obtained and analyzed by a data analysis tool deployed on the data analysis device, and when the data analysis result is that the operating state is abnormal, a tool for further troubleshooting and analysis is recommended according to the cause of the abnormality. This solution can reduce the cost of analyzing the operating state of the embedded device and improve the efficiency of analyzing the operating state of the embedded device.

[0220] In terms of CPU usage, the industry usually uses top to view the CPU usage statistics at a certain moment or the final CPU usage data results. When checking whether there is a problem with the operation of the device, if you want to view the CPU usage problem during the entire stress test process, you need to keep an eye on the CPU usage statistics of top on the serial port terminal. And the memory occupancy is also manually searched, which results in high cost and low efficiency. However, this embodiment can release manpower through automatic analysis of the tool, confirm whether there is a problem at a low cost and high efficiency, and recommend tools for further troubleshooting related problems.

[0221] The embodiment of the present disclosure is also configured to maintain a problem-solving library; the problem-solving library is used to respond to query requests regarding problem-solving methods issued by the data analysis tool.

[0222] In specific implementation, the problem solving library can automatically analyze the operation status of embedded devices. When an abnormality is determined, the corresponding tool for further troubleshooting and analysis can be found from the problem solving library through data analysis tools according to the cause of the abnormality, and recommendations can be made.

[0223] Alternatively, a technician may encounter a technical problem and search for a solution to the problem in the problem solving library.

[0224] The maintenance of the problem-solving library can be to add or modify the problem-solving methods in the problem-solving library according to the specific problem-solving results.

[0225] The following is a process for implementing the operating status analysis of an embedded device in an embodiment of the present application in combination with a specific application scenario.

[0226] The first scenario: After development and testing are completed and the system is put into use on site, you need to troubleshoot the anomaly after discovering it:

[0227] After the development of embedded devices such as Changdian cameras is completed, customers may encounter device abnormal restart issues after upgrading and using them for a period of time at a trial site; abnormality troubleshooting is required.

[0228] The data acquisition tool may be deployed on the normally powered camera when an abnormality occurs or when a trial is started, and this embodiment does not impose any restrictions on this.

[0229] Remotely start the data acquisition tool deployed on the normal power camera to collect the operation information of the normal power camera; as well as the operation information after the restart, obtain the data to be analyzed through calculation, and store it in the flash of the normal power camera. The remote here does not mean to start directly on the normal power camera, but to start through the device where the data analysis tool is deployed.

[0230] The device on which the data analysis tool is deployed obtains the data to be analyzed from the flash of the normally powered camera, and uses the data analysis tool deployed on it to analyze and determine the abnormality caused by the memory. Then, the tool for further investigation is recommended based on the occupancy rate of the sub-memory with the largest occupancy rate;

[0231] Assuming that the sub-memory occupancy with the largest occupancy is the user task memory occupancy, the recommended tools for further troubleshooting and analysis are mtrace, Valgrind, or ASan;

[0232] Assume that the valgrind tool is indeed recommended. The business developer directly uses the valgrind tool on the Changdian camera, and locates the file and code where the leak is located based on the information printed by valgrind after the abnormality after the stress test. After the problem is fixed, the iterative version is quickly upgraded for the customer, which saves time for the customer's good experience and also reflects the professional ability.

[0233] The second scenario: Perform stress testing on a newly developed embedded device to determine whether there are any problems:

[0234] After the resources of the new debugging version are integrated, they are placed in the stress test equipment for stress testing. After the stress test is completed, the deployed data acquisition tool is used to collect operation information and calculate the data to be analyzed.

[0235] The device that deploys the data analysis tool obtains the data to be analyzed, and uses the data analysis tool to analyze the data. If the total CPU usage is greater than the preset CPU usage threshold, it is determined that the system has an excessive CPU consumption problem. Then determine the CPU usage of each submodule; assuming that the sub-CPU usage with the largest usage is the user business process usage, the recommended tools for further troubleshooting and analysis are strace, htop, or perf; technicians can use the recommended tools to troubleshoot and locate abnormalities.

[0236] With the continuous increase of functions and the continuous iteration of business programs, the remaining memory is gradually becoming tight. At this time, further analysis of the data to be analyzed may show that the total memory occupancy rate is greater than the preset memory occupancy rate threshold, and then further determine the sub-memory occupancy rate with the largest occupancy rate;

[0237] Assuming that the sub-memory usage with the largest occupancy is the Slab memory occupancy, the recommended tools for further troubleshooting and analysis are slabtop, kmemleak, or PAGE_OWNER.

[0238] Use the recommended tools to further troubleshoot and analyze to locate the specific location where memory is consumed.

[0239] The operating status analysis method of embedded devices provided in this embodiment can recommend automatic abnormality location tools for each embedded device in application and test scenarios, thereby reducing the cost of analyzing the operating status of embedded devices and improving the efficiency of analyzing the operating status of embedded devices.

[0240] Figure 5 is a schematic diagram of a running status analysis device for an embedded device according to an exemplary embodiment. Figure 5 As shown, the operating status analysis device of the embedded device mainly includes:

[0241] The acquisition unit 501 is configured to acquire data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to state data; the state data is operation data collected by the data acquisition tool from the embedded device in operation;

[0242] The analysis unit 502 is configured to analyze the data to be analyzed by using a locally deployed data analysis tool to obtain a data analysis result; wherein the data analysis result is whether the operation state of the embedded device is abnormal or normal; if the operation state is abnormal, a recommended tool for further troubleshooting and analysis is also output;

[0243] The output unit 503 is configured to output the data analysis result.

[0244] In another embodiment,

[0245] The analysis unit 502 is configured to analyze the data to be analyzed by using a locally deployed data analysis tool when the data to be analyzed includes a total CPU usage and a sub-CPU usage; if it is determined that the total CPU usage is greater than a preset CPU usage threshold, it is determined that the operating state of the embedded device is abnormal, and a corresponding tool for further troubleshooting and analysis is determined based on the sub-CPU usage with the largest usage; if it is determined that the total CPU usage is not greater than the preset CPU usage threshold, it is determined that the operating state of the embedded device is normal.

[0246] In another embodiment,

[0247] The analysis unit 502 is configured to analyze the data to be analyzed by using a locally deployed data analysis tool when the data to be analyzed includes a total memory occupancy rate and a sub-memory occupancy rate; if it is determined that the total memory occupancy rate is greater than a preset memory occupancy rate threshold, it is determined that the operating state of the embedded device is abnormal, and a corresponding tool for further troubleshooting and analysis is determined based on the sub-memory occupancy rate with the largest occupancy rate; if it is determined that the total memory occupancy rate is not greater than the preset memory occupancy rate threshold, it is determined that the operating state of the embedded device is normal.

[0248] In another embodiment,

[0249] The analysis unit 502 is configured to perform, when the data to be analyzed includes the total CPU usage and the sub-CPU usage, as well as the total memory occupancy and the sub-memory occupancy, analyzing the data to be analyzed by using a locally deployed data analysis tool; if it is determined that the total CPU usage is greater than a preset CPU usage threshold, and the total memory occupancy is greater than a preset memory occupancy threshold, determining that the operating state of the embedded device is abnormal, and determining a corresponding tool for further troubleshooting and analysis according to the sub-CPU usage with the largest usage, and determining a corresponding tool for further troubleshooting and analysis according to the sub-memory occupancy with the largest occupancy; if it is determined that the total CPU usage is greater than the preset CPU usage threshold, and If the total memory occupancy rate is not greater than the preset memory occupancy rate threshold, it is determined that the operating state of the embedded device is abnormal, and the corresponding tool for further troubleshooting and analysis is determined according to the sub-CPU usage rate with the largest usage rate; if it is determined that the total CPU usage rate is not greater than the preset CPU usage rate threshold, and the total memory occupancy rate is greater than the preset memory occupancy rate threshold, it is determined that the operating state of the embedded device is abnormal, and the corresponding tool for further troubleshooting and analysis is determined according to the sub-memory occupancy rate with the largest usage rate; if it is determined that the total CPU usage rate is not greater than the preset CPU usage rate threshold, and the total memory occupancy rate is not greater than the preset memory occupancy rate threshold, it is determined that the operating state of the embedded device is normal.

[0250] In another embodiment,

[0251] If the sub-CPU usage with the highest usage rate is the user business process usage rate, the tool used for further investigation and analysis is strace, htop, or perf;

[0252] Or, if the sub-CPU usage with the highest usage rate is the system kernel state usage rate, the tool used for further troubleshooting and analysis is perf or ftrace;

[0253] Or, if the sub-CPU usage with the highest usage rate is the iowait usage rate, the tool used for further troubleshooting and analysis is perf, iostat or fio;

[0254] Or, if the sub-CPU usage with the highest usage is the irq usage, the tool for further troubleshooting and analysis is perf or ftrace;

[0255] Or, if the sub-CPU usage with the highest usage is the softirq usage, the tool for further troubleshooting and analysis is perf or ftrace.

[0256] In another embodiment,

[0257] If the sub-memory occupancy rate with the largest occupancy rate is the user task memory occupancy rate, the tool used for further investigation and analysis is mtrace, Valgrind or ASan;

[0258] Or, if the sub-memory occupancy rate with the largest occupancy rate is the Cache memory occupancy rate, the tool for further investigation and analysis is to prompt the user that the tmpfs file system occupies too much memory and that the file needs to be deleted in time;

[0259] Or, if the sub-memory occupancy with the largest occupancy is the Slab memory occupancy, the tool for further troubleshooting and analysis is slabtop, kmemleak or PAGE_OWNER.

[0260] In another embodiment, the apparatus further comprises:

[0261] The configuration unit 504 is configured to execute configuration and maintain a problem-solving library; wherein the problem-solving library is used to respond to query requests regarding problem-solving methods issued by the data analysis tool.

[0262] Regarding the operation status analysis apparatus of the embedded device in each of the above-mentioned embodiments, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the operation status analysis method of the embedded device, and will not be elaborated here.

[0263] It should be noted that: the above embodiment only illustrates the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0264] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. In some embodiments, the electronic device is a server. The electronic device 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 601 and one or more memories 602, wherein at least one program code is stored in the memory 602, and the at least one program code is loaded and executed by the processor 601 to implement the multi-person motion recognition method provided by the above-mentioned various embodiments. Of course, the electronic device 600 may also have components such as image acquisition components, wired or wireless network interfaces, keyboards, and input and output interfaces for input and output. The electronic device 600 may also include other components for implementing device functions, which will not be repeated here.

[0265] In an exemplary embodiment, a computer-readable storage medium including at least one instruction is also provided, such as a memory including at least one instruction. The at least one instruction can be executed by a processor in a computer device to complete the operating status analysis method of the embedded device in the above embodiment.

[0266] Optionally, the above-mentioned computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may include ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device, etc.

[0267] In an exemplary embodiment, a computer program product is also provided, including one or more instructions, which can be executed by a processor of a computer device to complete the operating status analysis method of the embedded device provided in the above-mentioned embodiments.

[0268] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. A method for analyzing the operating status of an embedded device, characterized in that: The method comprises: Acquire data to be analyzed from the embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to state data; the state data is operation data collected by the data acquisition tool from the embedded device in operation; The data to be analyzed is analyzed by a locally deployed data analysis tool to obtain a data analysis result and output it; wherein the data analysis result is whether the operating status of the embedded device is abnormal or normal; if the operating status is abnormal, a recommended tool for further troubleshooting and analysis is also output.

2. The method according to claim 1, characterized in that: The data to be analyzed is stored in the flash of the embedded device; The step of obtaining the data to be analyzed from the embedded device includes: The data to be analyzed is obtained from the flash of the embedded device.

3. The method according to claim 1, characterized in that When the data to be analyzed includes total CPU usage and sub-CPU usage, analyzing the data to be analyzed by using a locally deployed data analysis tool to obtain a data analysis result includes: Analyze the data to be analyzed by using a locally deployed data analysis tool; If it is determined that the total CPU usage is greater than the preset CPU usage threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the usage of the sub-CPU with the largest usage; Or, if it is determined that the total CPU usage is not greater than a preset CPU usage threshold, it is determined that the operating state of the embedded device is normal.

4. The method according to claim 1, characterized in that When the data to be analyzed includes total memory occupancy and sub-memory occupancy, analyzing the data to be analyzed by using a locally deployed data analysis tool to obtain a data analysis result includes: Analyze the data to be analyzed by using a locally deployed data analysis tool; If it is determined that the total memory occupancy rate is greater than a preset memory occupancy rate threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy rate with the largest occupancy rate; Or, if it is determined that the total memory occupancy is not greater than a preset memory occupancy threshold, it is determined that the operating state of the embedded device is normal.

5. The method according to claim 1, characterized in that When the data to be analyzed includes total CPU usage and sub-CPU usage, and total memory occupancy and sub-memory occupancy, analyzing the data to be analyzed by using a locally deployed data analysis tool to obtain a data analysis result includes: Analyze the data to be analyzed by using a locally deployed data analysis tool; If it is determined that the total CPU usage is greater than the preset CPU usage threshold, and the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operation state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-CPU usage with the largest usage, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy; Or, if it is determined that the total CPU usage is greater than a preset CPU usage threshold, and the total memory occupancy is not greater than a preset memory occupancy threshold, it is determined that the operating state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the usage of the sub-CPU with the largest usage; Or, if it is determined that the total CPU usage is not greater than the preset CPU usage threshold, and the total memory occupancy is greater than the preset memory occupancy threshold, it is determined that the operating state of the embedded device is abnormal, and a corresponding tool for further investigation and analysis is determined according to the sub-memory occupancy with the largest occupancy; Or, if it is determined that the total CPU usage is not greater than a preset CPU usage threshold, and the total memory occupancy is not greater than a preset memory occupancy threshold, it is determined that the operating state of the embedded device is normal.

6. The method according to claim 3 or 5, characterized in that: If the sub-CPU usage with the highest usage rate is the user business process usage rate, the tool used for further investigation and analysis is strace, htop, or perf; Or, if the sub-CPU usage with the highest usage rate is the system kernel state usage rate, the tool used for further troubleshooting and analysis is perf or ftrace; Or, if the sub-CPU usage with the highest usage rate is the iowait usage rate, the tool used for further troubleshooting and analysis is perf, iostat or fio; Or, if the sub-CPU usage with the highest usage is the irq usage, the tool for further troubleshooting and analysis is perf or ftrace; Or, if the sub-CPU usage with the highest usage is the softirq usage, the tool for further troubleshooting and analysis is perf or ftrace.

7. The method according to claim 4 or 5, characterized in that: If the sub-memory occupancy rate with the largest occupancy rate is the user task memory occupancy rate, the tool used for further investigation and analysis is mtrace, Valgrind or ASan; Or, if the sub-memory occupancy rate with the largest occupancy rate is the Cache memory occupancy rate, the tool for further investigation and analysis is to prompt the user that the tmpfs file system occupies too much memory and that the file needs to be deleted in time; Or, if the sub-memory occupancy with the largest occupancy is the Slab memory occupancy, the tool for further troubleshooting and analysis is slabtop, kmemleak or PAGE_OWNER.

8. The method according to claim 1, characterized in that The method further comprises: A problem-solving library is configured and maintained; wherein the problem-solving library is used to respond to query requests regarding problem-solving methods issued by the data analysis tool.

9. An operating status analysis device for an embedded device, characterized in that: The device comprises: an acquisition unit configured to acquire data to be analyzed from an embedded device; the data to be analyzed is obtained by the embedded device through a data acquisition tool deployed thereon according to state data; the state data is operation data collected by the data acquisition tool from the embedded device in operation; An analysis unit is configured to analyze the data to be analyzed by using a locally deployed data analysis tool to obtain a data analysis result; wherein the data analysis result is whether the operation state of the embedded device is abnormal or normal; if the operation state is abnormal, a recommended tool for further troubleshooting and analysis is also output; The output unit is configured to output the data analysis result.

10. An electronic device, characterized in that: include: processor; a memory for storing executable instructions for the processor; The processor is configured to execute the executable instructions to implement the operating status analysis method of the embedded device as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Linux system problem automatic analysis method and system

    CN107943657A

  • System detection method and device, memory monitoring method and device, medium and electronic equipment

    CN110457179A

  • Embedded system state monitoring method

    CN111061612A