Edge server self-starting method and device, computer device and storage medium

By controlling the edge server to start automatically through the baseboard management controller, the problem of rapid self-starting of the edge server in the event of unstable power supply is solved, achieving the effects of rapid self-starting and reduced maintenance costs.

CN119576098BActive Publication Date: 2025-12-12INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411656118.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-12-12
Estimated Expiration
2044-11-19

Smart Images

  • Figure CN119576098B_ABST
    Figure CN119576098B_ABST
Patent Text Reader

Abstract

The application relates to an edge server self-starting method and device, computer equipment and a storage medium. The method is applied to a baseboard management controller connected with a processor used for controlling the power-on and power-off of a server power supply, and comprises the following steps: closing the control authority of the processor on the server power supply, acquiring the boot state of the server, acquiring shutdown log information when the server is in a shutdown state, and acquiring the shutdown type of the server according to the shutdown log information, and performing the boot operation of the server when the server is in an abnormal shutdown state. The method can realize the fast self-starting of the edge server without adding additional hardware.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of servers, and in particular to an edge server self-starting method and device, a computer device and a storage medium. BACKGROUND

[0002] The application of the current edge server is more and more widely used. The edge server is a server located at the edge of the network, which is used to process and store data generated or accessed in a location close to the user. The edge server is different from the traditional server working environment. The traditional server is generally in the computer room, the environment is stable, and the AC (Alternating Current) power fluctuation is small. It can be automatically started by setting AC power on the BIOS (Basic Input / Output System) or BMC (Baseboard Management Controller). The AC fluctuation within 20 milliseconds can be filtered by the power module, and the short-term power supply by the capacitor does not affect the power on and off. And when the AC power fluctuation is 1 to 3 seconds, the processor will trigger the protection mechanism to lock the power state to prevent components from being impacted by repeated power-on and power-off, and the protection mechanism is reset after power-off.

[0003] However, the working environment of the edge server is harsh, and the power supply may be unstable and subject to lightning. Although it can also be automatically started by setting AC power, if the protection mechanism of the traditional server is followed, because the edge server is located in a scattered, remote, hidden place or even at a high place, once the AC power fluctuates, it needs to manually pull the switch to restore power supply, which greatly increases the difficulty and cost of maintenance work.

[0004] In order to solve this problem, the current mainstream method is to increase a timing air switch. When the voltage fluctuates, this air switch will immediately power off the server, and then wait for 30 minutes or other set time to close the switch. This is done to avoid the processor triggering the protection mechanism after the AC power is restored, causing the server to be locked in the shutdown state, because this locked state needs to be manually pulled to the server location to restore power supply. Therefore, using this way needs to increase components, increase cost, and the recovery time is long. On the other hand, if the server is normally shut down, the air switch will trigger the automatic start mechanism after the power fluctuation, which will cause the server to start itself, which may cause some unexpected situations. SUMMARY

[0005] Therefore, it is necessary to provide an edge server self-starting method, device, computer device and storage medium which can realize fast self-starting without increasing additional hardware in view of the above technical problems.

[0006] In a first aspect, the application provides an edge server self-starting method applied to a baseboard management controller connected with a processor for controlling power-on and power-off of a server, the edge server self-starting method comprising:

[0007] closing the control authority of the processor on the power of the server;

[0008] obtaining a boot state of the server;

[0009] when the server is in a power-off state, obtaining power-off log information and obtaining a power-off type of the server according to the power-off log information;

[0010] when the server is in an abnormal power-off state, performing a boot operation of the server.

[0011] In one embodiment, obtaining the boot state of the server comprises:

[0012] obtaining the boot state of the server every preset time interval;

[0013] The edge server self-starting method further comprises:

[0014] when the server is in a power-on state, returning to the step of obtaining the boot state every preset time interval;

[0015] when the server is in a normal power-off state, returning to the step of obtaining the boot state every preset time interval;

[0016] After performing the boot operation of the server, the edge server self-starting method further comprises:

[0017] detecting whether the server is successfully booted, and if the server is successfully booted, returning to the step of obtaining the boot state every preset time interval;

[0018] if the server fails to boot, recording a failure number;

[0019] judging whether the failure number is greater than a preset threshold;

[0020] if the failure number is not greater than the preset threshold, returning to the step of performing the boot operation of the server;

[0021] if the failure number is greater than the preset threshold, generating a prompt information of manual boot.

[0022] In one embodiment, the edge server self-starting method further comprises:

[0023] when the manual boot fails, generating a prompt information of hardware failure.

[0024] In one embodiment, before performing the boot operation of the server, the edge server self-starting method further comprises:

[0025] monitoring the key hardware parameters and the sensor data of the server;

[0026] performing a startup operation of the server, including:

[0027] performing the startup operation of the server when the key hardware parameters and the sensor data are recovered.

[0028] In one embodiment, the baseboard management controller is further connected with a basic input output interface, and the self-starting method of the edge server includes:

[0029] when receiving the shutdown instruction of the intelligent platform management interface, performing a shutdown operation of the server according to the shutdown instruction, and creating first type log information;

[0030] when receiving the notification information of the normal shutdown sent by the basic input output interface, creating second type log information;

[0031] when receiving the notification information of the normal shutdown sent by the processor, creating third type log information;

[0032] obtaining shutdown log information according to the first type log information, the second type log information and the third type log information.

[0033] In one embodiment, the control authority includes a lock authority, and the control authority of the processor on the power supply of the server includes:

[0034] writing a specified value into a register of the processor for controlling the lock state of the power supply of the server, so as to close the control authority of the processor on the power supply of the server.

[0035] In one embodiment, the self-starting method of the edge server further includes:

[0036] monitoring the state of a key process of the server;

[0037] controlling the key process to restart when an abnormality of the key process is monitored;

[0038] reporting alarm information of the abnormality of the key process to a specified client, so that the specified client enters an operating system of the server through a remote service of the baseboard management controller to obtain detailed information of the abnormality of the key process.

[0039] In one embodiment, the monitoring of the state of the key process of the server includes:

[0040] monitoring a heartbeat signal of the key process, and determining that the key process is abnormal when the heartbeat signal is monitored to be missing.

[0041] In a second aspect, the application provides an edge server self-starting device, which is applied to a baseboard management controller connected with a processor for controlling power-on and power-off of a server, and comprises:

[0042] a closing module for closing the control authority of the processor on the power supply of the server;

[0043] an obtaining module for obtaining a boot state of the server;

[0044] a processing module for obtaining shutdown log information when the server is in a shutdown state, and obtaining a shutdown type of the server according to the shutdown log information;

[0045] a starting module for executing a boot operation of the server when the server is in an abnormal shutdown state.

[0046] In a third aspect, the application further provides a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:

[0047] closing the control authority of the processor on the power supply of the server;

[0048] obtaining a boot state of the server;

[0049] obtaining shutdown log information when the server is in a shutdown state, and obtaining a shutdown type of the server according to the shutdown log information;

[0050] executing a boot operation of the server when the server is in an abnormal shutdown state.

[0051] In a fourth aspect, the application further provides a computer readable storage medium having a computer program stored thereon, and the computer program implements the following steps when executed by a processor:

[0052] closing the control authority of the processor on the power supply of the server;

[0053] obtaining a boot state of the server;

[0054] obtaining shutdown log information when the server is in a shutdown state, and obtaining a shutdown type of the server according to the shutdown log information;

[0055] executing a boot operation of the server when the server is in an abnormal shutdown state.

[0056] The self-starting method, device, computer equipment and storage medium of the edge server, by pre-closing the control authority of the processor on the server power supply through the baseboard management controller, that is, closing the protection mechanism of the processor on the server power supply, the control right of the baseboard management controller on the power-on and power-off of the server can be transferred, further, the baseboard management controller acquires the power-on and power-off state of the server every preset time period, when the server is in the power-off state, it is further judged whether the server is normally powered off or abnormally powered off, when the server is abnormally powered off, the power-on operation of the server is performed. As can be seen, the server is self-started by the baseboard management controller in the present application, solving the problem of additional air switch in the traditional technology, the power-on and power-off state of the server is polled by the baseboard management controller, the shutdown type is judged, in the case of abnormal shutdown, the server is started in time, avoiding the influence of long-time shutdown of the server on business, and also avoiding the problem of untimely manual power-on. The protection mechanism of the processor on the server power supply is pre-closed, avoiding manual pulling of the breaker of the edge server, on the other hand, the server shutdown type is judged, only when the server is abnormally powered off, the power-on operation of the server is performed, solving the problem that in the traditional technology, the air switch may be triggered to automatically start the server in the case of normal shutdown of the server after power fluctuation, causing some unexpected problems. BRIEF DESCRIPTION OF DRAWINGS

[0057] Figure 1 A flowchart of an edge server self-starting method in an embodiment;

[0058] Figure 2 A flowchart of an edge server self-starting method in another embodiment;

[0059] Figure 3 A block diagram of an edge server self-starting device in an embodiment;

[0060] Figure 4 An internal structure diagram of a computer equipment in an embodiment. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0062] In a first aspect, as shown in the specification, Figure 1 An edge server self-starting method is provided, the method is applied to a baseboard management controller, the baseboard management controller is connected with a processor for controlling the power-on and power-off of a server, and the edge server self-starting method comprises:

[0063] Step S11, close the control authority of the processor to the server power supply.

[0064] In the present application, the server refers to an edge server. The edge server is a kind of server deployed at the edge of the network. The network edge refers to a location closer to the data source or user end, as opposed to the traditional data center server. It is located at the edge of the network, such as near the mobile base station, the local network of the factory workshop, the local area network of the intelligent building, etc. This kind of server can quickly process the data generated locally, reduce the delay caused by the transmission of data to a remote data center, like in the Internet of Things scenario, the edge server can process the data collected by the sensor nearby; in the content distribution network, the edge server can cache popular content to speed up user access.

[0065] The baseboard management controller (BMC) is a microcontroller independent of the server system. It is mainly used for remote management and monitoring of the server. From the monitoring point of view, the baseboard management controller can collect various hardware information of the server in real time, such as system temperature, voltage, fan speed, etc. For example, when the temperature of a certain component of the server is too high, the baseboard management controller can discover it in time and issue an alarm. In terms of management, the baseboard management controller can realize remote power on, reboot. Moreover, even if the operating system of the server crashes or cannot respond, remote control operations can also be performed through the baseboard management controller.

[0066] The processor can be a programmable logic device. In the server, the programmable logic device is mainly used to control the power-on sequence. For example, it will control the power supply to turn on each component in the order set, ensure that each hardware component obtains power supply at the right time, and thus ensure the stable startup of the server.

[0067] When connected with the baseboard management controller, it can receive some control signals from the baseboard management controller, such as the signal for controlling the processor to close the control authority of the server power supply.

[0068] The control authority of the processor to the server can include the control authority of the power-on sequence of the power supply. Specifically, during the power-on stage, the processor can control the power-on sequence of the power supply. It will turn on the power supply of each hardware component in the server according to the pre-programmed order. For example, it can first supply power to the CPU (Central Processing Unit) core part, wait for it to complete initialization, and then supply power to the memory, disk and other devices, so as to ensure the stable startup of the server.

[0069] The control authority of the processor over the server can also include an authority over a protection mechanism of a power supply of the server when the server is in an abnormal condition, such as a power fluctuation.

[0070] In step S12, a boot state of the server is acquired.

[0071] Specifically, the baseboard management controller can be connected to a power supply unit (PSU) of the server or a power management chip on a mainboard. These hardware components generate specific signals, such as changes in high and low levels, when the power state changes, and the baseboard management controller determines whether the server is powered on or off by monitoring these signals. For example, when the server is powered on, the power-on generates a high-level signal indicating "power-on", and the baseboard management controller detects this signal to know that the server has been powered on.

[0072] Alternatively, during the operation of the server operating system, the system software can communicate with the baseboard management controller through a specific driver or management interface. When the operating system is normally shut down or started, it sends corresponding state information to the baseboard management controller through this interface. For example, in the Linux system, there are some commands that can interact with the hardware management module. These commands will inform the baseboard management controller that the server is about to shut down when the shutdown operation is performed.

[0073] In step S13, when the server is in the shutdown state, shutdown log information is acquired, and the shutdown type of the server is acquired according to the shutdown log information.

[0074] The shutdown log information refers to information related to shutdown. For example, the shutdown log information can include the time of shutdown, the type of shutdown (whether it is a normal shutdown), and the shutdown method.

[0075] Further, the application can extract the shutdown type from the shutdown log information. The shutdown type specifically refers to whether it is a normal shutdown, which can include the type of normal shutdown and abnormal shutdown.

[0076] The normal shutdown refers to a process of orderly terminating system processes, saving data and system settings, and then turning off the power of the server through the shutdown command provided by the operating system. In this way, the system will complete operations such as writing cache data to disk and closing running applications before shutdown, which can effectively prevent data loss and file system damage.

[0077] Abnormal shutdown refers to the server shutdown in unexpected and abnormal conditions, such as sudden power failure, hardware failure (such as motherboard damage, power failure), system crash (such as serious software conflict, kernel error) and the like. Such conditions can cause data loss, file system damage, because the server has no opportunity to complete a series of ordered operations such as saving data when normally shutting down.

[0078] Step S14, when the server is abnormally shut down, performing the startup operation of the server.

[0079] In one embodiment, the baseboard management controller can send a startup signal to the server motherboard to control the server to start up.

[0080] In one embodiment, the startup state of the server is obtained by obtaining the startup state of the server every preset time period. The edge server self-starting method further includes: when the server is in the startup state, returning to the step of obtaining the startup state every preset time period; when the server is normally shut down, returning to the step of obtaining the startup state every preset time period; after performing the startup operation of the server, the edge server self-starting method further includes: detecting whether the server starts up successfully, if the server starts up successfully, returning to the step of obtaining the startup state every preset time period, if the server fails to start up, recording the number of failures, determining whether the number of failures is greater than a preset threshold, if the number of failures is not greater than the preset threshold, returning to the step of performing the startup operation of the server, and if the number of failures is greater than the preset threshold, generating a prompt information of manual startup.

[0081] Specifically, please refer to Figure 2 , Figure 2 In one embodiment, the flowchart of the edge server self-starting method is shown in FIG. 1. In the embodiment, the edge server self-starting method can include the following steps: Figure 2

[0082] ​The startup state of the server is acquired every preset time period to perform the current polling, when the server is in the startup state, the step of acquiring the startup state of the server every preset time period is returned to perform the next polling, when the server is in the shutdown state, the shutdown log information is acquired, and the shutdown type of the server is acquired according to the shutdown log information, when the server is in the normal shutdown, the step of acquiring the startup state of the server every preset time period is returned to perform the next polling, when the server is in the abnormal shutdown, the startup operation of the server is performed, whether the server is successfully started is judged after the preset time, when the server is successfully started, the log of the successful startup is recorded, and the step of acquiring the startup state of the server every preset time period is returned to perform the next polling, when the server fails to start, it represents that the current power supply condition is still not suitable for startup, the failure log and the number of startup failures are recorded, whether the number of startup failures is greater than a preset threshold is judged, when the number of startup failures is not greater than the preset threshold, the step of acquiring the startup state of the server every preset time period is returned, when the number of startup failures is greater than the preset threshold, a prompt information of manual startup is generated.

[0083] The preset time and the preset threshold can be set according to actual needs, for example, the preset time can be set to 20 seconds, and the preset threshold can be set to 5 times. In this application, when the number of startup failures is greater than the preset threshold, it represents that continuous AC power fluctuation or machine damage is encountered, which causes the machine to fail to start, the log of each unsuccessful startup is recorded, the startup retry is not performed, and manual baseboard management controller startup is prompted.

[0084] The embodiment has the beneficial effect that the baseboard management controller polling shutdown method is used for automatic startup of the edge server. When the AC power fluctuation duration is within a specific time, for example, between 10 ms and 100 ms, the server power supply and the processor cannot normally start the server. The baseboard management controller performs timing polling to determine the shutdown type, and in the case of abnormal shutdown, the server is started in time to avoid the influence of long-time shutdown of the server on the business, and also avoids the problem of untimely manual startup and shutdown. The processor is closed to avoid manual arrangement of nodes at the edge server to manually pull the switch, and the cost of the traditional technology of increasing the timing air switch is saved, and the technology is more intelligent than the traditional technology, and the recovery speed is also faster.

[0085] In addition, the use of the timing air switch in the traditional technology will cause the server to start itself under normal shutdown, which will cause some unexpected problems, and the baseboard management controller in this application will determine whether the server is normally shutdown, and only when the server is abnormally shutdown, the startup operation is performed, which avoids this situation in the traditional technology.

[0086] In one of the embodiments, the edge server self-starting method can further include: generating a prompt information of hardware failure when the manual start fails.

[0087] When the manual start also fails, it means that there is a high probability that the hardware, OS (Operating System), BIOS or other environment causes the server to fail to start normally, and a hardware engineer needs to be positioned.

[0088] In one of the embodiments, before performing the start operation of the server, the edge server self-starting method can further include: monitoring the key hardware parameters and sensor data of the server, and performing the start operation of the server, including: when it is monitored that the key hardware parameters and the sensor data return to normal, performing the start operation of the server.

[0089] The baseboard management controller can monitor the key hardware parameters and system state of the edge server. When it is monitored that the server returns to normal due to software failure (such as system crash) or hardware failure (such as a hardware module overheating triggering protection and shutting down), the baseboard management controller can automatically send a start instruction. For example, the server crashes and shuts down due to memory error, and after the error is repaired, the baseboard management controller detects that the hardware state returns to normal, and triggers the server to start automatically.

[0090] Further, the baseboard management controller can be connected to various sensors inside the server. When the sensor data shows that the server environment (such as temperature, humidity, etc.) returns to the normal range, and the hardware failure has been ruled out, the baseboard management controller can start the server according to this information. For example, the server shuts down due to high temperature in the machine room, and when the temperature decreases to the appropriate range, the baseboard management controller starts the server after receiving the temperature sensor signal.

[0091] In one of the embodiments, the baseboard management controller is also connected to the basic input and output interface, and the edge server self-starting method can further include: when receiving the shutdown instruction of the intelligent platform management interface, performing the shutdown operation of the server according to the shutdown instruction, and creating first type of log information, when receiving the notification information of normal shutdown sent by the basic input and output interface, creating second type of log information, when receiving the notification information of normal shutdown sent by the processor, generating third type of log information, and obtaining the shutdown log information according to the first type of log information, the second type of log information and the third type of log information.

[0092] The baseboard management controller can perceive the start and shutdown state of the server and the start and shutdown type in any one or more of the following ways:

[0093] First, the server is shut down by IPMI (Intelligent Platform Management Interface) operation

[0094] The IPMI related shutdown operation, whether directly using IPMI command or triggering IPMI command in other ways to shut down the server, the command is ultimately received and processed by the baseboard management controller, so in this case the baseboard management controller can directly perceive that the server is shut down by IPMI.

[0095] Second, the server is shut down in the operating system

[0096] When the shutdown operation is performed in the operating system, the BIOS (Basic Input Output System) can detect this shutdown behavior. Here, an IPMI command between the BIOS and the baseboard management controller is added, and whenever the shutdown is performed in the operating system, the BIOS will send a normal shutdown log information to the baseboard management controller. Through this mechanism, the baseboard management controller can know that the server is shut down by the operating system.

[0097] Third, the server is shut down by external power key

[0098] The external power key of the server is controlled by the processor to control the on-off operation. When the external power key is pressed for a long time and the shutdown operation is really triggered, the processor will immediately send a normal shutdown instruction to the baseboard management controller, and if the server is not shut down by pressing the power key, the processor will not send the instruction to the baseboard management controller. Through this design, the baseboard management controller can perceive whether the server is normally shut down.

[0099] The baseboard management controller can perceive any of the above shutdown methods and record the corresponding log information. When the first shutdown method is perceived, the first type of log information is generated, when the second shutdown method is perceived, the second type of log information is generated, and when the third type of log information is generated, the third type of log information is generated. Further, the shutdown log information is obtained according to the first type of log information, the second type of log information and the third type of log information. In the shutdown log information, detailed information such as the specific shutdown method and whether it is a normal shutdown is recorded, and the baseboard management controller can obtain the shutdown type of the server by querying the shutdown log information.

[0100] The beneficial effect of this embodiment is that the server shutdown method can be automatically perceived by using the present application, and further combined with the judgment of the shutdown type, the self-start of the server is realized, and the problem of increasing cost and recovery event long caused by increasing the air switch to realize the self-start of the server in the traditional technology is solved.

[0101] In one embodiment, the control authority includes a lock authority, and the closing the control authority of the processor to the power supply of the server includes: sending a closing instruction of the lock authority to the processor, so that the processor closes the lock authority to the power supply of the server.

[0102] The lock authority of the processor to the power supply of the server refers to that when the AC power-off and power-on interval is less than 2 to 3 seconds, in order to protect the secondary power supply and other components of the server, the protection mechanism of the processor to the power supply of the server is triggered, the boot signals of each source are limited, and the server is locked in the shutdown state.

[0103] Specifically, the baseboard management controller establishes a connection with the processor in advance. The baseboard management controller and the processor are generally connected through a certain communication bus, and common communication protocols include I2C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface), etc. These protocols allow data transmission and interaction between the baseboard management controller and the processor. For example, through the I2C bus, the baseboard management controller can send instructions and configuration information to the processor as a slave device.

[0104] Further, the baseboard management controller can send specific closing instructions to the processor to close the power protection mechanism. These instructions are generally implemented by writing specific values to specific registers inside the processor. For example, there is a register in the processor that is used to control the opening or closing of the power protection function. The baseboard management controller writes a value representing “close power protection” (such as 0x00, the specific value depends on the design and programming convention of the processor) to this register through the communication bus.

[0105] Further, in addition to writing closing instructions, the baseboard management controller can also adjust other parameters related to the power protection mechanism. For example, set the parameters related to overvoltage and overcurrent protection thresholds to an invalid state to ensure that the power protection mechanism completely stops working.

[0106] Further, after sending the closing instruction, the baseboard management controller can read the status register of the processor to confirm that the power protection mechanism has been successfully closed. If the read status information shows that the power protection function is still in the open state, the baseboard management controller can resend the instruction or check whether there is a problem with the communication.

[0107] Therefore, the baseboard management controller can send a closing instruction of the lock authority to the processor, so that the processor closes the lock authority to the server power supply, thereby transferring the control right of the power-on and power-off of the server to the baseboard management controller, and further controlling the server to start automatically.

[0108] After the processor controls the server power supply, due to the limitation of the power-off and power-on timing, when the AC power-off to power-on interval time is less than 100 ms, the power-off is not completed and the power-on logic starts again. In order to avoid timing disorder, the power-on logic after AC recovery will do timeout processing. Therefore, the processor cannot automatically start the server after AC power recovery, and the external manifestation is that the server does not automatically start after AC power-on.

[0109] The power-on logic of the processor is a fixed parameter of the CPU (Central Processing Unit, CPU), and in order to ensure the stable operation of the CPU and other components, the power-on timing of the processor cannot be modified, and the power-on and power-off logic of the processor cannot be accelerated. Therefore, it is necessary to perform an auxiliary automatic start logic in the baseboard management controller, and in the case that the processor cannot trigger the automatic start due to AC power fluctuation, the baseboard management controller assists in the automatic start of the edge server.

[0110] The beneficial effects of this design are that by first closing the protection mechanism of the processor to the server power supply (i.e., closing the control right), it is avoided that the protection mechanism of the processor to the server power supply is triggered when AC power fluctuation occurs, the server is locked in the shutdown state, and manual restart by AC power-off in remote areas is required, which greatly increases the difficulty and cost of maintaining the server.

[0111] In one embodiment, after performing the start operation of the server, the self-start method of the edge server can further include: when the server starts successfully, the control right of the processor to the server power supply is opened.

[0112] Specifically, the baseboard management controller can send instructions to the processor through the communication bus to open the power protection mechanism. Specifically, the baseboard management controller writes configuration data to specific registers inside the processor. These registers are used to control various functions of the processor, including the power protection function.

[0113] Specifically, the transmitted instructions need to follow certain command formats and communication protocols. These command formats and protocols are predefined to ensure that the processor can correctly identify the intention of the instructions sent by the baseboard management controller. For example, the instruction can include a command header to identify the type of instruction (such as a power protection opening command), a data length field to indicate the number of bytes of the subsequent data, and the actual configuration data.

[0114] In the present application, the substrate management controller can flexibly control the control authority of the processor on the server power supply. When self-starting of the edge server is needed, the control authority of the programmable connection device on the server power supply is controlled to be closed in advance. When the self-starting of the edge server is not needed, the control authority of the programmable connection device on the server power supply can be controlled to be reopened to realize adaptive switching of the scheme.

[0115] In one embodiment, the edge server self-starting method can further include monitoring the state of a key process of the server, when an abnormality of the key process is monitored, controlling the key process to restart, and reporting alarm information of the abnormality of the key process to a designated terminal, so that the designated terminal accesses the operating system of the server through the remote service of the substrate management controller to obtain detailed information of the abnormality of the key process.

[0116] The key process refers to a process that plays a core role in the normal operation of the system and the provision of key services in the operating system. For example, in the server operating system, the core process of the database management system belongs to the key process. Specifically, the key process here can include network service related processes such as web service processes, database related processes, system management and security related processes, etc.

[0117] The remote service of the substrate management controller can be the KVM (Keyboard-Video-Mouse) function of the substrate management controller. The KVM function of the substrate management controller is mainly used to realize remote keyboard, video display and mouse operation on the server, as if the user is operating locally. For example, when the server is located in a remote data center, the administrator can use the KVM function of the substrate management controller through the network to see the screen output content during the server startup process, use the keyboard to input commands, and use the mouse to perform various operations, thereby conveniently managing, configuring, and troubleshooting the server.

[0118] In one embodiment, monitoring the state of the key process of the server includes monitoring a heartbeat signal of the key process, and when the heartbeat signal is missing, determining that the key process is abnormal.

[0119] Specifically, the key service in the operating system of the server integrates the heartbeat function into the BMC. Under normal circumstances, the key process will send a heartbeat signal to the BMC at a certain frequency to inform the BMC that it is running normally. When the key process stops unexpectedly, the BMC will detect the absence of the heartbeat signal. At this time, the BMC will start the server restart recovery process to attempt to recover the key service of the server.

[0120] Further, after the BMC restarts the recovery process, a remote alarm message is sent to a specified terminal (a terminal of a manager or a terminal of a customer) using a function such as an SNMP (Simple Network Management Protocol). The SNMP message contains information about the abnormality of the key process of the server and the restart recovery that has been performed.

[0121] Further, after the manager receives the alarm message through the terminal device, the manager establishes a connection with the BMC through a network. Using the KVM function of the BMC, the manager sends operation requests to the BMC from the terminal, and the BMC converts the operation requests into instructions that can be recognized by the server, so that the manager can remotely enter the operating system of the server.

[0122] Further, the specified terminal remotely operates the server through the KVM function of the BMC to troubleshoot the service problem. Specifically, the manager can input instructions (such as viewing log files and checking process states) into the terminal, and the instructions are transmitted to the server through the BMC. The server returns the execution results to the BMC, and the BMC displays the execution results on the specified terminal to realize the remote debugging function. The detailed information about the abnormality of the key process can include log information and state information of the key process.

[0123] The embodiment has the beneficial effect that the application can develop corresponding interfaces and modules at the software level, integrate the heartbeat function of the key service of the operating system with the BMC, and enable the BMC to monitor the state of the key process in real time. When the key process is unexpectedly stopped, the BMC triggers a restart mechanism to restart the machine to recover the service. The alarm function related code is embedded in the code of the restart recovery process of the BMC, and the SNMP protocol is used to remotely report information to a specified terminal (such as a terminal of a manager or a terminal of a customer).

[0124] At the same time, the KVM function of the BMC is ensured to be stable and remotely accessible. After receiving the alarm, the customer uses the KVM of the BMC to enter the operating system after security authentication and other procedures, uses the log tool and the diagnostic tool of the operating system to troubleshoot the cause of the service problem, and thus realizes the remote recovery and remote debugging functions when the key process is abnormal.

[0125] In a second aspect, as shown in Figure 3 A device for automatically starting an edge server is provided. The device is applied to a BMC, and the BMC is connected with a processor for controlling power-on and power-off of a server. The device comprises a closing module 31, an obtaining module 32, a processing module 33, and a starting module 34, wherein:

[0126] The closing module 31 is configured to close the control authority of the processor on the power supply of the server.

[0127] The obtaining module 32 is configured to obtain the startup state of the server.

[0128] The processing module 33 is configured to, when the server is in the shutdown state, obtain the shutdown log information, and obtain the shutdown type of the server according to the shutdown log information.

[0129] The starting module 34 is configured to, when the server is in the abnormal shutdown state, perform the startup operation of the server.

[0130] In one of the embodiments, the obtaining module 32 can obtain the startup state of the server every preset time period, return to the step of obtaining the startup state every preset time period when the server is in the startup state, return to the step of obtaining the startup state every preset time period when the server is in the normal shutdown state, and after performing the startup operation of the server, the obtaining module 32 can detect whether the server is successfully started, if the server is successfully started, return to the step of obtaining the startup state every preset time period, if the server fails to start, record the number of failures, judge whether the number of failures is greater than a preset threshold, if the number of failures is not greater than the preset threshold, return to the step of performing the startup operation of the server, and if the number of failures is greater than the preset threshold, generate a prompt information of manual startup.

[0131] In one of the embodiments, the obtaining module 32 can generate a prompt information of hardware failure when the manual startup fails.

[0132] In one of the embodiments, the starting module 34 can monitor the key hardware parameters and sensor data of the server, and when the key hardware parameters and the sensor data are detected to be restored to normal, perform the startup operation of the server.

[0133] In one of the embodiments, the baseboard management controller is further connected with a basic input and output interface, and the processing module 33 can, when receiving a shutdown instruction of the intelligent platform management interface, perform the shutdown operation of the server according to the shutdown instruction, and create first type log information, when receiving the notification information of the normal shutdown sent by the basic input and output interface, create second type log information, when receiving the notification information of the normal shutdown sent by the processor, generate third type log information, and obtain the shutdown log information according to the first type log information, the second type log information and the third type log information.

[0134] In one of the embodiments, the control authority includes a lock authority, and the closing module 31 can write a specified value into a register of the processor for controlling the lock state of the power supply of the server, so as to close the control authority of the processor on the power supply of the server.

[0135] In one of the embodiments, the starting module 34 can also monitor the status of the key process of the server, when the abnormality of the key process is monitored, the control key process is restarted, and the alarm information of the abnormality of the key process is reported to the specified client, so that the specified client enters the operating system of the server through the remote service of the baseboard management controller to obtain the detailed information of the abnormality of the key process.

[0136] In a third aspect, the embodiments of the present disclosure provide a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the edge server self-starting method provided in any of the embodiments of the first aspect when executing the computer program.

[0137] In one embodiment, the computer device can be a server, and its internal structure diagram can be as shown in Figure 4 The computer device comprises a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor to implement the edge server self-starting method.

[0138] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the edge server self-starting method provided in any of the embodiments of the first aspect of the present disclosure.

[0139] The computer readable storage medium can be Figure 4 the computer readable storage medium in the computer device as shown in

[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. Any reference to memory, storage, databases, or other media in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0141] The technical features of the above embodiments can be combined in any way. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0142] The above embodiments only express several implementation manners of the present application, and the description is specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.

Claims

1. An edge server self-starting method, characterized by, The method is applied to a baseboard management controller connected with a processor for controlling power-on and power-off of a server power supply, and the method comprises: closing control authority of the processor on the server power supply to take over control authority of the server power supply, the control authority comprising locking authority on the server power supply; obtaining a boot state of the server; when the server is in a power-off state, obtaining power-off log information and obtaining a power-off type of the server according to the power-off log information; when the server is in an abnormal power-off state, performing a boot operation of the server; wherein the process of closing the control authority of the processor on the server power supply comprises: writing a specified value into a register of the processor for controlling a locking state of the server power supply, and adjusting a state of an overvoltage protection threshold and an overcurrent protection threshold to an invalid state to close the locking authority.

2. The method of claim 1, wherein, The obtaining of the boot state of the server comprises: obtaining the boot state of the server every preset time period; The method further comprises: when the server is in a boot state, returning to the step of obtaining the boot state every preset time period; when the server is in a normal power-off state, returning to the step of obtaining the boot state every preset time period; After the performing of the boot operation of the server, the method further comprises: detecting whether the server is successfully booted, if the server is successfully booted, returning to the step of obtaining the boot state every preset time period; if the server fails to boot, recording a number of failures; judging whether the number of failures is greater than a preset threshold; if the number of failures is not greater than the preset threshold, returning to the step of performing the boot operation of the server; if the number of failures is greater than the preset threshold, generating a prompt information of manual boot.

3. The method of claim 2, wherein, The method further comprises: when manual boot fails, generating a prompt information of hardware failure.

4. The method of claim 1, wherein, Before the performing of the boot operation of the server, the method further comprises: monitoring a key hardware parameter and sensor data of the server; The performing of the boot operation of the server comprises: when the key hardware parameter and the sensor data are monitored to be restored to normal, performing the boot operation of the server.

5. The method of claim 1, wherein, The baseboard management controller is further connected with a basic input / output interface, and the method further comprises: when receiving a power-off instruction of an intelligent platform management interface, performing a power-off operation of the server according to the power-off instruction and creating first type log information; when receiving notification information of normal power-off sent by the basic input / output interface, creating second type log information; when receiving notification information of normal power-off sent by the processor, generating third type log information; obtaining the power-off log information according to the first type log information, the second type log information and the third type log information.

6. The method of claim 1, wherein, The method further comprises: monitoring a state of a key process of the server; when monitoring that the key process appears abnormal, controlling the key process to restart. report alarm information that the key process is abnormal to a designated terminal, so that the designated terminal accesses an operating system of the server through remote service of the baseboard management controller to obtain detailed information that the key process is abnormal.

7. The method of claim 6, wherein, The method further includes: monitoring a heartbeat signal of the key process, and determining that the key process is abnormal when the heartbeat signal is absent.

8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 7.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Server memory fault detection method and device, electronic equipment and storage medium

    CN116627712A