CN115509337A - Power supply detection method, device, equipment and readable storage medium - Google Patents
Power supply detection method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN115509337A CN115509337A CN202211190955.9A CN202211190955A CN115509337A CN 115509337 A CN115509337 A CN 115509337A CN 202211190955 A CN202211190955 A CN 202211190955A CN 115509337 A CN115509337 A CN 115509337A
- Authority
- CN
- China
- Prior art keywords
- power supply
- tested
- item
- parameter value
- supply information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 67
- 238000000034 method Methods 0.000 claims description 38
- 238000004590 computer program Methods 0.000 claims description 35
- 230000000694 effects Effects 0.000 abstract description 2
- 238000004891 communication Methods 0.000 description 9
- 230000002159 abnormal effect Effects 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 6
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000005055 memory storage Effects 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/28—Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
The application discloses a power supply detection method, a device, equipment and a readable storage medium in the technical field of computers. After power supply information of target equipment is acquired, a plurality of items to be tested corresponding to the power supply information, a parameter value range corresponding to each item to be tested and an alarm level are inquired from a multi-type power supply information database; comparing the actual parameter value of each item to be tested in the target equipment with the corresponding parameter value range; the alarm logs are generated according to the comparison results and the corresponding alarm levels, so that detection of different types of power supplies can be taken into consideration in a targeted manner without manually configuring detection items, a multi-type power supply information database can be automatically inquired after the type of the equipment power supply is changed, and power supply detection is continuously carried out according to the original flow according to the inquiry results, so that the sustainability and the efficiency of a power supply detection flow can be improved. Accordingly, the power detection device, the equipment and the readable storage medium provided by the application also have the technical effects.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a power detection method, apparatus, device, and readable storage medium.
Background
At present, the power types of supplying power to equipment such as switches and servers are different, and the detection items of the equipment are different aiming at different types of power supplies, so that the detection items of the power supplies are required to be manually configured again by technicians after the power supplies of the equipment such as switches and servers are replaced, the manual configuration is low in efficiency and easy to make mistakes, and the sustainability and the efficiency of a power supply detection process are also reduced.
Therefore, how to improve the sustainability and efficiency of the power detection process is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present application provides a power detection method, apparatus, device and readable storage medium to improve sustainability and efficiency of a power detection process. The specific scheme is as follows:
in a first aspect, the present application provides a power detection method, including:
acquiring power supply information of target equipment;
inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range and an alarm grade corresponding to each item to be tested from a multi-type power supply information database;
reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result;
and generating an alarm log according to the comparison result and the corresponding alarm level.
Optionally, the acquiring power information of the target device includes:
and acquiring the power type from the memory of the target equipment as the power information.
Optionally, if a power supply replacement signal is detected, the step of acquiring the power supply information of the target device is performed.
Optionally, before querying the item to be tested corresponding to the power information, the parameter value range corresponding to the item to be tested, and the alarm level from the multi-type power information database, the method further includes:
and if the currently acquired power supply information is inconsistent with the power supply information recorded last time, the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range and the alarm level corresponding to the item to be tested from the multi-type power supply information database is executed.
Optionally, the method further comprises:
and if the currently acquired power supply information is consistent with the power supply information recorded last time, waiting for executing a power supply detection timing task.
Optionally, the method further comprises:
and if the item to be tested and/or the parameter value range and/or the alarm grade are not inquired from the multi-type power supply information database, writing the item to be tested and/or the parameter value range and/or the alarm grade into the multi-type power supply information database, and then executing the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range corresponding to the item to be tested and the alarm grade from the multi-type power supply information database.
Optionally, before generating an alarm log according to the comparison result and the corresponding alarm level, the method further includes:
updating and recording the comparison times;
if the updated comparison times are larger than a preset threshold value, executing the step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, the step of reading the actual parameter value of each item to be tested in the target device and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result is executed until the updated comparison times are larger than the preset threshold value.
In a second aspect, the present application provides a power detection apparatus, including:
the acquisition module is used for acquiring power supply information of the target equipment;
the query module is used for querying items to be tested corresponding to the power supply information, parameter value ranges and alarm levels corresponding to the items to be tested from a multi-type power supply information database;
the comparison module is used for reading the actual parameter value of each item to be measured in the target equipment and comparing the actual parameter value of each item to be measured with the corresponding parameter value range to obtain a comparison result;
and the generating module is used for generating an alarm log according to the comparison result and the corresponding alarm level.
Optionally, the obtaining module is specifically configured to:
and acquiring the power type from the memory of the target equipment as the power information.
Optionally, the obtaining module is specifically configured to:
and if the power supply replacement signal is detected, executing the step of acquiring the power supply information of the target equipment.
Optionally, the method further comprises:
and the execution module is used for executing the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range corresponding to the item to be tested and the alarm level from the multi-type power supply information database if the currently acquired power supply information is inconsistent with the power supply information recorded at the previous time.
Optionally, the execution module is further configured to:
and if the currently acquired power supply information is consistent with the power supply information recorded last time, waiting for executing a power supply detection timing task.
Optionally, the method further comprises:
and the database updating module is used for writing the item to be tested and/or the parameter value range and/or the alarm grade into the multi-type power supply information database if the item to be tested and/or the parameter value range and/or the alarm grade are not queried from the multi-type power supply information database, and then executing the step of querying the item to be tested corresponding to the power supply information, the parameter value range and the alarm grade corresponding to the item to be tested from the multi-type power supply information database.
Optionally, the method further comprises:
the repeated detection module is used for updating and recording the comparison times; if the updated comparison times are larger than a preset threshold value, executing the step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, the step of reading the actual parameter value of each item to be tested in the target device and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result is executed until the updated comparison times are larger than the preset threshold value.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the power detection method disclosed in the foregoing.
In a fourth aspect, the present application provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the power detection method disclosed in the foregoing.
According to the scheme, the power supply detection method comprises the following steps: acquiring power supply information of target equipment; inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range corresponding to each item to be tested and an alarm grade from a multi-type power supply information database; reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level.
Therefore, the multi-type power supply information database is used for providing a plurality of items to be tested of various types of power supplies, and a parameter value range and an alarm grade corresponding to each item to be tested, so that the items to be tested, the parameter value range and the alarm grade corresponding to each item to be tested can be determined for any type of power supply, then the actual parameter value of each item to be tested in the target equipment is read, the actual parameter value of each item to be tested is compared with the corresponding parameter value range, and a comparison result is obtained; and generating an alarm log according to the comparison result and the corresponding alarm level. Therefore, detection of different types of power supplies can be taken into consideration in a targeted manner, manual configuration of detection items is not needed, after the type of the equipment power supply is changed, corresponding detection items, parameter value ranges and alarm levels corresponding to each item to be detected can be automatically inquired, and accordingly, power supply detection is continued according to the original flow according to the inquiry result, and therefore the sustainability and the efficiency of the power supply detection flow can be improved.
Accordingly, the power detection device, the equipment and the readable storage medium provided by the application also have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a power detection method disclosed herein;
FIG. 2 is a flow chart of another power detection method disclosed herein;
FIG. 3 is a schematic diagram of a power detection apparatus disclosed herein;
fig. 4 is a schematic diagram of an electronic device disclosed in the present application.
Detailed Description
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 only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, the power types of supplying power to equipment such as switches and servers are different, and for different types of power supplies, the detection items are different, so that after the types of the power supplies of the equipment such as switches and servers are replaced, technicians are required to manually configure the detection items of the power supplies again, manual configuration is low in efficiency and prone to errors, and the sustainability and the efficiency of a power supply detection process are reduced. Therefore, the power supply detection scheme can automatically inquire the corresponding detection items, the parameter value range and the alarm level corresponding to each item to be detected after the equipment power supply type is changed, so that the power supply detection is continuously carried out according to the inquiry result and the sustainability and the efficiency of the power supply detection process can be improved.
Referring to fig. 1, an embodiment of the present application discloses a power detection method, including:
s101, obtaining power supply information of the target device.
The embodiment may be implemented by a BMC (Baseboard Management Controller) in the target device, and the target device may be a server, a switch, or the like. Information such as the power model of the target device is generally recorded in the device memory, so in one embodiment, the obtaining of the power information of the target device includes: and acquiring the power type from the memory of the target equipment as power information.
It should be noted that this embodiment may be executed after the user triggers, may be executed at regular time, or may be executed after the power supply replacement signal is detected. Therefore, in one embodiment, if the power supply replacement signal is detected, acquiring the power supply information of the target device is performed; inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range and an alarm grade corresponding to each item to be tested from a multi-type power supply information database; reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level. It can be seen that S101-S104 may be performed after the power-supply replacement signal is detected.
S102, a plurality of items to be tested corresponding to the power supply information, a parameter value range corresponding to each item to be tested and an alarm grade are inquired from a multi-type power supply information database.
The multi-type power supply information database records information such as each item to be tested corresponding to various types of power supplies, parameter value range and alarm grade corresponding to each item to be tested, and can be read and written by users. Therefore, in an embodiment, if the item to be tested and/or the parameter value range and/or the alarm level are not queried from the multi-type power information database, the step of querying the item to be tested corresponding to the power information, the parameter value range corresponding to the item to be tested, and the alarm level from the multi-type power information database, and other subsequent steps are performed after the item to be tested and/or the parameter value range and/or the alarm level are written into the multi-type power information database. In this way, the user can write information that he or she did not have recorded to the database. Of course, the information already in the database may also be modified and deleted by the user.
In order to detect the power supply types before and after the target device is replaced, the obtained power supply information can be compared with the power supply information recorded at the previous time, and when the obtained power supply information is inconsistent with the power supply information recorded at the previous time, the multi-type power supply information database is inquired immediately. Therefore, in an embodiment, before querying an item to be tested corresponding to power supply information, a parameter value range corresponding to the item to be tested, and an alarm level from a multi-type power supply information database, the method further includes: and if the currently acquired power supply information is inconsistent with the power supply information recorded last time, a step of inquiring an item to be detected corresponding to the power supply information, a parameter value range and an alarm grade corresponding to the item to be detected from the multi-type power supply information database, and other subsequent steps are performed, so that the relevant state of the replaced power supply is detected immediately after the power supply is replaced. And if the currently acquired power supply information is consistent with the power supply information recorded last time, indicating that the power supply types before and after replacement are consistent, and waiting for executing a power supply detection timing task. That is: and when the power types before and after replacement are consistent, detecting the power state according to a preset timing task. Wherein, the item to be tested may be: power supply presence information, current information, voltage information, temperature information, power information, and the like.
S103, reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result.
And S104, generating an alarm log according to the comparison result and the corresponding alarm level.
In one embodiment, before generating an alarm log according to the comparison result and the corresponding alarm level, the method further includes: updating and recording the comparison times; if the updated comparison times are larger than a preset threshold value, executing a step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, executing the step of reading the actual parameter value of each item to be detected in the target equipment, comparing the actual parameter value of each item to be detected with the corresponding parameter value range to obtain a comparison result, and other subsequent steps until the updated comparison times is greater than a preset threshold value, thereby carrying out repeated detection for many times to avoid alarm caused by accidental errors.
It can be seen that, in the embodiment, multiple items to be tested of various types of power supplies, and parameter value ranges and alarm levels corresponding to each item to be tested are provided by using the multi-type power supply information database, so that for any type of power supplies, the application can determine the items to be tested, and the parameter value ranges and alarm levels corresponding to each item to be tested, then read the actual parameter value of each item to be tested in the target device, and compare the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level. Therefore, detection of different types of power supplies can be taken into consideration in a targeted manner, manual configuration of detection items is not needed, after the type of the equipment power supply is changed, corresponding detection items, parameter value ranges and alarm levels corresponding to each item to be detected can be automatically inquired, and accordingly, power supply detection is continued according to the original flow according to the inquiry result, and therefore the sustainability and the efficiency of the power supply detection flow can be improved.
The present application is further described below by taking a switch as an example. The following embodiments are based on BMC implementation in the switch. The BMC can monitor and control components such as fans and power supplies of the switch, and can adjust the fans and the power supplies correspondingly to ensure that the equipment is in a healthy state. Of course, information about the fan, power supply, etc. is also recorded to prompt the user or for fault location.
Therefore, the embodiment can read the power supply related information of the switch, then retrieve and load the corresponding monitoring parameters, value range, alarm level and other information, further compare the voltage, current and other information of the power supply in the switch with the retrieved value range, and finally record the alarm information according to the comparison result, thereby realizing the monitoring of the multi-model power supply.
Specifically, referring to fig. 2, the bmc reads the local power model through the d-bus interface, and then retrieves the psu standard parameter range, the item to be monitored, and the corresponding alarm level corresponding to the power model from the database. After loading the information, the BMC reads the information of the local power supply such as on-site information, current, voltage, power and the like, compares the information with the retrieved psu standard parameter range, finally carries out abnormal alarm according to the specified alarm level and records an abnormal information log. It should be noted that the above process can support immediate replacement and hot plug of the power supply.
This embodiment can detect the power after the change immediately after the power of the switch is changed. Specifically, after a power supply in the switch is replaced, a GPIO (General Purpose input/output) signal for instructing power supply replacement is detected, at this time, the power supply model of the switch is read again to the d-bus interface, if the power supply model changes, a corresponding monitoring item, a standard value range and an alarm level are retrieved from the database according to the currently read power supply model, then, information of the current power supply, such as on-site information, current, voltage and power, is read, and the information is compared with the retrieved standard value range to determine whether each monitoring item is abnormal. Retry is done for the abnormal item, i.e.: again, the comparison is made from the data obtained for the monitored item. And if the abnormity exists, sending alarm information to a BMC interface according to the alarm level of the monitoring item, and simultaneously recording the abnormal information to a log so as to analyze the specific reason.
The database contains power supply information of various types, such as: the information such as each item to be tested corresponding to various types of power supplies, the parameter value range and the alarm level corresponding to each item to be tested and the like can be added by an administrator. The method and the device have the advantages that the abnormal items are retried, so that the alarm caused by accidental errors can be avoided, and the aim of saving resources is fulfilled.
Therefore, the embodiment can monitor and detect different types of power supplies, and can retrieve corresponding monitoring items and other related information according to different types, so that the current, voltage, power and other information of the replaced power supply can be monitored and detected in time when the power supply is replaced. And if the abnormal condition occurs, sending alarm information and recording an abnormal log.
In the following, a power detection apparatus provided in an embodiment of the present application is introduced, and a power detection apparatus described below and a power detection method described above may be referred to each other.
Referring to fig. 3, an embodiment of the present application discloses a power detection apparatus, including:
an obtaining module 301, configured to obtain power information of a target device;
the query module 302 is configured to query an item to be tested corresponding to the power information, a parameter value range and an alarm level corresponding to the item to be tested from the multi-type power information database;
a comparison module 303, configured to read an actual parameter value of each item to be tested in the target device, and compare the actual parameter value of each item to be tested with a corresponding parameter value range, so as to obtain a comparison result;
and the generating module 304 is configured to generate an alarm log according to the comparison result and the corresponding alarm level.
In one embodiment, the obtaining module is specifically configured to:
and acquiring the power type from the memory of the target equipment as power information.
In one embodiment, the obtaining module is specifically configured to:
and if the power supply replacement signal is detected, executing the step of acquiring the power supply information of the target equipment.
In one embodiment, the method further comprises:
and the execution module is used for inquiring the item to be tested corresponding to the power supply information, the parameter value range corresponding to the item to be tested and the alarm level from the multi-type power supply information database if the currently acquired power supply information is inconsistent with the power supply information recorded last time.
In one embodiment, the execution module is further to:
and if the currently acquired power supply information is consistent with the power supply information recorded last time, waiting for executing a power supply detection timing task.
In one embodiment, the method further comprises:
and the database updating module is used for writing the item to be tested and/or the parameter value range and/or the alarm grade into the multi-type power supply information database and then executing the steps of querying the item to be tested corresponding to the power supply information, the parameter value range corresponding to the item to be tested and the alarm grade from the multi-type power supply information database if the item to be tested and/or the parameter value range and/or the alarm grade are not queried from the multi-type power supply information database.
In one embodiment, the method further comprises:
the repeated detection module is used for updating and recording the comparison times; if the updated comparison times are larger than a preset threshold value, executing a step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, the step of reading the actual parameter value of each item to be tested in the target equipment and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result is executed until the updated comparison times are larger than the preset threshold value.
For more specific working processes of each module and unit in this embodiment, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here again.
Therefore, the embodiment provides a power detection device, which can automatically query the corresponding detection items, the parameter value range and the alarm level corresponding to each item to be detected after the power type of the equipment is changed, so that the power detection is continued according to the original flow by using the query result, and the sustainability and efficiency of the power detection flow can be improved.
An electronic device provided in an embodiment of the present application is introduced below, and the electronic device described below and the power detection method and apparatus described above may be referred to with each other.
Referring to fig. 4, an embodiment of the present application discloses an electronic device, including:
a memory 401 for storing a computer program;
a processor 402 for executing the computer program to implement the method disclosed by any of the embodiments described above.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: acquiring power supply information of target equipment; inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range and an alarm grade corresponding to each item to be tested from a multi-type power supply information database; reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: and acquiring the power type from the memory of the target equipment as power information.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: if the power supply replacement signal is detected, acquiring power supply information of the target equipment; inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range and an alarm grade corresponding to each item to be tested from a multi-type power supply information database; reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: and if the currently acquired power supply information is inconsistent with the power supply information recorded last time, the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range and the alarm level corresponding to the item to be tested from the multi-type power supply information database, and other subsequent steps are executed.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: and if the currently acquired power supply information is consistent with the power supply information recorded last time, waiting for executing a power supply detection timing task.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: and if the item to be tested and/or the parameter value range and/or the alarm grade are not inquired from the multi-type power supply information database, writing the item to be tested and/or the parameter value range and/or the alarm grade into the multi-type power supply information database, and then executing the steps of inquiring the item to be tested corresponding to the power supply information, the parameter value range and the alarm grade corresponding to the item to be tested from the multi-type power supply information database, and other subsequent steps.
In this embodiment, when the processor executes the computer program stored in the memory, the following steps may be specifically implemented: updating and recording the comparison times; if the updated comparison times are larger than a preset threshold value, executing a step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, the step of reading the actual parameter value of each item to be tested in the target equipment and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result and other subsequent steps until the updated comparison times are larger than a preset threshold value is executed.
Further, an embodiment of the present application further provides a server as the electronic device. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input output interface, and a communication bus. The memory is used for storing a computer program, and the computer program is loaded and executed by the processor to implement relevant steps in the power detection method disclosed in any one of the foregoing embodiments.
In this embodiment, the power supply is configured to provide a working voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external equipment, and the communication protocol followed by the communication interface is any communication protocol applicable to the technical scheme of the application, and the communication protocol is not specifically limited herein; the input/output interface is used for acquiring external input data or outputting data to the outside, and the specific interface type of the input/output interface can be selected according to specific application requirements, which is not specifically limited herein.
In addition, the memory is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk, an optical disk, or the like, where the resources stored thereon include an operating system, a computer program, data, and the like, and the storage manner may be a transient storage manner or a permanent storage manner.
The operating system is used for managing and controlling hardware devices and computer programs on the Server so as to realize the operation and processing of the processor on the data in the memory, and the operating system can be Windows Server, netware, unix, linux and the like. The computer program 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 power detection method disclosed in any of the foregoing embodiments. The data may include data such as developer information of the virtual machine, in addition to data such as the virtual machine.
Further, the embodiment of the application also provides a terminal as the electronic device. The terminal may specifically include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Generally, the terminal in this embodiment includes: a processor and a memory.
The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in a wake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory is at least used for storing a computer program, wherein after the computer program is loaded and executed by the processor, the relevant steps in the power detection method executed by the terminal side disclosed in any one of the foregoing embodiments can be implemented. In addition, the resources stored by the memory may also include an operating system, data and the like, and the storage mode may be a transient storage mode or a permanent storage mode. The operating system may include Windows, unix, linux, etc. The data may include, but is not limited to, update information for the application.
In some embodiments, the terminal may further include a display, an input/output interface, a communication interface, a sensor, a power source, and a communication bus.
A readable storage medium provided in the embodiments of the present application is introduced below, and a readable storage medium described below and a power detection method, apparatus, and device described above may be referred to each other.
A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the power detection method disclosed in the foregoing embodiments.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: acquiring power supply information of target equipment; inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range and an alarm grade corresponding to each item to be tested from a multi-type power supply information database; reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: and acquiring the power type from the memory of the target equipment as power information.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: if the power supply replacement signal is detected, acquiring power supply information of the target equipment; inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range and an alarm grade corresponding to each item to be tested from a multi-type power supply information database; reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result; and generating an alarm log according to the comparison result and the corresponding alarm level.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: and if the currently acquired power supply information is inconsistent with the power supply information recorded last time, the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range and the alarm level corresponding to the item to be tested from the multi-type power supply information database, and other subsequent steps are executed.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: and if the currently acquired power supply information is consistent with the power supply information recorded last time, waiting for executing a power supply detection timing task.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: and if the item to be tested and/or the parameter value range and/or the alarm grade are not inquired from the multi-type power supply information database, writing the item to be tested and/or the parameter value range and/or the alarm grade into the multi-type power supply information database, and then executing the steps of inquiring the item to be tested corresponding to the power supply information, the parameter value range and the alarm grade corresponding to the item to be tested from the multi-type power supply information database, and other subsequent steps.
In this embodiment, the computer program executed by the processor may specifically implement the following steps: updating and recording the comparison times; if the updated comparison times are larger than a preset threshold value, executing a step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, executing the step of reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result, and other subsequent steps until the updated comparison times are greater than the preset threshold value.
References in this application to "first," "second," "third," "fourth," etc., if any, are intended to distinguish between similar elements and not necessarily to describe a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, or apparatus.
It should be noted that the descriptions relating to "first", "second", etc. in this application are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other.
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. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A method for power supply detection, comprising:
acquiring power supply information of target equipment;
inquiring a plurality of items to be tested corresponding to the power supply information, a parameter value range corresponding to each item to be tested and an alarm grade from a multi-type power supply information database;
reading the actual parameter value of each item to be tested in the target equipment, and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result;
and generating an alarm log according to the comparison result and the corresponding alarm level.
2. The method of claim 1, wherein the obtaining power information of the target device comprises:
and acquiring the power type from the memory of the target equipment as the power information.
3. The method of claim 1, wherein the step of obtaining power information of the target device is performed if a power replacement signal is detected.
4. The method according to claim 3, wherein before querying the item to be tested corresponding to the power information, the parameter value range corresponding to the item to be tested, and the alarm level from the multi-type power information database, the method further comprises:
and if the currently acquired power supply information is inconsistent with the power supply information recorded last time, the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range and the alarm level corresponding to the item to be tested from the multi-type power supply information database is executed.
5. The method of claim 3, further comprising:
and if the currently acquired power supply information is consistent with the power supply information recorded last time, waiting for executing a power supply detection timing task.
6. The method of claim 1, further comprising:
and if the item to be tested and/or the parameter value range and/or the alarm grade are not inquired from the multi-type power supply information database, writing the item to be tested and/or the parameter value range and/or the alarm grade into the multi-type power supply information database, and then executing the step of inquiring the item to be tested corresponding to the power supply information, the parameter value range corresponding to the item to be tested and the alarm grade from the multi-type power supply information database.
7. The method according to any one of claims 1 to 6, wherein before generating an alarm log according to the comparison result and the corresponding alarm level, the method further comprises:
updating and recording the comparison times;
if the updated comparison times are larger than a preset threshold value, executing the step of generating an alarm log according to the comparison result and the corresponding alarm level; otherwise, the step of reading the actual parameter value of each item to be tested in the target device and comparing the actual parameter value of each item to be tested with the corresponding parameter value range to obtain a comparison result is executed until the updated comparison times are larger than the preset threshold value.
8. A power supply detecting device, comprising:
the acquisition module is used for acquiring power supply information of the target equipment;
the query module is used for querying items to be tested corresponding to the power supply information, parameter value ranges and alarm levels corresponding to the items to be tested from a multi-type power supply information database;
the comparison module is used for reading the actual parameter value of each item to be measured in the target equipment and comparing the actual parameter value of each item to be measured with the corresponding parameter value range to obtain a comparison result;
and the generating module is used for generating an alarm log according to the comparison result and the corresponding alarm level.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the method of any one of claims 1 to 7.
10. A readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211190955.9A CN115509337A (en) | 2022-09-28 | 2022-09-28 | Power supply detection method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211190955.9A CN115509337A (en) | 2022-09-28 | 2022-09-28 | Power supply detection method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115509337A true CN115509337A (en) | 2022-12-23 |
Family
ID=84505471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211190955.9A Pending CN115509337A (en) | 2022-09-28 | 2022-09-28 | Power supply detection method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115509337A (en) |
-
2022
- 2022-09-28 CN CN202211190955.9A patent/CN115509337A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8935509B2 (en) | Method for controlling BMC having customized SDR | |
US20140195794A1 (en) | Electronic device with baseboard management controller updating system | |
US8898345B2 (en) | Out-of-band management of third party adapter configuration settings in a computing system | |
CN115967618A (en) | Multi-project BMC (baseboard management controller) sensor configuration management method and device | |
CN113672306B (en) | Server component self-checking abnormity recovery method, device, system and medium | |
CN113357067B (en) | Electric fuel pump control method and device, electronic equipment and storage medium | |
CN114138527A (en) | Method, device and medium for improving performance of server | |
CN113590405A (en) | Hard disk error detection method and device, storage medium and electronic device | |
CN111694684A (en) | Abnormal construction method and device of storage equipment, electronic equipment and storage medium | |
US20070005860A1 (en) | Interrupt control system and method | |
TW201705015A (en) | Method and system for remote system configuration management and non-transitory computer-readable storage medium | |
CN113900718B (en) | Decoupling method, system and device for BMC and BIOS asset information | |
CN115509337A (en) | Power supply detection method, device, equipment and readable storage medium | |
CN114817010A (en) | Python-based Redfish automatic testing method and device | |
CN115080132A (en) | Information processing method, information processing apparatus, server, and storage medium | |
CN114936135A (en) | Abnormity detection method and device and readable storage medium | |
US11809833B2 (en) | System and method for image localization in knowledge base content | |
CN115145634A (en) | System management software self-adaption method, device and medium | |
CN111124730B (en) | Error positioning method and device of server and computer storage medium | |
CN111124095B (en) | Power supply running state detection method and related device during upgrading of power supply firmware | |
CN113254304A (en) | Method for determining shutdown type of server, server and storage medium | |
CN111399871A (en) | System updating method, device, equipment and medium for HBA card | |
CN115993929B (en) | Storage device management method, storage device management device, electronic device and storage medium | |
CN111610935B (en) | Access control method, device, equipment and medium | |
CN114153388B (en) | Hard disk system, hard disk configuration information refreshing method, device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |