Power supply control method, device and equipment and readable storage medium
By issuing power restart commands with dual delay parameters through the BMC device to control the PSU, the server's power supply can be fully switched on and off, solving the problem of dependence on external devices and improving the reliability and automation of power restart testing.
Patent Information
- Application Number
- CN202511357668.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-20
AI Technical Summary
Existing power restart tests rely on external equipment, increasing costs and lack feedback on the actual server status, leading to incomplete tests or data loss, which affects reliability.
The BMC device issues a power restart command with dual delay parameters to control the PSU to achieve full power on/off, ensuring that the server is powered off in a stable state and simulating a real AC restart process, with an embedded status feedback mechanism.
A true AC restart can be completed without external devices, reducing costs, improving test reliability and automation, and ensuring the completeness and accuracy of test results.
Smart Images

Figure CN121364771A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of communication, and particularly relates to a power control method and device, equipment and a readable storage medium. BACKGROUND
[0002] As a key link of hardware quality verification, power reliability test is directly related to the performance of the equipment in the scene of unexpected power failure, power grid fluctuation or power recovery. In the center deployment, the stability of power supply is not absolute, and sudden power failure or power supply anomaly occurs from time to time. Therefore, during the production test and equipment deployment stage, it is necessary to detect whether the server has the ability to automatically restart and recover normal service after power failure, which is one of the important indicators for measuring high availability.
[0003] In order to simulate the power interruption situation, the industry generally adopts AC power cycle test. By artificially cutting off the AC power input of the server, then restoring the power supply, it is observed whether the server can complete the whole process of power down, power up, self-check, starting operating system and service recovery. This process not only verifies the tolerance and recovery mechanism of the key hardware such as power module, mainboard and BMC (baseboard management controller), but also verifies the consistency of data before and after power failure, the integrity of file system and the automatic recovery ability of key service.
[0004] AC power-off restart test usually relies on external auxiliary equipment to realize physical control of the server power supply. For example, a smart PDU (Power Distribution Unit) or AC switch device is used. Such devices can receive control instructions through a network interface and then perform power-on and power-off operations on the server power supply interface connected thereto, thereby simulating the interruption and recovery of alternating current power supply. Test personnel can remotely control the smart PDU through a script or an automated test platform to perform multiple AC restart operations on the target server in a predetermined time sequence to verify the stability of long-term operation. This external device-dependent solution has significant limitations. The smart PDU or AC switch itself is an additional hardware device that increases the overall cost of rack deployment, especially in large-scale test environments. Providing such devices for each test server or each batch of test servers will result in high capital investment and operational overhead. Secondly, this solution relies on the stability of network communication between the control end (such as the test client) and the smart PDU. Once the network is interrupted or the control end is down, the test process will be forced to interrupt, resulting in incomplete testing or data loss, affecting the reliability of the test results. Since the smart PDU is an external device and cannot sense the internal running state of the server in real time, for example, whether the operating system has been successfully started, whether the system self-checking is completed, or whether there is a startup exception, the power-off and power-on operations can only be performed based on the preset time interval, and there is no feedback mechanism for the actual state of the server. SUMMARY
[0005] Therefore, the present specification provides a power control method, device, equipment and readable storage medium to improve the above-mentioned power restart test inconvenience.
[0006] The specific technical solutions are as follows:
[0007] The present specification provides a power control method applied to a PSU device of a server, wherein the server further comprises a BMC device, the PSU device supplies power to the BMC device and other components of the server, and the method comprises: receiving a power restart instruction issued by the BMC device, wherein the power restart instruction comprises a first delay time length and a second delay time length, and the first delay time length and the second delay time length are parsed and obtained; waiting for the first delay time length, and performing power-off of the BMC device and power-off of other components of the server; waiting for the second delay time length, and performing power-on of the BMC device and power-on of other components of the server; the first delay time length is used to wait for the BMC device and other components of the server to start and load firmware; and the second delay time length is used to wait for the BMC device and other components of the server to complete power-off.
[0008] As a technical solution, the power restart instruction contains a loop instruction; the method further comprises: according to the loop instruction, under the condition of waiting for a first delay time length and a second delay time length respectively each time, cyclically executing the steps of powering off the BMC device and other components of the server, and powering on the BMC device and other components of the server again.
[0009] As a technical solution, after the step of waiting for the first delay time length, the method further comprises: detecting the current startup state, and feeding back an alarm log if an abnormal startup is detected.
[0010] As a technical solution, the power restart instruction is received by the BMC device through a PMbus channel.
[0011] The present specification also provides a power control method applied to a BMC device of a server, the server further comprising a PSU device, the PSU device powering the BMC device and other components of the server, the method comprising: issuing a power restart instruction to the PSU device, the power restart instruction containing a first delay time length and a second delay time length, and parsing to obtain the first delay time and the second delay time, the power restart instruction being used to make the PSU device execute powering off the BMC device and other components of the server after waiting for the first delay time length, and execute powering on the BMC device and other components of the server again after waiting for the second delay time length; powering off in response to a power-off event of the PSU device to the BMC device; powering on in response to a power-on event of the PSU device to the BMC device, and loading BMC firmware; the first delay time length is used to wait for the BMC device and other components of the server to start and load firmware; and the second delay time length is used to wait for the BMC device and other components of the server to complete power-off.
[0012] As a technical solution, the power restart instruction contains a loop instruction; the power restart instruction is further used to make the PSU device cyclically execute the steps of powering off the BMC device and other components of the server, and powering on the BMC device and other components of the server again according to the loop instruction, under the condition of waiting for a first delay time length and a second delay time length respectively each time.
[0013] As a technical solution, the powering on in response to the power-on event of the PSU device to the BMC device, and loading BMC firmware further comprises: detecting and / or obtaining startup abnormalities of each component of the server, and generating and / or obtaining an alarm log; the components of the server include the PSU device, the BMC device, and other components of the server.
[0014] As a technical solution, the power restart instruction is issued to the PSU device through a PMbus channel.
[0015] The present specification also provides a power control device applied to a PSU device of a server, the server further comprising a BMC device, the PSU device powering the BMC device and other components of the server, the device comprising: a first module configured to receive a power restart instruction issued by the BMC device, the power restart instruction comprising a first delay duration and a second delay duration, and configured to obtain a first delay time and a second delay time; a second module configured to wait for the first delay duration, and configured to execute power-off of the BMC device and power-off of other components of the server; a third module configured to wait for the second delay duration, and configured to execute power-on of the BMC device and power-on of other components of the server; the first delay duration is used for waiting for the BMC device and other components of the server to start and load firmware; and the second delay duration is used for waiting for the BMC device and other components of the server to complete power-off.
[0016] The present specification also provides a power control device applied to a BMC device of a server, the server further comprising a PSU device, the PSU device powering the BMC device and other components of the server, the device comprising: a fourth module configured to issue a power restart instruction to the PSU device, the power restart instruction comprising a first delay duration and a second delay duration, and configured to obtain a first delay time and a second delay time, the power restart instruction being used for causing the PSU device to execute power-off of the BMC device and power-off of other components of the server after waiting for the first delay duration, and to execute power-on of the BMC device and power-on of other components of the server after waiting for the second delay duration; a fifth module configured to be powered off in response to a power-off event of the BMC device by the PSU device; and the fifth module is further configured to be powered on in response to a power-on event of the BMC device by the PSU device, and to load BMC firmware; the first delay duration is used for waiting for the BMC device and other components of the server to start and load firmware; and the second delay duration is used for waiting for the BMC device and other components of the server to complete power-off.
[0017] The present specification also provides an electronic device comprising a processor and a readable storage medium, the readable storage medium storing machine executable instructions capable of being executed by the processor, the processor executing the machine executable instructions to implement the power control method described above.
[0018] The present specification also provides a readable storage medium storing machine executable instructions, the machine executable instructions causing the processor to implement the power control method described above when the machine executable instructions are invoked and executed by the processor.
[0019] The above technical solutions provided by the present specification at least have the following beneficial effects:
[0020] The power supply unit (PSU) is controlled by the instruction with double delay parameters issued by the BMC to realize full power on / off, and real AC restart can be completed without external equipment, thereby reducing cost and improving test reliability and automation level. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed to be used in the description of the embodiments of the present specification or the prior art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can also be obtained by those skilled in the art according to these drawings of the embodiments of the present specification.
[0022] Figure 1 is a flow chart of the power supply control method in an embodiment of the present specification;
[0023] Figure 2 is a flow chart of the power supply control method in an embodiment of the present specification;
[0024] Figure 3 is a structural diagram of the power supply control device in an embodiment of the present specification;
[0025] Figure 4 is a structural diagram of the power supply control device in an embodiment of the present specification;
[0026] Figure 5 is a hardware structural diagram of the electronic device in an embodiment of the present specification.
[0027] Reference signs: first module 31, second module 32, third module 33, fourth module 41, and fifth module 42. DETAILED DESCRIPTION
[0028] The terms used in the embodiments of the present specification are only for the purpose of describing specific embodiments, and are not intended to limit the present specification. The singular forms "a", "an" and "the" used in the present specification and claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein means any or all possible combinations of one or more associated listed items.
[0029] It should be understood that, although the embodiments of the present specification can employ the terms first, second, third, etc. to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information without departing from the scope of the present specification. In addition, the word "if" used can be interpreted as "when" or "upon" or "in response to a determination" depending on the context.
[0030] The present specification provides a power supply control method, device, equipment and readable storage medium to at least improve one of the above technical problems.
[0031] Specific technical solutions are described below.
[0032] In an embodiment, the present specification provides a power supply control method applied to a PSU device of a server, the server further comprising a BMC device, the PSU device providing power supply for the BMC device and other components of the server, the method comprising: receiving a power supply restart instruction issued by the BMC device, the power supply restart instruction comprising a first delay time length and a second delay time length, and parsing to obtain the first delay time and the second delay time; waiting for the first delay time length, and executing power-off of the BMC device and power-off of the other components of the server; waiting for the second delay time length, and executing power-on of the BMC device and power-on of the other components of the server; the first delay time length is used for waiting for the BMC device and the other components of the server to start and load firmware; and the second delay time length is used for waiting for the BMC device and the other components of the server to complete power-off.
[0033] The PSU is a power conversion and distribution module, which receives and parses the advanced power supply control instruction from the BMC, accurately controls the on-off sequence of the main power and auxiliary power according to the timing parameters contained in the instruction, and realizes the full-cycle management of the power supply state of the entire server. The method is applied to a PSU device of a server, the server further comprising a BMC device, the PSU device providing power support for the BMC device and other components such as CPU, memory, hard disk, motherboard chipset, etc. In the traditional design, the auxiliary power output of the PSU always supplies power to the BMC to ensure that even if the server is in a shutdown state, the BMC can still be remotely managed through the network. This results in that the conventional remote restart operation cannot cut off the power supply of the BMC, and cannot simulate the real power-off scenario. The present embodiment breaks through this limitation by introducing a controllable auxiliary power cut-off mechanism through the PSU, so that the PSU can actively cut off all power outputs including the BMC power supply circuit under the instruction of the BMC.
[0034] Specifically, as Figure 1 comprise the following steps, which can be exchanged in order according to the needs of the actual application scene:
[0035] Step S11, receiving the power restart instruction issued by the BMC device, the power restart instruction containing a first delay duration and a second delay duration, and parsing to obtain the first delay time and the second delay time.
[0036] The BMC device issues a special power restart instruction to the PSU device. The instruction can not be a general power control command defined in the standard IPMI (Intelligent Platform Management Interface) protocol, but a special instruction format further extended in the embodiment, containing a first delay duration and a second delay duration.
[0037] As the out-of-band management core of the server, the BMC has independent firmware (such as HDM, H3C Device Management) and network interface, and communicates with the PSU through an internal bus (such as PMBus, Power Management Bus) during the operation of the server operating system or in the shutdown state. When the tester or the automated script sends an AC restart request to the BMC through SSH, Web interface or API, the BMC generates a corresponding power restart instruction. The power restart instruction is sent to the PSU through the PMBus protocol.
[0038] The microcontroller inside the PSU receives the instruction and first parses it to extract the specific values of the first delay duration and the second delay duration. The first delay duration is used to control the time interval from receiving the instruction to executing the power-down operation, and its purpose is to ensure that the BMC and other components of the server have enough time to complete the key startup processes such as saving the current state, loading firmware or system self-checking. For example, if the power-down operation is performed immediately after the server is powered on or the operating system is starting, it may cause data corruption or startup failure. Therefore, setting a reasonable first delay duration (such as 100 seconds, 300 seconds or longer) can ensure that the system is in a stable state before power-off, thereby ensuring the effectiveness of the test. The second delay duration is used to control the time interval from the completion of power-down to the re-power-on, and its role is to simulate the recovery delay after a real power grid failure, ensuring that the capacitor inside the PSU is fully discharged and the power module is completely cooled, thereby more realistically reproducing the electrical environment of AC restart. For example, setting a second delay duration of 10 seconds can avoid the "soft restart" phenomenon caused by residual voltage of the capacitor, and ensure that the next power-on is a complete cold start process.
[0039] Step S12, waiting for the first delay duration, and executing power-down of the BMC device and power-down of other components of the server.
[0040] The PSU starts an internal timer and begins waiting for the first delay duration. During this period, the PSU maintains normal power output and the server components continue to operate. When the first delay duration expires, the PSU performs the critical power-down operation: simultaneously cutting off the main power output that powers the motherboard devices (such as CPU, memory, hard disk, etc.) and the auxiliary power output that powers the BMC.
[0041] This operation is implemented by the power switch circuit (such as MOSFET array) inside the PSU, and the microcontroller sends a control signal to close the corresponding power channel. Since the auxiliary power is cut off, the BMC is also powered off, which means that the out-of-band management function of the server is temporarily interrupted, which is completely consistent with the real power-off scenario.
[0042] Step S13, wait for the second delay duration, and perform the power-on operation for the BMC device and the power-on operation for other components of the server.
[0043] After the power-down operation is completed, the PSU enters the second phase of the waiting period, i.e., waiting for the second delay duration. During this period, all outputs of the PSU are in the off state, and the server is completely powered off. The microcontroller inside the PSU can enter a low-power sleep mode or be completely powered off, relying only on the state information saved before instruction execution to maintain the timing logic. When the second delay duration expires, the PSU performs the power-on operation: re-enables the main power and auxiliary power outputs. The restoration of the auxiliary power first powers the BMC, allowing it to start and load the firmware; the restoration of the main power powers the CPU, memory, and other components, triggering the complete power-on self-test (POST) and operating system startup process of the server.
[0044] At this point, a complete AC restart cycle is completed. The PSU has the ability to independently complete the entire timing and power-on / off sequence without continuous external instructions. The BMC needs to be restarted after power-off, and its communication link with the PSU will also experience interruption and reconstruction.
[0045] In one scenario, a tester needs to perform an automated AC reboot test on a server running a Linux operating system. The test script is deployed within the server's operating system and initiates the test by invoking the ipmitool chassis powercycle AC 300 300 10 command. The "AC" flag in the command indicates that an AC reboot is to be performed, "300" represents the number of cycles, "300" is the first delay duration (in seconds), and "10" is the second delay duration (in seconds). When the command is executed, the operating system forwards the request to the BMC through the in-band IPMI interface. Upon receiving the request, the BMC verifies the parameters' legitimacy, generates a power reboot instruction containing the first delay of 300 seconds and the second delay of 10 seconds, and sends it to the PSU via PMBus. After parsing the instruction, the PSU starts a 300-second countdown. During this period, the server operates normally, and the test script can perform system state checks, log collection, and other operations. After 300 seconds, the PSU cuts off the main power and auxiliary power, and the server is completely powered off. After 10 seconds, the PSU powers up again, and the server starts. After the BMC reinitializes, it restores its connection to the management network. The test script automatically reconnects and records the results of this reboot after the operating system recovers. This process will be repeated 300 times to achieve long-term unattended reliability testing. Since the first delay duration is long enough, it ensures that the system has been running stably before each reboot, avoiding invalid tests caused by frequent reboots.
[0046] A separate microcontroller (MCU) is integrated inside the PSU, which has sufficient processing power and storage space to run the power management firmware. This MCU needs to be connected to the control circuits of the main power and auxiliary power, allowing it to independently control the switching state of each power supply. During power-off, the MCU can use the residual energy from the PSU input or a small backup battery to maintain the operation of the timing circuit, ensuring the accuracy of the second delay duration. The PSU also has a state feedback mechanism that can report the current power state (such as "normal power supply," "waiting for power-off," "powered off," "waiting for power-on," etc.) to the BMC via PMBus, allowing the BMC to monitor the state and record logs.
[0047] In one embodiment, the power reboot instruction contains a loop instruction; the method further comprises: according to the loop instruction, under the condition of waiting for the first delay duration and the second delay duration respectively, cyclically performing the steps of powering off the BMC device and other components of the server, and powering on the BMC device and other components of the server.
[0048] In one embodiment, after the step of waiting for the first delay duration, the method further comprises: detecting the current startup state, and feeding back an alarm log if an abnormal startup is detected.
[0049] In an embodiment, the power supply restart instruction issued by the BMC device is received through a PMbus channel.
[0050] In an embodiment, the present specification also provides a power supply control method applied to a BMC device of a server, the server further comprising a PSU device, the PSU device supplying power to the BMC device and other components of the server, the method comprising: issuing a power supply restart instruction to the PSU device, the power supply restart instruction containing a first delay duration and a second delay duration, and parsing to obtain a first delay time and a second delay time, the power supply restart instruction being used to make the PSU device execute power-off of the BMC device and power-off of other components of the server after waiting for the first delay duration, and execute power-on of the BMC device and power-on of other components of the server after waiting for the second delay duration; powering off in response to a power-off event of the PSU device to the BMC device; powering on in response to a power-on event of the PSU device to the BMC device, and loading the BMC firmware; the first delay duration being used to wait for the BMC device and other components of the server to start and load the firmware; and the second delay duration being used to wait for the BMC device and other components of the server to complete power-off.
[0051] Specifically, as Figure 2 , the following steps can be exchanged in order according to the needs of the actual application scene:
[0052] Step S21, issuing a power supply restart instruction to the PSU device.
[0053] The BMC device issues a structured power restart instruction to the PSU device, including two programmable time parameters, a first delay time and a second delay time. The instruction is sent to the PSU through the internal physical bus of the server (such as PMBus). The first delay time included in the instruction is designed to provide a sufficient startup and firmware loading window for the BMC and other components of the server (such as CPU, memory, hard disk, etc.). For example, after the server has just completed a power-on operation, the BIOS / UEFI firmware needs time for self-checking (POST), the operating system needs time to load the kernel and drivers, and the BMC itself also needs time to initialize its network interface, sensor monitoring module and management service. If the power-off operation is performed immediately during this process, it may not only cause the system to crash, but also damage the data on the storage device. Therefore, by setting a reasonable first delay time (such as 90 seconds, 300 seconds or longer), it can be ensured that the system has entered a stable and predictable state before power-off. The second delay time is used to control the time interval between power-off and power-on, which simulates the recovery delay after a real power grid failure, ensures that the high-voltage capacitor inside the PSU is fully discharged, and the temperature of the power module is reduced to a safe level, thereby avoiding "false restart" or hardware damage caused by residual voltage or thermal stress. A typical second delay time may be set to 5 to 10 seconds to meet the discharge requirements of most power supply designs.
[0054] Step S22, in response to the power-off event of the PSU device to the BMC device.
[0055] When the PSU receives the power restart instruction issued by the BMC, it parses the first delay time and the second delay time, and starts the internal timing mechanism. During the first delay time, the PSU maintains normal power output, and the components of the server operate normally. After the timing ends, the PSU performs the critical power-off operation: simultaneously cutting off the main power output for the motherboard device and the auxiliary power output for the BMC, which is exactly the same as pulling out the power cord. When the auxiliary power is cut off, the power supply of the BMC is interrupted, and its internal processor and circuit stop working, and all running processes and network connections are immediately terminated. This process realizes real AC restart and breaks the mode of BMC uninterrupted power supply. During the power-off period, the BMC is in a completely power-off sleep state and does not consume any energy or perform any functions.
[0056] Step S23, in response to the power-on event of the PSU device to the BMC device, and loads the BMC firmware.
[0057] When the second delay duration ends, PSU re-enables the output of the main power and the auxiliary power, and the server starts to power up again. At this time, BMC responds to the power up event of itself by PSU, and starts to boot from zero. First, the restoration of the auxiliary power supplies power to the microcontroller and the memory of BMC, which makes it out of the reset state. Then, BMC starts to load its firmware, performs a self-checking procedure, initializes the network controller, sensor interface and management services. This power up and firmware loading process is exactly the same as the starting procedure of BMC when the server is cold started, which ensures the authenticity of the test scenario. When the firmware of BMC is loaded and enters the normal operation state, it restores the management capability of the server, and can receive new instructions through the network interface or report the status of the restart completion to the monitoring system.
[0058] In one implementation scenario, consider an automated reliability test environment. A newly designed server needs to be tested for AC restart endurance for 72 hours, and 1000 complete AC restart cycles are planned to be performed. The traditional method needs to configure expensive intelligent PDU and dedicated control server, and there is a risk of network interruption leading to test failure. Using the method of the embodiment, only the instruction similar to "ipmitool chassis power cycle AC 1000 90 8" needs to be input through the HDM Web interface or command line tool of the server. After the instruction is parsed by BMC, BMC generates a power restart instruction containing a first delay of 90 seconds and a second delay of 8 seconds and sends it to PSU. PSU cuts off all power after 90 seconds and powers up again after 8 seconds. Since the whole process is completed autonomously by BMC and PSU inside the server, no external intervention is needed, and even if the management network is interrupted for a short time during the test, it will not affect the execution of the restart sequence. BMC automatically records the number of restarts, timestamps and system status after each restart, and generates a complete log report at the end of the test. This embedded automatic test capability greatly improves the test efficiency and reliability.
[0059] In one implementation, the power restart instruction contains a cycle instruction; the power restart instruction is further used to make the PSU device cyclically execute the steps of powering down the BMC device and other components of the server, and powering up the BMC device and other components of the server according to the cycle instruction under the condition of waiting for a first delay duration and a second delay duration respectively each time.
[0060] In one implementation, the power up and load BMC firmware in response to the power up event of the PSU device to the BMC device further include: detecting and / or obtaining startup abnormities of components of the server, generating and / or obtaining alarm logs; the components of the server include the PSU device, the BMC device and other components of the server.
[0061] In an embodiment, the power supply restart instruction is issued to the PSU device through a PMbus channel.
[0062] In an embodiment, as Figure 3 The present specification also provides a power supply control device applied to a PSU device of a server, the server further comprising a BMC device, the PSU device supplying power to the BMC device and other components of the server, the device comprising: a first module configured to receive a power supply restart instruction issued by the BMC device, the power supply restart instruction comprising a first delay duration and a second delay duration, and configured to parse and obtain a first delay time and a second delay time; a second module configured to wait for the first delay duration, and execute power-off of the BMC device and power-off of the other components of the server; a third module configured to wait for the second delay duration, and execute power-on of the BMC device and power-on of the other components of the server; the first delay duration is used for waiting for the BMC device and the other components of the server to start and load firmware; and the second delay duration is used for waiting for the BMC device and the other components of the server to complete power-off.
[0063] In an embodiment, as Figure 4 The present specification also provides a power supply control device applied to a BMC device of a server, the server further comprising a PSU device, the PSU device supplying power to the BMC device and other components of the server, the device comprising: a fourth module configured to issue a power supply restart instruction to the PSU device, the power supply restart instruction comprising a first delay duration and a second delay duration, and configured to parse and obtain a first delay time and a second delay time, the power supply restart instruction being used for causing the PSU device to execute power-off of the BMC device and power-off of the other components of the server after waiting for the first delay duration, and execute power-on of the BMC device and power-on of the other components of the server after waiting for the second delay duration; a fifth module configured to be powered off in response to a power-off event of the BMC device caused by the PSU device; and the fifth module is further configured to be powered on in response to a power-on event of the BMC device caused by the PSU device, and load BMC firmware; the first delay duration is used for waiting for the BMC device and the other components of the server to start and load firmware; and the second delay duration is used for waiting for the BMC device and the other components of the server to complete power-off.
[0064] The device embodiments are the same as or similar to the corresponding method embodiments, and are not described here again.
[0065] In an embodiment, the present specification provides an electronic device comprising a processor and a readable storage medium, the readable storage medium storing machine executable instructions capable of being executed by the processor, the processor executing the machine executable instructions to implement the aforementioned power supply control method. From the hardware layer, the hardware architecture schematic diagram can be referred to the figure shown.
[0066] In one embodiment, the present specification provides a readable storage medium, which stores machine executable instructions, when the machine executable instructions are invoked and executed by a processor, the machine executable instructions cause the processor to implement the power control method mentioned above.
[0067] Here, the readable storage medium can be any electronic, magnetic, optical, or other physical storage apparatus, which can contain or store information such as executable instructions, data, etc. For example, the readable storage medium can be a RAM (Random Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as a hard drive), a solid state drive, any type of storage disk (such as an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
[0068] The system, apparatus, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0069] For the convenience of description, the above apparatus is described in various units by functions respectively. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware in the implementation of the present specification.
[0070] Those skilled in the art should understand that the embodiments of the present specification can be provided as a method, a system, or a computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, a disk storage, a CD-ROM, an optical storage, etc.) containing computer-usable program code.
[0071] The embodiments of the present specification are described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems) and computer program products according to the embodiments of the present specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more flows and / or blocks.
[0072] Moreover, these computer program instructions can also be stored in a computer readable storage medium that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a manufacture product including an instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more flows and / or blocks.
[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more flows and / or blocks.
[0074] Those skilled in the art should understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer usable storage media (which can include, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0075] The above only describes the embodiments of the present specification and is not intended to limit the present specification. The present specification can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present specification shall be included in the scope of claims of the present specification.
Claims
1. A power supply control method characterized by comprising: The application relates to a PSU device applied to a server, wherein the server further comprises a BMC device, the PSU device supplies power for the BMC device and other components of the server, and the method comprises the following steps: receiving a power supply restart instruction issued by the BMC device, wherein the power supply restart instruction comprises a first delay time length and a second delay time length, and the first delay time and the second delay time are obtained by analysis; waiting for the first delay time length, and executing power-off of the BMC device and power-off of other components of the server; waiting for the second delay time length, and executing power-on of the BMC device and power-on of other components of the server; the first delay time length is used for waiting for the BMC device and other components of the server to start and load firmware; the second delay time length is used for waiting for the BMC device and other components of the server to complete power-off.
2. The method of claim 1, wherein, The power supply restart instruction comprises a loop instruction; The method further comprises the following steps: According to the loop instruction, under the condition of waiting for the first delay time length and the second delay time length respectively each time, the steps of power-off of the BMC device and power-off of other components of the server and power-on of the BMC device and power-on of other components of the server are cyclically executed.
3. The method of claim 1, wherein, After the step of waiting for the first delay time length, the method further comprises the following steps: detecting a current starting state, and feeding back an alarm log if starting abnormity is detected.
4. The method of claim 1, wherein, The power supply restart instruction issued by the BMC device is received through a PMbus channel.
5. A power supply control method characterized by, The application relates to a BMC device applied to a server, wherein the server further comprises a PSU device, the PSU device supplies power for the BMC device and other components of the server, and the method comprises the following steps: issuing a power supply restart instruction to the PSU device, wherein the power supply restart instruction comprises a first delay time length and a second delay time length, the first delay time and the second delay time are obtained by analysis, and the power supply restart instruction is used for making the PSU device execute power-off of the BMC device and power-off of other components of the server after waiting for the first delay time length, and execute power-on of the BMC device and power-on of other components of the server after waiting for the second delay time length; powering off in response to a power-off event of the PSU device to the BMC device; powering on in response to a power-on event of the PSU device to the BMC device, and loading BMC firmware; the first delay time length is used for waiting for the BMC device and other components of the server to start and load firmware; the second delay time length is used for waiting for the BMC device and other components of the server to complete power-off.
6. The method of claim 5, wherein, The power supply restart instruction comprises a loop instruction; The power supply restart instruction is further used for making the PSU device cyclically execute the steps of power-off of the BMC device and power-off of other components of the server and power-on of the BMC device and power-on of other components of the server according to the loop instruction under the condition of waiting for the first delay time length and the second delay time length respectively each time.
7. The method of claim 5, wherein, The powering on in response to the power-on event of the PSU device to the BMC device and loading BMC firmware further comprises the following steps: detecting and / or obtaining starting abnormity of each component of the server, and generating and / or obtaining an alarm log; each component of the server comprises the PSU device, the BMC device and other components of the server.
8. The method of claim 5, wherein, The power supply restart instruction is sent to the PSU device through a PMbus channel.
9. A power control device, characterized by comprising: The PSU device is applied to a server, the server further comprises a BMC device, and the PSU device supplies power for the BMC device and other components of the server, and the device comprises: A first module is configured to receive a power supply restart instruction sent by the BMC device, the power supply restart instruction comprises a first delay duration and a second delay duration, and a first delay time and a second delay time are obtained by parsing; A second module is configured to wait for the first delay duration, and perform power-off of the BMC device and power-off of other components of the server; A third module is configured to wait for the second delay duration, and perform power-on of the BMC device and power-on of other components of the server; The first delay duration is used to wait for the BMC device and other components of the server to start and load firmware; The second delay duration is used to wait for the BMC device and other components of the server to complete power-off.
10. A power control device, characterized by comprising: The BMC device is applied to a server, the server further comprises a PSU device, the PSU device supplies power for the BMC device and other components of the server, and the device comprises: A fourth module is configured to send a power supply restart instruction to the PSU device, the power supply restart instruction comprises a first delay duration and a second delay duration, a first delay time and a second delay time are obtained by parsing, and the power supply restart instruction is used to make the PSU device perform power-off of the BMC device and power-off of other components of the server after waiting for the first delay duration, and perform power-on of the BMC device and power-on of other components of the server after waiting for the second delay duration; A fifth module is configured to be powered off in response to a power-off event of the PSU device to the BMC device; The fifth module is further configured to be powered on in response to a power-on event of the PSU device to the BMC device, and load BMC firmware; The first delay duration is used to wait for the BMC device and other components of the server to start and load firmware; The second delay duration is used to wait for the BMC device and other components of the server to complete power-off.
11. An electronic device, comprising: Comprise: A processor and a readable storage medium, the readable storage medium stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the method in any one of claims 1-8.
12. A readable storage medium, characterized by, The readable storage medium stores machine executable instructions, and when the machine executable instructions are called and executed by the processor, the machine executable instructions cause the processor to implement the method in any one of claims 1-8.
