Disclosure of Invention
In order to overcome at least the above disadvantages in the prior art, an object of the present application is to provide a hard disk temperature monitoring method applied to a hard disk monitoring system, the method comprising:
acquiring the temperature of the environment where the hard disks are located at the reference time point as an environment reference temperature and the temperature in each hard disk as a first hard disk temperature;
acquiring a second hard disk temperature from the first hard disk temperatures of all the hard disks;
and acquiring the current environment temperature of the environment where the hard disk is located at the current moment, and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature.
Optionally, the hard disk monitoring system includes a cooling fan, and the method further includes:
judging whether the current hard disk temperature exceeds a first preset temperature threshold value or not;
if the current hard disk temperature exceeds the first preset temperature threshold, increasing the rotating speed of the cooling fan to improve the cooling rate;
judging whether the current hard disk temperature is lower than a second preset temperature threshold value, wherein the second preset temperature threshold value is smaller than the first preset temperature threshold value;
and if the current hard disk temperature is lower than the second preset temperature threshold, reducing the rotating speed of the heat dissipation fan to reduce the heat dissipation rate.
Optionally, the step of obtaining the second hard disk temperature from the first hard disk temperatures of all the hard disks includes:
and acquiring the highest first hard disk temperature from the first hard disk temperatures of all the hard disks as a second hard disk temperature.
Optionally, the step of obtaining the current ambient temperature of the environment where the hard disk is located at the current time includes:
acquiring the current lamp plate temperature acquired by a temperature sensor on the lamp plate at the current moment and the current backboard temperature acquired by a temperature sensor on the backboard at the current moment, wherein the lamp plate is of a structure provided with an LED for indicating the running state of a system, and the backboard is of a structure for fixing a hard disk;
judging whether the current lamp panel temperature is within a preset temperature range or not;
if the current lamp panel temperature is within a preset temperature range, taking the current lamp panel temperature as the current environment temperature;
and if the current lamp panel temperature is not within the preset temperature range, taking the current backboard temperature as the current environment temperature.
Optionally, the step of obtaining the temperature of the environment where the hard disks are located at the reference time point as the environment reference temperature and the temperature in each hard disk as the first hard disk temperature includes:
according to a first preset time interval, acquiring the temperature of the environment where the hard disks are located as an environment reference temperature and the temperature in each hard disk as a first hard disk temperature;
the step of obtaining the current environment temperature of the environment where the hard disk is located at the current moment and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature comprises the following steps:
in a first preset time interval, starting from the time starting point of the first preset time interval, obtaining the current environment temperature of the environment where the hard disk is located at the current moment according to a second preset time interval, and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature, wherein the second preset time interval is smaller than the first preset time interval.
Optionally, the step of estimating the current hard disk temperature according to the current ambient temperature, the second hard disk temperature, and the ambient reference temperature includes:
calculating the difference between the environment reference temperature and the current environment temperature to obtain a temperature change value;
and calculating the sum of the second hard disk temperature and the temperature change value to obtain the current hard disk temperature.
Another object of the present application is to provide a hard disk temperature monitoring device, which is applied to a hard disk monitoring system, the device includes:
the memory is used for acquiring the temperature of the environment where the hard disks are located at the reference time point as an environment reference temperature and the temperature in each hard disk as a first hard disk temperature;
the processor is used for acquiring a second hard disk temperature from the first hard disk temperatures of all the hard disks;
and the temperature calculation module is used for acquiring the current environment temperature of the environment where the hard disk is located at the current moment, and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature.
Optionally, the hard disk monitoring system includes a cooling fan, the apparatus further includes a control module, and the control module is specifically configured to:
judging whether the current hard disk temperature exceeds a first preset temperature threshold value or not;
when the current hard disk temperature exceeds the first preset temperature threshold, increasing the rotating speed of the cooling fan to improve the cooling rate;
judging whether the current hard disk temperature is lower than a second preset temperature threshold value, wherein the second preset temperature threshold value is smaller than the first preset temperature threshold value;
and when the current hard disk temperature is lower than the second preset temperature threshold value, reducing the rotating speed of the cooling fan to reduce the cooling rate.
It is another object of the present application to provide a readable storage medium having stored therein an executable program which, when executed by a processor, implements the method according to any of the present applications.
Another objective of the present application is to provide a hard disk monitoring system, which includes a memory and a processor, wherein the memory is connected to the processor, the memory stores an executable program, and the processor implements the method according to any one of the present application when executing the executable program.
Compared with the prior art, the method has the following beneficial effects:
according to the hard disk temperature monitoring method, the hard disk temperature monitoring device, the readable storage medium and the hard disk monitoring system, the temperature in the environment where the hard disk is located at the reference time point is obtained as the environment reference temperature and the first hard disk temperature in the hard disk, the second hard disk temperature is obtained according to the first hard disk temperature, and finally the temperature of the hard disk at the current moment, namely the current hard disk temperature, is estimated according to the current environment temperature, the environment reference temperature and the second hard disk temperature. In the process of obtaining the current hard disk temperature, the temperature of the hard disk at the reference time point, the temperature of the environment where the hard disk is located and the temperature of the environment where the current hard disk is located are adopted, and the real-time temperature of the hard disk is not required to be obtained from the hard disk frequently by reading the S.M.A.R.T information, so that the real-time monitoring of the hard disk temperature can be realized, and the occupation of bandwidth resources can be avoided.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is further noted that, unless expressly stated or limited otherwise, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
A hard disk is a storage medium for storing a large amount of data, and is an important structure in an electronic device having a data storage capability, such as a server or a computer, and the reliability of the whole electronic device, or even other structures connected to the electronic device, is directly affected by the operating temperature of the hard disk. Generally, hard disks need to be used within certain specific temperature ranges. If the hard disk is outside the specified temperature range for a long time in the use process, the use risk is caused, and therefore, in the use process of the hard disk, the monitoring of the temperature of the hard disk is very important in the electronic equipment where the hard disk is located.
The hard disk can generate its own state information including the temperature of the hard disk itself, i.e., s.m.a.r.t information, through self-monitoring, analysis and reporting techniques. Therefore, in one embodiment, when the temperature data of the hard disk is monitored, the temperature data of the hard disk can be directly acquired from the hard disk. However, the temperature data in the s.m.a.r.t information is integrated with other data, and when acquiring the temperature data of the hard disk, it is necessary to read the s.m.a.r.t information from the hard disk first and then acquire the temperature data therefrom. Since the s.m.a.r.t information contains a large amount of information and a large amount of data, the manner of obtaining the temperature of the hard disk from the hard disk consumes some bandwidth resources, and if the manner is used to obtain the temperature of the hard disk in real time, the s.m.a.r.t information needs to be repeatedly read from the hard disk, which results in occupying more bandwidth resources.
In one embodiment, the temperature near the hard disk is directly adopted to directly replace the temperature of the hard disk, but the temperature collected by the temperature sensor near the hard disk is directly adopted to replace the temperature of the hard disk, so that the influence of external environment change on the temperature of the hard disk can only be reflected, and the influence of hard disk state and service change on the temperature of the hard disk cannot be effectively monitored.
In order to solve at least one of the above problems, the present embodiment provides a hard disk monitoring system 100, please refer to fig. 1, fig. 1 is a schematic block diagram of a structure of the hard disk monitoring system 100 provided in the embodiments of the present application, where the hard disk monitoring system 100 includes a hard disk temperature monitoring device 110, a memory 120 and a processor 130, and the memory 120 and the processor 130 are electrically connected to each other directly or indirectly for implementing data interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The hard disk temperature monitoring device 110 includes at least one software function module which can be stored in the memory 120 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the hard disk monitoring system 100. The processor 130 is used for executing executable modules stored in the memory 120, such as software functional modules and computer programs included in the hard disk temperature monitoring device 110.
Certainly, the hard disk monitoring system 100 in this embodiment may be a hard disk monitoring system on an electronic device such as a server and a host, for example, may be a hard disk monitoring system in an NVR (Network Video Recorder).
The embodiment further provides a hard disk temperature monitoring method applied to the hard disk monitoring system 100. Referring to fig. 2, the hard disk monitoring method includes steps S110 to S130, and the steps S110 to S130 are described in detail below with reference to specific embodiments.
Step S110, an environmental reference temperature and a first hard disk temperature of each hard disk are obtained.
Specifically, the temperature of the environment where the hard disks are located at the reference time point is obtained as the environment reference temperature and the temperature in each hard disk is obtained as the first hard disk temperature.
And step S120, acquiring a second hard disk temperature from the first hard disk temperatures of all the hard disks.
Step S130, obtaining a current ambient temperature of an environment where the hard disk is located at the current time.
And step S140, estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature.
In this embodiment, the second hard disk temperature is used as a reference for estimating the real-time temperature of the hard disk. The current hard disk temperature is the estimated real-time temperature of the hard disk.
The present embodiment is configured to obtain a first hard disk temperature of a hard disk at a reference time point and an environmental reference temperature, and determine a second hard disk temperature used as a reference of the temperature of the hard disk. When the current hard disk temperature is estimated, the environment reference temperature and the second hard disk temperature at the reference time point are adopted, so that the current hard disk temperature is estimated, and thus the real-time temperature of the hard disk is not required to be obtained by reading the S.M.A.R.T information in the hard disk in real time, and the real-time monitoring of the hard disk temperature can be realized while the occupation of bandwidth resources is avoided.
In this embodiment, because the environment reference temperature and the current environment temperature are directly obtained from the environment, the change conditions of the environment reference temperature and the current environment temperature can reflect the influence of the environment temperature change on the hard disk, and the second hard disk temperature is the actual temperature of the hard disk related to the state of the hard disk itself when referring to the time point, so that the real-time temperature of the hard disk under the environment influence and the state change condition of the hard disk itself, that is, the current hard disk temperature can be monitored, so that the monitored current hard disk temperature can be closer to the actual temperature of the hard disk, that is, the obtained current hard disk temperature is more accurate.
Optionally, in this embodiment, the hard disk monitoring system 100 includes a heat dissipation fan, where the heat dissipation fan may be controlled by the processor 130, referring to fig. 3, and the method further includes steps S210 to S240.
Step S210, determining whether the current hard disk temperature exceeds a first preset temperature threshold.
Step S220, if the current hard disk temperature exceeds the first preset temperature threshold, increasing the rotation speed of the cooling fan to increase the cooling rate.
Step S230, determining whether the current hard disk temperature is lower than a second preset temperature threshold, where the second preset temperature threshold is smaller than the first preset temperature threshold.
Step S240, if the current hard disk temperature is lower than the second preset temperature threshold, decreasing the rotation speed of the cooling fan to decrease the cooling rate.
For example, for some common hard disks, the first preset temperature threshold may be set to 70 degrees celsius, and the second preset temperature threshold may be set to 0 degree celsius, so that when the estimated current hard disk temperature exceeds 70 degrees celsius, the rotation speed of the cooling fan may be controlled to increase, thereby increasing the cooling rate. When the estimated current hard disk temperature is lower than 0 ℃, the rotating speed of the cooling fan can be controlled to be reduced, so that the cooling rate is reduced.
The embodiment is used for regulating and controlling the rotating speed of the cooling fan according to the estimated temperature range of the current hard disk temperature, so that the cooling rate is regulated, and the hard disk can be kept to work in a relatively stable temperature range.
Optionally, in this embodiment, the step S120 includes obtaining a highest first hard disk temperature from the first hard disk temperatures of all the hard disks as the second hard disk temperature, where the highest first hard disk temperature refers to a maximum value of the first hard disk temperatures.
In this embodiment, the highest first hard disk temperature among the first hard disk temperatures of all the hard disks is taken as the second hard disk temperature, that is, the real-time temperature of the hard disk is estimated according to the highest first hard disk temperature among the first hard disk temperatures of all the hard disks. Therefore, the temperature of the actual hard disk can be prevented from being influenced by excessive temperature rise of any hard disk, and all the hard disks in operation can be ensured to be in a specified temperature range.
In addition, in this embodiment, the highest first hard disk temperature among the first hard disk temperatures of all the hard disks is used as the second hard disk temperature, and the real-time temperature of the hard disk can be estimated under the condition that part of the hard disks are in failure, so as to ensure a normal operation monitoring and speed regulation strategy.
Of course, according to different actual requirements, in this embodiment, the second hard disk temperature may also be determined in other manners, for example, the second hard disk temperature may be determined according to an average value of the first hard disk temperatures of all hard disks.
Referring to fig. 4, optionally, in the present embodiment, the step of obtaining the current ambient temperature of the environment where the hard disk is located includes substeps S131 to step S134.
Step S131, obtaining the current lamp panel temperature and the current backboard temperature.
Specifically, the current lamp plate temperature acquired by a temperature sensor on the lamp plate at the current moment and the current backboard temperature acquired by the temperature sensor on the backboard at the current moment are acquired, wherein the lamp plate is of a structure provided with an LED (light emitting diode) indicating the running state of the system, and the backboard is of a structure for fixing the hard disk.
In this embodiment, referring to fig. 5, the hard disk is disposed on a back plate in a housing of an electronic device such as a server or a host, an air inlet for exchanging air between the inside of the chassis and the outside is disposed on the housing, and the lamp panel is disposed at the air inlet, so that the temperature of the external environment where the temperature hard disk of the lamp panel is located is the closest to the temperature of the external environment. Because on backplate and the lamp plate, all be provided with the temperature sensor who is used for gathering respective temperature, consequently, adopt the temperature of lamp plate or backplate, can directly utilize current structure to realize this scheme, have easy operation, resources are saved's effect.
Referring to fig. 4, after the current lamp panel temperature or the current backplane temperature is obtained, step S132 may be performed.
And S132, judging whether the current lamp panel temperature is within a preset temperature range.
The preset temperature range is the temperature range of the temperature value of the lamp panel in the normal working state.
And S133, if the current lamp panel temperature is within a preset temperature range, taking the current lamp panel temperature as the current environment temperature.
And S134, if the current lamp panel temperature is not within a preset temperature range, taking the current backboard temperature as the current environment temperature.
For example, in an abnormal situation that only the temperature on the lamp panel cannot be obtained, when the temperature of the lamp panel cannot be collected, a specific value may be used to represent the current lamp panel temperature, for example, 255, and the temperature when the lamp panel is in a normal working state may be directly represented by the actually obtained lamp panel temperature. When the current environment temperature is determined, if the current lamp panel temperature is 255, the current backboard temperature is used as the current environment temperature, and if not, the current lamp panel temperature is used as the current environment temperature.
In this embodiment, the temperature of earlier adoption lamp plate estimates the real-time temperature of hard disk, because the lamp plate is located air inlet department, consequently, the temperature of lamp plate can reflect the temperature of environment more accurately to can estimate the temperature of hard disk more accurately. When the normal temperature of the lamp panel cannot be obtained, the real-time temperature of the hard disk is estimated by adopting the temperature of the back plate, so that the normal operation of the hard disk monitoring system 100 can be ensured, the problem that the current temperature of the hard disk cannot be estimated due to abnormal conditions such as temperature loss of the lamp panel is avoided, and the temperature of the hard disk can be monitored.
In addition, in this embodiment, estimate the temperature of hard disk through the temperature of lamp plate, backplate, because lamp plate, backplate self just are provided with temperature sensor, consequently, can make full use of the current structure of equipment to can practice thrift the cost.
Optionally, in this embodiment, the step of obtaining the temperature of the environment where the hard disks are located at the reference time point as the environment reference temperature and the temperature in each hard disk as the first hard disk temperature includes: according to a first preset time interval, the temperature of the environment where the hard disks are located is obtained and used as an environment reference temperature, and the temperature in each hard disk is used as a first hard disk temperature.
That is, at every first preset time interval, the reference time point is updated to be the current time point, and the environmental reference temperature and the first hard disk temperature of each hard disk are updated.
The step of obtaining the current environment temperature of the environment where the hard disk is located at the current moment and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature comprises the steps of obtaining the current environment temperature of the environment where the hard disk is located at the current moment according to a second preset time interval from the time starting point of the first preset time interval in a first preset time interval, and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature, wherein the second preset time interval is smaller than the first preset time interval.
For example, in the present embodiment, the environmental reference temperature and the first hard disk temperature may be acquired in units of days. That is, the first preset time interval is 24 hours. At this time, if 0 point of each day is taken as the starting point time of the first preset time interval, at the 0 point time of the first day, the temperature of the environment where the hard disk is located at the 0 point time is obtained as the environmental reference temperature of the first day, and the first hard disk temperature of the hard disk at the 0 point time is obtained from each hard disk. And acquiring the current environment temperature of the environment where the hard disk is positioned according to a second preset time interval between the 0 point of the first day and the 0 point of the second day, and estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature and the environment reference temperature. And when the time of 0 point of the next day is reached, the temperature of the environment where the hard disk is located at the time of 0 point is obtained again to serve as the environment reference temperature of the next day, and the first hard disk temperature of the hard disk at the time of 0 point is obtained from each hard disk.
In this embodiment, the first preset time interval may be an integer multiple of the second preset time interval. Still taking the first predetermined time interval as a day (24 hours) as an example, the second predetermined time interval may be, but is not limited to, 15 minutes, or 5 minutes, etc., as determined by the actual situation.
In this embodiment, the temperature of the environment where the hard disk is located at the reference time point is obtained as the environment reference temperature according to the first preset time interval, and the temperature in each hard disk is obtained as the first hard disk temperature, so that the consumption of resources of the hard disks can be greatly reduced.
For example, in this embodiment, the environmental reference temperature and the first environmental temperature of each hard disk may be obtained when the hard disk runs and occupies less resources every day, so that the hard disk usage peak may be staggered, and the impact on the normal service is minimized.
Optionally, in this embodiment, the step of estimating the current hard disk temperature according to the current environment temperature, the second hard disk temperature, and the environment reference temperature includes calculating a difference between the environment reference temperature and the current environment temperature to obtain a temperature change value; and calculating the sum of the second hard disk temperature and the temperature change value to obtain the current hard disk temperature.
The method and the device are used for estimating the temperature of the hard disk according to the influence of the temperature of the hard disk on the temperature change of the environment where the hard disk is located, so that the current hard disk temperature which can reflect the environment temperature change and the state change of the hard disk at the same time is obtained.
Referring to fig. 6, another objective of the present application is to provide a hard disk temperature monitoring apparatus 110 applied to a hard disk monitoring system 100, the apparatus includes a first obtaining module 111, a second obtaining module 112, and a temperature calculating module 113. The hard disk temperature monitoring device 110 includes a software function module which can be stored in the memory 120 in the form of software or firmware or solidified in an Operating System (OS) of the hard disk monitoring system 100.
The first obtaining module 111 is configured to obtain a temperature of an environment where the hard disk is located at the reference time point as an environment reference temperature and a temperature in each hard disk as a first hard disk temperature.
The first obtaining module 111 in this embodiment is configured to execute step S110, and for a detailed description of the first obtaining module 111, reference may be made to the description of step S110.
The second obtaining module 112 is configured to obtain a second hard disk temperature from the first hard disk temperatures of all the hard disks.
The second obtaining module 112 in this embodiment is configured to perform step S120, and the detailed description about the second obtaining module 112 may refer to the description about the step S120.
And the temperature calculation module 113 is configured to obtain a current environment temperature of an environment where the hard disk is located at the current time, and estimate the current hard disk temperature according to the current environment temperature, the second hard disk temperature, and the environment reference temperature.
The temperature calculation module 113 in this embodiment is configured to perform steps S130 to S140, and specific descriptions about the temperature calculation module 113 may refer to the descriptions about the steps S130 to S140.
Optionally, the hard disk monitoring system 100 includes a cooling fan, the apparatus further includes a control module 114, and the control module 114 is specifically configured to execute steps S210 to S240.
The temperature calculation module 113 in this embodiment is specifically configured to execute steps S210 to S240, and the detailed description about the temperature calculation module 113 may refer to the description about steps S210 to S240.
Another object of the present application is to provide a readable storage medium, wherein an executable program is stored in the readable storage medium, and when the executable program is executed by the processor 130, the method according to any of the embodiments is implemented.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.