CN117971607B - Hard disk monitoring method, device, equipment and medium - Google Patents
Hard disk monitoring method, device, equipment and medium Download PDFInfo
- Publication number
- CN117971607B CN117971607B CN202410381974.2A CN202410381974A CN117971607B CN 117971607 B CN117971607 B CN 117971607B CN 202410381974 A CN202410381974 A CN 202410381974A CN 117971607 B CN117971607 B CN 117971607B
- Authority
- CN
- China
- Prior art keywords
- hard disk
- target
- current
- value
- management controller
- 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
- 238000012544 monitoring process Methods 0.000 title claims abstract description 144
- 238000000034 method Methods 0.000 title claims abstract description 73
- 230000006870 function Effects 0.000 claims description 38
- 238000004364 calculation method Methods 0.000 claims description 28
- 238000012795 verification Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 16
- 230000008569 process Effects 0.000 claims description 8
- 238000012216 screening Methods 0.000 claims description 6
- 238000012806 monitoring device Methods 0.000 claims description 4
- 238000007726 management method Methods 0.000 description 201
- 238000012545 processing Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 8
- 238000004519 manufacturing process Methods 0.000 description 8
- 239000007787 solid Substances 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 239000000758 substrate Substances 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000036541 health Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 239000013078 crystal Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 239000003990 capacitor Substances 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3037—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a hard disk monitoring method, a device, equipment and a medium, which relate to the technical field of hard disk monitoring and are applied to a hard disk monitoring controller and comprise the following steps: acquiring a current output signal of a monitored hard disk, and determining a target clock count value obtained after a local clock counts the current output signal; the current output signal is a signal obtained by modulating the output signal of the hard disk pin by the monitored hard disk by using the current hard disk log data; determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain current hard disk log data; and monitoring the monitored hard disk based on the current hard disk log data. The application can ensure that different hard disk monitoring controllers can accurately identify the level duration of the output signal of the monitored hard disk so as to further accurately demodulate and obtain the hard disk log data, thereby improving the reliability of hard disk monitoring.
Description
Technical Field
The present invention relates to the field of hard disk monitoring technologies, and in particular, to a method, an apparatus, a device, and a medium for hard disk monitoring.
Background
With more and more data stored in data centers, conventional hard disks still carry large amounts of data, and the capacity of single drives grows at average speeds of more than 10% per year, so the availability of hard disks increasingly affects data security. The probability of hard disk transmission failure is more than 50% of single server failure, and the data center has to sacrifice hard disk performance and time to continuously recover data.
In order to reduce the occurrence rate of such faults, different hard disk suppliers record health information related to the hard disk in a log form, and output log data to a hard disk monitoring controller through a hard disk pin for subsequent analysis. However, the server is relatively lack of health monitoring means of the hard disk at present, and meanwhile, due to different resources such as internal clocks of different hard disk monitoring controllers, deviation can occur in data identification of the same output signal of the hard disk after the hard disk monitoring controllers are replaced, so that accuracy of data identification is reduced, and reliability of hard disk monitoring is low.
Therefore, how to accurately and stably identify log data output by a monitored hard disk by different hard disk monitoring controllers in the hard disk monitoring process so as to improve the reliability of hard disk monitoring is a problem to be solved at present.
Disclosure of Invention
Therefore, the invention aims to provide a method, a device, equipment and a medium for monitoring a hard disk, which can enable different hard disk monitoring controllers to accurately and stably identify log data output by a monitored hard disk, and improve the reliability of hard disk monitoring. The specific scheme is as follows:
In a first aspect, the present application discloses a method for monitoring a hard disk, which is applied to a hard disk monitoring controller, and includes:
Acquiring a current output signal of a monitored hard disk, and determining a target clock count value obtained after a local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data;
Determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data;
and monitoring the monitored hard disk based on the current hard disk log data.
Optionally, the determining, based on the target clock count value, the local clock frequency, and a predetermined target clock count deviation, a target level duration corresponding to the current output signal includes:
Inputting the target clock count value, the local clock frequency and the predetermined target clock count deviation into a preset level duration calculation formula to obtain a target level duration corresponding to the current output signal; the preset level duration calculation formula is as follows:
T=1/f×(n+α);
Wherein T is the target level duration, f is the local clock frequency, n is the target clock count value, and α is the target clock count deviation.
Optionally, after determining the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, the method further includes:
Acquiring a corresponding relation between preset level duration and an expression value, and determining a level duration range corresponding to each expression value based on the corresponding relation;
judging whether the target level duration is within any level duration range;
And if the target level duration is not in any level duration range, discarding the target level duration, and if the target level duration is in any level duration range, executing the step of demodulating the current output signal based on the target level duration to obtain the current hard disk log data.
Optionally, the determining, based on the correspondence, a level duration range corresponding to each of the expression values includes:
Acquiring a preset first proportional coefficient and a preset second proportional coefficient;
and calculating the level duration corresponding to each expression value based on the first proportionality coefficient and the second proportionality coefficient so as to obtain a level duration range corresponding to each expression value.
Optionally, the determining process of the target clock count deviation includes:
after power-on, a target instruction for starting a hard disk verification function is sent to the monitored hard disk;
Acquiring a preset number of hard disk pin signals which are used for representing a target value and are sent by the monitored hard disk after the hard disk verification function is started, and counting actual clock count values obtained after the local clock counts all the hard disk pin signals;
and calculating the target clock count deviation based on all the actual clock count values.
Optionally, the calculating the target clock count deviation based on all the actual clock count values includes:
determining a corresponding first count average value and standard deviation based on all the actual clock count values;
determining a target counting range based on the first counting mean value and the standard deviation, and screening target actual clock counting values in the target counting range from all the actual clock counting values;
And calculating an average value of all the target actual clock count values to determine a corresponding second count average value, and acquiring a theoretical clock count value of a hard disk pin signal for representing the target value so as to calculate the target clock count deviation based on the second count average value and the theoretical clock count value.
Optionally, the number of the number types of the target number is one;
Correspondingly, the calculating the target clock count deviation based on the second count average and the theoretical clock count value includes:
And taking the difference value between the second counting average value and the theoretical clock counting value as the target clock counting deviation.
Optionally, the number of the number types of the target number is a plurality;
Correspondingly, the calculating the target clock count deviation based on the second count average and the theoretical clock count value includes:
Taking the corresponding difference value between the second count average value and the theoretical clock count value as the clock count deviation of the local clock pair for representing the hard disk pin signals of the target value of the same value type aiming at the target value of the same value type;
and carrying out average value calculation on clock count deviations corresponding to different target values, and taking an average value calculation result as the target clock count deviation.
Optionally, the hard disk monitoring controller is a complex programmable logic device, and the complex programmable logic device is connected with the baseboard management controller through a target bus;
correspondingly, the sending the target instruction for starting the hard disk verification function to the monitored hard disk includes:
after the baseboard management controller is electrified, responding to a serial number acquisition request sent by the baseboard management controller so as to send local serial number information to the baseboard management controller;
And if the baseboard management controller determines that the complex programmable logic device is currently used for the first time based on the local serial number information, acquiring a target instruction which is sent by the baseboard management controller and used for starting a hard disk verification function, and sending the target instruction to the monitored hard disk.
Optionally, the hard disk monitoring controller is a baseboard management controller;
Correspondingly, the monitoring the monitored hard disk based on the current hard disk log data comprises the following steps:
displaying the current hard disk log data on a target interface;
And determining a corresponding preset threshold condition based on the type of the current hard disk log data, judging whether the current hard disk log data meets the preset threshold condition, and if not, sending out an early warning prompt.
Optionally, the hard disk monitoring controller is a complex programmable logic device, and the complex programmable logic device is connected with the baseboard management controller through a target bus;
Correspondingly, the monitoring the monitored hard disk based on the current hard disk log data comprises the following steps:
storing the current hard disk log data to a local first register;
When a data polling request sent by the baseboard management controller through the target bus is obtained, the current hard disk log data stored in the first register is sent to the baseboard management controller, so that the baseboard management controller displays the current hard disk log data on a target interface, and an early warning prompt is sent when the current hard disk log data does not meet a preset threshold condition; the preset threshold condition is a threshold condition corresponding to the type of the current hard disk log data.
Optionally, when the current time is consistent with a preset time stamp, the baseboard management controller sends a data polling request to the complex programmable logic device through the target bus;
correspondingly, when the data polling request sent by the baseboard management controller through the target bus is obtained, the process of sending the current hard disk log data stored in the first register to the baseboard management controller further includes:
If the data polling request sent by the baseboard management controller is not obtained at the current moment, opening up a target cache space, and storing the current hard disk log data stored in the first register into the target cache space;
Clearing the current hard disk log data stored in the first register so as to continuously acquire and store new hard disk log data output by the monitored hard disk by using the first register;
And when the next data polling request sent by the baseboard management controller is obtained, sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller, and clearing the target cache space.
Optionally, the memory size of the target cache space dynamically changes based on the current number of hard disks and the number of times the baseboard management controller continuously does not send the data polling request.
Optionally, the memory size of the target cache space is lower than the available memory capacity of the complex programmable logic device; the available memory capacity is the difference between the total memory value of the complex programmable logic device and the memory occupied by the local register.
Optionally, the local register includes the first register, a second register storing a target state value for characterizing whether data in the first register was read by the baseboard management controller at a previous time, a third register storing a hard disk configuration parameter, and a fourth register storing a code file; the hard disk configuration parameters comprise the target clock count deviation, the total memory value, the available memory capacity, the occupied memory of the local register and the current hard disk number.
Optionally, the method further comprises:
After the baseboard management controller is powered on, the hard disk configuration parameters stored in the third register are sent to the baseboard management controller, so that the baseboard management controller can determine the current available memory capacity based on the hard disk configuration parameters;
and acquiring the current available memory capacity sent by the baseboard management controller, and updating the local available memory capacity by utilizing the current available memory capacity.
Optionally, the method further comprises:
And if the data in the first register is not read by the baseboard management controller at the last moment, setting the target state value as a second preset value and writing the second preset value into the second register.
Optionally, the method, when obtaining the data polling request sent by the baseboard management controller through the target bus, sends the current hard disk log data stored in the first register to the baseboard management controller, includes:
When a data polling request sent by the baseboard management controller through the target bus is acquired, determining the current value of the target state value in the second register;
if the current value is the first preset value, the current hard disk log data stored in the first register is sent to the baseboard management controller;
and if the current value is the second preset value, transmitting all hard disk log data stored in the first register and the target cache space to the baseboard management controller.
Optionally, after sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller if the current value is the second preset value, the method further includes:
and setting the current value of the target state value as the first preset value.
In a second aspect, the present application discloses a hard disk monitoring device, applied to a hard disk monitoring controller, comprising:
The clock counting module is used for acquiring a current output signal of the monitored hard disk and determining a target clock count value obtained after the local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data;
The level duration identification module is used for determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation;
The data demodulation module is used for demodulating the current output signal based on the target level duration to obtain the current hard disk log data;
and the monitoring module is used for monitoring the monitored hard disk based on the current hard disk log data.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and a processor for executing the computer program to implement the steps of the hard disk monitoring method disclosed above.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the hard disk monitoring method disclosed above.
The application can be seen that the current output signal of the monitored hard disk is obtained through the hard disk monitoring controller, and the target clock count value obtained after the local clock counts the current output signal is determined; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data; determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data; and monitoring the monitored hard disk based on the current hard disk log data.
The application has the beneficial effects that: after the current output signal of the monitored hard disk is obtained by the hard disk monitoring controller, the current output signal is counted by utilizing the local clock to determine a corresponding target clock count value; the current output signal is a signal obtained by modulating the output signal of the hard disk pin by the monitored hard disk by using the current hard disk log data, namely the current output signal carries the current hard disk log data, the monitored hard disk converts the current hard disk log data into an electric signal in a data modulation mode, and then the electric signal is output to the hard disk monitoring controller by the hard disk pin. Furthermore, the application can accurately identify the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and the target clock count deviation due to the target clock count deviation of the local clock, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data. Because the values represented by different level durations are different, the level durations can be accurately identified by the hard disk monitoring controller in the mode, so that log data output by the monitored hard disk can be accurately and stably identified, the monitored hard disk can be monitored by the hard disk monitoring controller based on the current hard disk log data, and the reliability of hard disk monitoring is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for monitoring a hard disk according to the present application;
FIG. 2 is a schematic diagram of a conventional hard disk out-of-band monitoring system according to the present application;
FIG. 3 is a flow chart of a method for determining a target clock count bias according to the present disclosure;
FIG. 4 is a flowchart of a specific method for monitoring a hard disk according to the present application;
FIG. 5 is a schematic diagram of a hard disk monitoring system according to the present application;
FIG. 6 is a schematic diagram of a hard disk monitoring device according to the present application;
Fig. 7 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The server is lack of health monitoring means of the hard disk at present, meanwhile, due to different resources such as internal clocks of different hard disk monitoring controllers, deviation can occur in data identification of the same output signal of the hard disk after the hard disk monitoring controllers are replaced, so that accuracy of data identification is reduced, and reliability of hard disk monitoring is low. Therefore, the embodiment of the application discloses a method, a device, equipment and a medium for monitoring a hard disk, which can enable different hard disk monitoring controllers to accurately and stably identify log data output by a monitored hard disk, and improve the reliability of hard disk monitoring.
Referring to fig. 1, an embodiment of the application discloses a hard disk monitoring method, which is applied to a hard disk monitoring controller, and comprises the following steps:
Step S11: acquiring a current output signal of a monitored hard disk, and determining a target clock count value obtained after a local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data.
In this embodiment, a current output signal of the monitored hard disk is obtained, where the current output signal is a signal obtained after the monitored hard disk modulates a hard disk pin output signal with current hard disk log data. It can be understood that the monitored hard disk can convert the current hard disk log data into level signals according to the data modulation method and then output the level signals through the hard disk pins, and the hard disk monitoring controller receives the current output signals of the monitored hard disk and counts the current output signals by using the local clock, so as to identify the level duration of the high level and the low level in the current output signals and demodulate the level duration to obtain the hard disk log data. Therefore, the present application needs to further determine the target clock count value obtained after the local clock counts the current output signal.
It should be noted that the hard disk monitor controller may be a baseboard management controller (Baseboard Management Controller, BMC) and a complex programmable logic device (Complex Programmable Logic Device, CPLD) which are involved in the out-of-band monitor scheme, or may be a central processor (Central Processing Unit, CPU) which is involved in the in-band monitor scheme. That is, since the baseboard management controller, the complex programmable logic device and the central processing unit all involve internal clocks, the scheme is applicable as long as the supervisory control controller for counting the level signals is involved.
Step S12: and determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data.
In this embodiment, since the target clock count deviation of the local clock is predetermined, the target level duration corresponding to the current output signal can be accurately identified based on the target clock count value, the local clock frequency and the target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data.
In a specific embodiment, the determining, based on the target clock count value, the local clock frequency, and a predetermined target clock count deviation, the target level duration corresponding to the current output signal includes: inputting the target clock count value, the local clock frequency and the predetermined target clock count deviation into a preset level duration calculation formula to obtain a target level duration corresponding to the current output signal; the preset level duration calculation formula is as follows:
T=1/f×(n+α);
Wherein T is the target level duration, f is the local clock frequency, n is the target clock count value, and α is the target clock count deviation.
The embodiment of the application discloses a preset level duration calculation formula, wherein the target clock counting deviation is determined in advance, the local clock frequency is a known parameter, and the monitored hard disk counts the signal through the local clock of the hard disk monitoring controller after outputting the signal every time, and the corresponding level duration can be accurately identified by substituting the counted value into the formula.
Further, after determining the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and the predetermined target clock count deviation, the method further includes: acquiring a corresponding relation between preset level duration and an expression value, and determining a level duration range corresponding to each expression value based on the corresponding relation; judging whether the target level duration is within any level duration range; and if the target level duration is not in any level duration range, discarding the target level duration, and if the target level duration is in any level duration range, executing the step of demodulating the current output signal based on the target level duration to obtain the current hard disk log data. It can be appreciated that the present embodiment may also implement preliminary filtering of the output signal to filter out the level duration in the abnormal range, thereby reducing unnecessary data demodulation steps. Specifically, firstly, a preset corresponding relation between the level duration and the expression value is obtained, and it can be understood that the hard disk can represent 0x1-0xF by different high and low level durations, and the corresponding relation between the level duration and the expression value can be shown in table 1, for example:
TABLE 1
Further, determining a level duration range corresponding to each expression value based on the corresponding relation shown in table 1, and judging whether the target level duration is within any level duration range after identifying the target level duration of the current output signal; if the target level duration is not within any level duration range, discarding the target level duration, and if the target level duration is within any level duration range, executing the step of data demodulation.
In a specific embodiment, the determining the level duration range corresponding to each of the expression values based on the correspondence relationship includes: acquiring a preset first proportional coefficient and a preset second proportional coefficient; and calculating the level duration corresponding to each expression value based on the first proportionality coefficient and the second proportionality coefficient so as to obtain a level duration range corresponding to each expression value. It can be understood that, in this embodiment, the level duration range corresponding to each expression value is determined by the preset first scaling factor p and the preset second scaling factor q, specifically denoted by [ p×t i,q×Ti ], where i has a value of NULL and 0x1-0xf in table 1, and T i has a value of 0.1 and 1 to 16, so that 17 level duration ranges can be obtained, and if the target level duration does not belong to any one of the 17 level duration ranges, the level duration information recorded in this time is discarded.
Wherein p is a value not greater than 1, q is a value not less than 1, and the user can change the values of p and q, for example, p can be set to 0.75 and q can be set to 1.2 according to specific conditions, and specific formulas are as follows:
Tx=1/f×(nx+α)∈[0.75×Ti,1.25×Ti];
Wherein T x is the level length calculated by the hard disk output x-th level, and n x is the clock count value of the local clock to the signal when the hard disk output x-th level.
Step S13: and monitoring the monitored hard disk based on the current hard disk log data.
In this embodiment, the hard disk monitoring controller monitors the monitored hard disk based on the current hard disk log data obtained by demodulation. In a specific embodiment, the hard disk monitoring controller is a baseboard management controller; correspondingly, the monitoring the monitored hard disk based on the current hard disk log data comprises the following steps: displaying the current hard disk log data on a target interface; and determining a corresponding preset threshold condition based on the type of the current hard disk log data, judging whether the current hard disk log data meets the preset threshold condition, and if not, sending out an early warning prompt. That is, when the hard disk monitoring controller is a baseboard management controller, that is, the baseboard management controller is directly connected with the monitored hard disk to monitor the monitored hard disk in an out-of-band manner, after the baseboard management controller demodulates the hard disk log data, the baseboard management controller directly displays the hard disk log data on a target interface of the baseboard management controller, and determines corresponding preset threshold conditions based on the types of the hard disk log data, wherein the hard disk state information to be monitored comprises temperature, number of bad tracks, cumulative number of errors and the like, and the threshold conditions corresponding to the different types of state information are inconsistent.
It should be noted that, in the present application, the baseboard management controller can perform out-of-band monitoring by directly connecting the monitored hard disk through the signal line, in addition to communicating with the hard disk expansion card connected to the hard disk to obtain the hard disk log data. It can be understood that in the related hard disk monitoring scheme, the hard disk can only be connected with the hard disk expansion card through a specified data pin to output hard disk log data to the baseboard management controller, and if the hard disk is not connected with the hard disk expansion card, the baseboard management controller cannot realize out-of-band monitoring of the hard disk.
For ease of understanding, the description will first be made of the content related to the hard disk out-of-band monitoring scheme.
Out-of-band management means that network management is realized through a special network management channel, network management data and service data are separated, and an independent channel is established for the network management data. In the channel, only the management data is transmitted, and the network management data is separated from the service data, so that the efficiency and the reliability of the network management can be improved, and the safety of the network management data can be improved. After deployment, the server provides out-of-band management and monitoring functions through a baseboard management controller (baseboard management controller, BMC).
The baseboard management controller is one of the important devices of the out-of-band management system. The baseboard management controller is a specialized service processor that uses sensors to monitor the status of a computer, web server, or other hardware driven device and communicates with the system administrator of the device via separate connection lines. In actual use, the baseboard management controller is typically mounted on a motherboard or main circuit board of a monitored device, and the baseboard management controller's sensors are used to measure internal physical variables such as: temperature, humidity, power supply voltage, fan speed, communication parameters, operating System (OS) functions, and the like. If any of these variables is outside the limits established, the baseboard management controller will notify the system administrator. The baseboard management controller may provide a network (web) service, which has a network communication function and provides a web page to display a monitoring interface, and an operator may obtain monitoring data of the baseboard management controller by connecting the baseboard management controller of the monitored device through a network cable on a site of the device, or connecting the baseboard management controllers of a plurality of monitored devices through a network in a data center.
Due to the limited performance and pin count of baseboard management controllers, complex programmable logic devices (Complex Programmable logic device, CPLD) are often built into baseboard management controller systems to share the performance pressure of baseboard management controllers and to provide more pins to connect sensors or monitored components as the number of components and items to be monitored increases. The complex programmable logic device is mainly composed of three parts, namely a logic block, a programmable interconnection channel and an input/output block (I/O block). A logic block of a complex programmable logic device typically includes 4-20 macro-cells, each macro-cell typically consisting of an array of product terms, product term assignments, and programmable registers. Each macro unit has a plurality of configuration modes, and each macro unit can be used in cascade connection, so that more complex combinational logic and sequential logic functions can be realized. For complex programmable logic devices with higher integration levels, embedded array blocks with on-chip random access Memory (Random Access Memory, RAM)/Read-Only Memory (ROM) are also typically provided. The programmable interconnect channels mainly provide an interconnect network between logic blocks, macro cells, and input/output pins. An input/output block (I/O block) provides an interface between internal logic to the device I/O pins.
The hard disk is an important component of the server and is an important object of out-of-band monitoring management. According to the type of communication interface, the serial connection small computer system interface (SERIAL ATTACHED SCSI, hereinafter abbreviated as SAS)/serial advanced technology attachment (SERIAL ADVANCED Technology Attachment, hereinafter abbreviated as SATA) interface hard disk and the nonvolatile memory host controller interface (Non Volatile Memory Host Controller Interface Specification, NVMHCIS or NVM Express, hereinafter abbreviated as NVMe) interface hard disk are mainly classified. Wherein the SAS interface is compatible with the SATA interface. According to the type of storage medium, the hard disk is mainly divided into a mechanical hard disk (HARD DISK DRIVE, HDD) and a Solid state disk (Solid STATE DISK or Solid STATE DRIVE, SSD). The mechanical hard disk is mainly an SAS interface or an SATA interface. The solid state disk comprises a SAS interface, a SATA interface and an NVMe interface hard disk.
As shown in fig. 2, if the baseboard management controller wants to obtain the hard disk log data, the hard disk expansion card can be accessed through an integrated circuit bus (Inter-INTEGRATED CIRCUIT, IIC or I2C) for the hard disk connected to the hard disk expansion card, the baseboard management controller runs monitoring software to send a pass-through command to the hard disk expansion card, the hard disk expansion card can forward the pass-through command to the hard disk, the hard disk sends corresponding hard disk log data to the hard disk expansion card after responding to the pass-through command, and the hard disk expansion card forwards the hard disk log data to the baseboard management controller. In addition, the NVMe interface hard disk can be directly connected with the central processor through the high-speed serial computer expansion bus, and one path of integrated circuit bus can be provided to the baseboard management controller through the high-speed serial computer expansion bus between the hard disk and the central processor, so that the functions of forwarding commands and hard disk log data for the baseboard management controller, such as a hard disk expansion card, can be realized, and the out-of-band monitoring of the hard disk can be realized.
It can be seen that in the current server monitoring architecture, service data of the device cannot be displayed to the outside due to confidentiality, that is, an operation and maintenance person has no authority to access in-band data to obtain hard disk log data which can be read by a central processor, and a baseboard management controller for implementing out-of-band monitoring cannot directly access the hard disk data, so that the out-of-band monitoring function of the hard disk is limited, so that the out-of-band monitoring party cannot timely and accurately obtain the running state of the hard disk, and further the storage reliability of the hard disk faces a threat.
Because there is no data path between the baseboard management controller and the hard disk without passing through the integrated circuit bus interface, the out-of-band monitoring of the hard disk can only be realized by means of a hard disk expansion card supporting the receipt of the pass-through command through the integrated circuit bus interface or by providing a high-speed serial computer expansion bus of the integrated circuit bus interface, and the out-of-band monitoring of the hard disk without the condition, such as the hard disk under the advanced host controller interface controller, can not be realized.
Therefore, the application provides a specific out-of-band monitoring scheme aiming at the substrate management controller directly connected with the monitored hard disk, and the key point of realizing the technology is that the monitored hard disk needs to provide a hard disk pin which can be directly accessed by the substrate management controller to output hard disk log data.
Pins of a hard disk are mainly divided into three types: data pins, power pins, and hard disk status pins. The data pin of the hard disk is connected with the in-band system, and the power pin of the hard disk is used for connecting a power supply and a ground signal. Therefore, the baseboard management controller has direct access to the hard disk status pins of the hard disk only.
The hard disk state pins of the hard disk mainly comprise a hard disk state indication pin, a hard disk production debugging pin and a hard disk idle pin.
The hard disk state indication pins include a hard disk bit state indication pin (p 10 pin), a hard disk read-write state indication pin, and the like (p 11 pin). The hard disk state indication pin is a pin for outputting a hard disk state indication signal, for example, the hard disk in-place state indication pin is used for outputting a hard disk in-place state signal, and the hard disk read-write state indication pin is used for outputting a hard disk read-write state signal. When the hard disk is connected to the hard disk backboard, the hard disk status indication pin mainly has two connection modes, one is connected to the baseboard management controller to inform the baseboard management controller of corresponding hard disk status data, and the other is connected to a control circuit on the hard disk backboard to control the status of corresponding controlled elements so that a user can learn the status of the corresponding hard disk. For example, a hard disk status indicator is provided on the hard disk backboard to indicate the hard disk operation status. If the hard disk is in the read-write state, the hard disk read-write state indicating pin can be controlled to output square wave signals to the amplifying driving circuit of the hard disk read-write state indicating lamp so as to control the hard disk read-write state indicating lamp to be on, and if the hard disk is not in the read-write state (idle state), the hard disk read-write state indicating pin is controlled to output a constant level signal (such as a constant high level signal) so as to enable the hard disk read-write state indicating lamp to be off to indicate that the hard disk read-write state indicating lamp is in the idle state, so that a user can know whether the hard disk is in the read-write state or not by watching the on-off of the hard disk read-write state indicating lamp. The hard disk shows the same based on the state of the hard disk bit state indication pin. Or the hard disk can also output two different constant level signals (one high and one low) through the hard disk state indicating pins to indicate different states, and the signals can be input to the baseboard management controller so as to trigger corresponding recording, processing or control.
The hard disk production debugging pins are mainly pins (debug pins) of the hard disk of the SAS or SATA interface beside the SAS or SATA interface, and are usually used in the production debugging stage of the hard disk, and in the actual use of the hard disk, the production debugging pins can be used for outputting guide information in the hard disk initialization stage.
And the NVMe interface hard disk comprises a hard disk idle pin besides the hard disk state indication pin. At present, three connectors, namely an M.2 connector, a U.2 connector and a CEM connector, are mainly adopted for the NVMe interface hard disk. The NVMe interface of the M.2 connector is used for connecting different types of devices, wherein Key B and Key M can be used for connecting a solid state disk. When the NVMe interface of M.2 specification is connected with the solid state disk of the SATA interface, the definition of the P10 pin is the same as that of the P11 pin of the SAS or SATA interface, and the P10 pin is a disk read-write state indication pin. When the NVMe interface of the m.2 specification is connected to the NVMe interface hard disk, the P10 pin is defined as an indicator light control pin. The NVMe interface of U.2 connector is completely compatible with SAS and SATA interfaces, and the P11 pin is also a hard disk read-write status indication pin. The P32 pin of the a-side of the NVMe interface of the CEM connector is an idle pin (Reserved pin), which is also a hard disk status pin other than a hard disk data pin, and there are also a plurality of idle pins at x8 (eight wire interface) and above.
The hard disk status pins are not pins for outputting data of the hard disk, do not have the risk of revealing user data stored in the hard disk, and are directly connected with the baseboard management controller or have the authority of being connected with the baseboard management controller after the hard disk is inserted into the hard disk backboard.
In the hard disk monitoring system provided by the embodiment of the invention, the hard disk status pins of the adopted hard disk may include at least one of a hard disk status indication pin, a hard disk production debugging pin and a hard disk idle pin.
In this embodiment, if hard disk status indication pins such as a hard disk in-place status indication pin and a hard disk read-write status indication pin are used, since these hard disk pins are usually already connected to General-purpose input/output (GPIO) pins of a baseboard management controller or input/output (I/O) pins of a complex programmable logic device, the hardware architecture can be directly used without changing the hardware architecture of a server, which is simple and convenient to implement.
The hard disk production debug pins (debug pins) on current devices are typically floating, typically comprising 4 pins. If the embodiment of the invention adopts the hard disk production debugging pin as the hard disk pin for outputting hard disk log data, the connector with corresponding number of pins can be adopted to connect the hard disk production debugging pin to the GPIO pin of the baseboard management controller or the I/O pin of the complex programmable logic device.
Since the idle pins of the hard disk are usually only in the interface of the hard disk of the NVMe (Non Volatile Memory Host Controller Interface Specification, NVMHCIS or NVM Express, nonvolatile memory host controller interface) interface, the high-speed signal cannot be suspended, and the idle pins of the hard disk in the NVMe interface are grounded through a resistor-capacitor circuit on the hard disk backboard after the hard disk is connected to the hard disk backboard. If the embodiment of the invention adopts the idle pin of the hard disk as the hard disk pin for outputting the hard disk log data, the connection relation between the idle pin of the hard disk and the hard disk backboard is changed into the connection relation between the idle pin of the hard disk and the GPIO pin of the baseboard management controller or the I/O pin of the complex programmable logic device.
Specifically, the monitored hard disk needs to modulate the initial output signal of the hard disk pin by using the hard disk log data, and then outputs the modulated signal, wherein the initial output signal represents the output signal corresponding to the original function of the hard disk pin, and for the idle pin of the hard disk, the initial output signal is the null signal. The signal modulation method specifically includes the following two modes: firstly, after the monitored hard disk converts hard disk log data into a level signal, the level signal is directly inserted into an initial output signal corresponding to a hard disk pin to obtain a modulated signal, and in the modulation mode, the modulated signal simultaneously carries the hard disk log data and the initial output signal; and the second method is that after the monitored hard disk converts the hard disk log data into a level signal, the level signal is inserted in a time period when the initial output signal corresponding to the hard disk pin is an invalid signal, so as to obtain a modulated signal, and the modulated signal carries the hard disk log data and the initial output signal in a time sharing way in the modulation mode. For the baseboard management controller, after the monitored hard disk outputs the modulated signal, the signal needs to be demodulated so as to accurately obtain the hard disk log data in the signal. However, considering that crystal oscillators of different baseboard management controllers may have inconsistent quality, an internal clock of the baseboard management controller needs to be calibrated, so that the internal clock can accurately count the duration of high and low levels in a signal, so as to accurately identify the duration value of the level corresponding to the high and low levels, and further demodulate hard disk log data according to the identified level duration.
In addition, the modulation mode of the application does not affect the original functions of the hard disk pins, can output hard disk log data, reduces the out-of-band monitoring difficulty, effectively improves the range of the monitorable hard disk for out-of-band monitoring of the hard disk, and can output the hard disk log data under the condition that the hard disk is not connected with a hard disk expansion card.
In addition, the monitored hard disk can be directly connected through the complex programmable logic device of the hard disk main board or the hard disk backboard to obtain the hard disk log data, and the complex programmable logic device sends the hard disk log data to the baseboard management controller. Under the out-of-band monitoring architecture, the monitored hard disk also needs to provide other hard disk pins except the data pins to output hard disk log data in the same way as the substrate management controller directly connects the monitored hard disk, so that the description is omitted here.
The beneficial effects are that: after the current output signal of the monitored hard disk is obtained by the hard disk monitoring controller, the current output signal is counted by utilizing the local clock to determine a corresponding target clock count value; the current output signal is a signal obtained by modulating the output signal of the hard disk pin by the monitored hard disk by using the current hard disk log data, namely the current output signal carries the current hard disk log data, the monitored hard disk converts the current hard disk log data into an electric signal in a data modulation mode, and then the electric signal is output to the hard disk monitoring controller by the hard disk pin. Furthermore, the application can accurately identify the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and the target clock count deviation due to the target clock count deviation of the local clock, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data. Because the values represented by different level durations are different, the level durations can be accurately identified by the hard disk monitoring controller in the mode, so that log data output by a monitored hard disk can be accurately and stably identified, the hard disk monitoring controller can monitor the hard disk of a method for determining the clock count deviation of the monitored target based on the current hard disk log data, and the reliability of hard disk monitoring is improved.
Referring to fig. 3, an embodiment of the application discloses a method for determining a target clock count deviation, which specifically includes:
step S21: and after power-on, sending a target instruction for starting a hard disk verification function to the monitored hard disk.
The embodiment particularly discloses a method for calculating a target clock count deviation. And after the hard disk monitoring controller is electrified, a target instruction for starting the hard disk checking function is sent to the monitored hard disk.
In a specific embodiment, the hard disk monitoring controller is a baseboard management controller, and then the target instruction for starting the hard disk verification function is directly sent to the monitored hard disk through the baseboard management controller.
In another specific embodiment, the hard disk monitoring controller is a complex programmable logic device, and the complex programmable logic device is connected with the baseboard management controller through a target bus; correspondingly, the sending the target instruction for starting the hard disk verification function to the monitored hard disk includes: after the baseboard management controller is electrified, responding to a serial number acquisition request sent by the baseboard management controller so as to send local serial number information to the baseboard management controller; and if the baseboard management controller determines that the complex programmable logic device is currently used for the first time based on the local serial number information, acquiring a target instruction which is sent by the baseboard management controller and used for starting a hard disk verification function, and sending the target instruction to the monitored hard disk. That is, when the hard disk monitor controller is a complex programmable logic device, the target instruction for starting the hard disk verification function needs to be sent by the hard disk monitor controller first, and then sent to the monitored hard disk by the complex programmable logic device. Specifically, after the baseboard management controller is powered on, the serial number of the complex programmable logic device can be obtained first, so as to confirm whether the complex programmable logic device is used for the first time according to the serial number, and if the complex programmable logic device is used for the first time, the target clock count deviation of the internal clock of the complex programmable logic device needs to be determined first.
Step S22: and acquiring a preset number of hard disk pin signals which are used for representing a target value and are transmitted by the monitored hard disk after the hard disk verification function is started, and counting the actual clock count value obtained after the local clock counts all the hard disk pin signals.
In this embodiment, after the monitored hard disk obtains the target instruction, the hard disk verification function is started and a preset number of hard disk pin signals for representing the target numerical value are sent, and the hard disk monitoring controller counts the actual clock count values obtained after the local clock counts all the hard disk pin signals. The preset number may be set to 1000, and the target value is any one of NULL or 0x1-0xF in table 1.
Step S23: and calculating the target clock count deviation based on all the actual clock count values.
In this embodiment, the target clock count deviation is calculated based on all the actual clock count values.
Specifically, the calculating the target clock count deviation based on all the actual clock count values includes: determining a corresponding first count average value and standard deviation based on all the actual clock count values; determining a target counting range based on the first counting mean value and the standard deviation, and screening target actual clock counting values in the target counting range from all the actual clock counting values; and calculating an average value of all the target actual clock count values to determine a corresponding second count average value, and acquiring a theoretical clock count value of a hard disk pin signal for representing the target value so as to calculate the target clock count deviation based on the second count average value and the theoretical clock count value. It can be understood that in this embodiment, the corresponding first count average value and standard deviation are calculated for the actual clock count value, then the target actual clock count value in the target count range determined according to the first count average value ± standard deviation is screened out, the average value of all the target actual clock count values is calculated to determine the corresponding second count average value, and then the target clock count deviation is calculated based on the second count average value and the theoretical clock count value of the hard disk pin signal for representing the target value. The theoretical clock count value can be obtained from table 1, for example, assuming that the target value is 0x1, the theoretical clock count value is 2ms.
In one embodiment, the number of numerical types of the target numerical value is one; correspondingly, the calculating the target clock count deviation based on the second count average and the theoretical clock count value includes: and taking the difference value between the second counting average value and the theoretical clock counting value as the target clock counting deviation. For example, after the monitored hard disk starts the hard disk verification function, 1000 0x1 are sequentially sent, the corresponding actual clock count values when the local clock counts 1000 0x1 respectively are recorded, then a corresponding second count average value is calculated according to the scheme described above, and the difference value between the second count average value and the theoretical clock count value corresponding to 0x1 is the target clock count deviation.
In another embodiment, the number of numerical types of the target numerical value is a plurality; correspondingly, the calculating the target clock count deviation based on the second count average and the theoretical clock count value includes: taking the corresponding difference value between the second count average value and the theoretical clock count value as the clock count deviation of the local clock pair for representing the hard disk pin signals of the target value of the same value type aiming at the target value of the same value type; and carrying out average value calculation on clock count deviations corresponding to different target values, and taking an average value calculation result as the target clock count deviation. It will be appreciated that in order to reduce the calculation error of the target clock count deviation, the monitored hard disk may be caused to transmit a plurality of target values of different value types, and the target clock count deviation may be calculated accordingly. For example, after the monitored hard disk starts the hard disk verification function, 1000 0x0-0xF are sequentially sent, the actual clock count values corresponding to the 1000 0x0-0xF are recorded when the local clock counts the 1000 0x 0xF respectively, then the clock count deviation corresponding to the 0x0 count is sequentially calculated according to the scheme described above, the clock count deviation corresponding to the 0x1 count, the clock count deviation corresponding to the 0x2 count, the clock count deviation corresponding to the … … count 0xF count are calculated, finally the 16 clock count deviations are averaged, and the average calculation result is taken as the target clock count deviation.
The embodiment of the application discloses a method for calculating a target clock counting deviation, which comprises the steps of sending a target instruction for starting a hard disk verification function to a monitored hard disk after a hard disk monitoring controller is electrified; obtaining a preset number of hard disk pin signals which are sent by a monitored hard disk after a hard disk verification function is started and used for representing a target value, wherein the number of the number type of the target value is one or more, counting the actual clock count value obtained after the local clock counts all the hard disk pin signals, calculating the average value, the standard deviation, screening data, calculating the average value again, and calculating the target clock count deviation in a mode of making a difference with the theoretical clock count value so as to accurately calculate the target clock count deviation.
Referring to fig. 4, an embodiment of the present application discloses a specific hard disk monitoring method, which is applied to a hard disk monitoring controller, where the hard disk monitoring controller is a complex programmable logic device, and the complex programmable logic device is connected with a baseboard management controller through a target bus, and specifically includes:
Step S31: acquiring a current output signal of a monitored hard disk, and determining a target clock count value obtained after a local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data.
In this embodiment, a complex programmable logic device is used to obtain a current output signal of a monitored hard disk, and a local clock is used to count the current output signal to obtain a target clock count value.
Step S32: and determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data.
Step S33: and storing the current hard disk log data to a local first register.
In this embodiment, the complex programmable logic device stores the hard disk log data obtained after demodulation in the local first register.
Step S34: when a data polling request sent by the baseboard management controller through the target bus is obtained, the current hard disk log data stored in the first register is sent to the baseboard management controller, so that the baseboard management controller displays the current hard disk log data on a target interface, and an early warning prompt is sent when the current hard disk log data does not meet a preset threshold condition; the preset threshold condition is a threshold condition corresponding to the type of the current hard disk log data.
In this embodiment, the baseboard management controller sends a data polling request to the complex programmable logic device through the target bus, and the complex programmable logic device sends the current hard disk log data stored in the local first register to the baseboard management controller after receiving the data polling request, so that the baseboard management controller displays the current hard disk log data on the target interface, and sends an early warning prompt when the hard disk log data does not meet a preset threshold condition; the preset threshold condition is a threshold condition corresponding to the type of hard disk log data. It will be appreciated that the hard disk status information to be monitored includes temperature, number of bad tracks, number of error accumulation, etc., and that the threshold conditions corresponding to the different types of status information are inconsistent.
It should be noted that, when the current time is consistent with a preset time stamp, the baseboard management controller sends a data polling request to the complex programmable logic device through the target bus; correspondingly, when the data polling request sent by the baseboard management controller through the target bus is obtained, the process of sending the current hard disk log data stored in the first register to the baseboard management controller further includes: if the data polling request sent by the baseboard management controller is not obtained at the current moment, opening up a target cache space, and storing the current hard disk log data stored in the first register into the target cache space; clearing the current hard disk log data stored in the first register so as to continuously acquire and store new hard disk log data output by the monitored hard disk by using the first register; and when the next data polling request sent by the baseboard management controller is obtained, sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller, and clearing the target cache space.
In this embodiment, the baseboard management controller may send the data polling request to the complex programmable logic device at regular time, and it may be understood that a preset time stamp for sending the data polling request by the baseboard management controller may be preset, for example, polling is performed once every one minute, so as to obtain a corresponding time stamp. And when the current moment is consistent with the preset time stamp, the baseboard management controller sends a data polling request to the complex programmable logic device through the target bus. However, if the baseboard management controller fails, it cannot send a data polling request to the complex programmable logic device at the present time. Therefore, when the baseboard management controller fails to acquire the current hard disk log data stored in the first register in a polling mode through the target bus in time, in order to avoid the data in the first register being covered by the data continuously output by the hard disk, the complex programmable logic device opens up a target cache space, stores the current hard disk log data stored in the first register and not read in time by the baseboard management controller into the target cache space, and then clears the current hard disk log data stored in the first register so as to continuously acquire and store the new hard disk log data output by the monitored hard disk by using the first register; it should be noted that in this process, the step of clearing may not be performed, and the new hard disk log data may be directly overlaid on the current hard disk log data. And then when the next data polling request sent by the baseboard management controller is obtained, sending all the hard disk log data stored in the first register and the target cache space to the baseboard management controller, and clearing the opened target cache space.
In a specific embodiment, the memory size of the target cache space dynamically changes based on the current number of hard disks and the number of times the baseboard management controller continuously does not send the data polling request. It is understood that the complex programmable logic device can adaptively set the first register size (β m) and the target buffer space size (β t) according to the current number of hard disks, and the complex programmable logic device should set the first register of 1 Byte size for 1 hard disk, so as to extend the first register of m Byte size for m hard disks. For 1 hard disk, if the memory resource of the complex programmable logic device is not considered to be limited, when the baseboard management controller fails to read the data in the first register at the time t, the complex programmable logic device needs to use a target buffer space with the size of 1 Byte to store the data in the data register at the time t, and the like, if the baseboard management controller fails to read the data until the time t+y, the complex programmable logic device needs to use a target buffer space with the size of (y+1) Byte to store the data in the first register at the time t-t+y. Therefore, for m hard disks, the complex programmable logic device needs to use a target buffer space with the size of m× (y+1) Byte to store the data in the first register at the time t to t+y, which is not read by the baseboard management controller, as follows:
βm=m Byte;
βt=m×(y+1) Byte。
Therefore, the memory size of the first register may dynamically change according to the current number of hard disks, and the memory size of the target cache space may dynamically change according to the current number of hard disks and the number of times that the baseboard management controller continuously does not send the data polling request.
It should be noted that, the memory size of the target cache space is lower than the available memory capacity of the complex programmable logic device; the available memory capacity is the difference between the total memory value of the complex programmable logic device and the memory occupied by the local register. That is, since the memory resources of the complex programmable logic device are limited, the memory size of the target cache space cannot be larger than the available memory capacity β max of the complex programmable logic device, and the available memory capacity is the difference between the total memory value of the complex programmable logic device and the memory occupied by the local register.
Specifically, the local register comprises the first register, a second register for storing a target state value used for representing whether the data in the first register is read by the baseboard management controller at the last moment, a third register for storing a hard disk configuration parameter, and a fourth register for storing a code file; the hard disk configuration parameters comprise the target clock count deviation, the total memory value, the available memory capacity, the occupied memory of the local register and the current hard disk number.
Therefore, the calculation formula of the available memory capacity β max is as follows:
βmax=βall-βm-βms-βcfg-βcode;
wherein β max is the total memory value of the complex programmable logic device, β m is the memory size of the first register, β ms is the memory size of the second register, β cfg is the memory size of the third register, and β code is the memory size of the fourth register; wherein the second register stores therein a target state value for characterizing whether the data in the first register was read by the baseboard management controller at the previous time; the third register stores hard disk configuration parameters including a target clock count deviation alpha, a total memory value beta all, an available memory capacity beta max, an occupied memory beta m、βms、βcfg、βcode of the local register and the current number m of hard disks; the fourth register has a code file.
Therefore, the application can accurately set the available memory capacity beta max in a self-adaptive manner according to the memory resources of different complex programmable logic devices.
In addition, it should be noted that the method further includes: after the baseboard management controller is powered on, the hard disk configuration parameters stored in the third register are sent to the baseboard management controller, so that the baseboard management controller can determine the current available memory capacity based on the hard disk configuration parameters; and acquiring the current available memory capacity sent by the baseboard management controller, and updating the local available memory capacity by utilizing the current available memory capacity. It can be appreciated that the baseboard management controller will acquire data in the third register of the complex programmable logic device after power-up, so as to calculate β max, and then update the calculated β max value to the third register of the complex programmable logic device. In addition, the baseboard management controller can also acquire the current hard disk number m of the third register in the complex programmable logic device at regular time, adjust the size of the first register read by the bus, analyze the data size, and display the current hard disk number on the interface.
As can be seen from the foregoing, the second register stores therein a target state value for indicating whether the data in the first register was read by the baseboard management controller at the previous time, and the size of the second register is specifically 2Byte. In a specific embodiment, the method further comprises: and if the data in the first register is not read by the baseboard management controller at the last moment, setting the target state value as a second preset value and writing the second preset value into the second register. That is, whether the data in the first register is read by the baseboard management controller at the previous time is indicated by displaying the target state value in the second register with different values, if so, the target state value is set to a first preset value 0, and if not, the target state value is set to a second preset value 1.
The data bits in the second register and their meanings are shown in table 2 below:
TABLE 2
Wherein, bit15-bit1 is used to represent the size beta t of the target cache space, and bit0 corresponds to the target state value.
Therefore, the baseboard management controller can determine whether the data only needs to be read from the first register or the data needs to be read from the target cache space besides the data needs to be read from the first register according to the current value of the target state value in the second register.
Specifically, for the complex programmable logic device, when the data polling request sent by the baseboard management controller through the target bus is obtained, the sending the current hard disk log data stored in the first register to the baseboard management controller specifically includes: when a data polling request sent by the baseboard management controller through the target bus is acquired, determining the current value of the target state value in the second register; if the current value is the first preset value, the current hard disk log data stored in the first register is sent to the baseboard management controller; and if the current value is the second preset value, transmitting all hard disk log data stored in the first register and the target cache space to the baseboard management controller. That is, after the baseboard management controller sends out the data polling request, determining the current value of the target state value in the second register; if the current value is a first preset value 0, it indicates that the data in the first register has been read by the baseboard management controller at the previous time, and at this time, a target cache space is not opened, so only the current hard disk log data stored in the first register is required to be sent to the baseboard management controller, and if the current value is a first preset value 1, it indicates that the data in the first register is not read by the baseboard management controller at the previous time, at this time, the target cache space stores the data which is not read by the baseboard management controller at the previous time, and therefore all the hard disk log data stored in the first register and the target cache space are required to be sent to the baseboard management controller.
Further, if the current value is the second preset value, after sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller, the method further includes: and setting the current value of the target state value as the first preset value. That is, if the target state value bit0 in the current second register is 1, the baseboard management controller sets the target state value bit0 to be the first preset value 1 after reading the data in the target cache space, and clears the other values in the second register.
For more specific processing procedures in steps S31 and S32, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no detailed description is given here.
Therefore, the embodiment of the application obtains the current output signal of the monitored hard disk through the complex programmable logic device, and stores the hard disk log data obtained by demodulating the current output signal in the local first register. The baseboard management controller sends a data polling request to the complex programmable logic device at regular time to acquire the hard disk log data stored in the first register, and as the hard disk continuously outputs data, if the baseboard management controller fails to acquire the current hard disk log data stored in the first register in a polling mode through the target bus in time, in order to avoid the data in the first register being covered by the data continuously output by the hard disk, the complex programmable logic device opens up a target cache space, stores the current hard disk log data stored in the first register and not read by the baseboard management controller in time into the target cache space, and then clears the current hard disk log data stored in the first register. And then when the next data polling request sent by the baseboard management controller is obtained, sending all the hard disk log data stored in the first register and the target cache space to the baseboard management controller, and clearing the opened target cache space. In the application, the memory size of the first register can be dynamically changed according to the current hard disk number, and the memory size of the target cache space can be dynamically changed according to the current hard disk number and the times that the baseboard management controller continuously does not send data polling requests, so that the reliability of hard disk monitoring is improved.
Referring to fig. 5, the technical scheme of the present application is described in detail by taking a hard disk monitoring controller, specifically, a complex programmable logic device on a hard disk back plate, and using a baseboard management controller and the complex programmable logic device to monitor a monitored hard disk together as an example.
It should be noted that, since the crystal oscillators of the hard disk back plate may have different quality, when the complex programmable logic device on the hard disk back plate is used for the first time, clock calibration is required to improve the reliability of out-of-band monitoring of the hard disk by using the complex programmable logic device. After the hard disk verification function is started, 1000 0x0-0xF are sequentially sent out by the monitored hard disk by the complex programmable logic device; the complex programmable logic device records the corresponding actual clock count value when the local clock sends 0x0-0xF (16 numbers) to the monitored hard disk, counts all the recorded actual clock count values for the same numerical value type, such as 0x0, calculates a first count average value and a standard deviation, calculates a second count average value of the actual clock count values within the first count average value +/-standard deviation, wherein the difference between the second count average value and the theoretical clock count value corresponding to 0x0 is the clock count deviation of the local clock identification 0x0, and finally averages the clock count deviations corresponding to 0x0-0xF to obtain the target clock count deviation alpha.
The hard disk monitoring system architecture in fig. 5 is first composed of a baseboard management controller, a target bus, a complex programmable logic device, a monitored hard disk and a system start controller. Wherein:
the baseboard management controller is connected with the complex programmable logic devices on each hard disk backboard/mainboard in the server system through the target bus and is responsible for acquiring hard disk log data stored in each complex programmable logic device through the target bus in a polling mode.
The target bus is a data bus managed out-of-band in the server system and works in a mode of one master and multiple slaves, wherein the baseboard management controller is a master device, and each complex programmable logic device is a slave device.
The complex programmable logic device mainly comprises a hard disk monitoring data service module and a pulse width demodulation module:
the hard disk monitoring data service module is responsible for receiving and utilizing the hard disk log data demodulated by the local first register temporary storage pulse width demodulation module, responding to a data polling request sent by the substrate management controller through the target bus and returning the hard disk log data.
The pulse width demodulation module accurately identifies the level duration of the current output signal of the hard disk pin, demodulates the current output signal based on the level duration to obtain hard disk log data, and stores the demodulated hard disk log data in a local first register in real time. The pulse width demodulation module should primarily filter the output signal, firstly, the pulse width demodulation module can record the internal clock count corresponding to the single level duration, and if the target level duration calculated by the pulse width demodulation module does not meet the formula t=1/f× (n+α) e [0.75×t i,1.25×Ti ], the recorded level length information is discarded.
When the baseboard management controller does not timely read the hard disk log data in the first register, the complex programmable logic device opens up a target cache space to store the data which is not timely acquired by the baseboard management controller in the first register, and the complex programmable logic device can adaptively set the size beta m of the first register and the size beta t of the cache space according to the current number of hard disks; the complex programmable logic device is also provided with a second register, a third register and a fourth register; the target state value in the second register is used for indicating whether the data in the first register is read by the baseboard management controller, the third register is used for storing the hard disk configuration parameters, and the fourth register is used for storing the code file.
And the monitored hard disk modulates the output signals of the hard disk pins by using the current hard disk log data to obtain current output signals, and outputs the current output signals to the complex programmable logic device through the hard disk pins.
The system starting controller can automatically detect the hard disk, the complex programmable logic device and the baseboard management controller when the server is started, and confirm the versions of the hard disk, the complex programmable logic device and the baseboard management controller; it can be understood that the embodiment of the application performs debugging configuration on the hard disk, the complex programmable logic device and the baseboard management controller in advance, and modifies the respective version information, so that the out-of-band monitoring system formed by the hard disk, the complex programmable logic device and the baseboard management controller can have the respective required out-of-band monitoring function, thereby enabling the whole out-of-band monitoring system to normally operate. Therefore, whether the hard disk, the complex programmable logic device and the baseboard management controller support the out-of-band monitoring function or not can be determined by detecting the version numbers of the hard disk, the complex programmable logic device and the baseboard management controller, if so, the out-of-band monitoring function of the three modules is started, and if the hard disk, the complex programmable logic device and the baseboard management controller can not support the out-of-band monitoring function at the same time, the out-of-band monitoring function of the three modules is confirmed to be closed. The hard disk, the complex programmable logic device and the baseboard management controller all close the out-of-band monitoring function by default.
Referring to fig. 6, an embodiment of the present application discloses a hard disk monitoring device, which is applied to a hard disk monitoring controller, and the device includes:
the clock counting module 11 is used for acquiring a current output signal of the monitored hard disk and determining a target clock count value obtained after the local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data;
A level duration identifying module 12, configured to determine a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency, and a predetermined target clock count deviation;
a data demodulation module 13, configured to demodulate the current output signal based on the target level duration to obtain the current hard disk log data;
and the monitoring module 14 is used for monitoring the monitored hard disk based on the current hard disk log data.
The beneficial effects are that: after the current output signal of the monitored hard disk is obtained by the hard disk monitoring controller, the current output signal is counted by utilizing the local clock to determine a corresponding target clock count value; the current output signal is a signal obtained by modulating the output signal of the hard disk pin by the monitored hard disk by using the current hard disk log data, namely the current output signal carries the current hard disk log data, the monitored hard disk converts the current hard disk log data into an electric signal in a data modulation mode, and then the electric signal is output to the hard disk monitoring controller by the hard disk pin. Furthermore, the application can accurately identify the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and the target clock count deviation due to the target clock count deviation of the local clock, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data. Because the values represented by different level durations are different, the level durations can be accurately identified by the hard disk monitoring controller in the mode, so that log data output by the monitored hard disk can be accurately and stably identified, the monitored hard disk can be monitored by the hard disk monitoring controller based on the current hard disk log data, and the reliability of hard disk monitoring is improved.
In some specific embodiments, the level duration identifying module 12 specifically includes:
The calculation formula determining unit is used for inputting the target clock count value, the local clock frequency and the predetermined target clock count deviation into a preset level duration calculation formula to obtain a target level duration corresponding to the current output signal; the preset level duration calculation formula is as follows:
T=1/f×(n+α);
Wherein T is the target level duration, f is the local clock frequency, n is the target clock count value, and α is the target clock count deviation.
In some embodiments, after determining the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency, and a predetermined target clock count deviation, the apparatus further comprises:
The corresponding relation acquisition unit is used for acquiring a corresponding relation between preset level duration and the expression numerical values and determining a level duration range corresponding to each expression numerical value based on the corresponding relation;
the time length judging unit is used for judging whether the target level time length is within any level time length range;
A time length discarding unit, configured to discard the target level time length if the target level time length is not within any of the level time length ranges;
And the signal demodulation unit is used for executing the step of demodulating the current output signal based on the target level duration to obtain the current hard disk log data if the target level duration is within any level duration range.
In some specific embodiments, the correspondence acquiring unit may specifically include:
The coefficient acquisition unit is used for acquiring a preset first proportional coefficient and a preset second proportional coefficient;
And the duration range calculation unit is used for calculating the level duration corresponding to each expression value based on the first proportional coefficient and the second proportional coefficient so as to obtain the level duration range corresponding to each expression value.
In some embodiments, in determining the target clock count deviation, the apparatus may specifically include:
The instruction sending unit is used for sending a target instruction for starting a hard disk verification function to the monitored hard disk after power-on;
The clock counting and counting unit is used for acquiring a preset number of hard disk pin signals which are sent by the monitored hard disk after the hard disk verification function is started and used for representing a target value, and counting actual clock count values obtained after the local clock counts all the hard disk pin signals;
and the deviation calculating unit is used for calculating the target clock count deviation based on all the actual clock count values.
In some specific embodiments, the deviation calculating unit may specifically include:
The first average value calculation unit is used for determining a corresponding first count average value and standard deviation based on all the actual clock count values;
the data screening unit is used for determining a target counting range based on the first counting mean value and the standard deviation, and screening target actual clock counting values in the target counting range from all the actual clock counting values;
The second average value calculation unit is used for calculating the average value of all the target actual clock count values so as to determine a corresponding second count average value;
And the clock count deviation calculation unit is used for acquiring a theoretical clock count value of the hard disk pin signal for representing the target value so as to calculate the target clock count deviation based on the second count average value and the theoretical clock count value.
In some embodiments, the number of numerical types of the target numerical value is one;
correspondingly, the clock count deviation calculating unit is specifically configured to take a difference value between the second count average value and the theoretical clock count value as the target clock count deviation.
In some embodiments, the number of numerical types of the target numerical value is a plurality;
correspondingly, the clock count deviation calculating unit is specifically configured to use, for target values of the same value type, a difference value between the corresponding second count average value and the theoretical clock count value as a clock count deviation of the local clock on a hard disk pin signal used for representing the target values of the same value type; and carrying out average value calculation on clock count deviations corresponding to different target values, and taking an average value calculation result as the target clock count deviation.
In some embodiments, the hard disk monitor controller is a complex programmable logic device, and the complex programmable logic device is connected with the baseboard management controller through a target bus;
Correspondingly, the instruction sending unit comprises:
The serial number sending unit is used for responding to the serial number acquisition request sent by the baseboard management controller after the baseboard management controller is electrified so as to send local serial number information to the baseboard management controller;
and the target instruction acquisition unit is used for acquiring a target instruction which is sent by the baseboard management controller and used for starting a hard disk verification function if the baseboard management controller determines that the complex programmable logic device is currently used for the first time based on the local serial number information, and sending the target instruction to the monitored hard disk.
In some embodiments, the hard disk monitor controller is a baseboard management controller;
Accordingly, the monitoring module 14 may specifically include:
the data display unit is used for displaying the current hard disk log data on a target interface;
and the threshold condition judging unit is used for determining a corresponding preset threshold condition based on the type of the current hard disk log data, judging whether the current hard disk log data meets the preset threshold condition or not, and if not, sending out an early warning prompt.
In some embodiments, the hard disk monitor controller is a complex programmable logic device, and the complex programmable logic device is connected with the baseboard management controller through a target bus;
Accordingly, the monitoring module 14 may specifically include:
the data storage unit is used for storing the current hard disk log data to a local first register;
The polling request acquisition unit is used for transmitting the current hard disk log data stored in the first register to the baseboard management controller when a data polling request transmitted by the baseboard management controller through the target bus is acquired, so that the baseboard management controller displays the current hard disk log data on a target interface and sends an early warning prompt when the current hard disk log data does not meet a preset threshold condition; the preset threshold condition is a threshold condition corresponding to the type of the current hard disk log data.
In some embodiments, the baseboard management controller sends a data polling request to the complex programmable logic device through the target bus when the current time is consistent with a preset time stamp;
Correspondingly, when the data polling request sent by the baseboard management controller through the target bus is obtained, the device further comprises:
a buffer space opening unit, configured to open up a target buffer space if the data polling request sent by the baseboard management controller is not acquired at the current time, and store the current hard disk log data stored in the first register into the target buffer space;
The data clearing unit is used for clearing the current hard disk log data stored in the first register so as to continuously acquire and store new hard disk log data output by the monitored hard disk by utilizing the first register;
and the data sending unit is used for sending all the hard disk log data stored in the first register and the target cache space to the baseboard management controller and clearing the target cache space when the next data polling request sent by the baseboard management controller is acquired.
In some embodiments, the memory size of the target cache space is dynamically changed based on the current number of hard disks and the number of times the baseboard management controller continuously does not send the data poll request.
In some embodiments, the memory size of the target cache space is lower than the available memory capacity of the complex programmable logic device; the available memory capacity is the difference between the total memory value of the complex programmable logic device and the memory occupied by the local register.
In some embodiments, the local registers include the first register, a second register storing a target state value characterizing whether data in the first register was read by the baseboard management controller at a previous time, a third register storing a hard disk configuration parameter, and a fourth register storing a code file; the hard disk configuration parameters comprise the target clock count deviation, the total memory value, the available memory capacity, the occupied memory of the local register and the current hard disk number.
In some embodiments, the apparatus further comprises:
The parameter sending unit is used for sending the hard disk configuration parameters stored in the third register to the baseboard management controller after the baseboard management controller is electrified so that the baseboard management controller can determine the current available memory capacity based on the hard disk configuration parameters;
And the parameter updating unit is used for acquiring the current available memory capacity sent by the baseboard management controller and updating the local available memory capacity by utilizing the current available memory capacity.
In some embodiments, the apparatus is further configured to set the target state value to a first preset value and write the target state value to the second register if the data in the first register is read by the baseboard management controller at a previous time, and set the target state value to a second preset value and write the target state value to the second register if the data in the first register is not read by the baseboard management controller at a previous time.
In some specific embodiments, the polling request acquiring unit specifically includes:
A value determining unit, configured to determine, when a data polling request sent by the baseboard management controller through the target bus is acquired, a current value of the target state value in the second register;
The first sending unit is configured to send the current hard disk log data stored in the first register to the baseboard management controller if the current value is the first preset value;
And the second sending unit is used for sending all the hard disk log data stored in the first register and the target cache space to the baseboard management controller if the current value is the second preset value.
In some embodiments, after sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller, if the current value is the second preset value, the apparatus is further configured to set the current value of the target state value to the first preset value.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Specifically, the method comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is configured to store a computer program that is loaded and executed by the processor 21 to implement relevant steps in the hard disk monitoring method performed by the electronic device as disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not limited herein in detail; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field-Programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon include an operating system 221, a computer program 222, and data 223, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows, unix, linux. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the hard disk monitoring method performed by the electronic device as disclosed in any of the previous embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Further, the embodiment of the application also discloses a computer readable storage medium, wherein the storage medium stores a computer program, and when the computer program is loaded and executed by a processor, the steps of the hard disk monitoring method disclosed in any embodiment are realized.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not intended to be limiting.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in random access Memory (Random Access Memory, i.e., RAM), memory, read-Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a compact disc Read-Only Memory (Compact Disc Read-Only Memory, i.e., CD-ROM), or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description of the method, the device, the equipment and the storage medium for monitoring the hard disk provided by the invention applies specific examples to illustrate the principle and the implementation of the invention, and the above examples are only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (21)
1. The hard disk monitoring method is characterized by being applied to a hard disk monitoring controller and comprising the following steps of:
Acquiring a current output signal of a monitored hard disk, and determining a target clock count value obtained after a local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data;
Determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, so as to demodulate the current output signal based on the target level duration to obtain the current hard disk log data;
monitoring the monitored hard disk based on the current hard disk log data;
Wherein the determining, based on the target clock count value, the local clock frequency, and a predetermined target clock count deviation, a target level duration corresponding to the current output signal includes:
Inputting the target clock count value, the local clock frequency and the predetermined target clock count deviation into a preset level duration calculation formula to obtain a target level duration corresponding to the current output signal; the preset level duration calculation formula is as follows:
T=1/f×(n+α);
Wherein T is the target level duration, f is the local clock frequency, n is the target clock count value, and α is the target clock count deviation.
2. The method for monitoring a hard disk according to claim 1, wherein after determining the target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation, the method further comprises:
Acquiring a corresponding relation between preset level duration and an expression value, and determining a level duration range corresponding to each expression value based on the corresponding relation;
judging whether the target level duration is within any level duration range;
And if the target level duration is not in any level duration range, discarding the target level duration, and if the target level duration is in any level duration range, executing the step of demodulating the current output signal based on the target level duration to obtain the current hard disk log data.
3. The method of claim 2, wherein determining a range of level durations corresponding to each of the expression values based on the correspondence relation comprises:
Acquiring a preset first proportional coefficient and a preset second proportional coefficient;
and calculating the level duration corresponding to each expression value based on the first proportionality coefficient and the second proportionality coefficient so as to obtain a level duration range corresponding to each expression value.
4. The method of claim 1, wherein the determining the target clock count bias comprises:
after power-on, a target instruction for starting a hard disk verification function is sent to the monitored hard disk;
Acquiring a preset number of hard disk pin signals which are used for representing a target value and are sent by the monitored hard disk after the hard disk verification function is started, and counting actual clock count values obtained after the local clock counts all the hard disk pin signals;
and calculating the target clock count deviation based on all the actual clock count values.
5. The hard disk monitoring method according to claim 4, wherein the calculating the target clock count deviation based on all the actual clock count values includes:
determining a corresponding first count average value and standard deviation based on all the actual clock count values;
determining a target counting range based on the first counting mean value and the standard deviation, and screening target actual clock counting values in the target counting range from all the actual clock counting values;
And calculating an average value of all the target actual clock count values to determine a corresponding second count average value, and acquiring a theoretical clock count value of a hard disk pin signal for representing the target value so as to calculate the target clock count deviation based on the second count average value and the theoretical clock count value.
6. The hard disk monitoring method according to claim 5, wherein the number of the number types of the target number is one;
Correspondingly, the calculating the target clock count deviation based on the second count average and the theoretical clock count value includes:
And taking the difference value between the second counting average value and the theoretical clock counting value as the target clock counting deviation.
7. The hard disk monitoring method according to claim 5, wherein the number of the number types of the target values is plural;
Correspondingly, the calculating the target clock count deviation based on the second count average and the theoretical clock count value includes:
Taking the corresponding difference value between the second count average value and the theoretical clock count value as the clock count deviation of the local clock pair for representing the hard disk pin signals of the target value of the same value type aiming at the target value of the same value type;
and carrying out average value calculation on clock count deviations corresponding to different target values, and taking an average value calculation result as the target clock count deviation.
8. The method of claim 4, wherein the hard disk monitor controller is a complex programmable logic device, the complex programmable logic device being connected to the baseboard management controller via a target bus;
correspondingly, the sending the target instruction for starting the hard disk verification function to the monitored hard disk includes:
after the baseboard management controller is electrified, responding to a serial number acquisition request sent by the baseboard management controller so as to send local serial number information to the baseboard management controller;
And if the baseboard management controller determines that the complex programmable logic device is currently used for the first time based on the local serial number information, acquiring a target instruction which is sent by the baseboard management controller and used for starting a hard disk verification function, and sending the target instruction to the monitored hard disk.
9. The hard disk monitoring method according to any one of claims 1 to 7, wherein the hard disk monitoring controller is a baseboard management controller;
Correspondingly, the monitoring the monitored hard disk based on the current hard disk log data comprises the following steps:
displaying the current hard disk log data on a target interface;
And determining a corresponding preset threshold condition based on the type of the current hard disk log data, judging whether the current hard disk log data meets the preset threshold condition, and if not, sending out an early warning prompt.
10. The method of any one of claims 1 to 8, wherein the hard disk monitor controller is a complex programmable logic device connected to a baseboard management controller via a target bus;
Correspondingly, the monitoring the monitored hard disk based on the current hard disk log data comprises the following steps:
storing the current hard disk log data to a local first register;
When a data polling request sent by the baseboard management controller through the target bus is obtained, the current hard disk log data stored in the first register is sent to the baseboard management controller, so that the baseboard management controller displays the current hard disk log data on a target interface, and an early warning prompt is sent when the current hard disk log data does not meet a preset threshold condition; the preset threshold condition is a threshold condition corresponding to the type of the current hard disk log data.
11. The method according to claim 10, wherein the baseboard management controller sends a data polling request to the complex programmable logic device through the target bus when the current time is consistent with a preset time stamp;
correspondingly, when the data polling request sent by the baseboard management controller through the target bus is obtained, the process of sending the current hard disk log data stored in the first register to the baseboard management controller further includes:
If the data polling request sent by the baseboard management controller is not obtained at the current moment, opening up a target cache space, and storing the current hard disk log data stored in the first register into the target cache space;
Clearing the current hard disk log data stored in the first register so as to continuously acquire and store new hard disk log data output by the monitored hard disk by using the first register;
And when the next data polling request sent by the baseboard management controller is obtained, sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller, and clearing the target cache space.
12. The method of claim 11, wherein the memory size of the target cache space is dynamically changed based on the current number of hard disks and the number of times the baseboard management controller continuously does not send the data poll request.
13. The method for monitoring a hard disk according to claim 11, wherein the memory size of the target cache space is lower than the available memory capacity of the complex programmable logic device; the available memory capacity is the difference between the total memory value of the complex programmable logic device and the memory occupied by the local register.
14. The hard disk monitoring method according to claim 13, wherein the local register includes the first register, a second register storing a target state value for characterizing whether data in the first register was read by the baseboard management controller at a previous time, a third register storing a hard disk configuration parameter, and a fourth register storing a code file; the hard disk configuration parameters comprise the target clock count deviation, the total memory value, the available memory capacity, the occupied memory of the local register and the current hard disk number.
15. The hard disk monitoring method of claim 14, further comprising:
After the baseboard management controller is powered on, the hard disk configuration parameters stored in the third register are sent to the baseboard management controller, so that the baseboard management controller can determine the current available memory capacity based on the hard disk configuration parameters;
and acquiring the current available memory capacity sent by the baseboard management controller, and updating the local available memory capacity by utilizing the current available memory capacity.
16. The hard disk monitoring method of claim 14, further comprising:
And if the data in the first register is not read by the baseboard management controller at the last moment, setting the target state value as a second preset value and writing the second preset value into the second register.
17. The method for monitoring a hard disk according to claim 16, wherein the sending the current hard disk log data stored in the first register to the baseboard management controller when the data polling request sent by the baseboard management controller through the target bus is acquired includes:
When a data polling request sent by the baseboard management controller through the target bus is acquired, determining the current value of the target state value in the second register;
if the current value is the first preset value, the current hard disk log data stored in the first register is sent to the baseboard management controller;
and if the current value is the second preset value, transmitting all hard disk log data stored in the first register and the target cache space to the baseboard management controller.
18. The method for monitoring a hard disk according to claim 17, wherein if the current value is the second preset value, after sending all hard disk log data stored in the first register and the target cache space to the baseboard management controller, the method further comprises:
and setting the current value of the target state value as the first preset value.
19. A hard disk monitoring device, characterized in that it is applied to a hard disk monitoring controller, comprising:
The clock counting module is used for acquiring a current output signal of the monitored hard disk and determining a target clock count value obtained after the local clock counts the current output signal; the current output signal is a signal obtained after the monitored hard disk modulates the hard disk pin output signal by using the current hard disk log data;
The level duration identification module is used for determining a target level duration corresponding to the current output signal based on the target clock count value, the local clock frequency and a predetermined target clock count deviation;
The data demodulation module is used for demodulating the current output signal based on the target level duration to obtain the current hard disk log data;
the monitoring module is used for monitoring the monitored hard disk based on the current hard disk log data;
The level duration identification module specifically comprises:
The calculation formula determining unit is used for inputting the target clock count value, the local clock frequency and the predetermined target clock count deviation into a preset level duration calculation formula to obtain a target level duration corresponding to the current output signal; the preset level duration calculation formula is as follows:
T=1/f×(n+α);
Wherein T is the target level duration, f is the local clock frequency, n is the target clock count value, and α is the target clock count deviation.
20. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the hard disk monitoring method as claimed in any one of claims 1 to 18.
21. A computer-readable storage medium storing a computer program; wherein the computer program when executed by a processor implements the steps of the hard disk monitoring method according to any one of claims 1 to 18.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410381974.2A CN117971607B (en) | 2024-03-29 | 2024-03-29 | Hard disk monitoring method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410381974.2A CN117971607B (en) | 2024-03-29 | 2024-03-29 | Hard disk monitoring method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117971607A CN117971607A (en) | 2024-05-03 |
CN117971607B true CN117971607B (en) | 2024-06-28 |
Family
ID=90866061
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410381974.2A Active CN117971607B (en) | 2024-03-29 | 2024-03-29 | Hard disk monitoring method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117971607B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118503053B (en) * | 2024-07-17 | 2024-09-27 | 苏州元脑智能科技有限公司 | Hardware information transmission method, product, equipment and medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116594493A (en) * | 2023-05-08 | 2023-08-15 | 苏州浪潮智能科技有限公司 | Hard disk device control method and device, electronic device and storage medium |
CN116680151A (en) * | 2023-06-16 | 2023-09-01 | 苏州浪潮智能科技有限公司 | Dynamic monitoring method, system, terminal and storage medium for hard disk performance |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20210158745A (en) * | 2020-06-24 | 2021-12-31 | 주식회사 멤레이 | Flash-based coprocessor |
CN112948157B (en) * | 2021-01-29 | 2022-12-23 | 苏州浪潮智能科技有限公司 | Server fault location method, device, system and computer-readable storage medium |
CN116881101A (en) * | 2023-07-07 | 2023-10-13 | 苏州浪潮智能科技有限公司 | A hard disk log recording, analysis and monitoring method, system, equipment and media |
CN117251333A (en) * | 2023-09-26 | 2023-12-19 | 浪潮(山东)计算机科技有限公司 | A hard disk information acquisition method, device, equipment and storage medium |
CN117632637A (en) * | 2023-11-06 | 2024-03-01 | 中国长城科技集团股份有限公司 | Hard disk management method, hard disk management device, computer readable storage medium and electronic equipment |
-
2024
- 2024-03-29 CN CN202410381974.2A patent/CN117971607B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116594493A (en) * | 2023-05-08 | 2023-08-15 | 苏州浪潮智能科技有限公司 | Hard disk device control method and device, electronic device and storage medium |
CN116680151A (en) * | 2023-06-16 | 2023-09-01 | 苏州浪潮智能科技有限公司 | Dynamic monitoring method, system, terminal and storage medium for hard disk performance |
Also Published As
Publication number | Publication date |
---|---|
CN117971607A (en) | 2024-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7962792B2 (en) | Interface for enabling a host computer to retrieve device monitor data from a solid state storage subsystem | |
US6243838B1 (en) | Method for automatically reporting a system failure in a server | |
CN106776196A (en) | A kind of server hard disc method for monitoring state and system | |
CN108304299A (en) | Server power-up state monitors system and method, computer storage and equipment | |
US9594641B2 (en) | Techniques for updating memory of a chassis management module | |
CN102546224A (en) | Remote management system and method for server | |
EP3422661B1 (en) | System and method for providing a secure airborne network-attached storage node | |
US8560688B2 (en) | Monitoring sensors for systems management | |
CN117971607B (en) | Hard disk monitoring method, device, equipment and medium | |
CN117992311B (en) | Server and hard disk monitoring method, device, equipment and medium thereof | |
CN102331959A (en) | Server system | |
CN108363477A (en) | Server power-up state monitors system and method, computer storage and equipment | |
CN115470056A (en) | Method, system, device and medium for troubleshooting power-on starting of server hardware | |
CN111858178A (en) | A method, device, device and readable medium for judging power startup type | |
CN117033099A (en) | Pressure testing method, system and device for system hard disk and storage medium | |
US8280930B1 (en) | Obtaining configuration information from host devices which store data into and load data from a data storage array | |
TWI832173B (en) | Method and system for monitoring flash memory device and computer system thereof | |
CN117971612B (en) | Hard disk monitoring method, device, equipment and medium | |
CN108304290A (en) | Server power-up state monitors system and method, computer storage and equipment | |
CN115934616A (en) | Serial port information storage method and device, server, electronic equipment and storage medium | |
JP2013109722A (en) | Computer, computer system and failure information management method | |
CN117056154A (en) | Method, system, device and medium for detecting network port function of intelligent network card | |
CN116539992A (en) | Storage device in-place stable state detection device, method, logic module and medium | |
CN117971610B (en) | Hard disk monitoring method, device, system, equipment and storage medium | |
CN114281618A (en) | A PCIE link training state monitoring device and server |
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 |