CN108023741B - Monitoring resource use method and server - Google Patents
Monitoring resource use method and server Download PDFInfo
- Publication number
- CN108023741B CN108023741B CN201610931401.8A CN201610931401A CN108023741B CN 108023741 B CN108023741 B CN 108023741B CN 201610931401 A CN201610931401 A CN 201610931401A CN 108023741 B CN108023741 B CN 108023741B
- Authority
- CN
- China
- Prior art keywords
- early warning
- server
- resource usage
- information
- preset file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0604—Management of faults, events, alarms or notifications using filtering, e.g. reduction of information by using priority, element types, position or time
- H04L41/0622—Management of faults, events, alarms or notifications using filtering, e.g. reduction of information by using priority, element types, position or time based on time
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Telephonic Communication Services (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a method for monitoring resource usage, which comprises the following steps: monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value; when the current resource usage size is determined to be larger than the early warning threshold value, detecting whether the current time is within a preset early warning time range; and when the current time is determined to be within the early warning time range, generating early warning information and outputting the early warning information, wherein the early warning information is used for prompting the information that the current resource use size of the server exceeds an early warning threshold value to a user. The embodiment of the invention also discloses a management server. By adopting the invention, the management server can perform early warning on the resource use condition of the server at proper time so as to eliminate obstacles in advance, ensure the normal operation of the server, improve the operation safety of the server and reduce the management cost.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a monitoring resource using method and a server.
Background
Currently, in the operation and maintenance service process, the management server of the operation and maintenance alarm system receives the resource usage of each server used for the operation and maintenance service in the system. Generally, a management server of an operation and maintenance alarm system monitors whether the resource usage size of the server exceeds a threshold value, when the resource usage size of the server exceeds the threshold value, the management server immediately alarms and needs an operation and maintenance manager to immediately remove obstacles, otherwise, an error occurs in the system, for example, when the storage space of the server is about to be exhausted by a certain application filing file, if the operation and maintenance manager does not immediately reduce the usage size of the storage space, a subsequent log file cannot be filed, and a database error is caused.
However, the management server may trigger an alarm at any time when the resource usage size of the server exceeds the threshold, and this scheme may cause the management server to possibly alarm when the operation and maintenance manager cannot timely perform the obstacle elimination process, for example, the operation and maintenance manager is notified by an alarm in late night, which may cause a system error due to the fact that the operation and maintenance manager cannot timely arrive at the site to eliminate the fault, and cannot ensure the safety of the server operation, and the operation and maintenance manager is inconveniently notified by the alarm at an inappropriate time, and thus increases the management cost.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method for monitoring resource usage and a server, which can perform early warning on the resource usage of the server at a suitable time to remove obstacles in advance, and improve the security of server operation.
In order to solve the above technical problem, an aspect of the present invention provides a method for monitoring resource usage, including:
monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value;
when the current resource usage size is determined to be larger than the early warning threshold value, detecting whether the current time is within a preset early warning time range;
and when the current time is determined to be within the early warning time range, generating early warning information and outputting the early warning information, wherein the early warning information is used for prompting the information that the current resource use size of the server exceeds an early warning threshold value to a user.
Another aspect of the embodiments of the present invention provides a management server, including:
the first monitoring unit is used for monitoring whether the current resource use size of the server is larger than a preset early warning threshold value;
the detection unit is used for detecting whether the current time is within a preset early warning time range or not when the monitoring unit determines that the current resource usage size is larger than the early warning threshold value;
and the first output unit is used for generating and outputting early warning information when the detection unit determines that the current time is within the early warning time range, wherein the early warning information is used for prompting the user of information that the current resource usage size of the server exceeds an early warning threshold value.
In the embodiment of the invention, the management server monitors whether the current resource usage size of the server is larger than a preset early warning threshold value, detects whether the current time is within a preset early warning time range when the current resource usage size is determined to be larger than the early warning threshold value, and generates and outputs early warning information when the current time is determined to be within the early warning time range, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, ensure the normal operation of the server, improve the operation safety of the server and reduce the management cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for monitoring resource usage according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a warning message display according to the present invention;
FIG. 4 is a flow chart illustrating another method for monitoring resource usage according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for monitoring resource usage according to another embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for monitoring resource usage according to another embodiment of the present invention;
fig. 7 is a block diagram of a management server according to an embodiment of the present invention;
fig. 8 is a structural diagram of another management server provided in the embodiment of the present invention;
fig. 9 is a structural diagram of another management server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The monitoring resource using method provided by the embodiment of the invention can be applied to a scene that a monitoring server monitors the resource using condition of the server.
In order to better understand the solution disclosed in the embodiment of the present invention, a network architecture to which the embodiment of the present invention is applicable is described below. Referring to fig. 1, fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present invention. In the network architecture shown in fig. 1, at least one server 1 for operation and maintenance service, a management server 2 for monitoring resource usage of the server 1, and a terminal 3 for receiving alarm information pushed by the management server 2 may be included. Both the server 1 and the terminal 3 may be connected to the management server 2 via a network. In a specific application, when the management server 2 monitors that the resource usage size of the server 1 is greater than a preset threshold, the monitoring server 2 may push alarm information to the terminal 3 to notify a manager that the server 1 needs to perform resource management in time.
The following will describe in detail a monitoring resource using method according to an embodiment of the present invention with reference to fig. 2 to 5, where an execution subject of the embodiment is a management server, and a terminal connected to the server through a network may include: the terminals are merely examples, and are not exhaustive, and include but not limited to the terminals described above.
Fig. 2 is a schematic flow chart of an embodiment of a method for monitoring resource usage according to an embodiment of the present invention. The method for monitoring the use of the resources comprises the following steps:
and S100, monitoring whether the current resource use size of the server is larger than a preset early warning threshold value.
In the embodiment of the present invention, the management server may perform monitoring periodically, or the management server may perform monitoring in real time, or the management server may perform monitoring according to a preset period. Specifically, the monitoring, by the management server, whether the current resource usage size of the server is greater than a preset early warning threshold may be: the management server can obtain the current resource usage size of the server and judge whether the current resource usage size of the server is larger than a preset early warning threshold value. The size of the current resource usage obtained by the management server may be: the management server can send a request for obtaining the resource use size to the server and receive the current resource use size returned by the server response request; or the management server can receive the current resource usage size uploaded by the server; or the management server obtains an operation log sent by the server, and obtains the current resource usage size of the server according to the operation log analysis.
In the embodiment of the invention, the server can comprise various resources, such as resources of a CPU, a memory, a hard disk, a bandwidth and the like, so that the management server can monitor whether the current CPU resource usage size of the server is larger than a preset early warning threshold value; or, the management server can monitor whether the current memory resource usage size of the server is larger than a preset early warning threshold value; or, the management server may monitor whether the current hard disk resource usage size of the server is greater than a preset early warning threshold value, and the like.
Further, in the embodiment of the present invention, the management server may monitor only one or more resources of the server. Preferably, in the embodiment of the present invention, the management server only monitors the current hard disk resource usage of the server. That is, it can be understood that the management server monitors whether the current usage size of the storage space of the server is greater than a preset warning threshold. The early warning threshold may be set by itself, and optionally, the early warning threshold may be 60% of the available resources of the server. Further optionally, the early warning threshold is smaller than the alarm threshold, and the difference between the set early warning threshold and the alarm threshold is greater than the resource growth value of the server in a preset future time period, if the management server predicts that the resource growth rate of the server is 20% in the future 12 hours and the alarm threshold is 90%, the management server may set the early warning threshold to be 60%, where the future time period may be a time period between the current early warning time range and the next early warning time range of the management server.
In a particular application, the server may be a server for an operation and maintenance service, and the server may record operation and maintenance logs of various applications. Because the operation and maintenance log only occupies the storage space of the server, the management server can monitor whether the usage size of the storage space of the server is larger than a preset early warning threshold value.
S101, when the current resource usage size is larger than the early warning threshold value, detecting whether the current time is within a preset early warning time range.
In the embodiment of the present invention, the pre-warneable time range may be a time range in which a manager can conveniently manage the server, for example, the pre-warneable time range may be daytime, or the pre-warneable time range may be working time, for example, the pre-warneable time range may be: 9: 00-18: 00. The management server can preset a pre-warning time range, if the management server can preset daily working time as the pre-warning time range, if the pre-warning time range is set as follows: 9: 00-18: 00, or the management server can also preset other time ranges which can facilitate the management of the server, and the time ranges are not limited herein.
In the embodiment of the invention, the management server can acquire the current time and judge whether the current time is within the preset early warning time range. Such as: when the pre-warning time range preset by the management server is 9: when the current time is 10:00, the management server can judge that the current time is within a preset early warning time range if the current time acquired by the management server is 00-18: 00. The acquiring, by the management server, the current time may specifically be: the management server obtains the current time through the network, or the management server receives the current time uploaded simultaneously when the server uploads the current resource usage size.
And S102, generating and outputting early warning information when the current time is determined to be within the early warning time range.
In the embodiment of the invention, when the management server determines that the current time is within a preset early warning time range, the management server can output early warning information to a terminal to be notified in a short message mode or a telephone mode and the like, wherein the early warning information is used for prompting a user that the current resource usage size of the server exceeds an early warning threshold value and related information such as resource management and the like needs to be carried out, for example, prompting a manager that the current storage space usage size of the server exceeds the early warning threshold value and the early warning information of cleaning the storage space of the server needs to be carried out, and the manager can carry out resource management on the resource usage condition of the server at a proper time according to the early warning information so as to reduce the current resource usage size of the server. Therefore, the early warning information can give early warning to the manager in advance, so that the manager can arrange proper time to solve the server problem.
In the embodiment of the invention, the management server can register the contact information of the manager needing the early warning notification, such as a mobile phone number. The management server can edit the short message information according to the early warning information and send the short message information to a terminal corresponding to the contact way through a preset contact way, and a display schematic diagram of the early warning information on the terminal can be specifically shown in fig. 3; or the management server can edit the corresponding voice information according to the early warning information and send the voice information to the terminal corresponding to the contact way through the preset contact way. The early warning information is used for informing a manager that the current resource use size of the server exceeds an early warning threshold value, and the manager can manage the resource of the server according to the resource use condition of the server, so that the current resource use size of the server is reduced.
In the embodiment of the present invention, when the management server determines that the current time is not within the preset pre-warning time range, the management server may monitor whether the current resource usage size of the server is greater than a preset warning threshold, where the warning threshold may be a threshold for a manager to immediately perform resource management on the server, and specifically may be 90% of the available resource size in the server. Therefore, when the management server judges that the current resource use size is larger than the preset alarm threshold value, the management server can generate and output alarm information at any time, and therefore the operation safety of the server is effectively guaranteed. The alarm information is used for prompting that the resource use size of the server exceeds an alarm threshold value, and management personnel need to take measures immediately to reduce the resource use information.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
Fig. 4 is a schematic flowchart of another embodiment of a method for monitoring resource usage according to an embodiment of the present invention. The method for monitoring the use of the resources comprises the following steps:
s200, obtaining a first resource usage log of a server, wherein the first resource usage log comprises a corresponding relation between the resource usage size of the server and time.
In the embodiment of the invention, resources such as a CPU (central processing unit), a memory, a hard disk, a bandwidth and the like of the server have corresponding resource use resource sizes at each time point, the management server can be internally provided with a log system, the log system can comprise a first resource use log, and the first resource use log can record and store the resource use sizes corresponding to different time points so as to record the corresponding relation between the resource use sizes of various resources on the server and time. Preferably, the management server may record a correspondence relationship between a usage size of the storage space of the server and time.
S201, predicting the predicted time corresponding to the alarm threshold value according to the corresponding relation between the resource usage size of the server and the time.
In the embodiment of the invention, the management server can generate the prediction model according to the corresponding relation between the resource use size of the server and the time. The management server can combine with the prediction model to predict according to the resource usage as an alarm threshold value, and obtain corresponding prediction time. The management server can input the resource usage value as an alarm threshold value as an input value into the prediction time model for time prediction to obtain the prediction time output by the prediction model. The prediction model may be a prediction time formula for outputting the prediction time, the resource usage size is an independent variable therein, and the server may perform fitting according to a correspondence between the resource usage size of the server and the time to generate the prediction time formula.
In the embodiment of the present invention, the management server may also generate the prediction model through machine training, for example, the management server may obtain the usage size of the sample resource and the sample time according to the correspondence between the usage size of the resource and the time of the server, and train the usage size of the sample resource as an independent variable and the sample time as a dependent variable to generate the prediction model.
S202, judging whether the predicted time is within a preset early warning time range.
In the embodiment of the present invention, the pre-alarmable time range may be a time range in which a manager can conveniently manage the server, for example, the pre-alarmable time range may be in the daytime, or the pre-alarmable time range may be the working time, for example, the pre-alarmable time range may be: 9: 00-18: 00.
In the embodiment of the invention, when the management server judges that the predicted time is within the preset early warning time range, the management server can not perform resource use early warning on the server, can output alarm information to inform a manager to perform resource management immediately after the resource use size of the server exceeds the alarm threshold, and can still perform resource use early warning on the server. The alarm information is used for prompting a user that the current resource usage size of the server exceeds an alarm threshold value, and information of an alarm reason needs to be solved by immediately adopting a word.
In the embodiment of the invention, when the management server judges that the predicted time is not in the early warning time range, the management server possibly gives an alarm to the management personnel in an improper time, so that the management server can perform early warning operation.
S203, monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value.
S204, when the current resource usage size is determined to be larger than the early warning threshold value, detecting whether the current time is within a preset early warning time range.
And S205, when the current time is determined to be within the early warning time range, generating early warning information and outputting the early warning information.
In the embodiment of the present invention, for specific implementation of step S203, step S204, and step S205, reference may be made to specific implementation of step S100, step S101, and step S102 in the foregoing embodiment, which is not described herein again.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
Fig. 5 is a schematic flow chart of another embodiment of the method for monitoring resource usage according to the embodiment of the present invention. The method for monitoring the use of the resources comprises the following steps:
s300, monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value.
S301, when the current resource usage size is determined to be larger than the early warning threshold value, detecting whether the current time is within a preset early warning time range.
And S302, when the current time is determined to be within the early warning time range, monitoring the current resource usage size of each preset file in the server, and acquiring a first target preset file corresponding to the highest resource usage size from the current resource usage size of each preset file.
In the embodiment of the present invention, the management server may preset a file or a directory for monitoring the resource usage, where the preset file may include: the preset path points to a file or all files pointed by the preset directory, and the preset file can be a file for cleaning. The management server can send a resource use size request for acquiring the preset file to the server and receive the current resource use size of the preset file returned by the server response request; or the management server may receive the current resource usage size of the preset file uploaded by the server, or the management server obtains an operation log sent by the server, and obtains the current resource usage size of the preset file of the server according to analysis of the operation log. The resource usage size of the preset file may be a storage space usage size of the preset file.
In the embodiment of the present invention, the management server may obtain, from the current resource usage size of each preset file, a first target preset file corresponding to the resource usage size that satisfies the preset condition. The first target preset file corresponding to the resource usage size that meets the preset condition and can be obtained by the management server from the current resource usage size of each preset file may be: the management server may obtain a first target preset file corresponding to a highest resource usage size among current resource usage sizes of the preset files, or the management server may randomly obtain a first target preset file corresponding to a resource usage size larger than a preset threshold among the current resource usage sizes of the preset files. Preferably, the management server may obtain the first target preset file corresponding to the highest storage space usage size from the current storage space usage sizes of the preset files.
S303, obtaining first target preset file information for positioning the first target preset file.
In the embodiment of the present invention, the first target preset file information may be used to locate the first target preset file, for example, information including a file name of the first target preset file, a storage space usage size of the first target preset file, a directory or a path of the first target preset file, and the like.
S304, generating early warning information carrying the first target preset file information.
In the embodiment of the invention, the management server can push the early warning information carrying the first target preset file information to the terminal, so that a manager can receive the early warning information or the files needing to be cleaned through the terminal, the manager can quickly position the files needing to be cleaned, and the efficiency of cleaning the server is effectively improved.
S305, outputting the early warning information carrying the first target preset file information.
In the embodiment of the present invention, for specific implementation manners of step S300, step S301, and step S305, reference may be made to the specific implementation manners of step S100, step S101, and step S102 in the foregoing embodiment, which are not described herein again.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
Fig. 6 is a schematic flow chart of another embodiment of the method for monitoring resource usage according to the embodiment of the present invention. The method for monitoring the use of the resources comprises the following steps:
s400, monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value.
S401, when the current resource usage size is larger than the early warning threshold value, whether the current time is within a preset early warning time range is detected.
S402, when the current time is determined to be within the early warning time range, obtaining a second resource usage log of each preset file in the server, wherein the second resource usage log comprises a corresponding relation between the resource usage size and the time of each preset file.
In the embodiment of the present invention, the management server may record the resource usage size of the preset file at different time points, so as to record the corresponding relationship between the resource usage size of the preset file and the time.
And S403, determining the increase rate of the resource usage size of each preset file in a preset time period according to the corresponding relation between the resource usage size of each preset file and the time.
In the embodiment of the present invention, the preset time period may be a continuous time period including the current time, such as a time period for daily work, or may also be a time period closest to the current time, such as a time period from the beginning of the month to the tenth day.
In the embodiment of the invention, the terminal can obtain the resource use sizes respectively corresponding to the two time endpoints of the preset time period according to the corresponding relation between the resource use size of the preset file and the time, so that the increase rate of the resource use size of the preset file in the preset time period can be calculated. The method specifically comprises the following steps: if the preset time period is from a time point a to b time point, where the resource usage size corresponding to the time point a is c and the resource usage size corresponding to the time point b is d, the resource usage size increase rate f in the preset time period is (d-c)/d.
S404, determining a second target preset file corresponding to the highest growth rate in the growth rates of the resource usage sizes of the preset files in a preset time period.
In the embodiment of the present invention, the management server may obtain, from the increase rate of the resource usage size of each preset file, a second target preset file corresponding to the increase rate of the resource usage size that meets the preset condition. The step of acquiring, by the management server, the second target preset file corresponding to the increase rate that meets the preset condition from the increase rate of the resource usage size of each preset file may be: the management server may obtain a second target preset file corresponding to the highest increase rate of the resource usage size from the increase rates of the resource usage sizes of the preset files, or the management server may randomly obtain a second target preset file corresponding to the increase rate of the resource usage size greater than a preset threshold from the increase rates of the resource usage sizes of the preset files. Preferably, the management server may obtain, from the increase rates of the storage space usage sizes of the preset files, the second target preset file corresponding to the highest increase rate of the storage space usage size.
S405, second target preset file information used for positioning the second target preset file is obtained.
In the embodiment of the present invention, the second target preset file information may be used to locate the second target preset file, for example, information including a file name of the second target preset file, a storage space usage size of the second target preset file, a directory or a path of the second target preset file, and the like.
And S406, generating early warning information carrying the second target preset file information.
In the embodiment of the invention, the management server can push the early warning information carrying the second target preset file information to the terminal, so that a manager can receive the early warning information or the files needing to be cleaned through the terminal, the manager can quickly position the files needing to be cleaned, and the efficiency of cleaning the server is effectively improved.
And S407, outputting the early warning information carrying the second target preset file information.
In the embodiment of the present invention, specific implementations of step S400, step S401, and step S407 can refer to specific implementations of step S100, step S101, and step S102 in the foregoing embodiment, which are not described herein again.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
The management server provided by the embodiment of the present invention will be described in detail with reference to fig. 7 to 9. It should be noted that, the management server shown in fig. 7-9 is used for executing the method according to the embodiment shown in fig. 1-6 of the present invention, and for convenience of description, only the portion related to the embodiment of the present invention is shown, and details of the specific technology are not disclosed, please refer to the embodiment shown in fig. 1-6 of the present invention.
Fig. 7 is a schematic structural diagram of a management server according to an embodiment of the present invention. As shown in fig. 7, the management server according to an embodiment of the present invention may include:
the first monitoring unit 100 is configured to monitor whether a current resource usage size of the server is greater than a preset early warning threshold.
A detecting unit 200, configured to detect whether the current time is within a preset pre-warning available time range when the monitoring unit determines that the current resource usage size is greater than the pre-warning threshold.
A first output unit 300, configured to generate and output warning information when the detection unit determines that the current time is within the forewarning available time range.
It is to be understood that the functions of each functional module of the unit in the management server in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the description related to the foregoing method embodiment, which is not described herein again.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
Please refer to fig. 8, which provides a schematic structural diagram of a management server according to an embodiment of the present invention. As shown in fig. 8, the management server according to an embodiment of the present invention may include:
a first monitoring unit 100, a detection unit 200 and a first output unit 300.
Wherein the management server includes:
an obtaining unit 400, configured to obtain a first resource usage log of a server, where the first resource usage log includes a correspondence between a resource usage size of the server and time;
a predicting unit 500, configured to predict, according to a correspondence between the resource usage size of the server and time, prediction time corresponding to an alarm threshold value for the resource usage size of the server;
a judging unit 600, configured to judge whether the predicted time is within a preset pre-warning available time range;
and when the judging unit determines that the predicted time is not within the early warning time range, informing the monitoring unit whether the current resource usage size of the monitoring server is larger than a preset early warning threshold value.
Wherein the management server further comprises:
a second monitoring unit 700, configured to monitor whether the current resource usage size of the server is greater than a preset alarm threshold value when it is determined that the current time is not within the pre-alarmable time range;
and a second output unit 800, configured to generate and output alarm information when the second monitoring unit determines that the resource usage size is greater than the alarm threshold, where the alarm information is used to prompt the server that the resource usage size exceeds the alarm threshold.
Wherein the first output unit 300 includes:
a first obtaining subunit 10, configured to obtain current resource usage sizes of the preset files in the server, and obtain a first target preset file corresponding to a highest resource usage size from the current resource usage sizes of the preset files;
a second obtaining subunit 20, configured to obtain first target preset file information used for positioning the first target preset file;
the first generating subunit 30 is configured to generate early warning information carrying the first target preset file information, so that a user locates the first target preset file in the server through the first target preset file information in the early warning information;
and the first output subunit 40 is configured to output the warning information carrying the first target preset file information.
Wherein the first output unit 300 includes:
a third obtaining subunit 50, configured to obtain a second resource usage log of each preset file in the server, where the second resource usage log includes a correspondence between a resource usage size of each preset file and time;
a first determining subunit 60, configured to determine, according to a correspondence between the resource usage size of each preset file and time, a growth rate of the resource usage size of each preset file in a preset time period;
a second determining subunit 70, configured to determine, from the growth rates of the resource usage sizes of the preset files in a preset time period, a second target preset file corresponding to the highest growth rate;
a fourth obtaining subunit 80, configured to obtain second target preset file information used for positioning the second target preset file;
a second generating unit 90, configured to generate warning information carrying the second target preset file information, so that a user locates the second target preset file in the server through the second target preset file information in the warning information;
and a second output unit 91, configured to output the warning information carrying the second target preset file information.
Wherein the first output unit 300 includes:
a first sending unit 92, configured to send the warning information to a terminal connected to the management server in a short message manner, or,
and a second sending unit 93, configured to send the warning information to a terminal connected to the management server in a telephone voice manner.
It is to be understood that the functions of each functional module of the unit in the management server in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the description related to the foregoing method embodiment, which is not described herein again.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
Referring to fig. 9, a schematic structural diagram of another server is provided for the embodiment of the present invention. As shown in fig. 9, the server 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 9, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a communication connection application program.
In the terminal 1000 shown in fig. 9, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; the network interface 1004 is used for connecting with a server and acquiring data sent by the server; and the processor 1001 may be configured to invoke the communication connection application stored in the memory 1005 and specifically perform the following operations:
monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value;
when the current resource usage size is determined to be larger than the early warning threshold value, detecting whether the current time is within a preset early warning time range;
and when the current time is determined to be within the early warning time range, generating early warning information and outputting the early warning information, wherein the early warning information is used for prompting the information that the current resource use size of the server exceeds an early warning threshold value to a user.
Before the processor 1001 monitors whether the current resource usage size of the server is greater than a preset early warning threshold, the processor 1001 further performs:
acquiring a first resource usage log of a server, wherein the first resource usage log comprises a corresponding relation between the resource usage size of the server and time;
predicting the predicted time corresponding to the alarm threshold value according to the corresponding relation between the resource use size of the server and the time;
judging whether the predicted time is within a preset early warning time range or not;
and when the predicted time is determined not to be within the early warning time range, executing the step of judging whether the current resource usage size of the monitoring server is larger than a preset early warning threshold value.
After the processor 1001 detects whether the current time is within a preset pre-alarmable time range, the processor 1001 further performs:
when the current time is determined not to be within the early warning time range, monitoring whether the current resource usage size of the server is larger than a preset warning threshold value;
and when the resource usage size is determined to be larger than the alarm threshold, generating alarm information and outputting the alarm information, wherein the alarm information is used for prompting the information that the resource usage size of the server exceeds the alarm threshold.
The processor 1001 generates and outputs the warning information, including:
acquiring the current resource use size of each preset file in the server, and acquiring a first target preset file corresponding to the highest resource use size in the current resource use size of each preset file;
acquiring first target preset file information for positioning the first target preset file;
generating early warning information carrying the first target preset file information so that a user can position the first target preset file in the server through the first target preset file information in the early warning information;
and outputting the early warning information carrying the first target preset file information.
Wherein, the processor 1001 generates the early warning information and outputs the early warning information, including:
acquiring a second resource use log of each preset file in the server, wherein the second resource use log comprises the corresponding relation between the resource use size and the time of each preset file;
determining the growth rate of the resource usage of each preset file in a preset time period according to the corresponding relation between the resource usage of each preset file and the time;
determining a second target preset file corresponding to the highest increase rate in the increase rates of the resource use sizes of the preset files in a preset time period;
acquiring second target preset file information for positioning the second target preset file;
generating early warning information carrying the second target preset file information so that a user can position the second target preset file in the server through the second target preset file information in the early warning information;
and outputting the early warning information carrying the second target preset file information.
Wherein, the processor 1001 generates the early warning information and outputs the early warning information, including:
sending the early warning information to a terminal connected with the management server in a short message mode, or,
and sending the early warning information to a terminal connected with a management server in a telephone voice mode.
It is to be understood that the functions of each functional module of the unit in the management server in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the description related to the foregoing method embodiment, which is not described herein again.
In the embodiment of the invention, whether the current resource usage size of the server is larger than a preset early warning threshold value or not is monitored, when the current resource usage size is determined to be larger than the early warning threshold value, whether the current time is within a preset early warning time range or not is detected, and when the current time is determined to be within the early warning time range, early warning information is generated and output, so that the management server can early warn the resource usage condition of the server at a proper time to eliminate obstacles in advance, the normal operation of the server is ensured, the operation safety of the server is improved, and the management cost is reduced.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.
Claims (12)
1. A method for monitoring resource usage, comprising:
acquiring a first resource usage log of a server, wherein the first resource usage log comprises a corresponding relation between the resource usage size of the server and time;
predicting the predicted time corresponding to the alarm threshold value according to the corresponding relation between the resource use size of the server and the time;
when the predicted time is determined not to be within the preset early warning time range, monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value;
when the current resource usage size is determined to be larger than the early warning threshold value, detecting whether the current time is within the early warning time range;
and when the current time is determined to be within the early warning time range, generating early warning information and outputting the early warning information, wherein the early warning information is used for prompting the information that the current resource use size of the server exceeds an early warning threshold value to a user.
2. The method of claim 1, wherein said detecting whether the current time is within a preset forewarning time range further comprises:
when the current time is determined not to be within the early warning time range, monitoring whether the current resource usage size of the server is larger than a preset warning threshold value;
and when the resource usage size is determined to be larger than the alarm threshold, generating alarm information and outputting the alarm information, wherein the alarm information is used for prompting the information that the resource usage size of the server exceeds the alarm threshold.
3. The method of claim 1, wherein the generating and outputting early warning information comprises:
acquiring the current resource use size of each preset file in the server, and acquiring a first target preset file corresponding to the highest resource use size in the current resource use size of each preset file;
acquiring first target preset file information for positioning the first target preset file;
generating early warning information carrying the first target preset file information so that a user can position the first target preset file in the server through the first target preset file information in the early warning information;
and outputting the early warning information carrying the first target preset file information.
4. The method of claim 3, wherein the generating and outputting early warning information comprises:
acquiring a second resource use log of each preset file in the server, wherein the second resource use log comprises the corresponding relation between the resource use size and the time of each preset file;
determining the growth rate of the resource usage of each preset file in a preset time period according to the corresponding relation between the resource usage of each preset file and the time;
determining a second target preset file corresponding to the highest increase rate in the increase rates of the resource use sizes of the preset files in a preset time period;
acquiring second target preset file information for positioning the second target preset file;
generating early warning information carrying the second target preset file information so that a user can position the second target preset file in the server through the second target preset file information in the early warning information;
and outputting the early warning information carrying the second target preset file information.
5. The method of claim 1, wherein the generating and outputting early warning information comprises:
the management server sends the early warning information to a terminal connected with the management server in a short message mode, or,
and the management server sends the early warning information to a terminal connected with the management server in a telephone voice mode.
6. A management server, characterized in that the management server comprises:
an obtaining unit, configured to obtain a first resource usage log of a server, where the first resource usage log includes a correspondence between a resource usage size of the server and time;
the prediction unit is used for predicting the prediction time corresponding to the alarm threshold value according to the corresponding relation between the resource use size of the server and the time;
the judging unit is used for judging whether the predicted time is within a preset early warning time range or not;
the first monitoring unit is used for monitoring whether the current resource usage size of the server is larger than a preset early warning threshold value or not when the judging unit determines that the predicted time is not within the early warning time range;
the detection unit is used for detecting whether the current time is within the early warning time range or not when the monitoring unit determines that the current resource usage size is larger than the early warning threshold value;
and the first output unit is used for generating and outputting early warning information when the detection unit determines that the current time is within the early warning time range, wherein the early warning information is used for prompting the user of information that the current resource usage size of the server exceeds an early warning threshold value.
7. The management server according to claim 6, wherein the management server further comprises:
the second monitoring unit is used for monitoring whether the current resource usage size of the server is larger than a preset alarm threshold value or not when the current time is determined not to be within the early warning time range;
and the second output unit is used for generating alarm information and outputting the alarm information when the second monitoring unit determines that the resource usage size is larger than the alarm threshold, wherein the alarm information is used for prompting the information that the resource usage size of the server exceeds the alarm threshold.
8. The management server according to claim 6, wherein the first output unit includes:
a first obtaining subunit, configured to obtain current resource usage sizes of the preset files in the server, and obtain a first target preset file corresponding to a highest resource usage size from the current resource usage sizes of the preset files;
the second acquisition subunit is configured to acquire first target preset file information used for positioning the first target preset file;
the first generating subunit is configured to generate early warning information carrying the first target preset file information, so that a user locates the first target preset file in the server through the first target preset file information in the early warning information;
and the first output subunit is used for outputting the early warning information carrying the first target preset file information.
9. The management server according to claim 8, wherein the first output unit includes:
a third obtaining subunit, configured to obtain a second resource usage log of each preset file in the server, where the second resource usage log includes a correspondence between a resource usage size of each preset file and time;
the first determining subunit is configured to determine, according to the correspondence between the resource usage size of each preset file and time, a growth rate of the resource usage size of each preset file in a preset time period;
a second determining subunit, configured to determine, from the growth rates of the resource usage sizes of the preset files in a preset time period, a second target preset file corresponding to the highest growth rate;
the fourth acquisition subunit is configured to acquire second target preset file information used for positioning the second target preset file;
the second generating unit is used for generating early warning information carrying the second target preset file information so that a user can position the second target preset file in the server through the second target preset file information in the early warning information;
and the second output unit is used for outputting the early warning information carrying the second target preset file information.
10. The management server according to claim 6, wherein the first output unit includes:
a first sending unit, configured to send the warning information to a terminal connected to the management server in a short message manner, or,
and the second sending unit is used for sending the early warning information to a terminal connected with the management server in a telephone voice mode.
11. A management server, comprising a processor and a memory, wherein the memory is configured to store program code and the processor is configured to invoke the program code to perform the method for monitoring resource usage according to any of claims 1-5.
12. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program comprising program instructions; the program instructions, when executed by a processor, cause the processor to perform the method of monitoring resource usage of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610931401.8A CN108023741B (en) | 2016-10-31 | 2016-10-31 | Monitoring resource use method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610931401.8A CN108023741B (en) | 2016-10-31 | 2016-10-31 | Monitoring resource use method and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108023741A CN108023741A (en) | 2018-05-11 |
CN108023741B true CN108023741B (en) | 2020-11-27 |
Family
ID=62069800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610931401.8A Active CN108023741B (en) | 2016-10-31 | 2016-10-31 | Monitoring resource use method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108023741B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113778778A (en) * | 2020-08-25 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Early warning method and device |
CN112162897A (en) * | 2020-08-27 | 2021-01-01 | 广东卓维网络有限公司 | Public intelligent equipment management method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729301A (en) * | 2008-11-03 | 2010-06-09 | 中国移动通信集团湖北有限公司 | Monitor method and monitor system of network anomaly traffic |
CN104916088A (en) * | 2015-05-12 | 2015-09-16 | 广东美的暖通设备有限公司 | Fault alarm method, device and wired controller |
CN105245360A (en) * | 2015-09-08 | 2016-01-13 | 长威信息科技发展股份有限公司 | Data center operation and maintenance monitoring and alarming white list system |
CN106034051A (en) * | 2015-03-12 | 2016-10-19 | 腾讯科技(深圳)有限公司 | Network monitoring data processing method and network monitoring data processing device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140149568A1 (en) * | 2012-11-26 | 2014-05-29 | Sap Ag | Monitoring alerts in a computer landscape environment |
-
2016
- 2016-10-31 CN CN201610931401.8A patent/CN108023741B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729301A (en) * | 2008-11-03 | 2010-06-09 | 中国移动通信集团湖北有限公司 | Monitor method and monitor system of network anomaly traffic |
CN106034051A (en) * | 2015-03-12 | 2016-10-19 | 腾讯科技(深圳)有限公司 | Network monitoring data processing method and network monitoring data processing device |
CN104916088A (en) * | 2015-05-12 | 2015-09-16 | 广东美的暖通设备有限公司 | Fault alarm method, device and wired controller |
CN105245360A (en) * | 2015-09-08 | 2016-01-13 | 长威信息科技发展股份有限公司 | Data center operation and maintenance monitoring and alarming white list system |
Also Published As
Publication number | Publication date |
---|---|
CN108023741A (en) | 2018-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109861856B (en) | Method and device for notifying system fault information, storage medium and computer equipment | |
KR102469441B1 (en) | A method and an apparatus for monitoring global failure of virtual gateway cluster | |
CN106211227A (en) | Flow method for early warning and the network equipment | |
CN104702982B (en) | A kind of algorithm configuration method and system of video analysis equipment | |
CN108023741B (en) | Monitoring resource use method and server | |
CN107306200A (en) | Network failure method for early warning and the gateway for network failure early warning | |
CN113507691A (en) | Information pushing system and method based on power distribution network cross-region service | |
CN115150460B (en) | Node security registration method, device, equipment and readable storage medium | |
CN104125586A (en) | Information prompt method, server and terminal | |
CN103517292A (en) | Mobile terminal information reporting method and apparatus | |
CN112565062B (en) | Processing method, related device, equipment and medium of instant messaging order | |
CN107612755A (en) | The management method and its device of a kind of cloud resource | |
CN108805512A (en) | A kind of attendance information recording method and its equipment, system | |
CN108234658B (en) | Method and device for sensing health condition of server cluster and server | |
CN109508356B (en) | Data abnormality early warning method, device, computer equipment and storage medium | |
CN113468030A (en) | Monitoring and alarming method and device of ABS (anti-lock braking system), storage medium and electronic equipment | |
US9305299B1 (en) | System, method, and computer program for proactively identifying and addressing customer needs | |
CN103260174B (en) | Mobile terminal data flow method for real-time monitoring and system | |
CN116260747A (en) | Monitoring method and device of terminal test equipment and electronic equipment | |
KR101679849B1 (en) | Automatic warning system using mobile phone and method thereof | |
CN110611576B (en) | Data quality monitoring method, device, equipment and storage medium | |
CN108566496B (en) | Method and device for monitoring voice line state | |
CN112965875A (en) | Message queue monitoring method and device | |
CN116112398B (en) | Link jitter suppression method and device, storage medium and electronic equipment | |
Aazam et al. | M2M Emergency help alert mobile cloud architecture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |