CN116680151A - Dynamic monitoring method, system, terminal and storage medium for hard disk performance - Google Patents

Dynamic monitoring method, system, terminal and storage medium for hard disk performance Download PDF

Info

Publication number
CN116680151A
CN116680151A CN202310721131.8A CN202310721131A CN116680151A CN 116680151 A CN116680151 A CN 116680151A CN 202310721131 A CN202310721131 A CN 202310721131A CN 116680151 A CN116680151 A CN 116680151A
Authority
CN
China
Prior art keywords
hard disk
service scene
disk performance
data
frequency
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.)
Pending
Application number
CN202310721131.8A
Other languages
Chinese (zh)
Inventor
郭仁毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310721131.8A priority Critical patent/CN116680151A/en
Publication of CN116680151A publication Critical patent/CN116680151A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of servers, and particularly provides a method, a system, a terminal and a storage medium for dynamically monitoring hard disk performance, wherein the method comprises the following steps: setting matched hard disk performance data acquisition frequency for the service scene according to the requirement of the service scene on the hard disk performance; monitoring an actual service scene of a server, and acquiring a target acquisition frequency matched with the actual service scene; invoking a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency; and carrying out abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data to obtain abnormal data. The invention can flexibly update the hard disk performance monitoring frequency according to the service scene of the server, thereby avoiding the situations of resource waste or untimely hard disk performance monitoring.

Description

Dynamic monitoring method, system, terminal and storage medium for hard disk performance
Technical Field
The invention belongs to the technical field of servers, and particularly relates to a method, a system, a terminal and a storage medium for dynamically monitoring hard disk performance.
Background
The service scenario used by the server is more and more, for example, the service scenario can be used for various tasks in a network, such as data storage, file transmission, network communication, website hosting and the like. In the internet age, servers play a vital role as a core component of the internet infrastructure. Different service scenes have different performance influences and specification requirements on hard disk reading and writing.
Most of the existing hard disk performance monitoring methods acquire hard disk performance data periodically and then perform abnormal monitoring on the hard disk performance data. The data acquisition period is a fixed parameter in the configuration file, and when the server bears multiple service scenes, the hard disk performance monitoring period under different service scenes is still the same. Because the number of hard disks of some servers is large, the hard disk performance data acquisition occupies more computing resources of the servers. This results in a waste of computing resources and communication resources for some service scenarios with low requirements on the hard disk if the pre-configured period is too short, and in a non-timely monitoring for some service scenarios with high requirements on the hard disk if the pre-configured period is too long.
Disclosure of Invention
Aiming at the problems of resource waste or untimely monitoring caused by inflexible monitoring of the performance of a hard disk in the prior art, the invention provides a method, a system, a terminal and a storage medium for dynamically monitoring the performance of the hard disk, so as to solve the technical problems.
In a first aspect, the present invention provides a method for dynamically monitoring performance of a hard disk, including:
setting matched hard disk performance data acquisition frequency for the service scene according to the requirement of the service scene on the hard disk performance;
monitoring an actual service scene of a server, and acquiring a target acquisition frequency matched with the actual service scene;
invoking a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency;
and carrying out abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data to obtain abnormal data.
In an optional embodiment, setting a matched hard disk performance data acquisition frequency for the service scenario according to a requirement of the service scenario for hard disk performance, including:
counting the duration time of a service scene and the number of data interaction times with a hard disk;
calculating the quotient of the data interaction times and the duration to obtain a demand index;
presetting a plurality of demand levels and demand index ranges corresponding to the demand levels, and determining the demand levels of a business scene based on the demand index ranges to which the demand indexes belong;
the acquisition frequency corresponding to each demand level is preset, and the hard disk performance data acquisition frequency matched with the service scene binding is set according to the demand level of the service scene.
In an alternative embodiment, the monitoring the actual service scene of the server, obtaining the target acquisition frequency matched with the actual service scene includes:
monitoring a task queue of a server, and extracting a task type from the task queue;
acquiring a matching service scene of the task type;
and outputting the matched service scene as an actual service scene.
In an optional implementation manner, obtaining the matching service scenario of the task type includes:
counting task types and task quantity duty ratios corresponding to the task types in a service scene, and storing the task types and the task quantity duty ratios as standard parameters of the service scene;
counting the actual task types and the actual number of tasks in the task queue of the server, and converting the actual task types and the actual number of tasks into feature vectors;
and calculating the similarity between the feature vector and the standard parameters of the service scene, and screening the service scene with the highest similarity as a matched service scene.
In an alternative embodiment, invoking the hard disk performance data collection script to periodically collect hard disk performance data according to the target collection frequency includes:
periodically collecting the occupied resource ratio of the server according to the target collection frequency;
judging whether the occupied ratio of the used resources reaches a set threshold value:
if yes, skipping the current hard disk performance data acquisition task, and generating delayed acquisition prompt information;
and if not, calling a hard disk performance acquisition script to acquire the hard disk read-write parameters, RAID array parameters, hard disk SMART information and network parameters.
In an alternative embodiment, after generating the delayed acquisition prompt, the method further comprises:
counting the number of the delayed acquisition prompt messages, and converting the number of the delayed acquisition prompt messages into frequency coefficients by using a preset conversion ratio, wherein the frequency coefficients are smaller than 1;
and calculating the product of the target acquisition frequency and the frequency coefficient, and taking the product as a new target acquisition frequency.
In an alternative embodiment, the abnormality determination is performed on the hard disk performance data by using pre-stored standard performance data, and the obtaining is performed as abnormal data, including:
presetting standard hard disk read-write parameters, standard RAID array parameters, standard hard disk SMART information and standard network parameters;
caching the read-write parameters of the hard disk, RAID array parameters, hard disk SMART information and network parameters which are acquired each time as data to be processed;
judging whether each item of data to be processed is in a corresponding standard parameter range or not by using a circulation function, and outputting the data to be processed which is not in the standard parameter range as abnormal data;
and clearing the compared data to be processed.
In a second aspect, the present invention provides a dynamic monitoring system for hard disk performance, including:
the frequency setting module is used for setting matched hard disk performance data acquisition frequency for the service scene according to the requirement of the service scene on the hard disk performance;
the frequency matching module is used for monitoring the actual service scene of the server and acquiring the target acquisition frequency matched with the actual service scene;
the data acquisition module is used for calling a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency;
and the abnormality judgment module is used for carrying out abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data to acquire abnormal data.
In an alternative embodiment, the frequency setting module includes:
the scene statistics unit is used for counting the duration time of the service scene and the data interaction times with the hard disk;
the index calculation unit is used for calculating the quotient of the data interaction times and the duration to obtain a demand index;
the system comprises a level matching unit, a service scene processing unit and a service scene processing unit, wherein the level matching unit is used for presetting a plurality of demand levels and demand index ranges corresponding to the demand levels, and determining the demand levels of the service scene based on the demand index ranges to which the demand indexes belong;
the frequency binding unit is used for presetting the acquisition frequency corresponding to each demand level, and binding the matched hard disk performance data acquisition frequency for the service scene according to the demand level of the service scene.
In an alternative embodiment, the frequency matching module includes:
the queue monitoring unit is used for monitoring a task queue of the server and extracting task types from the task queue;
the scene matching unit is used for acquiring a matching service scene of the task type;
and the scene output unit is used for outputting the matched service scene as an actual service scene.
In an alternative embodiment, the scene matching unit includes:
the task statistics unit is used for counting task types and task quantity duty ratios corresponding to the task types in the service scene and storing the task types and the task quantity duty ratios as standard parameters of the service scene;
the data conversion unit is used for counting the actual task types and the actual number proportion of various tasks in the task queue of the server and converting the actual task types and the actual number proportion of various tasks into feature vectors;
and the similarity calculation unit is used for calculating the similarity between the feature vector and the standard parameters of the service scene and screening the service scene with the highest similarity as a matched service scene.
In an alternative embodiment, the data acquisition module comprises:
the resource acquisition unit is used for periodically acquiring the occupied resource ratio of the server according to the target acquisition frequency;
a resource judging unit for judging whether the occupied ratio of the used resources reaches a set threshold value;
the acquisition delay unit is used for skipping the current hard disk performance data acquisition task and generating delay acquisition prompt information if the occupied resource proportion reaches a set threshold value;
and the acquisition execution unit is used for calling the hard disk performance acquisition script to acquire the hard disk read-write parameters, RAID array parameters, hard disk SMART information and network parameters if the occupied resource ratio does not reach the set threshold value.
Further, the data acquisition module further includes:
the information statistics unit is used for counting the number of the delayed acquisition prompt information and converting the number into a frequency coefficient by utilizing a preset conversion proportion, wherein the frequency coefficient is smaller than 1;
and the frequency adjusting unit is used for calculating the product of the target acquisition frequency and the frequency coefficient and taking the product as a new target acquisition frequency.
In an alternative embodiment, the anomaly determination module includes:
the standard setting unit is used for presetting standard hard disk read-write parameters, standard RAID array parameters, standard hard disk SMART information and standard network parameters;
the data caching unit is used for caching the read-write parameters of the hard disk, RAID array parameters, hard disk SMART information and network parameters which are acquired each time into data to be processed;
the data comparison unit is used for judging whether each item of data to be processed is in the corresponding standard parameter range or not by using the cyclic function, and outputting the data to be processed which is not in the standard parameter range as abnormal data;
and the data clearing unit is used for clearing the compared data to be processed.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal as described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
The method, the system, the terminal and the storage medium for dynamically monitoring the hard disk performance have the beneficial effects that the hard disk performance data acquisition frequency is set for different service scenes, and then the actual service scene of the server is monitored, so that the hard disk performance data acquisition frequency is timely adjusted according to the actual service scene of the server. The invention can flexibly update the hard disk performance monitoring frequency according to the service scene of the server, thereby avoiding the situations of resource waste or untimely hard disk performance monitoring.
According to the invention, the data interaction times of the CPU and the hard disk under various service scenes are counted, the demand index is calculated, the demands of the various service scenes on the hard disk are quantized, and then the corresponding acquisition frequency is designated. This approach is more accurate than manual assessment.
The invention monitors the task queue of the server, extracts data such as task type and duty ratio, and uses the data as the object of similarity calculation, and performs similarity calculation with corresponding data of each service scene, thereby finding out the corresponding service scene. The method can quickly identify the actual service scene of the server, so that the data acquisition frequency can be adjusted in time.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
Fig. 2 is another schematic flow chart of a method of one embodiment of the invention.
FIG. 3 is an exemplary graph of acquisition time for a method of one embodiment of the invention.
Fig. 4 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The following explains key terms appearing in the present invention.
BMC, execution server remote management controller, english name Baseboard Management controller. The method can perform firmware upgrade, check machine equipment and other operations on the machine in a state that the machine is not started. Fully implementing IPMI functionality in a BMC requires a powerful 16-bit or 32-bit microcontroller and RAM for data storage, flash memory for non-volatile data storage, and firmware to provide basic remote manageability in terms of secure remote reboot, secure re-power-up, LAN alerting, and system health monitoring. In addition to the basic IPMI and system operation monitoring functions, the mBMC can also enable BIOS flash element selection and protection by storing the previous BIOS using one of the 2 flash memories. For example, when the system fails to boot after a remote BIOS upgrade, the remote administrator may switch back to the previously-working BIOS image to boot the system. Once BIOS is upgraded, the BIOS image can be locked, so as to effectively prevent virus from invading it.
BIOS is an acronym of English "Basic Input Output System", and the Chinese name is "basic input output System" after being translated. On IBM PC compatible systems, is a industry standard firmware interface. The computer is a set of programs solidified on a ROM chip on a main board in the computer, which stores the most important programs of basic input and output, self-checking programs after starting up and system self-starting programs, and can read and write specific information of system settings from CMOS. Its main function is to provide the lowest, most direct hardware setup and control for the computer. In addition, the BIOS provides some system parameters to the operating system. The system hardware changes are hidden by the BIOS and the program uses the BIOS functions rather than directly controlling the hardware. Modern operating systems ignore the abstraction layer provided by the BIOS and directly control the hardware components.
A CPU central processing unit (central processing unit, abbreviated as CPU) is used as an operation and control core of the computer system, and is a final execution module for information processing and program running.
The method for dynamically monitoring the performance of the hard disk, provided by the embodiment of the invention, is executed by the computer equipment, and correspondingly, the system for dynamically monitoring the performance of the hard disk is operated in the computer equipment.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. The execution body of fig. 1 may be a dynamic monitoring system for performance of a hard disk. The order of the steps in the flow chart may be changed and some may be omitted according to different needs.
As shown in fig. 1, the method includes:
step 110, setting matched hard disk performance data acquisition frequency for the service scene according to the requirement of the service scene on the hard disk performance;
step 120, monitoring an actual service scene of a server, and acquiring a target acquisition frequency matched with the actual service scene;
step 130, calling a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency;
and 140, performing abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data to obtain abnormal data.
In order to facilitate understanding of the present invention, the method for dynamically monitoring the performance of a hard disk according to the present invention is further described below by combining the process of dynamically monitoring the performance of a hard disk in the embodiment.
Specifically, referring to fig. 2, the method for dynamically monitoring the performance of the hard disk includes:
s1, setting matched hard disk performance data acquisition frequency for a service scene according to the requirement of the service scene on the hard disk performance.
Counting the duration time of a service scene and the number of data interaction times with a hard disk; calculating the quotient of the data interaction times and the duration to obtain a demand index; presetting a plurality of demand levels and demand index ranges corresponding to the demand levels, and determining the demand levels of a business scene based on the demand index ranges to which the demand indexes belong; the acquisition frequency corresponding to each demand level is preset, and the hard disk performance data acquisition frequency matched with the service scene binding is set according to the demand level of the service scene.
For example, the server is set to continuously run for 1h under the first service scene, and the data interaction times of the CPU and the hard disk in 1h, namely the sum X of the data reading times and the data writing times, are recorded, so that the demand index of the first service scene is X. And then judging the index range to which X belongs according to a plurality of preset demand levels and the demand index ranges corresponding to the demand levels so as to find the demand level of the first business scene. And binding the matched hard disk performance data acquisition frequency for the service scene according to the preset acquisition frequency corresponding to each demand level and the demand level of the first service scene. And obtaining the corresponding acquisition frequencies of all the service scenes which the server can operate according to the method.
S2, monitoring an actual service scene of a server, and acquiring a target acquisition frequency matched with the actual service scene.
Monitoring a task queue of a server, and extracting a task type from the task queue; acquiring a matching service scene of the task type; and outputting the matched service scene as an actual service scene.
The scene matching method comprises the following steps: counting task types and task quantity duty ratios corresponding to the task types in a service scene, and storing the task types and the task quantity duty ratios as standard parameters of the service scene; counting the actual task types and the actual number of tasks in the task queue of the server, and converting the actual task types and the actual number of tasks into feature vectors; and calculating the similarity between the feature vector and the standard parameters of the service scene, and screening the service scene with the highest similarity as a matched service scene.
For example, the presence of a 30% data write task, a 30% data read task, and a task of 30% and 30% data transmission to a third party is monitored from the task queue of the server. The method for counting the task types and the corresponding task number proportion of the service scene in advance is operated for 1h under the service scene A, for example, all tasks executed by the server within 1h are counted, the task number proportion corresponding to all task types and each task type is analyzed, the task number proportion is sequenced from high to low, and the task types and the corresponding task number proportion of the first three are screened out. And saving the screened task types and the corresponding task quantity duty ratio as standard parameters of the service scene A. And respectively calculating the similarity between the current 30% data writing task, the 30% data reading task and the task of transmitting 30% data and 30% data to a third party and standard parameters of each service scene, and screening out the service scene with the highest similarity, namely the actual service scene of the server.
S3, calling a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency.
Periodically collecting the occupied resource ratio of the server according to the target collection frequency; judging whether the occupied ratio of the used resources reaches a set threshold value: if yes, skipping the current hard disk performance data acquisition task, and generating delayed acquisition prompt information; and if not, calling a hard disk performance acquisition script to acquire the hard disk read-write parameters, RAID array parameters, hard disk SMART information and network parameters.
Counting the number of the delayed acquisition prompt messages, and converting the number of the delayed acquisition prompt messages into frequency coefficients by using a preset conversion ratio, wherein the frequency coefficients are smaller than 1; and calculating the product of the target acquisition frequency and the frequency coefficient, and taking the product as a new target acquisition frequency.
When the system runs the service, the frequency of information acquisition also affects the running performance of the system, so the acquisition frequency needs to be controlled. Specifically, when the conversion ratio is set, a busy level may be preset, for example, 1 to 5 lines are first-level, 5 to 10 lines are second-level, more than 10 lines are third-level, the frequency coefficient corresponding to the first-level is 0.8, the frequency coefficient corresponding to the second-level is 0.6, the frequency coefficient corresponding to the third-level is 0.4, and the corresponding frequency coefficient is obtained according to the number of the actual delay acquisition prompt information. If the original acquisition frequency is 5 hours, the number of the prompt information strips is 2, and the new acquisition frequency is 4 hours, so that the data are acquired once.
In other embodiments of the present invention, a real-time collection manner may be adopted during the first week of system deployment, so as to quickly obtain the current system running state information as a reference standard. After one week of operation, 1 time per hour is adopted, 10 minutes of data are collected each time, and the cycle is performed every 6 hours, so that the system pressure generated by collecting information can be reduced, and all time periods can be covered.
The hard disk performance acquisition script gathers information from the server, including: IO read-write parameters of hard disk: the iostat reads the read-write parameters of the hard disk; CPU/memory usage: reading a pre-utilization top5 application by using a top instruction; RAID array parameters: if the array exists, reading array configuration parameters and error counting; hard disk SMART information: the smart tl reads hard disk smart information; BIOS parameters: reading energy-saving setting parameters; OS parameters: reading energy-saving setting parameters and service related parameters; network parameters: and reading a network delay setting parameter and a network card error count.
S4, performing abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data, and obtaining abnormal data.
Presetting standard hard disk read-write parameters, standard RAID array parameters, standard hard disk SMART information and standard network parameters; caching the read-write parameters of the hard disk, RAID array parameters, hard disk SMART information and network parameters which are acquired each time as data to be processed; judging whether each item of data to be processed is in a corresponding standard parameter range or not by using a circulation function, and outputting the data to be processed which is not in the standard parameter range as abnormal data; and clearing the compared data to be processed.
Specifically, the user inputs the preset value of the performance parameter in advance. And storing and archiving the acquired information and the processing result. Comparing the acquired information with a preset value to confirm whether the information is normal or not.
S5, parameter adjustment.
If abnormal data exists, namely when the IO read-write performance is abnormal, dynamically adjusting system parameters according to preset parameters, so that the IO read-write performance is kept at a normal level.
In some embodiments, the hard disk performance dynamic monitoring system 400 may include a plurality of functional modules consisting of computer program segments. The computer program of each program segment in the hard disk performance dynamic monitoring system 400 may be stored in a memory of a computer device and executed by at least one processor to perform the functions of hard disk performance dynamic monitoring (see fig. 1 for details).
In this embodiment, the hard disk performance dynamic monitoring system 400 may be divided into a plurality of functional modules according to the functions performed by the system, as shown in fig. 4. The functional module may include: a frequency setting module 410, a frequency matching module 420, a data acquisition module 430, and an anomaly determination module 440. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The frequency setting module 410 is configured to set a matched hard disk performance data acquisition frequency for the service scenario according to a requirement of the service scenario on the hard disk performance;
the frequency matching module 420 is configured to monitor an actual service scenario of a server, and acquire a target acquisition frequency matched with the actual service scenario;
the data acquisition module 430 is configured to call a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency;
the abnormality determination module 440 is configured to perform abnormality determination on the hard disk performance data by using pre-stored standard performance data, and obtain the hard disk performance data as abnormal data.
Optionally, as an embodiment of the present invention, the frequency setting module includes:
the scene statistics unit is used for counting the duration time of the service scene and the data interaction times with the hard disk;
the index calculation unit is used for calculating the quotient of the data interaction times and the duration to obtain a demand index;
the system comprises a level matching unit, a service scene processing unit and a service scene processing unit, wherein the level matching unit is used for presetting a plurality of demand levels and demand index ranges corresponding to the demand levels, and determining the demand levels of the service scene based on the demand index ranges to which the demand indexes belong;
the frequency binding unit is used for presetting the acquisition frequency corresponding to each demand level, and binding the matched hard disk performance data acquisition frequency for the service scene according to the demand level of the service scene.
Optionally, as an embodiment of the present invention, the frequency matching module includes:
the queue monitoring unit is used for monitoring a task queue of the server and extracting task types from the task queue;
the scene matching unit is used for acquiring a matching service scene of the task type;
and the scene output unit is used for outputting the matched service scene as an actual service scene.
Optionally, as an embodiment of the present invention, the scene matching unit includes:
the task statistics unit is used for counting task types and task quantity duty ratios corresponding to the task types in the service scene and storing the task types and the task quantity duty ratios as standard parameters of the service scene;
the data conversion unit is used for counting the actual task types and the actual number proportion of various tasks in the task queue of the server and converting the actual task types and the actual number proportion of various tasks into feature vectors;
and the similarity calculation unit is used for calculating the similarity between the feature vector and the standard parameters of the service scene and screening the service scene with the highest similarity as a matched service scene.
Optionally, as an embodiment of the present invention, the data acquisition module includes:
the resource acquisition unit is used for periodically acquiring the occupied resource ratio of the server according to the target acquisition frequency;
a resource judging unit for judging whether the occupied ratio of the used resources reaches a set threshold value;
the acquisition delay unit is used for skipping the current hard disk performance data acquisition task and generating delay acquisition prompt information if the occupied resource proportion reaches a set threshold value;
and the acquisition execution unit is used for calling the hard disk performance acquisition script to acquire the hard disk read-write parameters, RAID array parameters, hard disk SMART information and network parameters if the occupied resource ratio does not reach the set threshold value.
Optionally, as an embodiment of the present invention, the data acquisition module further includes:
the information statistics unit is used for counting the number of the delayed acquisition prompt information and converting the number into a frequency coefficient by utilizing a preset conversion proportion, wherein the frequency coefficient is smaller than 1;
and the frequency adjusting unit is used for calculating the product of the target acquisition frequency and the frequency coefficient and taking the product as a new target acquisition frequency.
Alternatively, as an embodiment of the present invention, the abnormality determination module includes:
the standard setting unit is used for presetting standard hard disk read-write parameters, standard RAID array parameters, standard hard disk SMART information and standard network parameters;
the data caching unit is used for caching the read-write parameters of the hard disk, RAID array parameters, hard disk SMART information and network parameters which are acquired each time into data to be processed;
the data comparison unit is used for judging whether each item of data to be processed is in the corresponding standard parameter range or not by using the cyclic function, and outputting the data to be processed which is not in the standard parameter range as abnormal data;
and the data clearing unit is used for clearing the compared data to be processed.
Fig. 5 is a schematic structural diagram of a terminal 500 according to an embodiment of the present invention, where the terminal 500 may be used for
The method for dynamically monitoring the performance of the hard disk provided by the embodiment of the invention is executed.
The terminal 500 may include: processor 510, memory 520, and communication module 530. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the invention, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
The memory 520 may be used to store instructions for execution by the processor 510, and the memory 520 may be implemented by any type of volatile or non-volatile memory terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The execution of the instructions in memory 520, when executed by processor 510, enables terminal 500 to perform some or all of the steps in the method embodiments described below.
The processor 510 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by running or executing software programs and/or modules stored in the memory 520, and invoking data stored in the memory. The processor may be comprised of an integrated circuit (Integrated Circuit, simply referred to as an IC), for example, a single packaged IC, or may be comprised of a plurality of packaged ICs connected to the same function or different functions. For example, the processor 510 may include only a central processing unit (Central Processing Unit, simply CPU). In the embodiment of the invention, the CPU can be a single operation core or can comprise multiple operation cores.
A communication module 530, configured to establish a communication channel, so that the storage terminal can communicate with other terminals. Receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium in which a program may be stored, which program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
Therefore, the invention sets the hard disk performance data acquisition frequency for different service scenes, and then monitors the actual service scene of the server, thereby adjusting the hard disk performance data acquisition frequency in time according to the actual service scene of the server. The invention can flexibly update the hard disk performance monitoring frequency according to the service scene of the server, thereby avoiding the condition of resource waste or untimely hard disk performance monitoring, and the technical effects achieved by the embodiment can be seen from the description above and are not repeated here.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium such as a U-disc, a mobile hard disc, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, including several instructions for causing a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with respect to each other may be through some interface, indirect coupling or communication connection of systems or modules, electrical, mechanical, or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for dynamically monitoring the performance of a hard disk is characterized by comprising the following steps:
setting matched hard disk performance data acquisition frequency for the service scene according to the requirement of the service scene on the hard disk performance;
monitoring an actual service scene of a server, and acquiring a target acquisition frequency matched with the actual service scene;
invoking a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency;
and carrying out abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data to obtain abnormal data.
2. The method of claim 1, wherein setting a matched hard disk performance data acquisition frequency for the service scenario according to a requirement of the service scenario for hard disk performance, comprises:
counting the duration time of a service scene and the number of data interaction times with a hard disk;
calculating the quotient of the data interaction times and the duration to obtain a demand index;
presetting a plurality of demand levels and demand index ranges corresponding to the demand levels, and determining the demand levels of a business scene based on the demand index ranges to which the demand indexes belong;
the acquisition frequency corresponding to each demand level is preset, and the hard disk performance data acquisition frequency matched with the service scene binding is set according to the demand level of the service scene.
3. The method according to claim 1 or 2, wherein monitoring a server actual traffic scenario, obtaining a target acquisition frequency matching the actual traffic scenario, comprises:
monitoring a task queue of a server, and extracting a task type from the task queue;
acquiring a matching service scene of the task type;
and outputting the matched service scene as an actual service scene.
4. A method according to claim 3, wherein obtaining a matching business scenario for the task type comprises:
counting task types and task quantity duty ratios corresponding to the task types in a service scene, and storing the task types and the task quantity duty ratios as standard parameters of the service scene;
counting the actual task types and the actual number of tasks in the task queue of the server, and converting the actual task types and the actual number of tasks into feature vectors;
and calculating the similarity between the feature vector and the standard parameters of the service scene, and screening the service scene with the highest similarity as a matched service scene.
5. The method of claim 1, wherein invoking a hard disk performance data collection script to periodically collect hard disk performance data according to the target collection frequency comprises:
periodically collecting the occupied resource ratio of the server according to the target collection frequency;
judging whether the occupied ratio of the used resources reaches a set threshold value:
if yes, skipping the current hard disk performance data acquisition task, and generating delayed acquisition prompt information;
and if not, calling a hard disk performance acquisition script to acquire the hard disk read-write parameters, RAID array parameters, hard disk SMART information and network parameters.
6. The method of claim 5, wherein after generating the delayed acquisition prompt, the method further comprises:
counting the number of the delayed acquisition prompt messages, and converting the number of the delayed acquisition prompt messages into frequency coefficients by using a preset conversion ratio, wherein the frequency coefficients are smaller than 1;
and calculating the product of the target acquisition frequency and the frequency coefficient, and taking the product as a new target acquisition frequency.
7. The method of claim 5, wherein performing anomaly determination on the hard disk performance data using pre-stored standard performance data to obtain as anomaly data, comprising:
presetting standard hard disk read-write parameters, standard RAID array parameters, standard hard disk SMART information and standard network parameters;
caching the read-write parameters of the hard disk, RAID array parameters, hard disk SMART information and network parameters which are acquired each time as data to be processed;
judging whether each item of data to be processed is in a corresponding standard parameter range or not by using a circulation function, and outputting the data to be processed which is not in the standard parameter range as abnormal data;
and clearing the compared data to be processed.
8. A hard disk performance dynamic monitoring system, comprising:
the frequency setting module is used for setting matched hard disk performance data acquisition frequency for the service scene according to the requirement of the service scene on the hard disk performance;
the frequency matching module is used for monitoring the actual service scene of the server and acquiring the target acquisition frequency matched with the actual service scene;
the data acquisition module is used for calling a hard disk performance data acquisition script to periodically acquire hard disk performance data according to the target acquisition frequency;
and the abnormality judgment module is used for carrying out abnormality judgment on the hard disk performance data by utilizing pre-stored standard performance data to acquire abnormal data.
9. A terminal, comprising:
the memory is used for storing a hard disk performance dynamic monitoring program;
a processor for implementing the steps of the method for dynamically monitoring the performance of a hard disk according to any one of claims 1 to 7 when executing the program for dynamically monitoring the performance of the hard disk.
10. A computer readable storage medium storing a computer program, characterized in that the readable storage medium stores thereon a hard disk performance dynamic monitoring program, which when executed by a processor, implements the steps of the hard disk performance dynamic monitoring method according to any one of claims 1-7.
CN202310721131.8A 2023-06-16 2023-06-16 Dynamic monitoring method, system, terminal and storage medium for hard disk performance Pending CN116680151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310721131.8A CN116680151A (en) 2023-06-16 2023-06-16 Dynamic monitoring method, system, terminal and storage medium for hard disk performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310721131.8A CN116680151A (en) 2023-06-16 2023-06-16 Dynamic monitoring method, system, terminal and storage medium for hard disk performance

Publications (1)

Publication Number Publication Date
CN116680151A true CN116680151A (en) 2023-09-01

Family

ID=87788896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310721131.8A Pending CN116680151A (en) 2023-06-16 2023-06-16 Dynamic monitoring method, system, terminal and storage medium for hard disk performance

Country Status (1)

Country Link
CN (1) CN116680151A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971607A (en) * 2024-03-29 2024-05-03 苏州元脑智能科技有限公司 Hard disk monitoring method, device, equipment and medium
CN117971607B (en) * 2024-03-29 2024-06-28 苏州元脑智能科技有限公司 Hard disk monitoring method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971607A (en) * 2024-03-29 2024-05-03 苏州元脑智能科技有限公司 Hard disk monitoring method, device, equipment and medium
CN117971607B (en) * 2024-03-29 2024-06-28 苏州元脑智能科技有限公司 Hard disk monitoring method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN108683720B (en) Container cluster service configuration method and device
CN109271411B (en) Report generation method, report generation device, computer equipment and storage medium
CN108804299B (en) Application program exception handling method and device
CN109271359B (en) Log information processing method and device, electronic equipment and readable storage medium
US10509689B2 (en) Method for processing application and terminal
CN109542744A (en) Detect method, apparatus, storage medium and the terminal of terminal booting abnormal problem
CN103023984A (en) Terminal application server and application log filtering method thereof
CN110941530B (en) Method, device, computer equipment and storage medium for acquiring monitoring data
CN108509322B (en) Method for avoiding excessive return visit, electronic device and computer readable storage medium
CN109918221B (en) Hard disk error reporting analysis method, system, terminal and storage medium
CN113076231A (en) Server application scene setting method, system, terminal and storage medium
CN110532150B (en) Case management method and device, storage medium and processor
US11334436B2 (en) GPU-based advanced memory diagnostics over dynamic memory regions for faster and efficient diagnostics
CN110347546B (en) Dynamic adjustment method, device, medium and electronic equipment for monitoring task
CN109558300B (en) Whole cabinet alarm processing method and device, terminal and storage medium
CN116680151A (en) Dynamic monitoring method, system, terminal and storage medium for hard disk performance
CN116361106A (en) Log processing method and device, electronic equipment and storage medium
CN112712610B (en) Vehicle diagnosis log processing method and device, terminal equipment and readable storage medium
CN108459940B (en) Configuration information modification method and device of application performance management system and electronic equipment
CN113239251A (en) Processing method of buried point data, related device and storage medium
CN111797406A (en) Medical fund data analysis processing method and device and readable storage medium
CN110058866B (en) Cluster component installation method and device
CN111694713B (en) Application operation optimization method and device and computer readable storage medium
CN110968397B (en) Analysis method and device for virtual machine capacity management
CN116932297A (en) CPU performance power consumption ratio test method, system, terminal and storage medium

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