A fan rotating speed measurement method, device, equipment and readable storage medium
By automatically setting the duty cycle and measuring decibel value through a measuring device connected to the server, the cumbersome problem of fan speed measurement is solved, and efficient and accurate speed measurement without human intervention is achieved.
Patent Information
- Application Number
- CN202210898975.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-07-28
AI Technical Summary
In existing technologies, fan speed measurement requires manual disassembly of the fan and manual measurement, which is cumbersome and complicated, and lacks automated measurement methods.
By calling the BMC interface through a measuring device connected to the server, multiple duty cycles are set for the fan. The volume sensor measures the decibel value, establishes the correspondence between the duty cycle and the decibel value, and automatically determines the current duty cycle and calculates the speed.
It enables automated measurement of fan speed, reducing manpower consumption, lowering measurement complexity and cost, and improving measurement efficiency and accuracy.
Smart Images

Figure CN115202982B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of server fan measurement, and more particularly to a fan rotating speed measurement method, device, equipment and readable storage medium. BACKGROUND
[0002] For a server, the internal devices thereof will generate heat during working process, thereby causing internal temperature to rise. In order to ensure the stability and reliability of the working of the internal devices of the server, it is necessary to dissipate heat for the server. At present, the heat dissipation of the server is mainly realized through a fan module in the server, and therefore, the test of the rotating speed of the fan module is essential.
[0003] At present, when the fan in the server is tested, the fan module needs to be disassembled from the server, and then, the reflective paper is pasted on the fan by manual work, and the tachometer is held by manual work to aim at the reflective paper pasted on the fan, so as to realize the measurement of the rotating speed of the fan. The existing fan rotating speed measurement method not only needs to disassemble the fan from the server, but also needs manual participation, and therefore, it is relatively complicated to realize.
[0004] In summary, how to realize the automatic measurement of the rotating speed of the fan is a technical problem to be solved by the technical personnel in the field at present. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a fan rotating speed measurement method, device, equipment and readable storage medium, which is used to realize the automatic measurement of the rotating speed of the fan.
[0006] In order to achieve the above purpose, the present application provides the following technical scheme:
[0007] A fan rotating speed measurement method applied to a measurement device connected with a server, comprising:
[0008] calling an interface of a BMC in the server, and setting a plurality of duty cycles for the fan in the server through the interface; the server is placed in a test space with an environmental noise lower than a preset decibel value, and a volume sensor is arranged on the server;
[0009] obtaining a decibel value corresponding to each of the duty cycles and the fan measured by the volume sensor, and constructing a corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value;
[0010] obtaining a current decibel value of the fan measured by the volume sensor, and determining a current duty cycle corresponding to the current decibel value according to the corresponding relationship;
[0011] obtaining the rotating speed of the fan according to the current duty cycle.
[0012] Preferably, the step of obtaining the decibel value corresponding to each duty cycle of the fan measured by the volume sensor comprises:
[0013] obtaining a real-time decibel value corresponding to the duty cycle of the fan measured by the volume sensor;
[0014] determining whether the real-time decibel value does not change within a preset time length;
[0015] if yes, taking the real-time decibel value as the decibel value corresponding to the duty cycle of the fan.
[0016] Preferably, the step of sequentially setting multiple duty cycles for the fan in the server through the interface comprises:
[0017] setting the duty cycles from low to high and then from high to low for the fan through the interface;
[0018] or, setting the duty cycles from high to low and then from low to high for the fan through the interface.
[0019] Preferably, the step of constructing the corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value comprises:
[0020] repeating the steps of sequentially setting multiple duty cycles for the fan in the server through the interface and obtaining the decibel value corresponding to each duty cycle of the fan measured by the volume sensor for a preset number of times;
[0021] calculating an average decibel value corresponding to each duty cycle to obtain the corresponding relationship.
[0022] Preferably, after obtaining the current decibel value of the fan measured by the volume sensor, the method further comprises:
[0023] determining a decibel value error range corresponding to the current decibel value;
[0024] determining whether there is only one decibel value in the corresponding relationship within the decibel value error range;
[0025] if yes, determining a current duty cycle corresponding to the current decibel value according to the corresponding relationship, comprising:
[0026] taking the duty cycle corresponding to the only one decibel value in the corresponding relationship as the current duty cycle corresponding to the current decibel value.
[0027] Preferably, if it is determined that there is no only one decibel value in the corresponding relationship within the decibel value error range, the method further comprises:
[0028] increasing the number of times of repeatedly executing the step of setting the plurality of duty cycles for the fan in the server through the interface and the step of obtaining the decibel value corresponding to each of the duty cycles measured by the volume sensor;
[0029] recomputing the average decibel value corresponding to each of the duty cycles to obtain a new corresponding relationship;
[0030] obtaining a current decibel value of the fan measured by the volume sensor, and determining a decibel value error range corresponding to the current decibel value;
[0031] determining whether there is only one decibel value in the new corresponding relationship within the decibel value error range;
[0032] if yes, determining a current duty cycle corresponding to the current decibel value according to the corresponding relationship, comprising:
[0033] taking the duty cycle corresponding to the only one decibel value in the new corresponding relationship as the current duty cycle corresponding to the current decibel value.
[0034] Preferably, if it is determined that there is no only one decibel value in the new corresponding relationship within the decibel value error range, the method further comprises:
[0035] detecting whether the environmental noise exceeds the preset decibel value;
[0036] if yes, outputting a prompt that there is environmental noise;
[0037] if no, outputting a prompt that the fan speed is abnormal.
[0038] A fan speed measurement device applied to a measurement device connected to a server, comprising:
[0039] a setting module configured to call an interface of a BMC in the server, and set a plurality of duty cycles for a fan in the server through the interface; the server is placed in a test space with environmental noise lower than a preset decibel value, and a volume sensor is arranged on the server;
[0040] a construction module configured to obtain a decibel value corresponding to each of the duty cycles measured by the volume sensor, and construct a corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value;
[0041] a first determination module configured to obtain a current decibel value of the fan measured by the volume sensor, and determine a current duty cycle corresponding to the current decibel value according to the corresponding relationship;
[0042] a speed obtaining module configured to obtain a speed of the fan according to the current duty cycle.
[0043] A fan rotating speed measuring device, comprising:
[0044] a memory for storing a computer program;
[0045] a processor for implementing the steps of the fan rotating speed measuring method as claimed in any one of the preceding claims when executing the computer program.
[0046] A readable storage medium having a computer program stored therein, the computer program being executed by a processor to implement the steps of the fan rotating speed measuring method as claimed in any one of the preceding claims.
[0047] The application provides a fan rotating speed measuring method, device, equipment and readable storage medium, wherein the method is applied to a measuring device connected with a server, comprising: calling an interface of a BMC in the server, setting a plurality of duty cycles for fans in the server in sequence through the interface; the server is placed in a test space with an environmental noise lower than a preset decibel value, and a volume sensor is arranged on the server; obtaining decibel values corresponding to the fans and each duty cycle measured by the volume sensor, and constructing a corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value; obtaining a current decibel value of the fan measured by the volume sensor, determining a current duty cycle corresponding to the current decibel value according to the corresponding relationship; and obtaining the rotating speed of the fan according to the current duty cycle.
[0048] The above technical solutions disclosed by the application utilize the measuring device connected with the server to call the interface of the BMC in the server, set a plurality of duty cycles for the fans in the server in sequence through the interface, obtain the decibel values corresponding to the fans and each duty cycle respectively measured by the volume sensor arranged on the server, and construct the corresponding relationship between the duty cycle and the decibel value according to the set duty cycle and the decibel values corresponding to each duty cycle. Then, the current duty cycle of the fan measured by the volume sensor is obtained, the current duty cycle corresponding to the current decibel value is determined according to the current duty cycle of the fan and the constructed corresponding relationship, and the rotating speed of the fan is obtained according to the current duty cycle. That is, the application realizes the automatic measurement of the rotating speed of the fan through the measuring device, without the participation of manual work, so as to reduce the labor consumption, reduce the measurement complexity and cost, and improve the fan rotating speed measurement efficiency. Placing the server in the test space with the environmental noise lower than the preset decibel value can reduce the influence of the environmental noise on the measurement of the decibel value of the fan, and improve the accuracy of the fan rotating speed measurement. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only constitute a part of the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0050] Figure 1 A flow chart of a fan speed measurement method provided by an embodiment of the present application;
[0051] Figure 2 A flow chart of another fan speed measurement method provided by an embodiment of the present application;
[0052] Figure 3 A schematic diagram of verifying a fan provided by an embodiment of the present application;
[0053] Figure 4 An abnormal situation processing schematic diagram provided by an embodiment of the present application;
[0054] Figure 5 A structural schematic diagram of a fan speed measurement device provided by an embodiment of the present application;
[0055] Figure 6 A structural schematic diagram of a fan speed measurement device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0056] The core of the present application is to provide a fan speed measurement method, device, equipment and readable storage medium, which is used to realize automatic measurement of fan speed.
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments only constitute a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0058] Referring to Figure 1 , a flow chart of a fan speed measurement method provided by an embodiment of the present application is shown. The fan speed measurement method provided by an embodiment of the present application is applied to a measurement device connected with a server, and can include:
[0059] S11: calling an interface of a BMC in the server, and setting a plurality of duty cycles for fans in the server in sequence through the interface; the server is placed in a test space with an environmental noise lower than a preset decibel value, and a volume sensor is arranged on the server.
[0060] In the present application, a python script for implementing fan speed measurement is deployed in the measurement device.
[0061] When measuring the speed of the fan in the server, the server can be installed with the fan, and then the server is placed in a test space with an environmental noise lower than a preset decibel value. The size of the preset decibel value can be set according to experience or in combination with the detection capability of the volume sensor, for example, it can be set to 40 decibels. Wherein, placing the server in a test space with an environmental noise lower than a preset decibel value means placing the server in a quiet test space to avoid the influence of subsequent environmental noise on the fan decibel value measurement, thereby improving the accuracy of fan speed measurement. It should be noted that the fan in the present application is specifically a PWM (Pulse Width Modulation) fan.
[0062] After placing the server in a test space with an environmental noise lower than a preset decibel value, the server can be connected to the measurement device through a network cable or the like, so that they can communicate with each other. In addition, a volume sensor also needs to be installed in the server, wherein the volume sensor can be installed near the fan in the server or directly on the fan to facilitate the measurement of the fan decibel value.
[0063] After the above preparation work is completed, the measurement device can simulate a restful interface through the deployed python script to log in to the BMC (Basement management controller) in the server, and set a plurality of duty cycles for the fan in the server through the BMC fan interface. Specifically, the measurement device logs in to the BMC in the server through the deployed python script and calls the interface (specifically, the restful interface) of the BMC in the server, and sets a plurality of duty cycles for the fan in the server through the interface, so that the fan in the server runs at the set duty cycles.
[0064] In combination with the actual working condition of the fan, the fan can be set with 20%, 50%, 80%, and 100% duty cycles, of course, if the fan can work at other duty cycles, other duty cycles can also be set for the fan.
[0065] It should be noted that in the above-mentioned setting of a plurality of duty cycles in sequence, there can be a certain time interval between the setting of adjacent two duty cycles (the size of the time interval can be determined according to actual experience), so that the fan can work stably for a certain time according to the set duty cycle, thereby improving the accuracy of decibel value measurement, and thus facilitating the improvement of the accuracy of fan speed measurement, and at the same time avoiding the influence on the working performance of the fan through the above-mentioned operation.
[0066] S12: Obtain the decibel value corresponding to each duty cycle of the fan measured by the volume sensor, and construct the corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value.
[0067] On the basis of step S11, a duty cycle is set for each fan in the server, and the volume sensor can measure the decibel value corresponding to the set duty cycle of the fan, and the python script deployed in the measurement device can obtain the decibel value corresponding to the set duty cycle of the fan measured by the volume sensor through the restful interface of the BMC. Therefore, the python script deployed in the measurement device can obtain the decibel value corresponding to each duty cycle set in step S11 respectively through the restful interface of the BMC.
[0068] On the basis of the above, the python script deployed in the measurement device can construct the corresponding relationship between the duty cycle and the decibel value according to the set duty cycle and the decibel value corresponding to the set duty cycle, and can store the constructed corresponding relationship, so as to facilitate subsequent measurement of the fan speed based on the corresponding relationship.
[0069] S13: Obtain the current decibel value of the fan measured by the volume sensor, and determine the current duty cycle corresponding to the current decibel value according to the corresponding relationship.
[0070] When it is necessary to measure the fan speed (for example, receiving a fan speed measurement instruction or the current condition meeting a fan speed measurement strategy (such as a strategy of measuring the fan speed at a fixed time)), the python script deployed in the measurement device can control the volume sensor to measure the current decibel value of the fan through the restful interface of the BMC (of course, the volume sensor can also measure the decibel value of the fan at all times to prepare for the fan speed measurement), and obtain the current decibel value of the fan in the server measured by the volume sensor through the restful interface of the BMC. Then, the current duty cycle corresponding to the current decibel value can be determined according to the corresponding relationship between the duty cycle and the decibel value constructed in step S12 and the current decibel value of the fan measured by the volume sensor, that is, the duty cycle corresponding to the current working of the fan in the server is obtained.
[0071] S14: Obtain the speed of the fan according to the current duty cycle.
[0072] After obtaining the current duty cycle of the fan, the speed of the fan can be obtained according to the current duty cycle. Specifically, the current duty cycle of the fan can be multiplied by the maximum speed of the fan to obtain the speed of the fan.
[0073] It should be noted that after step S13, the python script deployed in the measurement device can also obtain the duty ratio of the fan itself through the restful interface of the BMC, and compare the current duty ratio obtained in step S13 with the duty ratio of the fan itself. If the two are consistent, it indicates that the fan does not exist abnormally, and if the two are inconsistent, it indicates that the fan speed exists abnormally.
[0074] Through the above process, it can be known that the application utilizes the measurement device connected with the server to realize the automatic measurement of the fan speed in the server, without the need for manual participation in the fan speed measurement process, and without the need for disassembling the fan from the server. Therefore, the complexity of fan speed measurement can be reduced, the human cost of fan measurement can be reduced, and the convenience and efficiency of fan speed measurement can be improved.
[0075] The above technical solution disclosed in the application utilizes the measurement device connected with the server to call the interface of the BMC in the server, sets multiple duty ratios for the fan in the server through the interface in sequence, obtains the decibel values corresponding to the set duty ratios respectively measured by the volume sensor arranged on the server, and constructs the corresponding relationship between the duty ratio and the decibel value according to the set duty ratios and the decibel values corresponding to the duty ratios. Then, the current duty ratio of the fan measured by the volume sensor is obtained, the current duty ratio corresponding to the current decibel value is determined according to the current duty ratio of the fan and the constructed corresponding relationship, and the fan speed is obtained according to the current duty ratio. That is, the application realizes the automatic measurement of the fan speed through the measurement device, without the need for manual participation, so as to reduce the human consumption, reduce the measurement complexity and measurement cost, and improve the fan speed measurement efficiency. Placing the server in a test space with an environmental noise lower than a preset decibel value can reduce the influence of the environmental noise on the fan decibel value measurement, and improve the accuracy of the fan speed measurement.
[0076] Specifically, reference can be made to Figure 2 which shows a flowchart of another fan speed measurement method provided by an embodiment of the application. The fan speed measurement method provided by an embodiment of the application can include:
[0077] obtaining the real-time decibel value corresponding to the fan and the duty ratio measured by the volume sensor;
[0078] determining whether the real-time decibel value does not change within a preset time length;
[0079] If yes, the real-time decibel value is taken as the decibel value corresponding to the fan and the duty ratio.
[0080] In the present application, when obtaining the fan and the corresponding duty cycle of the volume sensor measurement of the decibel value, the real-time decibel value of the fan and the duty cycle corresponding to the volume sensor measurement can be obtained, and then it can be judged whether the real-time decibel value changes within a preset time length, wherein the preset time length mentioned here can be less than the aforementioned certain time interval, for example, the preset time length can be 10s.
[0081] If the real-time decibel value changes within the preset time length, it indicates that the fan is not working stably at this duty cycle, therefore, in order to improve the accuracy of the fan speed measurement, the real-time decibel value obtained at this time can not be used as the final decibel value corresponding to the duty cycle. If the real-time decibel value does not change within the preset time length, it indicates that the fan is working stably at this duty cycle, and at this time, the real-time decibel value obtained by the volume sensor measurement can be used as the final decibel value corresponding to the duty cycle.
[0082] It should be noted that for each duty cycle set, the final corresponding decibel value is determined in the above manner to improve the accuracy of the corresponding decibel value determination, thereby improving the accuracy of the corresponding relationship determination, and further improving the accuracy of the fan speed measurement.
[0083] The fan speed measurement method provided by the embodiments of the present application sets a plurality of duty cycles for the fan in the server through the interface, which can include:
[0084] The duty cycles are set from low to high and then from high to low for the fan through the interface.
[0085] Alternatively, the duty cycles are set from high to low and then from low to high for the fan through the interface.
[0086] In the present application, when a plurality of duty cycles are set for the fan in the server through the interface, the duty cycles can be set from high to low and then from low to high for the fan through the interface. Taking the set duty cycles of 20%, 50%, 80%, and 100% as an example, the duty cycle of the fan can be set to 20%, 50%, 80%, and 100% in turn, and then the duty cycle of the fan can be set to 100%, 80%, 50%, and 20% in turn.
[0087] Alternatively, the duty cycles are set from high to low and then from low to high for the fan through the interface. Taking the set duty cycles of 20%, 50%, 80%, and 100% as an example, the duty cycle of the fan can be set to 100%, 80%, 50%, and 20% in turn, and then the duty cycle of the fan can be set to 20%, 50%, 80%, and 100% in turn.
[0088] The fan duty cycle setting mode (from high to low, from low to high) can be used to set the fan duty cycle, so as to cover various working modes of the fan, thereby improving the accuracy of the corresponding relationship acquisition, and improving the accuracy of the fan speed measurement.
[0089] The fan speed measurement method provided by the embodiment of the application can include the following steps:
[0090] The steps of setting multiple duty cycles for the fan in the server through the interface and the steps of obtaining the decibel value corresponding to each duty cycle measured by the volume sensor are repeatedly executed for a preset number of times;
[0091] The average decibel value corresponding to each duty cycle is calculated to obtain the corresponding relationship.
[0092] In the application, when the corresponding relationship between the duty cycle and the decibel value is constructed according to the duty cycle and the decibel value, the python script can repeatedly execute the steps of setting multiple duty cycles for the fan in the server through the interface and the steps of obtaining the decibel value corresponding to each duty cycle measured by the volume sensor for a preset number of times, wherein the preset number of times can be set according to actual experience, for example, the python script can be repeated 1000-2000 times. Then, the average decibel value corresponding to each duty cycle can be calculated according to the decibel value corresponding to each duty cycle obtained each time, to obtain the corresponding relationship between the duty cycle and the decibel value (here, the decibel value is the average decibel value), that is, the corresponding relationship between the duty cycle a, b, c, d and the decibel value e, f, g, h.
[0093] The method of repeatedly setting a preset number of times and calculating the average decibel value corresponding to each duty cycle to obtain the corresponding relationship can improve the accuracy of the decibel value calculation, thereby facilitating the improvement of the accuracy of the fan speed measurement.
[0094] Of course, after calculating the average decibel value corresponding to each duty cycle, the corresponding relationship expression can also be obtained according to the duty cycle and the corresponding average decibel value, so as to directly calculate the current duty cycle according to the corresponding relationship expression and the current decibel value, thereby calculating the fan speed.
[0095] The fan speed measurement method provided by the embodiment of the application can further include the following steps after obtaining the current decibel value of the fan measured by the volume sensor:
[0096] Determine the decibel value error range corresponding to the current decibel value;
[0097] Determine whether there is only one decibel value in the corresponding relationship within the decibel value error range;
[0098] If yes, the current duty cycle corresponding to the current decibel value is determined according to the correspondence, which can include:
[0099] The duty cycle corresponding to the only one decibel value in the correspondence is taken as the current duty cycle corresponding to the current decibel value.
[0100] In the present application, on the basis of calculating the average decibel value corresponding to each duty cycle to obtain the correspondence, after obtaining the current decibel value of the fan measured by the volume sensor, the decibel value error range corresponding to the current decibel value can be determined according to the pre-determined error range (determined according to the accuracy of the volume sensor). After determining the decibel value error range corresponding to the current decibel value, it is judged whether there is only one decibel value in the correspondence within the decibel value error range, if it is determined that there is only one decibel value in the correspondence within the determined decibel value error range, it indicates that there is no abnormal situation affecting the fan speed measurement, on this basis, the process of determining the current duty cycle corresponding to the current decibel value according to the correspondence is: obtaining the duty cycle corresponding to the only one decibel value from the obtained correspondence, and taking the obtained duty cycle corresponding to the only one decibel value as the current duty cycle, so as to improve the accuracy of the fan speed measurement.
[0101] Taking the current decibel value as x and the error range as ±5% as an example, the decibel value error range corresponding to the current decibel value is 0.95x-1.05x, at this time, it can be judged whether there is only one decibel value in the obtained correspondence within 0.95x-1.05x, that is, it is determined whether 0.95x-1.05x covers one decibel value in the correspondence and the decibel value is unique.
[0102] Specifically, it can be seen from Figure 3 which shows a schematic diagram of verifying the fan provided by the embodiment of the present application. After determining the current duty cycle by the above-mentioned manner, the python script can also obtain the duty cycle of the fan through the restful interface, and compare the current duty cycle with the duty cycle of the fan, if they are consistent, it indicates that the fan does not exist abnormal, the test is passed, if they are inconsistent, it indicates that the fan speed is abnormal, the test is not passed.
[0103] The fan speed measurement method provided by the embodiment of the present application can further include:
[0104] The number of times of repeating the steps of sequentially setting a plurality of duty cycles for the fan in the server through the interface and obtaining the decibel value of the fan corresponding to each duty cycle measured by the volume sensor is increased;
[0105] The average decibel value corresponding to each duty cycle is recalculated to obtain a new correspondence;
[0106] obtaining a current decibel value of the fan measured by the volume sensor, determining a decibel value error range corresponding to the current decibel value;
[0107] judging whether there is only one decibel value in the new corresponding relationship located in the decibel value error range;
[0108] if yes, determining a current duty cycle corresponding to the current decibel value according to the corresponding relationship, which can comprise:
[0109] taking the duty cycle corresponding to the only one decibel value in the new corresponding relationship as the current duty cycle corresponding to the current decibel value.
[0110] In the present application, if it is determined that there is not only one decibel value in the corresponding relationship located in the decibel value error range, specifically, if it is determined that there is not any decibel value in the corresponding relationship located in the decibel value error range, or there are at least two decibel values in the corresponding relationship located in the decibel value error range, it indicates that there is an abnormal situation, and the abnormal situation can be that the repeated preset number of times is too small, which can be specifically referred to in Figure 4 which shows an abnormal situation processing schematic diagram provided by the embodiments of the present application. Therefore, after it is determined that there is not only one decibel value in the corresponding relationship located in the decibel value error range, the number of times of repeatedly executing the steps of sequentially setting multiple duty cycles for the fan in the server through the interface and the steps of obtaining the decibel values of the fan corresponding to each duty cycle measured by the volume sensor can be increased (the increased number of times can be the same as the preset number of times, or can be set according to experience). Then, the average decibel values corresponding to each duty cycle are recalculated according to the repeated preset number of times and the increased repeated number of times, so as to obtain a new corresponding relationship (i.e. to obtain the relationship between each duty cycle and the recalculated average decibel value). Then, the current decibel value of the fan obtained by the volume sensor can be obtained, the decibel value error range corresponding to the current decibel value is determined, and it is judged whether there is only one decibel value in the obtained new corresponding relationship located in the decibel value error range. If yes, the duty cycle corresponding to the only one decibel value is obtained from the obtained new corresponding relationship, and the obtained duty cycle corresponding to the only one decibel value is taken as the current duty cycle, so as to improve the accuracy of the fan speed measurement.
[0111] It should be noted that the above-mentioned process is similar to the process performed after the repeated preset number of times mentioned before, which will not be described here.
[0112] The fan speed measurement method provided by the embodiments of the present application can further comprise:
[0113] detecting whether the environmental noise exceeds a preset decibel value;
[0114] If yes, output a prompt that there is environmental noise influence;
[0115] If no, output a prompt that the fan rotation speed is abnormal.
[0116] In the present application, after increasing the number of repetitions and obtaining a new corresponding relationship, and re-determining, if it is determined that there is not a unique decibel value in the new corresponding relationship within the decibel value error range, it indicates that it is not that the number of repetitions is too small to cause the above-mentioned situation, but it may be caused by environmental noise or fan rotation speed abnormality. Therefore, it can be detected whether the environmental noise exceeds the preset decibel value. Specifically, the fan can be controlled to stop running, and the volume sensor can be controlled to measure the decibel value after the fan stops running (the decibel value is the environmental noise), and the decibel value measured by the volume sensor after the fan stops running is obtained. Then, it is determined whether the decibel value measured by the volume sensor after the fan stops running exceeds the preset decibel value. If yes, it is determined that the environmental noise exceeds the preset decibel value. If no, it is determined that the environmental noise does not exceed the preset decibel value.
[0117] If it is determined that the environmental noise exceeds the preset decibel value, it indicates that there is other noise in the environment that affects the fan rotation speed measurement. Therefore, a prompt that there is environmental noise influence can be output, so that relevant personnel can replace the test space or remove the environmental noise according to the prompt, thereby reducing the influence of environmental noise and improving the accuracy of fan rotation speed measurement.
[0118] If it is determined that the environmental noise does not exceed the preset decibel value, it indicates that there is no other noise in the environment that affects the fan rotation speed measurement, but the fan rotation speed is abnormal. At this time, a prompt that the fan rotation speed is abnormal can be output, so that relevant personnel can troubleshoot the fan according to the prompt, thereby facilitating the continuation of fan rotation speed measurement.
[0119] The present application also provides a fan rotation speed measurement device, which is applied to a measurement equipment connected with a server, as shown in Figure 5 which shows a structural schematic diagram of a fan rotation speed measurement device provided by an embodiment of the present application, and can include:
[0120] The setting module 51 is configured to call the interface of the BMC in the server, and set a plurality of duty cycles for the fan in the server through the interface; the server is placed in a test space with environmental noise lower than a preset decibel value, and the server is provided with a volume sensor;
[0121] The construction module 52 is configured to obtain the decibel values corresponding to the fan and each duty cycle measured by the volume sensor, and construct the corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value;
[0122] The first determining module 53 is configured to acquire a current decibel value of the fan measured by the volume sensor, and determine a current duty cycle corresponding to the current decibel value according to the corresponding relationship.
[0123] The obtaining speed module 54 is configured to obtain the rotating speed of the fan according to the current duty cycle.
[0124] The fan rotating speed measurement device provided by the embodiment of the present application can comprise:
[0125] The obtaining unit is configured to obtain a real-time decibel value of the fan corresponding to the duty cycle measured by the volume sensor.
[0126] The judging unit is configured to judge whether the real-time decibel value is changed within a preset time length.
[0127] The first setting unit is configured to set the real-time decibel value as the decibel value of the fan corresponding to the duty cycle if the real-time decibel value is not changed within the preset time length.
[0128] The fan rotating speed measurement device provided by the embodiment of the present application can comprise:
[0129] The setting unit is configured to set the duty cycle of the fan from low to high and then from high to low through the interface, or set the duty cycle of the fan from high to low and then from low to high through the interface.
[0130] The fan rotating speed measurement device provided by the embodiment of the present application can comprise:
[0131] The repeating unit is configured to repeat the steps of setting the multiple duty cycles of the fan in the server through the interface in sequence and obtaining the decibel values of the fan corresponding to the duty cycles measured by the volume sensor for a preset number of times.
[0132] The calculating unit is configured to calculate the average decibel values corresponding to the duty cycles to obtain the corresponding relationship.
[0133] The fan rotating speed measurement device provided by the embodiment of the present application can further comprise:
[0134] The second determining module is configured to determine a decibel value error range corresponding to the current decibel value after acquiring the current decibel value of the fan measured by the volume sensor.
[0135] The first judging module is configured to judge whether there is only one decibel value in the corresponding relationship within the decibel value error range.
[0136] The first determining module 53 can comprise:
[0137] The second determining unit is configured to determine, if there is only one decibel value in the corresponding relationship within the decibel value error range, a duty cycle corresponding to the only one decibel value in the corresponding relationship as a current duty cycle corresponding to the current decibel value.
[0138] The fan rotating speed measuring device provided in the embodiment of the present application can further comprise:
[0139] The increasing module is configured to increase the number of times of repeatedly executing the steps of sequentially setting the plurality of duty cycles for the fan in the server through the interface and obtaining the decibel values corresponding to the plurality of duty cycles measured by the volume sensor, if there is not only one decibel value in the corresponding relationship within the decibel value error range.
[0140] The recalculation module is configured to recalculate the average decibel values corresponding to the plurality of duty cycles to obtain a new corresponding relationship.
[0141] The obtaining module is configured to obtain a current decibel value of the fan measured by the volume sensor, and determine a decibel value error range corresponding to the current decibel value.
[0142] The second determining module is configured to determine whether there is only one decibel value in the new corresponding relationship within the decibel value error range.
[0143] The first determining module 53 can comprise:
[0144] The third determining unit is configured to determine, if there is only one decibel value in the new corresponding relationship within the decibel value error range, a duty cycle corresponding to the only one decibel value in the new corresponding relationship as a current duty cycle corresponding to the current decibel value.
[0145] The fan rotating speed measuring device provided in the embodiment of the present application can further comprise:
[0146] The detecting module is configured to detect whether the environmental noise exceeds a preset decibel value.
[0147] The first output module is configured to output a prompt that the environmental noise exists if the environmental noise exceeds the preset decibel value.
[0148] The second output module is configured to output a prompt that the fan rotating speed is abnormal if the environmental noise does not exceed the preset decibel value.
[0149] The embodiment of the present application further provides a fan rotating speed measuring device, referring to Figure 6 which shows a structural schematic diagram of a fan rotating speed measuring device provided in the embodiment of the present application, and can comprise:
[0150] The memory 61 is configured to store a computer program.
[0151] The processor 62, when executing the computer program stored in the memory 61, can implement the following steps:
[0152] The interface of the BMC in the server is called, and a plurality of duty cycles are set for the fan in the server through the interface; the server is placed in a test space in which the environmental noise is lower than a preset decibel value, and a volume sensor is arranged on the server; a decibel value corresponding to each duty cycle of the fan measured by the volume sensor is obtained, and a corresponding relationship between the duty cycle and the decibel value is constructed according to the duty cycle and the decibel value; a current decibel value of the fan measured by the volume sensor is obtained, and a current duty cycle corresponding to the current decibel value is determined according to the corresponding relationship; and the speed of the fan is obtained according to the current duty cycle.
[0153] The embodiment of the application further provides a readable storage medium, and the readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0154] The interface of the BMC in the server is called, and a plurality of duty cycles are set for the fan in the server through the interface; the server is placed in a test space in which the environmental noise is lower than a preset decibel value, and a volume sensor is arranged on the server; a decibel value corresponding to each duty cycle of the fan measured by the volume sensor is obtained, and a corresponding relationship between the duty cycle and the decibel value is constructed according to the duty cycle and the decibel value; a current decibel value of the fan measured by the volume sensor is obtained, and a current duty cycle corresponding to the current decibel value is determined according to the corresponding relationship; and the speed of the fan is obtained according to the current duty cycle.
[0155] The readable storage medium can include a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0156] The description of the fan speed measuring device, the equipment and the related part of the readable storage medium provided in the application can refer to the detailed description of the corresponding part of the fan speed measuring method provided in the embodiment of the application, and will not be repeated here.
[0157] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting; it is not intended to exclude myriad other embodiments of the present application that are not specifically enumerated herein. The use of certain terms in various places of this application is not intended to exclude all other embodiments that can be drawn to the same general concept. It is intended that the present application encompass all such possible embodiments.
[0158] The above description of disclosed embodiments provides enough information to enable those skilled in the art to make or use the application. Various modifications will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Accordingly, the application is not to be restricted as only described in the description herein but is to be given the full scope that the principles and novel features recited herein support.
Claims
1. A method of measuring the rotational speed of a fan, characterized by, The application is applied to a measuring device connected with a server, a script for realizing fan rotating speed measurement is deployed in the measuring device, and the method comprises the following steps: Logging in the BMC in the server through the deployed script, and calling the restful interface of the BMC in the server to set multiple duty cycles for the fan in the server in sequence through the restful interface; the server is placed in a test space with an environmental noise lower than a preset decibel value, and a volume sensor is arranged on the server; Obtaining the decibel values corresponding to the fan and each duty cycle measured by the volume sensor through the restful interface, and constructing a corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value; Obtaining the current decibel value of the fan measured by the volume sensor through the restful interface, and determining the current duty cycle corresponding to the current decibel value according to the corresponding relationship; Obtaining the rotating speed of the fan according to the current duty cycle; Wherein, obtaining the decibel values corresponding to the fan and each duty cycle measured by the volume sensor comprises: Obtaining the real-time decibel value corresponding to the fan and the duty cycle measured by the volume sensor; Judging whether the real-time decibel value changes within a preset time length; If yes, the real-time decibel value is taken as the decibel value corresponding to the fan and the duty cycle; Wherein, constructing the corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value comprises: Repeating the steps of setting multiple duty cycles for the fan in the server in sequence through the restful interface and obtaining the decibel values corresponding to the fan and each duty cycle measured by the volume sensor a preset number of times; Calculating the average decibel value corresponding to each duty cycle according to the decibel values corresponding to each duty cycle obtained each time to obtain the corresponding relationship between the duty cycle and the average decibel value.
2. The fan speed measurement method of claim 1, wherein, Setting multiple duty cycles for the fan in the server in sequence through the restful interface comprises: Setting the duty cycles from low to high and then from high to low for the fan through the restful interface; Or, setting the duty cycles from high to low and then from low to high for the fan through the restful interface.
3. The fan speed measurement method of claim 1, wherein, After obtaining the current decibel value of the fan measured by the volume sensor, further comprising: Determining the decibel value error range corresponding to the current decibel value; Judging whether there is only one decibel value in the corresponding relationship located in the decibel value error range; If yes, determining the current duty cycle corresponding to the current decibel value according to the corresponding relationship comprises: Taking the duty cycle corresponding to the only one decibel value in the corresponding relationship as the current duty cycle corresponding to the current decibel value.
4. The fan speed measurement method of claim 3, wherein, If it is determined that there is no only one decibel value in the corresponding relationship located in the decibel value error range, further comprising: Increasing the number of times of repeating the steps of setting multiple duty cycles for the fan in the server in sequence through the restful interface and obtaining the decibel values corresponding to the fan and each duty cycle measured by the volume sensor; re-calculate average decibel values corresponding to each of the duty cycles to obtain a new corresponding relationship; obtain a current decibel value of the fan measured by the volume sensor, and determine a decibel value error range corresponding to the current decibel value; determine whether there is only one decibel value in the new corresponding relationship within the decibel value error range; if yes, determine a current duty cycle corresponding to the current decibel value according to the corresponding relationship, including: taking the duty cycle corresponding to the only one decibel value in the new corresponding relationship as the current duty cycle corresponding to the current decibel value.
5. The fan speed measurement method of claim 4, wherein, if it is determined that there is no only one decibel value in the new corresponding relationship within the decibel value error range, further including: detecting whether the environmental noise exceeds the preset decibel value; if yes, outputting a prompt that there is environmental noise influence; if no, outputting a prompt that the fan speed is abnormal.
6. A fan speed measurement device, characterized by, application to a measurement device connected to a server, the measurement device deploying a script for implementing fan speed measurement, the device comprising: a setting module for logging into a BMC in the server through the deployed script, and calling a restful interface of the BMC in the server, and setting a plurality of duty cycles for the fan in the server through the restful interface; the server is placed in a test space where the environmental noise is lower than a preset decibel value, and a volume sensor is arranged on the server; a construction module for obtaining, through the restful interface, decibel values corresponding to the fan and each of the duty cycles measured by the volume sensor, and constructing a corresponding relationship between the duty cycle and the decibel value according to the duty cycle and the decibel value; a first determination module for obtaining, through the restful interface, a current decibel value of the fan measured by the volume sensor, and determining a current duty cycle corresponding to the current decibel value according to the corresponding relationship; a speed obtaining module for obtaining the speed of the fan according to the current duty cycle; wherein the construction module comprises: an acquisition unit for acquiring real-time decibel values corresponding to the fan and the duty cycle measured by the volume sensor; a judgment unit for judging whether the real-time decibel values change within a preset time length; a first unit for taking the real-time decibel values as the decibel values corresponding to the fan and the duty cycle if the real-time decibel values do not change within the preset time length. wherein the construction module comprises: a repeating unit for repeatedly executing the steps of setting a plurality of duty cycles for the fan in the server through the interface and acquiring decibel values corresponding to the fan and each of the duty cycles measured by the volume sensor for a preset number of times; a calculation unit for calculating average decibel values corresponding to each of the duty cycles according to the decibel values corresponding to each of the duty cycles obtained each time, to obtain a corresponding relationship between the duty cycle and the average decibel value.
7. A fan speed measurement apparatus, characterized by, comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the fan speed measurement method according to any one of claims 1 to 5.
8. A readable storage medium, characterized by, The readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the fan rotating speed measurement method in any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent fan control method and system applied to server
CN108536259A