Visual performance analysis tool under linux system and use method thereof

CN119311531APending Publication Date: 2025-01-14KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411342667.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The debugging and analysis tools of existing Linux systems are mostly command line interfaces, which are inconvenient to use and have shortcomings in historical data storage and automated analysis, making it difficult to quickly and accurately locate system performance abnormalities, affecting system stability and user experience.

Method used

A visual performance analysis tool for Linux system was designed, real-time data acquisition and processing is realized through sppd and sppv, graphical interface and automated analysis are provided, socket communication and JSON format data exchange are used, and built-in tools such as iotop and df are integrated. , cpuinfo, etc., and in-depth parsing of /proc and /sys directory information.

Benefits of technology

It significantly improves the visualization and analysis efficiency of system performance data. Users can quickly understand the system status without being familiar with command line operations, easily perform performance analysis, and reduce failure risks. It is suitable for various application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311531A_ABST
    Figure CN119311531A_ABST
Patent Text Reader

Abstract

The invention relates to a visual performance analysis tool under a linux system and a use method thereof, and relates to the field of computer technology, the visual performance analysis tool SPP comprises two parts of an sppd and an sppv, the sppd and the sppv are communicated through a socket, the sppd runs on a tested machine, has a data acquisition function and is used for monitoring running data of the tested machine in real time, and the sppv is used for analyzing the running data of the tested machine in real time. And when an acquisition request of the sppv is received, the operation data is sent to the sppv, and the sppv operates on a non-test machine, has a data processing function and is used for processing and displaying the data acquired from the sppd. According to the method, the effect that a user can quickly know the system state and easily perform performance analysis without being familiar with complex command line operation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a visual performance analysis tool under a Linux system and a method for using the tool. Background Art

[0002] With the rapid development and continuous growth of domestic operating systems, more and more companies and individuals choose to use domestic operating systems as tools for daily production and life. In the development and use of operating systems, the system often encounters overall performance degradation challenges caused by internal process problems such as memory leaks, abnormal disk I / O usage, and soaring CPU usage. Faced with these challenges, how to quickly and accurately locate these abnormal processes and then adopt effective strategies to improve system performance has become a vital task. This is not only related to the stability and reliability of the system, but also directly affects the user experience and work efficiency. Therefore, optimizing system performance and ensuring that it can maintain efficient and stable operation in various complex environments is the common goal pursued by every operating system developer and user.

[0003] Currently, Linux systems have many powerful built-in debugging and profiling tools, such as top, pidstat, vmstat, iotop, perf, powertop, free, and slabtop, which provide developers and system administrators with rich monitoring and diagnostic capabilities. These tools deeply parse the system information in the / proc and / sys directories, analyze hardware data in real time, and accurately monitor key indicators such as disk I / O read and write, CPU usage, system process status, and memory application, release, and read and write, thereby helping users gain insight into the operating status of a single process or the entire system and quickly perform fault analysis. However, most of these tools are based on command line interfaces, which may not be intuitive and easy to use for users who are not familiar with terminal operations. In addition, their support for historical data storage and analysis is relatively limited, and the degree of automated analysis needs to be improved. Summary of the invention

[0004] To solve the above problem, the present invention provides a visual performance analysis tool and an implementation method thereof under a Linux system.

[0005] In the first aspect, a visual performance analysis tool under a Linux system includes two parts, sppd and sppv. Sppd and sppv communicate through sockets, wherein: sppd runs on the tested machine and has a data collection function. It is used to monitor the running data of the tested machine in real time and send the running data to sppv when receiving the acquisition request from sppv. sppv runs on non-test machines and has data processing capabilities. It is used to process and display the data obtained from sppd.

[0006] In another possible implementation, sppd runs on the tested machine and has a data acquisition function for real-time monitoring of the running data of the tested machine and sending the running data to sppv upon receiving an acquisition request from sppv, including: When the tested machine is turned on, sppd is started to initialize the libev event-driven framework and the socket communication interface; Waiting for the socket data request sent by sppv; When a request is received, the request is parsed and the corresponding interface function is called to generate a string in json format corresponding to the request; Return a JSON formatted string to sppv.

[0007] In another possible implementation, when a request is received, the request is parsed and a corresponding interface function is called to generate a string in json format corresponding to the request, including: If the request is for system io data, sppd enters the / proc directory, scans all processes under the directory, obtains the read_bytes data and write_bytes data of all processes, and obtains the overall disk data through the df command, and packages the read_bytes data, write_bytes data and the obtained overall disk data into a string in json format; If the request is for system memory data, sppd enters the / proc directory, scans all processes under the directory, obtains the uss data and pss data of all processes, and parses / proc / meminfo to obtain the system's overall memory information, and packages the uss data, pss data and the obtained system's overall memory information into a string in json format; If the request is for system CPU data, sppd will first enter the / proc directory, scan all processes under the directory, obtain the CPU usage data of all processes, and call the cpuinfo or vmstat command to obtain more CPU information, and package the obtained more CPU information and CPU usage data into a string in json format; If the request is for system core data, sppd calls the coredumpctl instruction to obtain a core file list, and packages the core file list into a string in json format.

[0008] In another possible implementation, sppv runs on a non-test machine and has data processing capabilities for processing and displaying the data obtained from sppd, including: When the non-test machine is turned on, sppv initializes the UI image interface and the scanning cycle; sppv waits for user operation. When the user performs the operation, it sends the corresponding request to sppd through the socket according to the user operation. Receive the string in json format returned by sppd, parse the string in json format, and save it as sample data in the corresponding database; Export the data saved in the database according to user operations.

[0009] In another possible implementation, the data stored in the database is exported according to the user operation, including: If the data to be exported is system IO data, the difference between all sample data and the sample data collected in the previous scan cycle is obtained cyclically, and the IO growth of each scan cycle in the test period is obtained based on the difference, and an Excel report is generated and exported; If the data to be exported is system data, a list of processes with abnormal risks will be generated based on the data to be exported, and a corresponding process line chart will be output based on the process name entered by the user, and a test report will be automatically generated at the same time; If the data to be exported is system CPU data, the process list whose CPU usage is greater than the preset threshold will be exported, and the corresponding process line chart will be output according to the process name entered by the user; If the data to be exported is system core data, directly export the core file list.

[0010] In the second aspect, the present application provides a method for using a visual performance analysis tool under a Linux system, using the following technical solution: A method for using a visual performance analysis tool under a Linux system includes: At the beginning of the test, when the tested machine and the non-tested machine are turned on, sppd and sppv are started respectively, and the libev event-driven framework and the UI graphical interface are initialized, and the socket communication interface is initialized on both the tested machine and the non-tested machine; sppv waits for user operation. When the user performs the operation, it sends the corresponding request to sppd through the socket according to the user operation. When sppd receives a request, it parses the request and calls the corresponding interface function to generate a string in json format corresponding to the request; sppd returns a string in json format to sppv; sppv receives the string in JSON format returned by sppd, parses the string in JSON format, and saves it as sample data in the corresponding database; After the test is completed, sppv analyzes the system performance of the current tested machine based on the sample data saved in the database according to the user's operation and exports the analysis results.

[0011] In another possible implementation, when sppd receives a request, it parses the request and calls a corresponding interface function to generate a string in json format corresponding to the request, including: If the request is for system io data, sppd enters the / proc directory, scans all processes under the directory, obtains the read_bytes data and write_bytes data of all processes, and obtains the overall disk data through the df command, and packages the read_bytes data, write_bytes data and the obtained overall disk data into a string in json format; If the request is for system memory data, sppd enters the / proc directory, scans all processes under the directory, obtains the uss data and pss data of all processes, and parses / proc / meminfo to obtain the system's overall memory information, and packages the uss data, pss data and the obtained system's overall memory information into a string in json format; If the request is for system CPU data, sppd will first enter the / proc directory, scan all processes under the directory, obtain the CPU usage data of all processes, and call the cpuinfo or vmstat command to obtain more CPU information, and package the obtained more CPU information and CPU usage data into a string in json format; If the request is for system core data, sppd calls the coredumpctl instruction to obtain a core file list, and packages the core file list into a string in json format.

[0012] In another possible implementation, sppv exports the data stored in the database according to the user operation, including: If the data to be exported is system IO data, the difference between all sample data and the sample data collected in the previous scan cycle is obtained cyclically, and the IO growth of each scan cycle in the test period is obtained based on the difference, and an Excel report is generated and exported; If the data to be exported is system data, a list of processes with abnormal risks will be generated based on the data to be exported, and a corresponding process line chart will be output based on the process name entered by the user, and a test report will be automatically generated at the same time; If the data to be exported is system CPU data, the process list whose CPU usage is greater than the preset threshold will be exported, and the corresponding process line chart will be output according to the process name entered by the user; If the data to be exported is system core data, directly export the core file list.

[0013] In summary, this application includes the following beneficial technical effects: This application customizes the SPP tool for the Linux system, and then introduces an intuitive and easy-to-understand graphical interface through the SPP tool, which significantly improves the visualization of system performance data. Users can quickly understand the system status and easily perform performance analysis without being familiar with complex command line operations.

[0014] Through the automated data collection, storage and analysis mechanism, comprehensive monitoring and in-depth analysis of system performance data are achieved, greatly improving the efficiency and accuracy of system performance analysis. Users can locate problems more quickly, develop optimization strategies, and reduce the risk of system failures. At the same time, the SPP tool is optimized for various application scenarios to better meet the actual needs of users. Whether it is a large-scale enterprise-level server cluster or a single-machine system for individual users, SPP can provide a suitable monitoring and analysis solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a structural diagram of a visual performance analysis tool under a Linux system in an embodiment of the present application.

[0016] Figure 2 It is a functional schematic diagram of the visual performance analysis tool in an embodiment of the present application.

[0017] Figure 3 It is a flowchart of a method for using a visual performance analysis tool under a Linux system in an embodiment of the present application.

[0018] Figure 4 It is a process line chart corresponding to the men data in the embodiment of the present application.

[0019] Figure 5 This is an example diagram of a test report corresponding to the men data in an embodiment of the present application.

[0020] Figure 6 It is a process line chart corresponding to the cpu data in the embodiment of the present application. DETAILED DESCRIPTION

[0021] The present application is further described in detail below in conjunction with the accompanying drawings.

[0022] After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed, but such modifications are protected by patent law as long as they are within the scope of the claims of this application.

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0025] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.

[0026] For ease of understanding, the abbreviations involved in this application are first explained: SPP: SPP (system-performance-profile) is the abbreviation of system performance profiler sppd: SPP Daemon, a background process running on the tested machine, mainly collects IO / MEM / CPU information of the tested machine sppv: SPP Viewer, with data storage, data processing, visualization, and automatic analysis functions, runs on the non-test machine side and communicates with the tested machine through socket.

[0027] Secondly, if Figure 1As shown, this application has customized a visual performance analysis tool for Linux system. Compared with traditional tools, the visual performance analysis tool SPP customized by this application has been significantly enhanced in multiple dimensions such as visualization, interactivity, in-depth analysis, data comparison and scene fit. It provides an intuitive and easy-to-understand graphical interface, allowing users to monitor and analyze system performance data more easily. It also supports automated data collection, storage and analysis, greatly improving the efficiency and accuracy of system performance analysis. In addition, SPP is also optimized for various application scenarios and is not limited by the test platform. Whether it is a server, a desktop operating system, or a resource-constrained embedded platform, it can be used to perform performance analysis, which can better meet the actual needs of users and provide more accurate solutions.

[0028] In order to better understand the specific functions of the SPP customized for this application, such as Figure 2 As shown, the visual performance analysis tool SPP of this application has the following functions: 1. System / process analysis and monitoring functions 1. Historical data storage: Use sql database to store historical data. Specifically, use sqlite3 lightweight database to store it. The sqlite3 lightweight database, with its small size, strong compatibility and convenient mobile copy features, greatly facilitates the preservation and comparative analysis of historical data; 2. Visualization processing: After logical analysis of historical data, the data is visualized by using Python + Qt5 and combined with Python third-party graphics libraries. The easy-to-use API, rich interface controls and powerful development tool support provided by PyQt5 greatly shorten the development cycle from data to visual presentation, presenting users with an intuitive and interactive data display interface; 3. Export the test report, analyze the hardware information of the monitoring host, the change of system memory during the monitoring period, and the memory usage of all applications in the system, and output a detailed test report in txt and excel formats; 4. Real-time tracking and display of system memory buffer / cache usage; 5. Process memory leak analysis: analyze historical data to obtain the rising slope of memory data, and obtain and output the processes with an upward trend in the system with one click.

[0029] 2. Process running status monitoring 1. All process information records in the system initial state; 2. Automatically analyze and record the system's new and ended processes within the interval time, and output detailed Excel reports.

[0030] (III) System / IO analysis and monitoring 1. Real-time collection and display of system disk; 2. Visual display of io read / write of all processes in the system, which is helpful for analyzing io performance rise and fall problems at a certain moment or time period; 3. Historical data storage / analysis, output IO usage in Excel document in the form of original value + difference, which can quickly analyze system IO performance problems.

[0031] (IV) Core file list (coredump) file collection Core file list capture and output.

[0032] (V) Others 1. Network disconnection and reconnection mechanism. Through the network disconnection and reconnection mechanism, SPP demonstrates excellent robustness. When an abnormality occurs during the communication process, SPP has a built-in efficient multiple reconnection mechanism to ensure that a stable connection state can be maintained even in an unstable network environment. In addition, all key historical data are securely stored in the database. This design not only ensures the integrity and traceability of the data, but also means that even if the communication is temporarily interrupted, once the network is restored, the software can seamlessly connect and continue to perform the collection and analysis tasks of system performance, ensuring the continuity of work and the accuracy of data; 2. The setting.ini file and configurable collection cycle / frequency such as mem. Users can edit the configuration parameters in the setting.ini file to realize personalized settings when the software starts. This mechanism ensures that each time the software starts, the capture cycle and frequency of memory (mem), central processing unit (CPU) and input and output (IO) data will be automatically adjusted according to the latest configuration file, so as to accurately match the diverse needs of different users, greatly improving the adaptability and user experience of the software; 3. Easy-to-expand program architecture to facilitate later maintenance and functional expansion.

[0033] VI. Conclusion 1. Linux has many ready-made debugging and analysis tools, such as top, vmstat, lotop, pert, vagrind, and tree. These tools can track the running status of a single process or the system very well, but it is difficult to manually view and analyze massive amounts of data, and it is impossible to quickly locate the problem.

[0034] 2. In addition to integrating and expanding existing tools, the performance analyzer further enhances these tools from the perspectives of visualization, in-depth analysis, data comparison, and scenario adaptation.

[0035] 3. During the tool development process, we conducted in-depth research on the memory management mechanism and continuously output documents, which was very helpful in analyzing system problems.

[0036] More specifically, the above functions of SPP are implemented through sppd and sppv, and sppd and sppv communicate through sockets, where: sppd runs on the tested machine and has a data collection function. It is used to monitor the running data of the tested machine in real time and send the running data to sppv when receiving the acquisition request from sppv. sppv runs on non-test machines and has data processing capabilities. It is used to process and display the data obtained from sppd.

[0037] More specifically, Figure 3 The following is a specific method for using the visual performance analysis tool SPP in this application to capture and analyze the main data, including: Step S101, the test starts. When the tested machine and the non-tested machine are powered on, sppd and sppv are started respectively, and the libev event-driven framework and the UI graphical interface are initialized, and the socket communication interface is initialized on both the tested machine and the non-tested machine.

[0038] Step S102, sppv waits for user operation, and when the user performs the operation, sends a corresponding request to sppd through the socket according to the user operation.

[0039] Step S103, when sppd receives the request, it parses the request and calls the corresponding interface function to generate a string in json format corresponding to the request.

[0040] For the embodiment of the present application, the request types received by sppd include: system io data, system men data, system cpu data and system core data. When the request type is different, the corresponding method of generating a string in json format is different. By adopting the JSON-RPC remote procedure call protocol, not only the speed of data transmission is ensured, but also the data format parsing process is greatly simplified. It is worth noting that sppd, as a core process driven by C language, and sppv (view or display process) based on Python, achieve seamless and flexible communication through json, a language-independent data exchange format, further enhancing the maintainability and scalability of the system, that is, step S103 specifically includes: When the request is for system io data, sppd enters the / proc directory and scans all processes under the directory. Specifically, / proc / <pids> / io data is parsed to obtain the read_bytes data and write_bytes data of all processes. At the same time, the overall disk data is obtained through the df command, and the read_bytes data, write_bytes data and the obtained overall disk data are packaged into a string in json format; When the request is for system data, sppd enters the / proc directory and scans all processes under the directory. Specifically, / proc / <pids> / maps and / proc / meminfo data are parsed to obtain the uss data and pss data of all processes. At the same time, / proc / meminfo is parsed to obtain the overall memory information of the system. The uss data, pss data and the obtained overall memory information of the system are packaged into a string in json format; When the request is for system CPU data, sppd first enters the / proc directory and scans all processes under the directory. Specifically, / proc / <pids> / stat data is parsed to obtain the CPU usage data of all processes, and cpuinfo or vmstat commands are called to obtain more CPU information. Specifically, the vmstat command can obtain CPU information such as the percentage of user space execution time, the percentage of kernel space execution time, the percentage of CPU time in idle state, and the percentage of time spent waiting for IO. The vmstat command can obtain CPU information such as CPU main frequency and cache size, and package the obtained more CPU information and CPU usage data into a string in json format, so that the CPU performance and efficiency can be evaluated more comprehensively and efficiently based on these CPU information in the future; When the request is for system core data, sppd calls the coredumpctl command to obtain the core file list and packages the core file list into a string in JSON format.

[0041] This application adopts a two-pronged approach: first, directly use the system's built-in analysis tools (such as iotop, iostat, df, cpuinfo, etc.) to efficiently obtain key indicators of system performance; second, deeply parse the system's core files (especially the files in the / proc directory) to extract the information that is crucial to the analysis.

[0042] Step S104, sppd returns the string in json format to sppv.

[0043] Step S105, sppv receives the string in json format returned by sppd, parses the string in json format, and saves it as sample data in a corresponding database.

[0044] Step S106, the test is finished. SPPv analyzes the system performance of the current tested machine based on the sample data stored in the database according to the user operation and exports the analysis results. When the analysis is finished, the SPP application ends. For the embodiment of the present application, the data types of the sample data include: system io data, system men data, system cpu data and system core data. When the data types of the sample data are different, the corresponding analysis methods are different, and the derived analysis results are also different. The specific step S106 includes: When the data to be analyzed is system IO data, the difference between all sample data and the sample data collected in the previous scan cycle is obtained cyclically, and the IO growth amount of each scan cycle in the test period is obtained based on the difference, and an Excel report is generated and exported; When the data to be analyzed is system data, a list of processes with memory anomaly risks is generated based on the data to be analyzed, and a corresponding process line chart is output based on the process name entered by the user (such as Figure 4 ), and automatically generates a test report (such as Figure 5 shown); When the data to be exported is system CPU data, the list of processes whose CPU usage is greater than the preset threshold is exported, and the corresponding process line chart is output according to the process name entered by the user (such as Figure 6 shown); When the data to be exported is system core data, directly export the core file list.

[0045] This application customizes a visual performance analysis tool SPP for the Linux system, integrates the debugging and analysis tools into sppd in SPP, and makes sppd have powerful analysis capabilities. At the same time, it can go deep into the system, extract and analyze system information located in the / proc and / sys directories. When SPPV performs performance evaluation on specific performance parameters (such as memory, I / O, current process status of the system or CPU), sppd can respond quickly and return relevant specific information, providing strong data support for sppv. This efficient information interaction ensures the accuracy and real-time nature of performance analysis.

[0046] Simply deploy sppd, a program written entirely in C, on the monitored server or host to implement basic data collection functions, thereby minimizing the impact on the monitored system itself. The storage, analysis, and visualization of data are all handled by sppv. sppd is responsible for collecting real-time operating data of the monitored target, which is then obtained by sppv through JSONRPC requests. Once the raw data sent from sppd is obtained, sppv will store it in a database and perform specialized data processing. Finally, through the pyqt interface, sppv can vividly display the processed data in a variety of graphical ways.

[0047] By separating sppd from sppv, not only can sppd be easily deployed on an embedded computer board with limited resources, but it also ensures that data storage and analysis are performed on another host, thereby reducing the performance impact on the target machine and ensuring that the collected target machine data is more authentic and reliable.

[0048] In addition, the data is securely stored in the database, which not only supports long-term monitoring, but also provides a solid guarantee for subsequent data comparison and analysis. At the same time, automated test result output, visual line charts and other functions greatly improve the efficiency of R&D personnel.

[0049] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0050] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.< / pids> < / pids> < / pids>

Claims

1. A visual performance analysis tool under Linux system, characterized by: The visual performance analysis tool SPP consists of two parts: sppd and sppv. Sppd and sppv communicate through sockets. sppd runs on the tested machine and has a data collection function. It is used to monitor the running data of the tested machine in real time and send the running data to sppv when receiving the acquisition request from sppv. sppv runs on non-test machines and has data processing capabilities. It is used to process and display the data obtained from sppd.

2. A visual performance analysis tool for Linux system according to claim 1, characterized in that: sppd runs on the tested machine and has a data collection function. It is used to monitor the running data of the tested machine in real time and send the running data to sppv when receiving the acquisition request from sppv, including: When the tested machine is turned on, sppd is started to initialize the libev event-driven framework and the socket communication interface; Waiting for the socket data request sent by sppv; When a request is received, the request is parsed and the corresponding interface function is called to generate a string in json format corresponding to the request; Return a JSON formatted string to sppv.

3. A visual performance analysis tool for Linux system according to claim 2, characterized in that: When a request is received, the request is parsed and the corresponding interface function is called to generate a string in json format corresponding to the request, including: If the request is for system io data, sppd enters the / proc directory, scans all processes under the directory, obtains the read_bytes data and write_bytes data of all processes, and obtains the overall disk data through the df command, and packages the read_bytes data, write_bytes data and the obtained overall disk data into a string in json format; If the request is for system memory data, sppd enters the / proc directory, scans all processes under the directory, obtains the uss data and pss data of all processes, and parses / proc / meminfo to obtain the system's overall memory information, and packages the uss data, pss data and the obtained system's overall memory information into a string in json format; If the request is for system CPU data, sppd will first enter the / proc directory, scan all processes under the directory, obtain the CPU usage data of all processes, and call the cpuinfo or vmstat command to obtain more CPU information, and package the obtained more CPU information and CPU usage data into a string in json format; If the request is for system core data, sppd calls the coredumpctl instruction to obtain a core file list, and packages the core file list into a string in json format.

4. A visual performance analysis tool for Linux system according to claim 1, characterized in that: sppv runs on non-test machines and has data processing functions. It is used to process and display the data obtained from sppd, including: When the non-test machine is turned on, sppv initializes the UI image interface and the scanning cycle; sppv waits for user operation. When the user performs the operation, it sends the corresponding request to sppd through the socket according to the user operation. Receive the string in JSON format returned by sppd, parse the string in JSON format, and save it as sample data in the corresponding database; Export the data saved in the database according to user operations.

5. A visual performance analysis tool for Linux system according to claim 4, characterized in that: According to user operations, the data saved in the database is exported, including: If the data to be exported is system IO data, the difference between all sample data and the sample data collected in the previous scan cycle is obtained cyclically, and the IO growth of each scan cycle in the test period is obtained based on the difference, and an Excel report is generated and exported; If the data to be exported is system data, a list of processes with abnormal risks will be generated based on the data to be exported, and a corresponding process line chart will be output based on the process name entered by the user, and a test report will be automatically generated at the same time; If the data to be exported is system CPU data, the process list whose CPU usage is greater than the preset threshold will be exported, and the corresponding process line chart will be output according to the process name entered by the user; If the data to be exported is system core data, directly export the core file list.

6. A method for using a visual performance analysis tool under a Linux system, characterized in that: include: At the beginning of the test, when the tested machine and the non-tested machine are turned on, sppd and sppv are started respectively, and the libev event-driven framework and the UI graphical interface are initialized, and the socket communication interface is initialized on both the tested machine and the non-tested machine; sppv waits for user operation. When the user performs the operation, it sends the corresponding request to sppd through the socket according to the user operation. When sppd receives a request, it parses the request and calls the corresponding interface function to generate a string in json format corresponding to the request; sppd returns a string in json format to sppv; sppv receives the string in JSON format returned by sppd, parses the string in JSON format, and saves it as sample data in the corresponding database; After the test is completed, sppv analyzes the system performance of the current tested machine based on the sample data saved in the database according to the user's operation and exports the analysis results.

7. A visual performance analysis tool for Linux system according to claim 6, characterized in that: When sppd receives a request, it parses the request and calls the corresponding interface function to generate a string in json format corresponding to the request, including: If the request is for system io data, sppd enters the / proc directory, scans all processes under the directory, obtains the read_bytes data and write_bytes data of all processes, and obtains the overall disk data through the df command, and packages the read_bytes data, write_bytes data and the obtained overall disk data into a string in json format; If the request is for system memory data, sppd enters the / proc directory, scans all processes under the directory, obtains the uss data and pss data of all processes, and parses / proc / meminfo to obtain the system's overall memory information, and packages the uss data, pss data and the obtained system's overall memory information into a string in json format; If the request is for system CPU data, sppd will first enter the / proc directory, scan all processes under the directory, obtain the CPU usage data of all processes, and call the cpuinfo or vmstat command to obtain more CPU information, and package the obtained more CPU information and CPU usage data into a string in json format; If the request is for system core data, sppd calls the coredumpctl instruction to obtain a core file list, and packages the core file list into a string in json format.

8. The visual performance analysis tool for Linux system according to claim 6, characterized in that: Sppv exports the data stored in the database according to user operations, including: If the data to be exported is system IO data, the difference between all sample data and the sample data collected in the previous scan cycle is obtained cyclically, and the IO growth of each scan cycle in the test period is obtained based on the difference, and an Excel report is generated and exported; If the data to be exported is system data, a list of processes with abnormal risks will be generated based on the data to be exported, and a corresponding process line chart will be output based on the process name entered by the user, and a test report will be automatically generated at the same time; If the data to be exported is system CPU data, the process list whose CPU usage is greater than the preset threshold will be exported, and the corresponding process line chart will be output according to the process name entered by the user; If the data to be exported is system core data, directly export the core file list.