Server performance monitoring method and device, computer equipment and storage medium
Real-time acquisition of server performance logs and business scheduling status through the baseboard management controller, and use of fuzzy control algorithms to predict risks, solve the problem of low server performance monitoring efficiency in the existing technology, and achieve efficient performance analysis and risk prediction.
Patent Information
- Application Number
- CN202410692122.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
AI Technical Summary
Existing server performance monitoring methods are inefficient, rely on manual operations and manpower, and cannot obtain component utilization and business scheduling in real time, resulting in poor analysis timeliness and resource waste.
Establish an SSH connection with the server operating system through the baseboard management controller (BMC) to obtain system performance logs and business scheduling conditions in real time, use fuzzy control algorithms to predict risk levels, automatically analyze and generate performance reports.
It improves the efficiency of server performance monitoring, reduces dependence on operation and maintenance personnel, detects performance bottlenecks and downtime risks in a timely manner, and reduces operation and maintenance costs and risks.
Smart Images

Figure CN118656278A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a server performance monitoring method, device, computer equipment and storage medium. Background Art
[0002] Currently, servers are generally installed with performance monitoring tools to monitor the usage of various server components, such as CPU (central processing unit) utilization, memory utilization, etc. To monitor server performance, staff generally need to manually start the server performance monitoring tool, manually collect the server system performance logs, and perform analysis based on the system performance logs. This problem analysis method is less timely, less efficient, and time-consuming and labor-intensive. Summary of the invention
[0003] In view of this, the present invention provides a server performance monitoring method, apparatus, computer equipment and storage medium to solve the problem of low efficiency of server performance analysis.
[0004] In a first aspect, the present invention provides a server performance monitoring method, which is applied to a baseboard management controller of a server, comprising:
[0005] Establishing a connection with the operating system of the server via a secure shell protocol;
[0006] Obtaining a system performance log generated by the server, and parsing the system performance log to determine component utilization of internal components of the server;
[0007] Use the process detection commands supported by the operating system to determine the resource scheduling of the corresponding business;
[0008] A performance analysis is performed according to the component utilization and the scheduling status of the business, and a corresponding performance analysis result is generated.
[0009] In some optional implementations, the component utilization includes: processor utilization, memory utilization and hard disk utilization, and the scheduling of the service includes service utilization of resources by the service;
[0010] The performing performance analysis according to the component utilization and the scheduling status of the service to generate corresponding performance analysis results includes:
[0011] Determining a corresponding service utilization increment according to a change in the service utilization;
[0012] The performance of the server is predicted based on the processor utilization, the memory utilization, the hard disk utilization, and the service utilization increment to determine the risk level of the server.
[0013] In some optional implementations, predicting the performance of the server according to the processor utilization, the memory utilization, the hard disk utilization, and the service utilization increment to determine the risk level of the server includes:
[0014] Performing fuzzy control processing according to the processor utilization, the memory utilization and the hard disk utilization to determine the comprehensive utilization of the server; the number of fuzzy sets corresponding to the comprehensive utilization is greater than the number of fuzzy sets corresponding to the processor utilization, the memory utilization or the hard disk utilization;
[0015] Fuzzy control processing is performed according to the comprehensive utilization rate and the business utilization rate increment to determine the risk level of the server.
[0016] In some optional implementations, performing fuzzy control processing according to the processor utilization, the memory utilization, and the hard disk utilization to determine the comprehensive utilization of the server includes:
[0017] Determine a plurality of first fuzzy sets corresponding to the processor utilization, determine a plurality of second fuzzy sets corresponding to the memory utilization, determine a plurality of third fuzzy sets corresponding to the hard disk utilization, and determine a plurality of fourth fuzzy sets corresponding to the comprehensive utilization;
[0018] Setting a first fuzzy rule base; the first fuzzy rule base includes the corresponding relationship between the first fuzzy set, the second fuzzy set and the third fuzzy set, and the corresponding fourth fuzzy set;
[0019] Determining, according to a first membership function of a first target fuzzy set, a first membership degree of the processor utilization rate belonging to the first target fuzzy set; the first target fuzzy set is a first fuzzy set;
[0020] Determining, according to a second membership function of a second target fuzzy set, that the memory utilization rate belongs to a second membership degree of the second target fuzzy set; the second target fuzzy set is a second fuzzy set;
[0021] Determine, according to the third membership function of the third target fuzzy set, that the hard disk utilization rate belongs to the third membership degree of the third target fuzzy set; the third target fuzzy set is a third fuzzy set;
[0022] Determine, according to the first fuzzy rule base, a fourth target fuzzy set among the plurality of fourth fuzzy sets, which has a corresponding relationship with the first target fuzzy set, the second target fuzzy set, and the third target fuzzy set;
[0023] The membership degree within the range covered by the first membership degree, the second membership degree, and the third membership degree is used as the temporary membership degree corresponding to the comprehensive utilization rate;
[0024] According to the fourth membership function of the fourth target fuzzy set, determining a first valid area corresponding to the fourth target fuzzy set; the first valid area is a partial area smaller than the temporary membership degree;
[0025] Defuzzification is performed according to the first effective regions of all the fourth objective fuzzy sets to determine the comprehensive utilization rate.
[0026] In some optional implementations, performing fuzzy control processing according to the comprehensive utilization rate and the service utilization rate increment to determine the risk level of the server includes:
[0027] Determining a plurality of fifth fuzzy sets corresponding to the service utilization increment, and determining a plurality of sixth fuzzy sets corresponding to the risk degree;
[0028] Setting a second fuzzy rule base; the second fuzzy rule base includes the corresponding relationship between the fourth fuzzy set and the fifth fuzzy set and the corresponding sixth fuzzy set;
[0029] Determining, according to a fourth membership function of the fourth objective fuzzy set, a fourth degree of membership of the comprehensive utilization rate to the fourth objective fuzzy set;
[0030] Determining, according to the fifth membership function of the fifth target fuzzy set, that the service utilization increment belongs to the fifth membership degree of the fifth target fuzzy set; the fifth target fuzzy set is a fifth fuzzy set;
[0031] Determine, according to the second fuzzy rule base, a sixth target fuzzy set among the plurality of sixth fuzzy sets, which has a corresponding relationship with the fourth target fuzzy set and the fifth target fuzzy set;
[0032] The membership degree within the range covered by the fourth membership degree and the fifth membership degree is taken as the sixth membership degree corresponding to the risk degree; the sixth membership degree temporarily represents the membership degree of the risk degree belonging to the sixth target fuzzy set;
[0033] According to the sixth membership function of the sixth target fuzzy set, determining a second valid area corresponding to the sixth target fuzzy set; the second valid area is a partial area smaller than the sixth membership degree;
[0034] Defuzzification is performed based on the second valid regions of all the sixth target fuzzy sets to determine the risk level.
[0035] In some optional implementations, the method further includes: presetting the first thread, the second thread, and the third thread;
[0036] The first thread is used to obtain the system performance log generated by the server, parse the system performance log, determine the component utilization of the server, and then store the component utilization;
[0037] The second thread is used to determine the scheduling of resources by the corresponding business using a process detection command supported by the operating system, and then store the scheduling of the business;
[0038] The third thread is used to read the component utilization and the scheduling status of the service, and perform performance analysis according to the component utilization and the scheduling status of the service to generate corresponding performance analysis results.
[0039] In some optional embodiments, the method further comprises:
[0040] In response to the display instruction, display the component utilization and / or the scheduling status of the service;
[0041] When the performance analysis result indicates that the server is at risk, a system event log is recorded, and / or a corresponding reminder message is sent to a user of the server.
[0042] In a second aspect, the present invention provides a server performance monitoring device, which is applied to a baseboard management controller of a server, comprising:
[0043] A connection module, used to establish a connection with the operating system of the server through a secure shell protocol;
[0044] A first acquisition module, used for acquiring a system performance log generated by the server, and parsing the system performance log to determine a component utilization rate of an internal component of the server;
[0045] The second acquisition module is used to determine the resource scheduling of the corresponding business by using the process detection command supported by the operating system;
[0046] The analysis module is used to perform performance analysis according to the component utilization and the scheduling status of the business, and generate corresponding performance analysis results.
[0047] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the server performance monitoring method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the server performance monitoring method of the first aspect or any corresponding embodiment thereof.
[0049] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the server performance monitoring method of the first aspect or any corresponding embodiment thereof.
[0050] The embodiment of the present invention can use BMC to directly establish an SSH connection with the server's operating system, so that the utilization information of multiple components of the server and the business scheduling information can be captured from the server in real time. There is no need for customer service or operation and maintenance personnel to manually use scripts and commands under the server operating system to obtain this information, and the dependence on users such as customer service and operation and maintenance personnel and script tools can be eliminated. This can not only save the manpower and material resources of operation and maintenance and improve the operation and maintenance efficiency, but also improve the efficiency of server performance monitoring, and can timely discover problems such as server downtime caused by business pressure and server performance bottlenecks, thereby reducing risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is a flow chart of a server performance monitoring method according to an embodiment of the present invention;
[0053] Figure 2 is a flow chart of another server performance monitoring method according to an embodiment of the present invention;
[0054] Figure 3 is a schematic diagram of determining the risk level of a server based on fuzzy control according to an embodiment of the present invention;
[0055] Figure 4 is a schematic diagram of fuzzy sets and corresponding membership functions of processor utilization, memory utilization and hard disk utilization according to an embodiment of the present invention;
[0056] Figure 5 is a schematic diagram of a fuzzy set of comprehensive utilization rate and a corresponding membership function according to an embodiment of the present invention;
[0057] Figure 6is a schematic diagram of a process for determining a comprehensive utilization rate according to an embodiment of the present invention;
[0058] Figure 7 is a structural block diagram of a server performance monitoring device according to an embodiment of the present invention;
[0059] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0061] Performance monitoring tools, such as sysstat, are generally installed in the server. Sysstat is a collection of performance monitoring tools for the Linux operating system, which includes utilities such as sar, iostat, mpstat, pidstat, and sa tools. These tools provide system administrators with a way to monitor system performance, resource usage, and potential bottlenecks. They help solve system problems, optimize performance, and plan capacity.
[0062] Real-time monitoring of server performance is very necessary. For example, server downtime diagnosis is the work of server maintenance engineers to collect downtime information after the server downtime occurs, find out the cause of the downtime, and find solutions or avoidance plans based on the cause. Server downtime is one of the most serious server errors, which will cause customer business interruption and cause direct losses to customers. Therefore, it is very necessary to ensure the accuracy, timeliness and reliability of server downtime diagnosis.
[0063] At present, the utilization rate of server components (such as CPU, memory, hard disk, etc.) needs to be monitored under the condition that the sysstat service is enabled on the server operating system. The server operating system (OS) log sosreport is collected, and the operating system R&D personnel parse the collected system performance logs (for example, sar logs) in a fixed path through a special parsing tool (such as ksar, etc.). For example, install the sysstat monitoring tool in the server's Linux operating system and enable the sysstat service. After the server has been running for a period of time, the monitored performance-related files (such as sar log files including the server CPU and memory usage) are collected in the file system path corresponding to the server and downloaded to the local computer for R&D personnel familiar with the operating system to unpack and analyze.
[0064] The disadvantages of this solution are: it cannot be analyzed in real time and relies on field engineers to manually start sysstat and manually collect system performance logs. In addition, in order to accurately monitor server performance, it is generally necessary to determine the scheduling of customer services, which is usually asked by customer service, and customer operations and maintenance obtain and pass to R&D by logging into the server operating system and using the top command. Because it involves manual operations and communication and cooperation between server R&D, customer service, and customer operations and maintenance, the timeliness of problem analysis is poor and consumes a lot of manpower and material resources.
[0065] The Baseboard Management Controller (BMC) is a management controller unique to the server. One of the main functions of the BMC is to automatically monitor the operating status of the server, mainly including the health status of each hardware. The BMC monitors the health status of each hardware and obtains information about each hardware, which helps the operation and maintenance personnel to understand the operating status of the server in a timely manner and ensure the normal operation of the server; when a problem occurs on the server, the fault information is sent to the operation and maintenance personnel through the log to assist the operation and maintenance personnel in locating the fault. The BMC can be regarded as a small Linux operating system that runs independently from the server operating system. Shared memory is the storage space inside the BMC system. Traditional BMC shared memory generally stores monitoring information of server hardware, such as CPU (central processing unit) temperature, voltage, fan speed, etc.
[0066] However, the existing BMC server monitoring is mainly focused on the server hardware, and does not directly monitor the utilization of the internal components of the server. The method provided in the embodiment of the present invention enables the BMC to obtain the component utilization of the server and business-related information through the Secure Shell (SSH) protocol, so that the performance of the server can be monitored at the business level.
[0067] According to an embodiment of the present invention, an embodiment of a server performance monitoring method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0068] In this embodiment, a server performance monitoring method is provided, which is applied to a baseboard management controller (ie, BMC) of a server, and the BMC implements performance monitoring of internal components of the server. Figure 1 is a flow chart of a server performance monitoring method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps.
[0069] Step S101, establishing a connection with the operating system of the server through the secure shell protocol.
[0070] Among them, SSH (Secure Shell) is a network protocol for communication between Linux systems, used to securely transmit data in an insecure network. It is usually used to remotely log in to a computer system and execute commands. The general usage of SSH is to establish a connection and identity authentication between the host and the client, and then perform remote access and file transfer. It is generally used to achieve a connection between two different devices.
[0071] In this embodiment, SSH is used to establish a connection between the BMC inside the server and its operating system, so that the BMC can obtain information collected by the server's operating system through SSH. The process of establishing a connection between the BMC and the server operating system through SSH may specifically include establishing a connection, identity authentication, etc.
[0072] Step S102, obtaining a system performance log generated by the server, and parsing the system performance log to determine component utilization of internal components of the server.
[0073] In this embodiment, after the BMC establishes an SSH connection with the operating system, the operating system can be remotely accessed, thereby continuously acquiring data required for performance monitoring.
[0074] Specifically, the BMC can control the server to automatically start performance monitoring tools, such as the sysstat tool, etc. The server's operating system can generate a system performance log, such as a sar log, containing the utilization of various internal components such as the CPU, memory, and hard disk based on the performance monitoring tool. The BMC polls the custom IPMI (Intelligent Platform Management Interface) command, and can communicate with the operating system through SSH, thereby obtaining the system performance log generated by the operating system in real time. For example, the system performance log can be passed to the BMC through the scp (secure copy protocol) command under SSH.
[0075] After the BMC obtains the system performance log, it can parse the system performance log to extract the component utilization rate therein, which can specifically include processor utilization rate (ie, CPU utilization rate), memory utilization rate, and hard disk utilization rate.
[0076] Step S103: using the process detection command supported by the operating system to determine the resource scheduling status of the corresponding business.
[0077] In this embodiment, the operating system (for example, the Linux operating system) supports multiple process detection commands, such as the top command, the ps (process status) command, etc. Among them, the top command can display the overall level of the operating system, such as the average load, running time, the most CPU and memory consuming processes, etc., and can refresh this information in real time; the ps command can display the current process status.
[0078] After the BMC establishes an SSH connection with the operating system, it can poll the custom IPMI command and continuously use the process detection command to obtain the resource scheduling status of the server user when deploying services on the server, such as the ID of each process in the service, the CPU and memory usage of each process, etc.
[0079] Optionally, after the BMC obtains the component utilization and the service scheduling status, the user may be allowed to input a corresponding display instruction, and the BMC may display the component utilization and / or service scheduling status to the user. For example, the user may remotely access the BMC through a terminal, and the BMC sends the obtained component utilization and service scheduling status to the user terminal, so as to display the information in a graphical form on the user terminal interface for reference by maintenance engineers and other users.
[0080] Step S104: Perform performance analysis based on component utilization and service scheduling conditions, and generate corresponding performance analysis results.
[0081] In this embodiment, after obtaining the component utilization of the server components themselves and the scheduling status related to the business, the BMC can perform performance analysis to generate corresponding performance analysis results. The performance analysis results can indicate the current performance of the server, such as whether the server is at risk of downtime, so as to detect problems in a timely manner and remind users to solve the problems.
[0082] For example, when the performance analysis result indicates that the server is at risk, a system event log (SEL) may be recorded, and / or a corresponding reminder message may be sent to the user of the server. For example, an SMTP (Simple Mail Transfer Protocol) mail server may be used to automatically send mails to notify the user of the server to adjust the service, thereby avoiding the risk of downtime.
[0083] In some optional implementations, in order to improve the efficiency of performance monitoring and ensure real-time performance, the first thread, the second thread and the third thread are pre-set; different threads respectively obtain the system performance log, obtain the business scheduling status, and perform performance analysis, that is, the three threads respectively execute the above steps S102, S103, and S104.
[0084] Specifically, the first thread is used to obtain the system performance log generated by the server, parse the system performance log, determine the server component utilization, and then store the component utilization. For example, the first thread can store the component utilization in the shared memory of the BMC. Among them, the BMC can only store the component utilization collected within the latest period of time (for example, 10 minutes, etc.), and expired data can be overwritten by new data.
[0085] The second thread is used to use the process detection command supported by the operating system to determine the resource scheduling of the corresponding business, and then store the scheduling of the business. For example, the second thread can also store the component utilization rate in the shared memory of the BMC. Among them, the BMC can also only store the business scheduling collected within the latest period of time (such as 1 minute, etc.), and expired data can also be overwritten by new data.
[0086] The third thread is used to read the component utilization and the scheduling of the service, and perform performance analysis according to the component utilization and the scheduling of the service to generate corresponding performance analysis results. For example, the third thread can read the component utilization and the scheduling of the service from the shared memory of the BMC, and then perform performance analysis.
[0087] The server performance monitoring method provided in the embodiment of the present invention can directly establish an SSH connection with the operating system of the server by using the BMC, so that the utilization information of multiple components of the server and the business scheduling information can be captured from the server in real time, and the customer service or operation and maintenance personnel do not need to manually use scripts and commands under the server operating system to obtain this information, and the dependence on users such as customer service and operation and maintenance personnel and script tools can be eliminated, which can not only save the manpower and material resources of operation and maintenance and improve the operation and maintenance efficiency, but also improve the efficiency of server performance monitoring, and can timely discover problems such as server downtime caused by business pressure and server performance bottlenecks, thereby reducing risks.
[0088] In this embodiment, a server performance monitoring method is provided, which is applied to a baseboard management controller (ie, BMC) of a server, and the BMC implements performance monitoring of internal components of the server. Figure 2 is a flow chart of a server performance monitoring method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps.
[0089] Step S201, establishing a connection with the operating system of the server through the secure shell protocol.
[0090] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0091] Step S202, obtaining a system performance log generated by the server, and parsing the system performance log to determine component utilization of internal components of the server.
[0092] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0093] Step S203: using the process detection command supported by the operating system to determine the resource scheduling status of the corresponding business.
[0094] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0095] Step S204: Perform performance analysis based on component utilization and service scheduling conditions, and generate corresponding performance analysis results.
[0096] The component utilization obtained by the BMC specifically includes: processor utilization, memory utilization and hard disk utilization, and the scheduling of the service specifically includes the service utilization of the service to the resource. The above step S204 "performs performance analysis according to the component utilization and the scheduling of the service to generate corresponding performance analysis results" includes the following steps S2041 to S2042.
[0097] Step S2041, determining the corresponding service utilization increment according to the change of service utilization.
[0098] In this embodiment, the service utilization rate specifically refers to the occupancy rate of resources (such as CPU, memory, etc.) used by the process corresponding to the service. The higher the service utilization rate, the greater the amount of resources required for the service, and the more likely it is to have risks.
[0099] In order to predict the possible risks in the server in advance, this embodiment determines the corresponding service utilization increment based on the change of service utilization. For example, the BMC can collect service utilization at multiple different time points within a certain period of time, and the increment of the service utilization can be determined by determining the difference between two adjacent service utilizations.
[0100] Among them, when the business utilization rate decreases, it means that the resources occupied by the business are decreasing. At this time, the server generally does not have any risks, or even if the server has risks, it has nothing to do with the business. Therefore, when the business utilization rate decreases, the business utilization increment can be set to zero, that is, the reduction in business utilization rate can be ignored in the future.
[0101] Step S2042, predicting the performance of the server based on the processor utilization, memory utilization, hard disk utilization and service utilization increment, and determining the risk level of the server.
[0102] In this embodiment, the processor utilization, memory utilization, and hard disk utilization can be the utilization at a certain point in time, or the utilization determined within a time period (such as average utilization, etc.). Based on these utilizations and the business utilization increment, the performance of the server can be predicted from the business level to determine whether the business will pose a risk to the server, so that problems with the business can be discovered in advance, so that the server user (i.e., the business provider) can be notified in time to adjust the business to avoid server downtime.
[0103] In some optional implementations, due to the complexity of the server's operating status, it is difficult to directly define the risk level in different situations according to the rules; although there are some prediction models, the processing capacity of the BMC is limited, and it is difficult to deploy the prediction model in the BMC. In this embodiment, a fuzzy control algorithm is used to predict the risk level of the server. Specifically, the above step S2042 "predicts the performance of the server based on the processor utilization, memory utilization, hard disk utilization and business utilization increments to determine the risk level of the server" includes the following steps A1 to A2.
[0104] Step A1, performing fuzzy control processing according to processor utilization, memory utilization and hard disk utilization to determine the comprehensive utilization of the server; the number of fuzzy sets corresponding to the comprehensive utilization is greater than the number of fuzzy sets corresponding to the processor utilization, memory utilization or hard disk utilization.
[0105] Step A2, performing fuzzy control processing according to the comprehensive utilization rate and the business utilization rate increment to determine the risk level of the server.
[0106] In this embodiment, the input data includes processor utilization, memory utilization, hard disk utilization and business utilization increment, which are of many types, a total of four types. If fuzzy control is directly performed, it is necessary to establish a fuzzy rule base for the four types of input data more accurately, and the accuracy of the fuzzy rule base is highly dependent. However, the processor utilization, memory utilization and hard disk utilization are relatively similar input data, so in this embodiment, fuzzy control is first performed on these three types of input data (processor utilization, memory utilization and hard disk utilization) to determine the comprehensive utilization of the CPU, memory and hard disk, and then fuzzy control is performed based on the comprehensive utilization and business utilization increment. At this time, only the fuzzy rule base of two types of input data (i.e., the comprehensive utilization and business utilization increment) needs to be determined, and the accuracy of the fuzzy rule base is less dependent, so that the risk level of the server can be predicted more accurately.
[0107] Furthermore, in order to ensure prediction accuracy, when determining the comprehensive utilization rate, more fuzzy sets are set for the comprehensive utilization rate, that is, the number of fuzzy sets corresponding to the comprehensive utilization rate is greater than the number of fuzzy sets corresponding to the processor utilization rate, memory utilization rate or hard disk utilization rate, so that the fuzzy rule base contains a larger number of rules, which can ensure the accuracy of the final prediction results.
[0108] Figure 3 FIG. 4 shows a schematic diagram of determining the risk level of a server based on fuzzy control. Figure 3 As shown, by using a fuzzy rule base containing multiple rules, the comprehensive utilization rate and business utilization rate increment can be fuzzified to obtain the fuzzified results of multiple rules, and then the corresponding defuzzification is performed to predict the risk level of the server.
[0109] Optionally, the above step A1 "performing fuzzy control processing according to processor utilization, memory utilization and hard disk utilization to determine the comprehensive utilization of the server" includes steps A11 to A19.
[0110] Step A11, determine multiple first fuzzy sets corresponding to processor utilization, determine multiple second fuzzy sets corresponding to memory utilization, determine multiple third fuzzy sets corresponding to hard disk utilization, and determine multiple fourth fuzzy sets corresponding to comprehensive utilization.
[0111] For example, for the convenience of description, three fuzzy sets are set for the original processor utilization, memory utilization and hard disk utilization, and the three fuzzy sets are respectively "low", "medium" and "high", that is, the number of the first fuzzy set, the second fuzzy set and the third fuzzy set are all three. In addition, five fuzzy sets are set for the comprehensive utilization, that is, the number of the fourth fuzzy sets is five, and the five fuzzy sets are respectively: "low", "medium-low", "medium", "medium-high" and "high".
[0112] In addition, each fuzzy set is provided with a membership function, such as a triangular membership function, a trapezoidal membership function, etc. This embodiment takes the triangular membership function as an example. Since the value range of the utilization rate is 0-100%, the range corresponding to each fuzzy set can be determined within the value range.
[0113] Figure 4 The schematic diagram shows the fuzzy sets of processor utilization, memory utilization and hard disk utilization and the corresponding membership functions. Taking processor utilization as an example (the horizontal axis is the processing utilization, and the vertical axis is the membership degree), it includes three first fuzzy sets "low", "medium" and "high". The range corresponding to the first fuzzy set "low" (the range of processor utilization) is 0-30%, and the membership function (hereinafter referred to as the first membership function) is a relatively small membership function (i.e., the function decreases as a whole); the range corresponding to the first fuzzy set "medium" is 0-60%, and the membership function is an intermediate membership function; the range corresponding to the first fuzzy set "high" is 30%-100%, and the membership function is a relatively large membership function (i.e., the function increases as a whole).
[0114] Figure 4 In the example, the fuzzy set value ranges of processor utilization, memory utilization, and hard disk utilization and the corresponding membership functions are the same. It can be understood that different utilizations can be divided in different ways, and this embodiment does not limit this. For example, since processor utilization is a relatively important monitoring indicator, it is necessary to avoid the situation where the processor utilization is high. Therefore, for processor utilization, the value range of its first fuzzy set "high" can be larger, or the value range of the first fuzzy set "low" and "medium" can be smaller.
[0115] Similarly, Figure 5 The value ranges of multiple fourth fuzzy sets corresponding to the comprehensive utilization rate and the corresponding membership functions are shown. Figure 5 As shown, the value ranges corresponding to the fourth fuzzy sets "low", "medium-low", "medium", "medium-high" and "high" are 0-20%, 0-40%, 20%-60%, 40%-80%, 60%-100% respectively, and the membership functions of the middle three fourth fuzzy sets "medium-low", "medium" and "medium-high" (hereinafter referred to as the fourth membership functions) are intermediate membership functions.
[0116] Step A12, setting a first fuzzy rule base; the first fuzzy rule base includes the corresponding relationship between the first fuzzy set, the second fuzzy set and the third fuzzy set and the corresponding fourth fuzzy set.
[0117] In this embodiment, the first fuzzy set, the second fuzzy set and the third fuzzy set are combined to form different fuzzy set combinations, and a corresponding relationship between the fuzzy set combination and the fourth fuzzy set can be established based on human experience or an expert knowledge base, etc. Each corresponding relationship is a rule in the first fuzzy rule base.
[0118] by Figure 4 and Figure 5 Taking the fuzzy set shown in the figure as an example, if the first fuzzy set, the second fuzzy set and the third fuzzy set are all "low", the corresponding fourth fuzzy set is "low"; if the first fuzzy set, the second fuzzy set and the third fuzzy set are all "high", the corresponding fourth fuzzy set is "high"; if there are only two fuzzy sets in the first fuzzy set, the second fuzzy set and the third fuzzy set are "low" (the other fuzzy set can be "medium" or "high"), the corresponding fourth fuzzy set is "medium-low"; if there are only two fuzzy sets in the first fuzzy set, the second fuzzy set and the third fuzzy set are "high" (the other fuzzy set can be "medium" or "low"), the corresponding fourth fuzzy set is "medium-high". The remaining fuzzy set combinations correspond to the fourth fuzzy set "medium".
[0119] Step A13, determining a first membership degree of the processor utilization to the first target fuzzy set according to a first membership function of the first target fuzzy set; the first target fuzzy set is a first fuzzy set.
[0120] Among them, based on the size of the currently collected processor utilization, it can be determined which one or which first fuzzy sets it belongs to; among them, if the processor utilization is within the value range corresponding to a first fuzzy set, then the processor utilization belongs to the first fuzzy set, and the first fuzzy set is a first target fuzzy set.
[0121] The first membership function represents the functional relationship between the processor utilization and its membership degree to the corresponding first fuzzy set. Figure 4 If the processor utilization is 15%, its first membership to the first fuzzy set “low” and the first fuzzy set “medium” is 0.5; if the processor utilization is 100%, its first membership to the first fuzzy set “high” is 1.
[0122] Of course, all first fuzzy sets can be used as the first target fuzzy sets of processor utilization. However, if the processor utilization is not within the value range of a first fuzzy set, the corresponding first membership is 0, which is meaningless and can be eliminated.
[0123] Step A14, determining the second membership degree of the memory utilization rate to the second target fuzzy set according to the second membership function of the second target fuzzy set; the second target fuzzy set is a second fuzzy set.
[0124] Step A15, determining the third membership degree of the hard disk utilization rate to the third target fuzzy set according to the third membership function of the third target fuzzy set; the third target fuzzy set is a third fuzzy set.
[0125] The process of determining the second membership corresponding to the memory utilization and the second membership corresponding to the hard disk utilization is similar to step A13 and will not be described again here.
[0126] Step A16, determining, according to the first fuzzy rule base, a fourth target fuzzy set among the plurality of fourth fuzzy sets, which has a corresponding relationship with the first target fuzzy set, the second target fuzzy set, and the third target fuzzy set.
[0127] For example, if the first target fuzzy set, the second target fuzzy set, and the third target fuzzy set are all "low", then based on the first fuzzy rule base shown in step A12, it can be determined that the corresponding fourth fuzzy set is "low" at this time, so the fourth fuzzy set "low" is the corresponding fourth target fuzzy set.
[0128] It can be understood that, since there may be multiple first target fuzzy sets, second target fuzzy sets, and third target fuzzy sets, multiple fourth target fuzzy sets may also be determined.
[0129] Step A17: taking the membership degree within the range covered by the first membership degree, the second membership degree and the third membership degree as the temporary membership degree corresponding to the comprehensive utilization rate.
[0130] In this embodiment, for any set of the first membership, the second membership, and the third membership, the membership indicating that the comprehensive utilization rate belongs to the corresponding fourth target fuzzy set, i.e., the temporary membership, can be determined. The temporary membership is within the range covered by the first membership, the second membership, and the third membership. In other words, the temporary membership is not less than the minimum value among the first membership, the second membership, and the third membership, and is not greater than the maximum value among the first membership, the second membership, and the third membership, i.e., min{first membership, second membership, third membership}≤temporary membership≤max{first membership, second membership, third membership}.
[0131] For example, the average of the first membership degree, the second membership degree, and the third membership degree may be used as the temporary membership degree.
[0132] Step A18, determining a first valid region corresponding to the fourth target fuzzy set according to the fourth membership function of the fourth target fuzzy set; the first valid region is a partial region smaller than the temporary membership degree.
[0133] Step A19, defuzzifying the first effective areas of all fourth objective fuzzy sets to determine the comprehensive utilization rate.
[0134] In this embodiment, for any fourth objective fuzzy set, if its corresponding temporary membership is determined, then based on the fourth membership function of the fourth objective fuzzy set, the value range of the comprehensive utilization rate corresponding to the temporary membership can be determined. Among them, the partial area of the area corresponding to the fourth membership function that is smaller than the temporary membership is used as the effective area for defuzzification, that is, the first effective area.
[0135] If a plurality of fourth target fuzzy sets are determined, the first effective region corresponding to each fourth target fuzzy set can be determined, and then defuzzification is performed based on all the first effective regions, so that the comprehensive utilization rate can be determined.
[0136] Optionally, the defuzzification process of the above step A19 may specifically include: superimposing the first valid areas of all fourth target fuzzy sets to form a superimposed area; determining the center of gravity position of the superimposed area, and taking the comprehensive utilization rate corresponding to the center of gravity position as the final comprehensive utilization rate.
[0137] In this embodiment, all first effective areas are superimposed, and the final comprehensive utilization rate is determined based on the superimposed areas, wherein the comprehensive utilization rate corresponding to the center of gravity of the superimposed areas can be used as the final determined comprehensive utilization rate.
[0138] Figure 6 A schematic diagram of the process of determining the comprehensive utilization rate is shown in FIG. Figure 6 As shown in , if based on a set of first target fuzzy sets, second target fuzzy sets, and third target fuzzy sets, a fourth target fuzzy set "middle" is determined, and at this time the temporary membership obtained based on the corresponding first membership, second membership, and third membership is 0.5, then the first valid area corresponding to the fourth target fuzzy set "middle" is as follows Figure 6 In addition, based on another set of first target fuzzy sets, second target fuzzy sets, and third target fuzzy sets, the fourth target fuzzy set "medium-high" is determined, and the temporary membership is determined to be 0.25. The first effective area corresponding to the fourth target fuzzy set "medium-high" is shown as follows: Figure 6 The grayscale area in the upper right portion is shown.
[0139] The two first effective areas are superimposed to form Figure 6 The overlay area shown in the lower part has a comprehensive utilization rate corresponding to the center of gravity of 46.8%, that is, the final comprehensive utilization rate is 46.8%, and the comprehensive utilization rate 46.8% is used to determine the risk level of the server.
[0140] Optionally, the above-mentioned step A2 of "performing fuzzy control processing according to the comprehensive utilization rate and the business utilization rate increment to determine the risk level of the server" may include steps A21 to A28.
[0141] Step A21, determining a plurality of fifth fuzzy sets corresponding to the service utilization increment, and determining a plurality of sixth fuzzy sets corresponding to the risk degree.
[0142] In this embodiment, similar to the determination of the first fuzzy set, corresponding fuzzy sets, namely the fifth fuzzy set and the sixth fuzzy set, may also be determined for the service utilization increment and the risk level, respectively. No further details are given here. Generally, the number of the sixth fuzzy set is not less than the number of the fourth fuzzy set, nor is it less than the number of the fifth fuzzy set.
[0143] Step A22, setting a second fuzzy rule base; the second fuzzy rule base includes the corresponding relationship between the fourth fuzzy set and the fifth fuzzy set and the corresponding sixth fuzzy set.
[0144] In this embodiment, similar to the above-mentioned first fuzzy rule base, the second fuzzy rule base also contains multiple rules, that is, multiple corresponding relationships, but the corresponding relationship is the corresponding relationship between the fourth fuzzy set (comprehensive utilization rate) and the fifth fuzzy set (business utilization rate increment) and the corresponding sixth fuzzy set (risk degree).
[0145] For example, the second fuzzy rule base may include:
[0146] Rule 1: If the comprehensive utilization rate is high and the incremental business utilization rate of the server business is large, it means that the server performance bottleneck is likely to be reached due to business pressure, and thus it can be determined that the risk of server downtime caused by the current business is extremely high; that is, the fourth fuzzy set representing a high comprehensive utilization rate and the fifth fuzzy set representing a large incremental business utilization rate correspond to the sixth fuzzy set representing an extremely high degree of risk.
[0147] Rule 2: If the comprehensive utilization rate is high and the incremental business utilization rate of the server is small or 0, there is also a certain risk of downtime, and the downtime risk can be set to medium; that is, the fourth fuzzy set representing high comprehensive utilization rate and the fifth fuzzy set representing small incremental business utilization rate or 0 correspond to the sixth fuzzy set representing the risk level.
[0148] Rule 3: If the comprehensive utilization rate is low and the incremental business utilization rate of the server is small or 0, the downtime risk is low; that is, the fourth fuzzy set representing the low comprehensive utilization rate and the fifth fuzzy set representing the small incremental business utilization rate or 0 correspond to the sixth fuzzy set representing the low risk level.
[0149] Step A23, determining the fourth membership degree of the comprehensive utilization rate to the fourth target fuzzy set according to the fourth membership function of the fourth target fuzzy set.
[0150] Step A24, determining the fifth membership degree of the service utilization increment to the fifth target fuzzy set according to the fifth membership function of the fifth target fuzzy set; the fifth target fuzzy set is a fifth fuzzy set.
[0151] The process of determining the fourth degree of membership and the fifth degree of membership is similar to the process of the above-mentioned steps A13 to A15, and will not be repeated here.
[0152] It should be noted that although the fourth membership and the above-mentioned temporary membership both indicate that the comprehensive utilization rate belongs to the membership of the fourth target fuzzy set, the process of determining the two is not the same, and the values of the two are generally different, that is, for the same fourth target fuzzy set, the values of the fourth membership and the temporary membership may be different, which will not be elaborated here.
[0153] Step A25, determining, according to the second fuzzy rule base, a sixth target fuzzy set among the plurality of sixth fuzzy sets, which has a corresponding relationship with the fourth target fuzzy set and the fifth target fuzzy set.
[0154] Step A26, taking the membership within the range covered by the fourth membership and the fifth membership as the sixth membership corresponding to the risk degree; the sixth membership temporarily indicates that the risk degree belongs to the membership of the sixth target fuzzy set.
[0155] In this embodiment, the process of determining the sixth target fuzzy set and the corresponding sixth membership is similar to the principle of the above steps A16 to A17, which will not be repeated here. It can be understood that the sixth membership determined at this time is also a temporary membership, which is used to determine the final risk level.
[0156] Step A27, determining a second valid region corresponding to the sixth target fuzzy set according to the sixth membership function of the sixth target fuzzy set; the second valid region is a partial region with a value smaller than the sixth membership degree.
[0157] Step A28, defuzzifying the second valid regions of all sixth target fuzzy sets to determine the risk level.
[0158] In this embodiment, after determining each sixth target fuzzy set and the corresponding sixth membership, the effective area, i.e., the second effective area, can be determined based on the corresponding sixth membership function, and at least one effective area is superimposed to form a superimposed area, which can then be defuzzified to calculate the current risk level of the server. The risk level is a quantitative parameter that can more accurately represent the risk of the server.
[0159] The server performance monitoring method provided in this embodiment can directly establish an SSH connection with the server's operating system using BMC, so that the utilization information of multiple server components and business scheduling information can be captured from the server in real time, which can improve the operation and maintenance efficiency, and also improve the efficiency of server performance monitoring, and can timely discover problems such as server downtime caused by business pressure and server performance bottlenecks, thereby reducing risks. Using the increment of business utilization as input data, the server performance can be predicted, so as to determine the risks of the server in advance; first determine the comprehensive utilization of the server based on fuzzy control, and finally determine the risk coefficient by combining the comprehensive utilization and business utilization increments. Through double-layer nested fuzzy processing, the requirements for the fuzzy control rule base can be reduced, and the accuracy of the final prediction results can be guaranteed.
[0160] In this embodiment, a server performance monitoring device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0161] This embodiment provides a server performance monitoring device, which is applied to a baseboard management controller of a server, such as Figure 7 As shown, including:
[0162] A connection module 701 is used to establish a connection with the operating system of the server through a secure shell protocol;
[0163] A first acquisition module 702 is used to acquire a system performance log generated by the server, and parse the system performance log to determine the component utilization of the internal components of the server;
[0164] The second acquisition module 703 is used to determine the resource scheduling of the corresponding business by using the process detection command supported by the operating system;
[0165] The analysis module 704 is used to perform performance analysis according to the component utilization and the scheduling status of the service, and generate corresponding performance analysis results.
[0166] In some optional implementations, the component utilization includes: processor utilization, memory utilization and hard disk utilization, and the scheduling of the service includes service utilization of resources by the service;
[0167] The analysis module 704 performs performance analysis according to the component utilization and the scheduling of the service, and generates corresponding performance analysis results, including:
[0168] Determining a corresponding service utilization increment according to a change in the service utilization;
[0169] The performance of the server is predicted based on the processor utilization, the memory utilization, the hard disk utilization, and the service utilization increment to determine the risk level of the server.
[0170] In some optional implementations, the analysis module 704 predicts the performance of the server according to the processor utilization, the memory utilization, the hard disk utilization, and the service utilization increment to determine the risk level of the server, including:
[0171] Performing fuzzy control processing according to the processor utilization, the memory utilization and the hard disk utilization to determine the comprehensive utilization of the server; the number of fuzzy sets corresponding to the comprehensive utilization is greater than the number of fuzzy sets corresponding to the processor utilization, the memory utilization or the hard disk utilization;
[0172] Fuzzy control processing is performed according to the comprehensive utilization rate and the business utilization rate increment to determine the risk level of the server.
[0173] In some optional implementations, the analysis module 704 performs fuzzy control processing according to the processor utilization, the memory utilization, and the hard disk utilization to determine the comprehensive utilization of the server, including:
[0174] Determine a plurality of first fuzzy sets corresponding to the processor utilization, determine a plurality of second fuzzy sets corresponding to the memory utilization, determine a plurality of third fuzzy sets corresponding to the hard disk utilization, and determine a plurality of fourth fuzzy sets corresponding to the comprehensive utilization;
[0175] Setting a first fuzzy rule base; the first fuzzy rule base includes the corresponding relationship between the first fuzzy set, the second fuzzy set and the third fuzzy set, and the corresponding fourth fuzzy set;
[0176] Determining, according to a first membership function of a first target fuzzy set, a first membership degree of the processor utilization rate belonging to the first target fuzzy set; the first target fuzzy set is a first fuzzy set;
[0177] Determining, according to a second membership function of a second target fuzzy set, that the memory utilization rate belongs to a second membership degree of the second target fuzzy set; the second target fuzzy set is a second fuzzy set;
[0178] Determine, according to the third membership function of the third target fuzzy set, that the hard disk utilization rate belongs to the third membership degree of the third target fuzzy set; the third target fuzzy set is a third fuzzy set;
[0179] Determine, according to the first fuzzy rule base, a fourth target fuzzy set among the plurality of fourth fuzzy sets, which has a corresponding relationship with the first target fuzzy set, the second target fuzzy set, and the third target fuzzy set;
[0180] The membership degree within the range covered by the first membership degree, the second membership degree, and the third membership degree is used as the temporary membership degree corresponding to the comprehensive utilization rate;
[0181] According to the fourth membership function of the fourth target fuzzy set, determining a first valid area corresponding to the fourth target fuzzy set; the first valid area is a partial area smaller than the temporary membership degree;
[0182] Defuzzification is performed according to the first effective regions of all the fourth objective fuzzy sets to determine the comprehensive utilization rate.
[0183] In some optional implementations, the analysis module 704 performs fuzzy control processing according to the comprehensive utilization rate and the service utilization rate increment to determine the risk level of the server, including:
[0184] Determining a plurality of fifth fuzzy sets corresponding to the service utilization increment, and determining a plurality of sixth fuzzy sets corresponding to the risk degree;
[0185] Setting a second fuzzy rule base; the second fuzzy rule base includes the corresponding relationship between the fourth fuzzy set and the fifth fuzzy set and the corresponding sixth fuzzy set;
[0186] Determining, according to a fourth membership function of the fourth objective fuzzy set, a fourth degree of membership of the comprehensive utilization rate to the fourth objective fuzzy set;
[0187] Determining, according to the fifth membership function of the fifth target fuzzy set, that the service utilization increment belongs to the fifth membership degree of the fifth target fuzzy set; the fifth target fuzzy set is a fifth fuzzy set;
[0188] Determine, according to the second fuzzy rule base, a sixth target fuzzy set among the plurality of sixth fuzzy sets, which has a corresponding relationship with the fourth target fuzzy set and the fifth target fuzzy set;
[0189] The membership degree within the range covered by the fourth membership degree and the fifth membership degree is taken as the sixth membership degree corresponding to the risk degree; the sixth membership degree temporarily represents the membership degree of the risk degree belonging to the sixth target fuzzy set;
[0190] According to the sixth membership function of the sixth target fuzzy set, determining a second valid area corresponding to the sixth target fuzzy set; the second valid area is a partial area smaller than the sixth membership degree;
[0191] Defuzzification is performed based on the second valid regions of all the sixth target fuzzy sets to determine the risk level.
[0192] In some optional implementations, the device further includes a thread setting module, which is used to: pre-set the first thread, the second thread, and the third thread;
[0193] The first thread is used to obtain the system performance log generated by the server, parse the system performance log, determine the component utilization of the server, and then store the component utilization;
[0194] The second thread is used to determine the scheduling of resources by the corresponding business using a process detection command supported by the operating system, and then store the scheduling of the business;
[0195] The third thread is used to read the component utilization and the scheduling status of the service, and perform performance analysis according to the component utilization and the scheduling status of the service to generate corresponding performance analysis results.
[0196] In some optional embodiments, the device further comprises:
[0197] A display module, configured to display the component utilization and / or the scheduling status of the service in response to a display instruction;
[0198] The reminder module is used to record a system event log and / or send a corresponding reminder message to a user of the server when the performance analysis result indicates that the server is at risk.
[0199] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0200] The server performance monitoring device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0201] The embodiment of the present invention also provides a computer device having the above Figure 7 The server performance monitoring device shown.
[0202] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0203] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0204] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0205] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0206] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0207] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0208] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0209] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0210] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A server performance monitoring method, characterized in that: A baseboard management controller applied to a server, the method comprising: Establishing a connection with the operating system of the server via a secure shell protocol; Obtaining a system performance log generated by the server, and parsing the system performance log to determine component utilization of internal components of the server; Use the process detection commands supported by the operating system to determine the resource scheduling of the corresponding business; A performance analysis is performed according to the component utilization and the scheduling status of the business, and a corresponding performance analysis result is generated.
2. The method according to claim 1, characterized in that The component utilization includes: processor utilization, memory utilization and hard disk utilization, and the scheduling of the service includes the service utilization of resources by the service; The performing performance analysis according to the component utilization and the scheduling status of the service to generate corresponding performance analysis results includes: Determining a corresponding service utilization increment according to a change in the service utilization; The performance of the server is predicted based on the processor utilization, the memory utilization, the hard disk utilization, and the service utilization increment to determine the risk level of the server.
3. The method according to claim 2, characterized in that The predicting the performance of the server according to the processor utilization, the memory utilization, the hard disk utilization and the service utilization increment to determine the risk level of the server includes: Performing fuzzy control processing according to the processor utilization, the memory utilization and the hard disk utilization to determine the comprehensive utilization of the server; the number of fuzzy sets corresponding to the comprehensive utilization is greater than the number of fuzzy sets corresponding to the processor utilization, the memory utilization or the hard disk utilization; Fuzzy control processing is performed according to the comprehensive utilization rate and the business utilization rate increment to determine the risk level of the server.
4. The method according to claim 3, characterized in that The performing fuzzy control processing according to the processor utilization, the memory utilization and the hard disk utilization to determine the comprehensive utilization of the server includes: Determine a plurality of first fuzzy sets corresponding to the processor utilization, determine a plurality of second fuzzy sets corresponding to the memory utilization, determine a plurality of third fuzzy sets corresponding to the hard disk utilization, and determine a plurality of fourth fuzzy sets corresponding to the comprehensive utilization; Setting a first fuzzy rule base; the first fuzzy rule base includes the corresponding relationship between the first fuzzy set, the second fuzzy set and the third fuzzy set, and the corresponding fourth fuzzy set; Determining, according to a first membership function of a first target fuzzy set, a first membership degree of the processor utilization rate belonging to the first target fuzzy set; the first target fuzzy set is a first fuzzy set; Determining, according to a second membership function of a second target fuzzy set, that the memory utilization rate belongs to a second membership degree of the second target fuzzy set; the second target fuzzy set is a second fuzzy set; Determine, according to the third membership function of the third target fuzzy set, that the hard disk utilization rate belongs to the third membership degree of the third target fuzzy set; the third target fuzzy set is a third fuzzy set; Determine, according to the first fuzzy rule base, a fourth target fuzzy set among the plurality of fourth fuzzy sets, which has a corresponding relationship with the first target fuzzy set, the second target fuzzy set, and the third target fuzzy set; The membership degree within the range covered by the first membership degree, the second membership degree, and the third membership degree is used as the temporary membership degree corresponding to the comprehensive utilization rate; According to the fourth membership function of the fourth target fuzzy set, determining a first valid area corresponding to the fourth target fuzzy set; the first valid area is a partial area smaller than the temporary membership degree; Defuzzification is performed according to the first effective regions of all the fourth objective fuzzy sets to determine the comprehensive utilization rate.
5. The method according to claim 4, characterized in that The performing fuzzy control processing according to the comprehensive utilization rate and the service utilization rate increment to determine the risk level of the server includes: Determining a plurality of fifth fuzzy sets corresponding to the service utilization increment, and determining a plurality of sixth fuzzy sets corresponding to the risk degree; Setting a second fuzzy rule base; the second fuzzy rule base includes the corresponding relationship between the fourth fuzzy set and the fifth fuzzy set and the corresponding sixth fuzzy set; Determining, according to a fourth membership function of the fourth objective fuzzy set, a fourth degree of membership of the comprehensive utilization rate to the fourth objective fuzzy set; Determining, according to the fifth membership function of the fifth target fuzzy set, that the service utilization increment belongs to the fifth membership degree of the fifth target fuzzy set; the fifth target fuzzy set is a fifth fuzzy set; Determine, according to the second fuzzy rule base, a sixth target fuzzy set among the plurality of sixth fuzzy sets, which has a corresponding relationship with the fourth target fuzzy set and the fifth target fuzzy set; The membership degree within the range covered by the fourth membership degree and the fifth membership degree is used as the sixth membership degree corresponding to the risk degree; the sixth membership degree temporarily represents the membership degree of the risk degree belonging to the sixth target fuzzy set; According to the sixth membership function of the sixth target fuzzy set, determining a second valid area corresponding to the sixth target fuzzy set; the second valid area is a partial area smaller than the sixth membership degree; Defuzzification is performed based on the second valid regions of all the sixth target fuzzy sets to determine the risk level.
6. The method according to claim 1, characterized in that Also includes: Presetting a first thread, a second thread, and a third thread; The first thread is used to obtain the system performance log generated by the server, parse the system performance log, determine the component utilization of the server, and then store the component utilization; The second thread is used to determine the scheduling of resources by the corresponding business using a process detection command supported by the operating system, and then store the scheduling of the business; The third thread is used to read the component utilization and the scheduling status of the service, and perform performance analysis according to the component utilization and the scheduling status of the service to generate corresponding performance analysis results.
7. The method according to claim 1, characterized in that Also includes: In response to the display instruction, display the component utilization and / or the scheduling status of the service; When the performance analysis result indicates that the server is at risk, a system event log is recorded, and / or a corresponding reminder message is sent to a user of the server.
8. A server performance monitoring device, characterized in that: A baseboard management controller applied to a server, the device comprising: A connection module, used to establish a connection with the operating system of the server through a secure shell protocol; A first acquisition module, used for acquiring a system performance log generated by the server, and parsing the system performance log to determine a component utilization rate of an internal component of the server; The second acquisition module is used to determine the resource scheduling of the corresponding business by using the process detection command supported by the operating system; The analysis module is used to perform performance analysis according to the component utilization and the scheduling status of the business, and generate corresponding performance analysis results.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the server performance monitoring method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the server performance monitoring method according to any one of claims 1 to 7.
