Monitoring method and device, equipment and storage medium

By determining the server working mode based on the command line parameters entered by the user and monitoring the bandwidth status of the core processor in the monitoring mode, the problem that existing tools are difficult to effectively monitor memory resources is solved, efficient management of memory resources and failure prevention is achieved, and the stability and resource utilization efficiency of the server are improved.

CN119829357APending Publication Date: 2025-04-15CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411725875.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In high-density virtualization environments, existing tools are difficult to effectively monitor and manage memory resources, especially in the context of rapid development of cloud computing, big data processing and virtualization technologies.

Method used

The server's working mode is determined through the command line parameters entered by the user, including monitoring mode and allocation resource mode. In monitoring mode, obtain the bandwidth status information of the core processor, determine whether it is overloaded, and output reminder information. In the allocation resource mode, resource allocation is performed according to the level 3 cache resource allocation ratio and memory bandwidth resource allocation ratio, and bandwidth status information is displayed.

Benefits of technology

It realizes effective monitoring of memory resources, discovers potential failure points in advance, avoids system crashes or data loss caused by processor overload, improves the overall stability and resource management efficiency of the server system, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829357A_ABST
    Figure CN119829357A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a monitoring method which is applied to a server, the server comprises a central processing unit, the central processing unit comprises at least one core processor, the working mode of the server can be directly determined through command line parameters input by a user, the server can quickly respond to different task requirements, and the user experience is improved. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, and invalid monitoring or missing of the resources is avoided, so that the efficiency of resource management is improved; according to the method, potential fault points can be found in advance by monitoring the bandwidth state of the core processor, system crash or data loss caused by overload of the processor is avoided, the overall stability of a server system can be improved, and it is ensured that the server can still operate stably in a high-load environment; and through an automatic monitoring and reminding mechanism, the frequency and necessity of manually checking the state of the server are reduced, and the maintenance cost is reduced.
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 monitoring method, device, equipment and storage medium. Background Art

[0002] With the development of science and technology, the challenges of memory resource monitoring and management in high-density virtualized environments are increasing. Especially in the context of the rapid development of cloud computing, big data processing and virtualization technology, the demand for memory resource management is growing, but existing tools cannot effectively monitor memory resources. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a monitoring method, apparatus, device and storage medium that overcome the above problems or at least partially solve the above problems.

[0004] In order to solve the above problem, an embodiment of the present invention discloses a monitoring method, wherein the server includes a central processor, the central processor includes at least one core processor, and the method includes:

[0005] Get the command line parameters entered by the user;

[0006] Determine the working mode that the server needs to execute according to the command line parameters;

[0007] When the working mode is the monitoring mode, determining at least one core processor in the central processing unit that needs to be monitored according to the command line parameters;

[0008] Acquiring bandwidth status information of the at least one core processor;

[0009] determining, according to the bandwidth status information of the at least one core processor, whether the at least one core processor is overloaded;

[0010] When it is determined that a target core processor among the at least one core processor is overloaded, a warning message is output.

[0011] Optionally, determining the working mode that the server needs to execute according to the command line parameters includes:

[0012] Parsing the command line parameters by a parameter parser to determine the command header identifier contained in the command line parameters;

[0013] If the command header is identified as a monitoring character, determining that the working mode executed by the server is a monitoring mode;

[0014] If the command header identifier is an added character, it is determined that the working mode executed by the server is a resource allocation mode.

[0015] Optionally, it also includes:

[0016] When the working mode is the resource allocation mode, obtaining the level 3 cache resource allocation ratio and the memory bandwidth resource allocation ratio of the core processor to be allocated to which resources need to be allocated in the command line parameters;

[0017] Allocating the third-level cache resources and the memory resources of the core processor to be allocated according to the third-level cache resource allocation ratio and the memory bandwidth resource allocation ratio;

[0018] Obtaining bandwidth status information of the core processor to be allocated after resource reallocation;

[0019] The bandwidth status information of the at least one core processor is displayed according to the bandwidth status information of the to-be-allocated core processor after the reallocation.

[0020] Optionally, displaying the bandwidth status information of the at least one core processor includes:

[0021] Create graphical interfaces through preset scripts;

[0022] Determining a display mode of the graphical interface;

[0023] The bandwidth status information of the at least one core processor is displayed in the graphical interface according to the display mode.

[0024] Optionally, displaying the bandwidth status information of the at least one core processor in the graphical interface according to the display mode includes:

[0025] When the display mode is the first display mode, obtaining operating system information and current time of at least one core processor to be monitored;

[0026] Displaying the operating system information of the at least one core processor to be monitored and the current time in the top information of the graphical interface;

[0027] The bandwidth status information of the at least one core processor that needs to be monitored is displayed in the middle window of the graphical interface.

[0028] Optionally, displaying the bandwidth status information of the at least one core processor in the graphical interface according to the display mode further includes:

[0029] When the display mode is the second display mode, obtaining operating system information and current time of the server;

[0030] Displaying the current time and the operating system information in the top information of the graphical interface;

[0031] The bandwidth status information of the core processor to be allocated is displayed in the middle window of the graphical interface.

[0032] Optionally, the bandwidth status information includes at least one of an average bandwidth lower limit, an average bandwidth upper limit, an average bandwidth value, a last-level cache, and a total memory bandwidth byte count.

[0033] The present invention also discloses a monitoring device, which is applied to a server, wherein the server includes a central processor, and the central processor includes at least one core processor. The device includes:

[0034] The parameter acquisition module is used to obtain the command line parameters input by the user;

[0035] A mode determination module, used to determine the working mode that the server needs to execute according to the command line parameters;

[0036] A processor determination module, used for determining at least one core processor to be monitored in the central processing unit according to the command line parameters when the working mode is the monitoring mode;

[0037] A status acquisition module, used to acquire bandwidth status information of the at least one core processor;

[0038] A judging module, configured to judge whether the at least one core processor is overloaded according to the bandwidth status information of the at least one core processor;

[0039] The output module is used to output a reminder message when it is determined that a target core processor in the at least one core processor is overloaded.

[0040] Optionally, the mode determination module includes:

[0041] A first determining submodule, configured to parse the command line parameters through a parameter parser to determine a command header identifier contained in the command line parameters;

[0042] A second determination submodule, configured to determine that the working mode executed by the server is a monitoring mode if the command header identifier is a monitoring character;

[0043] The third determination submodule is used to determine that the working mode executed by the server is a resource allocation mode if the command header identifier is an added character.

[0044] Optionally, it also includes:

[0045] An allocation ratio acquisition module, used for acquiring a third-level cache resource allocation ratio and a memory bandwidth resource allocation ratio of a core processor to be allocated resources in the command line parameters when the working mode is a resource allocation mode;

[0046] An allocation module, configured to allocate the third-level cache resources and the memory resources of the core processor to be allocated according to the third-level cache resource allocation ratio and the memory bandwidth resource allocation ratio;

[0047] An acquisition module, used for acquiring bandwidth status information of the core processor to be allocated after resource reallocation;

[0048] The display module is used to display the bandwidth status information of the at least one core processor according to the bandwidth status information of the to-be-allocated core processor after the reallocation.

[0049] Optionally, the display module includes:

[0050] Create submodules for creating graphical interfaces through preset scripts;

[0051] A mode determination submodule, used to determine the display mode of the graphical interface;

[0052] The display submodule is used to display the bandwidth status information of the at least one core processor in the graphical interface according to the display mode.

[0053] Optionally, the display submodule includes:

[0054] A first acquisition unit, configured to acquire operating system information and current time of at least one core processor to be monitored when the display mode is the first display mode;

[0055] A first display unit, configured to display the operating system information of the at least one core processor to be monitored and the current time in the top information of the graphical interface;

[0056] The second display unit is used to display the bandwidth status information of the at least one core processor that needs to be monitored in the middle window of the graphical interface.

[0057] Optionally, the display submodule includes:

[0058] A second acquisition unit, configured to acquire operating system information and current time of the server when the display mode is the second display mode;

[0059] A third display unit, configured to display the current time and the operating system information in the top information of the graphical interface;

[0060] The fourth display unit is used to display the bandwidth status information of the core processor to be allocated in the middle window of the graphical interface.

[0061] Optionally, the bandwidth status information includes at least one of an average bandwidth lower limit, an average bandwidth upper limit, an average bandwidth value, a last-level cache, and a total memory bandwidth byte count.

[0062] The present invention also discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the above-mentioned monitoring method when executed by the processor.

[0063] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned monitoring method are implemented.

[0064] The embodiments of the present invention include the following advantages:

[0065] The present invention discloses a monitoring method. The present invention can directly determine the working mode of a server through command line parameters input by a user, so that the server can quickly respond to different task requirements. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, and invalid monitoring or omission of resources can be avoided, thereby improving the efficiency of resource management; by monitoring the bandwidth status of the core processor, potential fault points can be discovered in advance, and system crashes or data losses caused by processor overload can be avoided, and the overall stability of the system can be improved, ensuring that the server can still run stably under a high-load environment; through an automated monitoring and reminder mechanism, the frequency and necessity of manual inspection of the server status are reduced, the maintenance cost is reduced, and effective monitoring of memory resources can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 is a flowchart of a monitoring method provided by an embodiment of the present invention;

[0067] Figure 2 is a structural block diagram of a server provided by an embodiment of the present invention;

[0068] Figure 3 It is a structural block diagram of a monitoring device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] One of the core concepts of the embodiments of the present invention is that the present invention can directly determine the working mode of the server through the command line parameters input by the user, so that the server can quickly respond to different task requirements. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, avoiding invalid monitoring or omission of resources, thereby improving the efficiency of resource management; by monitoring the bandwidth status of the core processor, potential failure points can be discovered in advance, avoiding system crashes or data loss caused by processor overload, and improving the overall stability of the server system, ensuring that the server can still run stably under high load environments; through the automated monitoring and reminder mechanism, the frequency and necessity of manual inspection of the server status are reduced, reducing maintenance costs.

[0071] Reference Figure 1 , shows a flow chart of steps of a monitoring method provided by an embodiment of the present invention, the server includes a central processor, the central processor includes at least one core processor, and the method may include the following steps:

[0072] Step 101, obtaining command line parameters input by the user.

[0073] In an embodiment of the present invention, command line parameters are some specific instructions or setting information entered by the user in the command line interface of the server, which are used to convey the user's specific needs and configuration intentions to the server. In this monitoring method, different command line parameter combinations can trigger different functions or set different monitoring conditions, etc., giving the entire monitoring process a high degree of flexibility and customizability to adapt to the diverse needs of different users and various complex application scenarios.

[0074] In one example, the command line parameter that a user may enter is "-m monitor -c 1,3,5", where "-mmonitor" means setting the server's operating mode to monitoring mode ("monitor" means monitoring), and "-c 1,3,5" specifies that the core processors to be monitored are numbered 1, 3, and 5. Through such a simple command line input, the server can receive clear operation instructions, laying the foundation for subsequent steps.

[0075] Step 102: Determine the working mode that the server needs to execute according to the command line parameters.

[0076] In the embodiment of the present invention, the server usually has a variety of different working modes, such as a service mode for normal business operation, a maintenance mode for system maintenance, a monitoring mode specifically for resource monitoring, and a resource allocation mode. This step is to parse the corresponding key information from the command line parameters input by the user to determine which specific working mode the server should enter. The present invention can allow the server to accurately know the current main task. The resource allocation, operating logic and functional emphasis of the server will be different under different working modes. Accurately determining the working mode can ensure that subsequent operations are carried out in an orderly manner around the goals corresponding to the mode.

[0077] Taking the command line parameter "-m monitor" mentioned above as an example, the server-side program will perform string parsing on the entire command line parameter input. When it recognizes that the "-m" logo is followed by the word "monitor", it can be determined that the current server needs to execute the monitoring mode. Then the internal related modules will perform subsequent initialization, resource allocation and other preparations according to the requirements of the monitoring mode.

[0078] Step 103: When the working mode is the monitoring mode, at least one core processor in the central processing unit that needs to be monitored is determined according to the command line parameters.

[0079] In an embodiment of the present invention, when it is determined that the server is in monitoring mode, the server can extract information about which core processors need to be monitored from the command line parameters. Since the central processing unit of the server often includes multiple core processors (for example, common multi-core processors have 2-core, 4-core, 8-core or even more core configurations), different business application scenarios may only require attention to the operating status of some of the core processors. Through this step, those core processors that need to be monitored can be accurately screened out, thereby improving monitoring efficiency and more specifically understanding the operating conditions of the core components of the server.

[0080] like Figure 2 , shows a structural block diagram of a server provided by an embodiment of the present invention. The server is an 8-core processor, including: core processor 1, core processor 2, core processor 3, core processor 4, core processor 5, core processor 6, core processor 7, core processor 8. In an example, the core processors that need to be monitored are core processor 3 and core processor 5.

[0081] Step 104: Obtain bandwidth status information of at least one core processor.

[0082] In an embodiment of the present invention, after determining at least one core processor that needs to be monitored, bandwidth status information of the at least one core processor can be obtained. The bandwidth status information can well reflect the workload of the core processor and the usage of data processing capabilities. These data are crucial for accurately judging whether the core processor is in an overloaded state, because during the operation of the core processor, the amount of data processed, the data interaction speed with the memory and other components, etc. will be reflected in the bandwidth status. For example, if the bandwidth of a core processor is close to or exceeds the limit it can bear for a long time, it means that it is facing heavy load pressure and may be about to be overloaded. By obtaining this information, an intuitive and critical basis can be provided for subsequent overload judgment.

[0083] In an embodiment of the present invention, the bandwidth status information includes at least one of an average bandwidth lower limit, an average bandwidth upper limit, an average bandwidth value, a last-level cache, and a total memory bandwidth byte count.

[0084] In the embodiment of the present invention, the bandwidth status information may include at least one of an average bandwidth lower limit, an average bandwidth upper limit, an average bandwidth value, a last-level cache, and a total memory bandwidth byte count.

[0085] The lower limit of average bandwidth refers to the minimum reference value of bandwidth under normal working conditions. The upper limit of average bandwidth refers to the critical value of bandwidth close to overload. The data transmission volume between the core processor and the outside (such as memory, other hardware devices, etc.) can be counted within a certain period of time through the built-in performance monitoring tool of the operating system or the specially written low-level driver program, and then the average bandwidth value is calculated. At the same time, the lower limit and upper limit of average bandwidth are determined according to the design specifications of the server hardware and past performance evaluation experience. For example, for a core processor of a server, after counting the total amount of data transmission within one minute and combining it with time conversion, the average bandwidth value is 100MB per second, while the lower limit of average bandwidth set according to the server configuration is 20MB per second, and the upper limit of average bandwidth is 150MB per second.

[0086] Last Level Cache (LLC): The last level cache is the first-level cache closest to the core and has a relatively large capacity in the core processor cache system. Its usage has a great impact on the performance of the core processor. The relevant data of the last level cache can be obtained by reading specific registers inside the processor or using the monitoring interface provided by the hardware manufacturer. For example, the current occupancy rate of the last level cache is 80%, which means that most of its space has been used. This may indicate that the core processor is processing a large amount of data and is under heavy load, which in turn affects the judgment of whether it is overloaded.

[0087] The total memory bandwidth byte count refers to the number of data bytes that the core processor interacts with the memory per unit time. The memory management module of the operating system or hardware monitoring tools can be used to count the number of data bytes that the core processor interacts with the memory per unit time, that is, the memory bandwidth. For example, statistics show that the total memory bandwidth byte count that a core processor interacts with the memory in a certain period of time is 500MB. Combined with the overall memory bandwidth design capacity of the server and the memory bandwidth usage of other core processors, the load level of the core processor in memory data reading and writing and whether there is an overload risk can be comprehensively judged.

[0088] Step 105: Determine whether the at least one core processor is overloaded according to the bandwidth status information of the at least one core processor.

[0089] In an embodiment of the present invention, pre-set judgment rules and algorithms can be used to comprehensively evaluate whether each monitored core processor is in an overload state. Overload means that the workload of the core processor has exceeded the range that it can handle stably and efficiently. If it is not discovered and handled in time, it may lead to adverse consequences such as task processing delays, system freezes, and even partial service crashes.

[0090] In one example, based on the average bandwidth value, if the average bandwidth value of a core processor is continuously higher than a preset average bandwidth upper limit, then it can be preliminarily determined that the core processor may be overloaded, because this indicates that it has been in a high-load data transmission state for a long time and may not be able to process new tasks in a timely manner.

[0091] In another example, the last-level cache and average bandwidth are combined to determine: when the occupancy rate of the last-level cache is very high (such as exceeding 90%), and the average bandwidth value is close to or exceeds the upper limit, this means that the core processor is not only processing a large amount of data, but also its cache resources are almost exhausted, and the cache cannot be effectively used to accelerate data processing. At this time, it can be determined that the core processor is in an overloaded state because it is already facing the dual pressure of data processing and caching.

[0092] In another example, the total memory bandwidth byte count is used to determine if a core processor's total memory bandwidth byte count is abnormally high over a period of time, and accounts for too large a proportion of the server's overall available memory bandwidth, such as more than 80%, then it can also be determined to be overloaded, because this means that the core processor has consumed too many resources in interacting with the memory, affecting the smooth reading and writing of the entire server's memory data, and may cause other tasks that rely on memory resources to experience problems such as jamming.

[0093] Step 106: When it is determined that the target core processor in the at least one core processor is overloaded, output a reminder message.

[0094] In an embodiment of the present invention, for example, if the server is an 8-core processor, when it is determined that the third core processor is overloaded, a reminder message can be output to remind the user that the third core processor is overloaded, so that the overloaded core processor can be processed in time to improve troubleshooting efficiency.

[0095] It should be noted that the reminder method can be an interface prompt, an email reminder, or a voice reminder, and the specific method is not limited here.

[0096] The present invention discloses a monitoring method. The present invention can directly determine the working mode of a server through command line parameters input by a user, so that the server can quickly respond to different task requirements. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, and invalid monitoring or omission of resources can be avoided, thereby improving the efficiency of resource management; by monitoring the bandwidth status of the core processor, potential fault points can be discovered in advance, and system crashes or data losses caused by processor overload can be avoided, thereby improving the overall stability of the server system and ensuring that the server can still run stably under a high-load environment; through an automated monitoring and reminder mechanism, the frequency and necessity of manual inspection of the server status are reduced, thereby reducing maintenance costs.

[0097] In one embodiment of the present invention, the working mode that the server needs to execute is determined based on the command line parameters, including: parsing the command line parameters through a parameter parser to determine the command header identifier contained in the command line parameters; if the command header identifier is a monitoring character, then determining that the working mode executed by the server is a monitoring mode; if the command header identifier is an adding character, then determining that the working mode executed by the server is a resource allocation mode.

[0098] In an embodiment of the present invention, if the command header is identified as a monitoring character after parsing by the parameter parser, for example, "monitor" is used as the monitoring character, it means that the user wants the server to enter the monitoring mode. In the monitoring mode, the main task of the server is usually to monitor the status of certain key resources of the server (such as the core processor of the central processing unit, memory, network bandwidth, etc.), collect relevant data information, and judge whether these resources are in a normal state or whether abnormal conditions occur based on certain rules, so that the administrator can promptly grasp the operating health of the server, promptly discover potential problems and take corresponding measures to ensure the stable operation of the server.

[0099] If the command header is identified as an add character, for example, "add" is set as an add character, then the working mode executed by the server is determined to be a resource allocation mode. In the resource allocation mode, the server focuses on how to reasonably allocate its various internal hardware and software resources (such as memory space, processor core computing power, disk storage capacity, etc.) to different applications, services or user tasks to meet the resource requirements in different business scenarios, improve the overall resource utilization efficiency, and avoid the situation where some resources are idle while some tasks have insufficient resources. The present invention can determine the server working mode by parsing the command line parameters, and the server can flexibly switch the functional focus according to the different needs of users and accurately execute the corresponding tasks.

[0100] In one embodiment of the present invention, it also includes: when the working mode is the resource allocation mode, obtaining the three-level cache resource allocation ratio and the memory bandwidth resource allocation ratio of the core processor to be allocated to which resources need to be allocated in the command line parameters; allocating the three-level cache resources and the memory resources of the core processor to be allocated according to the three-level cache resource allocation ratio and the memory bandwidth resource allocation ratio; obtaining the bandwidth status information of the core processor to be allocated after the resources are reallocated; and displaying the bandwidth status information of at least one core processor according to the bandwidth status information of the core processor to be allocated after the reallocation.

[0101] In the embodiment of the present invention, the third-level cache generally refers to a higher-level cache in the CPU cache system, such as LLC-LastLevel Cache, which has a great influence on the data reading speed and processing efficiency of the core processor. The memory bandwidth reflects the ability and efficiency of data interaction between the core processor and the memory. The third-level cache and memory bandwidth are both key components of the core resources of the server. Different application scenarios and different tasks have different requirements for these resources.

[0102] By specifying these two resource allocation ratios in the command line parameters, users can accurately control the share of third-level cache resources and memory bandwidth resources that each core processor to be allocated can obtain according to actual needs, so as to achieve optimal resource allocation and ensure that the tasks undertaken by each core processor can obtain appropriate resource support, thereby improving the overall operating efficiency of the server.

[0103] After obtaining the allocation ratio of the third-level cache resource of the core processor to be allocated, the total amount of the third-level cache that can be allocated to the entire server will be determined first, and then the specific cache resource shares will be divided according to the allocation ratio corresponding to each core processor to be allocated. For example, the core servers to be allocated are core processors No. 1 and No. 3. If the total third-level cache is 16MB and the third-level cache resource allocation ratio of core processor 1 is 30%, then the third-level cache size it can allocate is 16MB×30%=4.8MB; the allocation ratio of core processor 3 is 50%, which can be allocated 16MB×50%=8MB.

[0104] Furthermore, for the allocation of memory bandwidth resources, the overall memory bandwidth upper limit of the server can be determined first, such as 100 GB / s, and then the specific bandwidth share can be allocated according to the memory bandwidth resource allocation ratio of each core processor to be allocated. For example, the core servers to be allocated are core processors No. 1 and No. 3, and the memory bandwidth resource allocation ratio of core processor 1 is 20%, then the memory bandwidth that can be allocated to it is 100 GB / s×20%=20 GB / s; the corresponding allocation ratio of core processor 3 is 30%, which can be allocated to 100 GB / s×30%=30 GB / s.

[0105] After completing the allocation of the third-level cache resources and memory bandwidth resources, obtaining the bandwidth status information of the reallocated core processor to be allocated can further optimize the resource configuration. The user can determine whether each core processor has obtained better performance support due to resource allocation, or whether there are still potential problems such as insufficient resources and load imbalance.

[0106] Furthermore, the bandwidth status information can be displayed in the server, for example, directly displaying the bandwidth status information in text form in the command line terminal of the server, such as listing the key indicator data such as the number of each core processor, the average bandwidth value, the last-level cache occupancy rate in a table.

[0107] In one embodiment of the present invention, displaying bandwidth status information of at least one core processor includes: creating a graphical interface through a preset script; determining a display mode of the graphical interface; and displaying the bandwidth status information of at least one core processor in the graphical interface according to the display mode.

[0108] In the embodiment of the present invention, when displaying the bandwidth status information of at least one core processor, a graphical interface can be first created through a preset script. Common programming languages ​​or frameworks for creating graphical interfaces include Tkinter, PyQt, etc. in Python, and Swing and JavaFX in Java.

[0109] After determining the graphic interface, the display mode of the graphic interface can be determined. The display modes may include two types: one is to display the bandwidth status information of the reallocated core processor, and the other is to display the bandwidth status information of all core processors. The bandwidth status information of at least one core processor can be displayed in the graphic interface according to the display mode selected by the user.

[0110] In one embodiment of the present invention, bandwidth status information of at least one core processor is displayed in a graphical interface according to a display mode, including: when the display mode is a first display mode, obtaining operating system information and current time of at least one core processor to be monitored; displaying the operating system information and current time of at least one core processor to be monitored in the top information of the graphical interface; and displaying the bandwidth status information of at least one core processor to be monitored in the middle window of the graphical interface.

[0111] In an embodiment of the present invention, the first display method is to display the bandwidth status information of at least one core processor that needs to be monitored. The operating system information is very important for understanding the operating environment of the core processor and the factors that may affect its bandwidth status. For example, in a Linux system, the uname -a command can be used to obtain detailed information including the operating system name, version number, kernel version, etc., and then the information is extracted through the corresponding programming interface for subsequent display in the graphical interface.

[0112] You can use the datetime.now() function to get the current date and time information, and get an object containing detailed time data such as year, month, day, hour, minute, and second. You can also organize it into a suitable format (such as "YYYY-MM-DDHH:MM:SS" format) for display in a graphical interface.

[0113] Then, after obtaining the operating system and current time, they can be displayed in the top information of the graphical interface, such as "Operating system: Linux 5.10.0-11-amd64", directly showing the operating system name and version number, and the current time will be updated in real time according to the selected time format (such as "YYYY-MM-DDHH:MM:SS"). For example, the setInterval function can be used in JavaScript), and the current time is re-obtained at regular intervals (such as every second) and the time text content displayed on the interface is updated to ensure that it always displays the latest and accurate time, so that users can clearly grasp the time reference point for viewing bandwidth status information.

[0114] The middle window is a key area for displaying the core content and the core processor bandwidth status information. It is necessary to select a suitable visual display form such as a bar chart, a line chart, a table, etc. according to the characteristics of the specific bandwidth status data obtained. There is no limitation on which one to use.

[0115] It should be noted that the image display interface may further include a bottom window, and the bottom window may prompt the user of operations that can be performed on the interface.

[0116] In one embodiment of the present invention, the bandwidth status information of at least one core processor is displayed in a graphical interface according to a display mode, and also includes: when the display mode is a second display mode, obtaining the operating system information and current time of the server; displaying the current time and operating system information in the top information of the graphical interface; and displaying the bandwidth status information of the core processor to be allocated in the middle window of the graphical interface.

[0117] In an embodiment of the present invention, the second display mode refers to displaying the bandwidth status information of the core processor to be allocated that needs to be monitored. The operating system information and current time of the server can be obtained first, and then the current time and operating system information are displayed in the top information of the graphical interface; the bandwidth status information of the core processor to be allocated is displayed in the middle window of the graphical interface.

[0118] The present invention discloses a monitoring method. The present invention can directly determine the working mode of a server through command line parameters input by a user, so that the server can quickly respond to different task requirements. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, and invalid monitoring or omission of resources can be avoided, thereby improving the efficiency of resource management; by monitoring the bandwidth status of the core processor, potential fault points can be discovered in advance, and system crashes or data losses caused by processor overload can be avoided, thereby improving the overall stability of the server system and ensuring that the server can still run stably under a high-load environment; through an automated monitoring and reminder mechanism, the frequency and necessity of manual inspection of the server status are reduced, thereby reducing maintenance costs.

[0119] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0120] Reference Figure 3, shows a structural block diagram of a monitoring device provided by an embodiment of the present invention, which is applied to a server, the server includes a central processing unit, the central processing unit includes at least one core processor, and the device includes:

[0121] The parameter acquisition module 201 is used to acquire the command line parameters input by the user;

[0122] A mode determination module 202 is used to determine the working mode that the server needs to execute according to the command line parameters;

[0123] The processor determination module 203 is used to determine at least one core processor that needs to be monitored in the central processing unit according to the command line parameters when the working mode is the monitoring mode;

[0124] A status acquisition module 204, used to acquire bandwidth status information of at least one core processor;

[0125] The judging module 205 is used to judge whether the at least one core processor is overloaded according to the bandwidth status information of the at least one core processor;

[0126] The output module 206 is configured to output a warning message when it is determined that a target core processor in at least one core processor is overloaded.

[0127] The present invention discloses a data processing device. The present invention can directly determine the working mode of a server through command line parameters input by a user, so that the server can quickly respond to different task requirements. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, and invalid monitoring or omission of resources can be avoided, thereby improving the efficiency of resource management; by monitoring the bandwidth status of the core processor, potential fault points can be discovered in advance, and system crashes or data losses caused by processor overload can be avoided, thereby improving the overall stability of the server system and ensuring that the server can still run stably under a high-load environment; through an automated monitoring and reminder mechanism, the frequency and necessity of manual inspection of the server status are reduced, thereby reducing maintenance costs.

[0128] In one embodiment of the present invention, the mode determination module includes:

[0129] A first determination submodule is used to parse the command line parameters through a parameter parser to determine the command header identifier contained in the command line parameters;

[0130] A second determination submodule is used to determine that the working mode executed by the server is a monitoring mode if the command header is identified as a monitoring character;

[0131] The third determination submodule is used to determine that the working mode executed by the server is a resource allocation mode if the command header identifier is an added character.

[0132] In one embodiment of the present invention, it also includes:

[0133] The allocation ratio acquisition module is used to acquire the third-level cache resource allocation ratio and the memory bandwidth resource allocation ratio of the core processor to be allocated in the command line parameters when the working mode is the resource allocation mode;

[0134] An allocation module, used for allocating the third-level cache resources and memory resources of the core processor to be allocated according to the third-level cache resource allocation ratio and the memory bandwidth resource allocation ratio;

[0135] An acquisition module, used for acquiring bandwidth status information of the core processor to be allocated after resource reallocation;

[0136] The display module is used to display the bandwidth status information of at least one core processor according to the bandwidth status information of the reallocated core processor to be allocated.

[0137] In one embodiment of the present invention, a display module includes:

[0138] Create submodules for creating graphical interfaces through preset scripts;

[0139] The mode determination submodule is used to determine the display mode of the graphical interface;

[0140] The display submodule is used to display the bandwidth status information of at least one core processor in a graphical interface according to a display mode.

[0141] In one embodiment of the present invention, the display submodule includes:

[0142] A first acquisition unit, configured to acquire operating system information and current time of at least one core processor to be monitored when the display mode is the first display mode;

[0143] A first display unit, used for displaying operating system information and current time of at least one core processor to be monitored in the top information of the graphical interface;

[0144] The second display unit is used to display bandwidth status information of at least one core processor that needs to be monitored in the middle window of the graphical interface.

[0145] In one embodiment of the present invention, the display submodule includes:

[0146] A second acquisition unit, used for acquiring operating system information and current time of the server when the display mode is the second display mode;

[0147] A third display unit, used to display the current time and operating system information in the top information of the graphical interface;

[0148] The fourth display unit is used to display the bandwidth status information of the core processor to be allocated in the middle window of the graphical interface.

[0149] In an embodiment of the present invention, the bandwidth status information includes at least one of an average bandwidth lower limit, an average bandwidth upper limit, an average bandwidth value, a last-level cache, and a total memory bandwidth byte count.

[0150] The present invention discloses a monitoring device. The present invention can directly determine the working mode of a server through command line parameters input by a user, so that the server can quickly respond to different task requirements. In the monitoring mode, the core processor resources of the server can be monitored in a targeted manner, and invalid monitoring or omission of resources can be avoided, thereby improving the efficiency of resource management; by monitoring the bandwidth status of the core processor, potential fault points can be discovered in advance, and system crashes or data losses caused by processor overload can be avoided, thereby improving the overall stability of the server system and ensuring that the server can still run stably under a high-load environment; through an automated monitoring and reminder mechanism, the frequency and necessity of manual inspection of the server status are reduced, thereby reducing maintenance costs.

[0151] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0152] An embodiment of the present invention further provides an electronic device, including:

[0153] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned monitoring method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0154] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned monitoring method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0155] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0156] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0157] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0158] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0160] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0161] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0162] The monitoring method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A monitoring method, characterized in that: Applied to a server, the server includes a central processing unit, the central processing unit includes at least one core processor, and the method includes: Get the command line parameters entered by the user; Determine the working mode that the server needs to execute according to the command line parameters; When the working mode is the monitoring mode, determining at least one core processor in the central processing unit that needs to be monitored according to the command line parameters; Acquiring bandwidth status information of the at least one core processor; determining, according to the bandwidth status information of the at least one core processor, whether the at least one core processor is overloaded; When it is determined that a target core processor among the at least one core processor is overloaded, a warning message is output.

2. The method according to claim 1, characterized in that Determining the working mode that the server needs to execute according to the command line parameters includes: Parsing the command line parameters by a parameter parser to determine the command header identifier contained in the command line parameters; If the command header is identified as a monitoring character, determining that the working mode executed by the server is a monitoring mode; If the command header identifier is an added character, it is determined that the working mode executed by the server is a resource allocation mode.

3. The method according to claim 2, characterized in that Also includes: When the working mode is the resource allocation mode, obtaining the level 3 cache resource allocation ratio and the memory bandwidth resource allocation ratio of the core processor to be allocated to which resources need to be allocated in the command line parameters; Allocating the third-level cache resources and the memory resources of the core processor to be allocated according to the third-level cache resource allocation ratio and the memory bandwidth resource allocation ratio; Obtaining bandwidth status information of the core processor to be allocated after resource reallocation; The bandwidth status information of the at least one core processor is displayed according to the bandwidth status information of the to-be-allocated core processor after the reallocation.

4. The method according to claim 3, characterized in that The displaying of the bandwidth status information of the at least one core processor includes: Create graphical interfaces through preset scripts; Determining a display mode of the graphical interface; The bandwidth status information of the at least one core processor is displayed in the graphical interface according to the display mode.

5. The method according to claim 4, wherein displaying the bandwidth status information of the at least one core processor in the graphical interface according to the display mode comprises: When the display mode is the first display mode, obtaining operating system information and current time of at least one core processor to be monitored; Displaying the operating system information of the at least one core processor to be monitored and the current time in the top information of the graphical interface; The bandwidth status information of the at least one core processor that needs to be monitored is displayed in the middle window of the graphical interface.

6. The method according to claim 4, characterized in that The displaying the bandwidth status information of the at least one core processor in the graphical interface according to the display mode further includes: When the display mode is the second display mode, obtaining operating system information and current time of the server; Displaying the current time and the operating system information in the top information of the graphical interface; The bandwidth status information of the core processor to be allocated is displayed in the middle window of the graphical interface.

7. The method according to claim 1, characterized in that The bandwidth status information includes at least one of an average bandwidth lower limit, an average bandwidth upper limit, an average bandwidth value, a last-level cache, and a total memory bandwidth byte count.

8. A monitoring device, characterized in that: Applied to a server, the server includes a central processing unit, the central processing unit includes at least one core processor, and the device includes: The parameter acquisition module is used to obtain the command line parameters input by the user; A mode determination module, used to determine the working mode that the server needs to execute according to the command line parameters; A processor determination module, used for determining at least one core processor to be monitored in the central processing unit according to the command line parameters when the working mode is the monitoring mode; A status acquisition module, used to acquire bandwidth status information of the at least one core processor; A judging module, configured to judge whether the at least one core processor is overloaded according to the bandwidth status information of the at least one core processor; The output module is used to output a reminder message when it is determined that a target core processor in the at least one core processor is overloaded.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the steps of the monitoring method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the monitoring method according to any one of claims 1 to 7 are implemented.