Remote restarting method and device, storage medium and computer program product

By receiving the execution command of the remote control terminal at the second core of the dual -core controller, the remote restart to the dual -core controller is realized, the problem that the server system cannot automatically restarts automatically during failure, and improves the system's automatic recovery capacity.

CN119376803APending Publication Date: 2025-01-28INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411961678.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When the server system fails, the timeout automatic restart mechanism cannot be effectively triggered, resulting in manual power-on and power-off for restart and recovery, which is extremely inconvenient.

Method used

Provide a remote restart method to receive the execution command of the remote control end through the second core of the dual -core controller, control the dual -core controller to restart, or restart the process of running in the non -real -time operating system through the nuclear communication.

Benefits of technology

When the Linux system is abnormal but has not yet triggered the timeout restart mechanism, it restores the normal operation of the system through the network service remote restart substrate management controller or network service by running the RTOS network service to avoid manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376803A_ABST
    Figure CN119376803A_ABST
Patent Text Reader

Abstract

The invention discloses a remote restarting method and device, a storage medium and a computer program product, and relates to the technical field of servers. The method comprises the following steps: in response to a fault of a non-real-time operating system, when a dual-core controller cannot be restarted through a first core or a process running in the non-real-time operating system cannot be restarted through the first core, sending an execution command to a second core at a remote control end; the second core obtains the execution command and judges the command type of the execution command; and the second core restarts the dual-core controller or runs in the process of the non-real-time operating system according to the command type of the execution command. According to the remote restarting method and device, the storage medium and the computer program product provided by the embodiment of the invention, when the Linux system is abnormal but does not trigger an overtime restarting mechanism, the substrate management controller or the network service is restarted remotely through the network service provided by the processor, and normal operation of the system is recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a remote restart method, device, storage medium and computer program product. Background Art

[0002] The dual-core controller is an independent embedded processor working in the server system, which is used to monitor the host parameters of the server and realize remote control and other functions. The dual-core baseboard management controller is a typical dual-core controller. The baseboard management controller runs the Linux operating system and handles all services. A reset timer is set in the dual-core controller. When the Linux system does not work normally, the reset timer times out, thereby restarting the Linux system; for network services, when the corresponding process running in the Linux system crashes, the system will end and restart the corresponding crashed process.

[0003] If the Linux system does not work properly and the reset timer does not trigger the timeout restart mechanism, the faulty system cannot be restarted in time; similarly, if the network service fails but does not crash, the network cannot be restored. This will make it impossible to restore the dual-core controller through remote operation, and the only way to restart the dual-core controller is to go to the computer room and power it on and off, which is extremely inconvenient. Summary of the invention

[0004] In order to solve the problem that the server system fails and the timeout automatic restart mechanism cannot be effectively triggered, and restart recovery needs to be performed manually by powering on and off, this application provides the following technical solutions: In a first aspect, a remote restart method is provided, which is applied to a dual-core controller, wherein the dual-core controller includes a first core and a second core, wherein the first core is used to run a non-real-time operating system, and the second core is used to run a real-time operating system, wherein the first core communicates with a remote control terminal through a first network interface controller, and the second core communicates with the remote control terminal through a second network interface controller; Methods include: In response to a failure of the non-real-time operating system, the remote control terminal cannot control the first core through the first network interface controller to restart the dual-core controller or the process running in the non-real-time operating system; The remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core.

[0005] Further, the remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, including: Sending the execution command to the second core at the remote control end; The second core obtains the execution command and determines the command type of the execution command; According to the command type of the execution command, the dual-core controller is controlled to restart, or the process running in the non-real-time operating system is restarted through the inter-core communication between the second core and the first core.

[0006] Further, after the second core controls the dual-core controller to restart according to the command type of the executed command, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, the method further includes: An operation instruction is sent to the first core through the remote control terminal, so as to manage the dual-core controller through the non-real-time operating system running on the first core.

[0007] Further, according to the command type of the execution command, controlling the dual-core controller to restart, or restarting the process running in the non-real-time operating system through the inter-core communication between the second core and the first core, includes: In response to the type of the execution command being to restart the dual-core controller, the dual-core controller is restarted by resetting the timer.

[0008] Further, according to the command type of the execution command, controlling the dual-core controller to restart, or restarting the process running in the non-real-time operating system through the inter-core communication between the second core and the first core, further includes: In response to the type of the execution command being restarting the process, determining whether the process supports restarting; In response to the process supporting restart, the process ID of the process is sent to the first core, and the process corresponding to the process ID is restarted by the first core.

[0009] Further, in response to the type of the execution command being to restart the process, after determining whether the process supports restarting, the method further includes: In response to the process not supporting restart, restart failure is returned.

[0010] Furthermore, sending the execution command to the second core at the remote control end includes: Creating a first socket, adding the first socket to a connection group, and determining whether the first socket in the connection group includes a connection request; In response to the first socket containing a connection request, receiving the connection request, and adding a second socket generated by receiving the connection request to a receiving group of the second core, the receiving group corresponding to the connection group; At every preset time interval, the second core determines whether any second socket in the receiving group is readable; In response to the second socket being readable, obtaining the data carried in the second socket from the second socket; The second core extracts the data body from the data and determines whether the length of the data body meets the preset length; In response to the data body length meeting the preset length, the data body is parsed into a corresponding execution command, and the execution command is added to a message queue, and the execution command is sent to a command execution module running on the first core through the message queue to wait for execution.

[0011] Furthermore, after adding the first socket to the connection group, the method further includes: In response to the first socket not including a connection request, the second core determines whether any second socket in the receiving group is readable at every preset time interval.

[0012] Furthermore, after the second core determines whether any second socket in the receiving group is readable at each preset time interval, it further includes: In response to the second socket being unreadable or the reading of the second socket failing, after a preset time interval, it is determined whether the next second socket in the receiving group is readable.

[0013] Furthermore, after extracting the data body from the data and determining whether the length of the data body meets the preset length, the method further includes: In response to the data body length not meeting the preset length, or the data body receiving fails, it is determined again whether any second socket in the receiving group is readable after a preset time interval.

[0014] Furthermore, the second core obtains the execution command and determines the command type of the execution command, including: Obtain the execution command sent by the command execution module; Determine whether the second socket is writable; In response to the second socket being writable, an execute command is sent to the second socket.

[0015] Furthermore, after determining whether the second socket is writable, the following steps are further included: In response to the second socket being not writable, the execute command is resent.

[0016] Furthermore, before the remote control terminal sends the execution command to the second core, at least one of the following is also included: Initialize the inter-core communication module of the second core; Initialize the command execution module of the second core; Initialize the command transceiver module of the second core; And initialize the network module of the second core.

[0017] Furthermore, the inter-core communication module of the second core is initialized, including: Register an interrupt handler.

[0018] Furthermore, the command execution module of the second core is initialized, including: Register execution order; Associate the execution command with the called function to complete the initialization of the command execution module.

[0019] Further, the command transceiver module of the second core is initialized, including: Create a receiving group to hold the second socket; Create a message queue for transmitting execution results.

[0020] Further, the network module of the second core is initialized, including: Obtaining a second core network address through a dynamic host configuration protocol; Print the second core network address through the serial port; The second core network address is sent to the first core for display by the operating system running on the first core.

[0021] In a second aspect, a computer device is provided, including a memory, a processor, and a remote restart program stored in the memory and executable on the processor, wherein when the processor executes the remote restart program, the remote restart method described in the first aspect is implemented.

[0022] In a third aspect, a computer-readable storage medium is provided, on which a remote restart program is stored. When the remote restart program is executed by a processor, the remote restart method recorded in the first aspect is implemented.

[0023] In a fourth aspect, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the remote restart method recorded in the first aspect is implemented.

[0024] The beneficial effects of the technical solution provided by the embodiment of the present application are: By implementing the remote restart method, device, storage medium and computer program product provided in the embodiments of the present application, when an abnormality occurs in the Linux system but the timeout restart mechanism has not been triggered, the baseboard management controller or network service is remotely restarted by running the network service provided by the processor of the RTOS (Real Time Operation System) to restore the normal operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 It is a schematic diagram of the architecture of a dual-core baseboard management controller provided in an embodiment of the present application; Figure 2 This is a schematic diagram of the RTOS core command processing flow provided in an embodiment of the present application; Figure 3 This is a schematic diagram of a remote restart method provided in an embodiment of the present application; Figure 4 It is a schematic diagram of a data transmission process between a remote control terminal and a second core provided in an embodiment of the present application; Figure 5 It is a schematic diagram of the second core command execution flow provided in an embodiment of the present application; Figure 6 This is a schematic diagram of the initialization process of the second core provided in an embodiment of the present application; Figure 7 It is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the implementation mode of this application will be clearly and completely described below in conjunction with the drawings in the implementation mode of this application. Obviously, the described implementation mode is only a part of the embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "one" or "the" do not indicate a quantity limitation, but indicate that there is at least one. The numbers in the drawings of the specification only indicate the distinction between various functional components or modules, and do not indicate the logical relationship between components or modules. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0029] Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that in the accompanying drawings, the same reference numerals are given to components having substantially the same or similar structures and functions, and repeated descriptions thereof will be omitted.

[0030] In order to solve the problem that a server system fails and the timeout automatic restart mechanism cannot be effectively triggered, and manual power-on and power-off are required to restart and recover, the present application provides the following specific implementation methods.

[0031] In some embodiments, a remote restart method is applied to a dual-core controller, the dual-core controller includes a first core and a second core, the first core is used to run a non-real-time operating system, and the second core is used to run a real-time operating system; like Figure 1 As shown, the real-time operating system includes: a network interface controller, a command transceiver module, a command execution module and an inter-core communication module; A network interface controller, used for transmitting execution commands with a remote control terminal and sending the execution commands to a command transceiver module; a command transceiver module, used for receiving execution commands and sending execution results; a command execution module, used for executing the execution commands received by the command transceiver module and feeding back the execution results to the command transceiver module; an inter-core communication module, used for inter-core communication with the first core; The first core communicates with the remote control terminal via a first network interface controller, and the second core communicates with the remote control terminal via a second network interface controller; Methods include: In response to a failure of the non-real-time operating system, the remote control terminal cannot control the first core through the first network interface controller to restart the dual-core controller or the process running in the non-real-time operating system; The remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core.

[0032] Non-real-time operating systems are computer systems that do not have strict time requirements. Although they also pursue efficient operation, they mainly focus on the accuracy of the final result rather than the execution speed. For example: Linux system with standard kernel, etc.

[0033] Real-time operating systems are computer systems that can complete tasks within a specified time frame. Their design goal is to ensure that high-priority tasks can be responded to and processed within strict time limits, thereby ensuring the determinism and predictability of the system. For example: QNX Neutrino system, etc.

[0034] A dual-core controller is a controller with two cores, one of which has better performance and is used to handle almost all business operations, while the other core is used to assist in the work.

[0035] Preferably, the dual-core controller is a baseboard management controller (BMC). The baseboard management controller is an embedded processor used to monitor, report and control the status of server hardware. The baseboard management controller is an independent system under the server system, with its own processor and memory. Even if the server host is down or shut down, the baseboard management controller can still manage the server. The baseboard management controller can monitor various parameters of the host, such as temperature, voltage, fan speed, power status, etc., and can realize functions such as remote power on and off, remote reinstallation of the host system, and remote display of the host screen. The baseboard management controller provides users with a remote access interface, and users can access the baseboard management controller through the network interface to achieve the purpose of remote management of the server.

[0036] Among them, the core with better performance is used to run the operating system, such as the Linux system; the other core is used to run a lightweight system, such as RTOS, to assist the operating system. There is a reset timer in the baseboard management controller. When the reset timer times out, the baseboard management controller firmware will be restarted. When the Linux system is running normally, the reset timer will be reset and the timing will start again. When the Linux system fails, the reset timer is usually not reset. Therefore, when the reset timer times out, the baseboard management controller firmware will be restarted.

[0037] For network services, there are one or several processes running in the Linux operating system. When these processes crash, the processes end, and the systemd tool that comes with the Linux operating system will restart these processes.

[0038] In some special fault conditions, although the Linux operating system shows a fault state, it does not block the reset timer from being reset. When the network service fails but does not crash, it is impossible to restart the network service. At this time, the only way is to manually go to the computer room to power on and off the system, which brings great inconvenience.

[0039] Figure 1 The figure shows a dual-core BMC architecture. Both RTOS and Linux implement network protocol stacks, command processing modules, and inter-core communication modules. Linux and RTOS are independent of each other and have their own IP addresses. Linux has good performance and implements a web server through which users can remotely control the server. Due to memory and frequency limitations, RTOS uses a relatively lightweight open source TCP / IP protocol. Linux and RTOS communicate through the inter-core communication module.

[0040] In the dual-core BMC architecture, the overall process of using the RTOS core to process commands is as follows: Figure 2 shown.

[0041] 1. The remote control terminal sends a command to the RTOS core. The RTOS core command transceiver module receives the command through the network; 2. The RTOS command transceiver module sends the received data to the RTOS command execution module, and the command execution module executes the command, which in this patent is to restart the baseboard management controller firmware or restart a specific process of the baseboard management controller; 3. After the command is executed, the result is returned to the command transceiver module; 4. The command transceiver module sends the data back to the remote control terminal through the network.

[0042] Specifically, Figure 3 As shown, the remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, including: S100: Sending the execution command to the second core at the remote control end; S200: The second core obtains an execution command and determines the command type of the execution command; S300: Restart the dual-core controller or the process running in the non-real-time operating system according to the command type of the execution command.

[0043] Thereafter, an operation instruction is sent to the first core through the remote control terminal, so as to manage the dual-core controller through the non-real-time operating system running on the first core.

[0044] like Figure 4 As shown, the remote control terminal sends the execution command to the second core, including: S110: creating a first socket, adding the first socket to a connection group, and determining whether the first socket in the connection group includes a connection request; S120: In response to the first socket including a connection request, receiving the connection request, and adding a second socket generated by receiving the connection request to a receiving group of the second core, the receiving group corresponding to the connection group; S130: At every preset time interval, the second core determines whether any second socket in the receiving group is readable; S140: In response to the second socket being readable, obtaining data carried in the second socket from the second socket; S150: The second core extracts a data body from the data, and determines whether the length of the data body meets a preset length; S160: In response to the data body length meeting the preset length, the data body is parsed into a corresponding execution command, and the execution command is added to a message queue, and the execution command is sent to a command execution module running on the first core through the message queue to wait for execution.

[0045] Optionally, after adding the first socket to the connection group, the method further includes: S120a: In response to the first socket not including a connection request, the second core determines whether any second socket in the receiving group is readable at every preset time interval.

[0046] Optionally, after the second core determines whether any second socket in the receiving group is readable at each preset time interval, the following further comprises: S140a: In response to the second socket being unreadable or the reading of the second socket failing, after a preset time interval, determining whether the next second socket in the receiving group is readable.

[0047] Optionally, after extracting the data body from the data and determining whether the length of the data body meets a preset length, the method further includes: In response to the data body length not meeting the preset length, or the data body receiving fails, it is determined again whether any second socket in the receiving group is readable after a preset time interval.

[0048] Specifically, Figure 5As shown, the second core obtains the execution command and determines the command type of the execution command, including: S210: Acquire an execution command sent by the command execution module; S220: Determine whether the second socket is writable; S230: In response to the second socket being writable, sending an execution command to the second socket.

[0049] The socket serves as the interface of the throne network, establishing a communication connection between the remote controller and the second core through the network.

[0050] Optionally, after determining whether the second socket is writable, the method further includes: S230a: In response to the second socket being unwritable, resending the execution command.

[0051] Preferably, according to the command type, according to the command type of the execution command, controlling the dual-core controller to restart includes: S310: In response to the type of the execution command being to restart the dual-core controller, restart the dual-core controller by resetting the timer; Specifically, the reset function of the reset timer is blocked, and after the reset timer reaches a preset time, the dual-core controller is restarted.

[0052] Optionally, S320: feeding back the execution result to the remote control end.

[0053] Optionally, according to the command type of the execution command, controlling the dual-core controller to restart, or restarting the process running in the non-real-time operating system through inter-core communication between the second core and the first core, further includes: S320a: In response to the type of the execution command being to restart the process, determining whether the process supports restarting; S330a: In response to the process supporting restart, the process ID of the process is sent to the first core, and the process corresponding to the process ID is restarted through the first core.

[0054] The communication between the second core and the first core is carried out with the help of the inter-core communication module, and the content of the communication is stored in the shared memory. Take the transmission of information from the second core to the first core as an example: the second core sends a soft interrupt instruction to the first core, and the first core receives the soft interrupt instruction, obtains the corresponding information from the shared memory, and completes the inter-core communication.

[0055] Optionally, in response to the type of the execution command being to restart the process, after determining whether the process supports restarting, the method further includes: S330b: In response to the process not supporting restart, returning restart failure.

[0056] Preferably, before the remote control terminal sends the execution command to the second core, the method further includes: S000: Initialize the second core.

[0057] Specifically, Figure 6 As shown, initializing the second core includes at least one of the following: S010: Initializing the inter-core communication module of the second core; S020: Initializing the command execution module of the second core; S030: Initializing the command transceiver module of the second core; And S040: Initialize the network module of the second core.

[0058] Specifically, initializing the inter-core communication module of the second core includes: S011: Register interrupt processing function.

[0059] Specifically, the command execution module of the second core is initialized, including: S021: Register execution command; S022: Associating the execution command with the called function to complete the initialization of the command execution module.

[0060] Specifically, initializing the command transceiver module of the second core includes: S031: Create a receiving group for storing the second socket; S032: Create a message queue for transmitting execution results.

[0061] Specifically, initializing the network module of the second core includes: S041: Obtaining a second core network address through a dynamic host configuration protocol; S042: Print the second core network address through the serial port; S043: Send the second core network address to the first core for display by the operating system running on the first core.

[0062] It should be understood that although Figure 1-6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-6At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0063] In other embodiments, Figure 7 As shown, a computer device includes a memory, a processor, and a remote restart program stored in the memory and executable on the processor. When the processor executes the remote restart program, the remote restart method described above is implemented. Specifically, it includes: In response to the non-real-time operating system failure, the remote control end is unable to control the first core through the first network interface controller to restart the dual-core controller or the process running in the non-real-time operating system; The remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core.

[0064] A dual-core controller is a controller with two cores, one of which has better performance and is used to handle almost all business operations, while the other core is used to assist in the work.

[0065] Preferably, the dual-core controller is a baseboard management controller (BMC). The baseboard management controller is an embedded processor used to monitor, report and control the status of server hardware. The baseboard management controller is an independent system under the server system, with its own processor and memory. Even if the server host is down or shut down, the baseboard management controller can still manage the server. The baseboard management controller can monitor various parameters of the host, such as temperature, voltage, fan speed, power status, etc., and can realize functions such as remote power on and off, remote reinstallation of the host system, and remote display of the host screen. The baseboard management controller provides users with a remote access interface, and users can access the baseboard management controller through the network interface to achieve the purpose of remote management of the server.

[0066] Among them, the core with better performance is used to run the operating system, such as the Linux system; the other core is used to run a lightweight system, such as RTOS, to assist the operating system. There is a reset timer in the baseboard management controller. When the reset timer times out, the baseboard management controller firmware will be restarted. When the Linux system is running normally, the reset timer will be reset and the timing will start again. When the Linux system fails, the reset timer is usually not reset. Therefore, when the reset timer times out, the baseboard management controller firmware will be restarted.

[0067] For network services, there are one or several processes running in the Linux operating system. When these processes crash, the processes end, and the systemd tool that comes with the Linux operating system will restart these processes.

[0068] In some special fault conditions, although the Linux operating system shows a fault state, it does not block the reset timer from being reset. When the network service fails but does not crash, it is impossible to restart the network service. At this time, the only way is to manually go to the computer room to power on and off the system, which brings great inconvenience.

[0069] Figure 1 The figure shows a dual-core BMC architecture. Both RTOS and Linux implement network protocol stacks, command processing modules, and inter-core communication modules. Linux and RTOS are independent of each other and have their own IP addresses. Linux has good performance and implements a web server through which users can remotely control the server. Due to memory and frequency limitations, RTOS uses a relatively lightweight open source TCP / IP protocol. Linux and RTOS communicate through the inter-core communication module.

[0070] In the dual-core BMC architecture, the overall process of using the RTOS core to process commands is as follows: Figure 2 shown.

[0071] 1. The remote control terminal sends a command to the RTOS core. The RTOS core command transceiver module receives the command through the network; 2. The RTOS command transceiver module sends the received data to the RTOS command execution module, and the command execution module executes the command, which in this patent is to restart the baseboard management controller firmware or restart a specific process of the baseboard management controller; 3. After the command is executed, the result is returned to the command transceiver module; 4. The command transceiver module sends the data back to the remote control terminal through the network.

[0072] Specifically, Figure 3 As shown, the remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, including: S100: Sending the execution command to the second core at the remote control end; S200: The second core obtains an execution command and determines the command type of the execution command; S300: Restart the dual-core controller or the process running in the non-real-time operating system according to the command type of the execution command.

[0073] like Figure 4 As shown, the remote control terminal sends the execution command to the second core, including: S110: creating a first socket, adding the first socket to a connection group, and determining whether the first socket in the connection group includes a connection request; S120: In response to the first socket including a connection request, receiving the connection request, and adding a second socket generated by receiving the connection request to a receiving group of the second core, the receiving group corresponding to the connection group; S130: At every preset time interval, the second core determines whether any second socket in the receiving group is readable; S140: In response to the second socket being readable, obtaining data carried in the second socket from the second socket; S150: The second core extracts a data body from the data, and determines whether the length of the data body meets a preset length; S160: In response to the data body length meeting the preset length, the data body is parsed into a corresponding execution command, and the execution command is added to a message queue, and the execution command is sent to a command execution module running on the first core through the message queue to wait for execution.

[0074] Optionally, after adding the first socket to the connection group, the method further includes: S120a: In response to the first socket not including a connection request, the second core determines whether any second socket in the receiving group is readable at every preset time interval.

[0075] Optionally, after the second core determines whether any second socket in the receiving group is readable at each preset time interval, the following further comprises: S140a: In response to the second socket being unreadable or the reading of the second socket failing, after a preset time interval, determining whether the next second socket in the receiving group is readable.

[0076] Optionally, after extracting the data body from the data and determining whether the length of the data body meets a preset length, the method further includes: In response to the data body length not meeting the preset length, or the data body receiving fails, it is determined again whether any second socket in the receiving group is readable after a preset time interval.

[0077] Specifically, Figure 5 As shown, the second core obtains the execution command and determines the command type of the execution command, including: S210: Acquire an execution command sent by the command execution module; S220: Determine whether the second socket is writable; S230: In response to the second socket being writable, sending an execution command to the second socket.

[0078] The socket serves as the interface of the throne network, establishing a communication connection between the remote controller and the second core through the network.

[0079] Optionally, after determining whether the second socket is writable, the method further includes: S230a: In response to the second socket being unwritable, resending the execution command.

[0080] Specifically, according to the command type, according to the command type of the execution command, controlling the dual-core controller to restart includes: S310: In response to the type of the execution command being to restart the dual-core controller, restart the dual-core controller by resetting the timer; Specifically, the reset function of the reset timer is blocked, and after the reset timer reaches a preset time, the dual-core controller is restarted.

[0081] Optionally, S320: feeding back the execution result to the remote control end.

[0082] Optionally, according to the command type of the execution command, controlling the dual-core controller to restart, or restarting the process running in the non-real-time operating system through inter-core communication between the second core and the first core, further includes: S320a: In response to the type of the execution command being to restart the process, determining whether the process supports restarting; S330a: In response to the process supporting restart, the process ID of the process is sent to the first core, and the process corresponding to the process ID is restarted through the first core.

[0083] The communication between the second core and the first core is carried out with the help of the inter-core communication module, and the content of the communication is stored in the shared memory. Take the transmission of information from the second core to the first core as an example: the second core sends a soft interrupt instruction to the first core, and the first core receives the soft interrupt instruction, obtains the corresponding information from the shared memory, and completes the inter-core communication.

[0084] Optionally, in response to the type of the execution command being to restart the process, after determining whether the process supports restarting, the method further includes: S330b: In response to the process not supporting restart, returning restart failure.

[0085] Preferably, before the remote control terminal sends the execution command to the second core, the method further includes: S000: Initialize the second core.

[0086] Specifically, Figure 6 As shown, initializing the second core includes at least one of the following: S010: Initializing the inter-core communication module of the second core; S020: Initializing the command execution module of the second core; S030: Initializing the command transceiver module of the second core; And S040: Initialize the network module of the second core.

[0087] Specifically, initializing the inter-core communication module of the second core includes: S011: Register interrupt processing function.

[0088] Specifically, the command execution module of the second core is initialized, including: S021: Register execution command; S022: Associating the execution command with the called function to complete the initialization of the command execution module.

[0089] Specifically, initializing the command transceiver module of the second core includes: S031: Create a receiving group for storing the second socket; S032: Create a message queue for transmitting execution results.

[0090] Specifically, initializing the network module of the second core includes: S041: Obtaining a second core network address through a dynamic host configuration protocol; S042: Print the second core network address through the serial port; S043: Send the second core network address to the first core for display by the operating system running on the first core.

[0091] In some other embodiments, a computer-readable storage medium stores a remote restart program, and when the remote restart program is executed by a processor, the remote restart method described above is implemented. Specifically, it includes: In response to a failure of the non-real-time operating system, the remote control terminal cannot control the first core through the first network interface controller to restart the dual-core controller or the process running in the non-real-time operating system; The remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core.

[0092] A dual-core controller is a controller with two cores, one of which has better performance and is used to handle almost all business operations, while the other core is used to assist in the work.

[0093] Preferably, the dual-core controller is a baseboard management controller (BMC). The baseboard management controller is an embedded processor used to monitor, report and control the status of server hardware. The baseboard management controller is an independent system under the server system, with its own processor and memory. Even if the server host is down or shut down, the baseboard management controller can still manage the server. The baseboard management controller can monitor various parameters of the host, such as temperature, voltage, fan speed, power status, etc., and can realize functions such as remote power on and off, remote reinstallation of the host system, and remote display of the host screen. The baseboard management controller provides users with a remote access interface, and users can access the baseboard management controller through the network interface to achieve the purpose of remote management of the server.

[0094] Among them, the core with better performance is used to run the operating system, such as the Linux system; the other core is used to run a lightweight system, such as RTOS, to assist the operating system. There is a reset timer in the baseboard management controller. When the reset timer times out, the baseboard management controller firmware will be restarted. When the Linux system is running normally, the reset timer will be reset and the timing will start again. When the Linux system fails, the reset timer is usually not reset. Therefore, when the reset timer times out, the baseboard management controller firmware will be restarted.

[0095] For network services, there are one or several processes running in the Linux operating system. When these processes crash, the processes end, and the systemd tool that comes with the Linux operating system will restart these processes.

[0096] In some special fault conditions, although the Linux operating system shows a fault state, it does not block the reset timer from being reset. When the network service fails but does not crash, it is impossible to restart the network service. At this time, the only way is to manually go to the computer room to power on and off the system, which brings great inconvenience.

[0097] Figure 1 The figure shows a dual-core BMC architecture. Both RTOS and Linux implement network protocol stacks, command processing modules, and inter-core communication modules. Linux and RTOS are independent of each other and have their own IP addresses. Linux has good performance and implements a web server through which users can remotely control the server. Due to memory and frequency limitations, RTOS uses a relatively lightweight open source TCP / IP protocol. Linux and RTOS communicate through the inter-core communication module.

[0098] In the dual-core BMC architecture, the overall process of using the RTOS core to process commands is as follows: Figure 2 shown.

[0099] 1. The remote control terminal sends a command to the RTOS core. The RTOS core command transceiver module receives the command through the network; 2. The RTOS command transceiver module sends the received data to the RTOS command execution module, and the command execution module executes the command, which in this patent is to restart the baseboard management controller firmware or restart a specific process of the baseboard management controller; 3. After the command is executed, the result is returned to the command transceiver module; 4. The command transceiver module sends the data back to the remote control terminal through the network.

[0100] Specifically, Figure 3 As shown, the remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, including: S100: Sending the execution command to the second core at the remote control end; S200: The second core obtains an execution command and determines the command type of the execution command; S300: Restart the dual-core controller or the process running in the non-real-time operating system according to the command type of the execution command.

[0101] like Figure 4 As shown, the remote control terminal sends the execution command to the second core, including: S110: creating a first socket, adding the first socket to a connection group, and determining whether the first socket in the connection group includes a connection request; S120: In response to the first socket including a connection request, receiving the connection request, and adding a second socket generated by receiving the connection request to a receiving group of the second core, the receiving group corresponding to the connection group; S130: At every preset time interval, the second core determines whether any second socket in the receiving group is readable; S140: In response to the second socket being readable, obtaining data carried in the second socket from the second socket; S150: The second core extracts a data body from the data, and determines whether the length of the data body meets a preset length; S160: In response to the data body length meeting the preset length, the data body is parsed into a corresponding execution command, and the execution command is added to a message queue, and the execution command is sent to a command execution module running on the first core through the message queue to wait for execution.

[0102] Optionally, after adding the first socket to the connection group, the method further includes: S120a: In response to the first socket not including a connection request, the second core determines whether any second socket in the receiving group is readable at every preset time interval.

[0103] Optionally, after the second core determines whether any second socket in the receiving group is readable at each preset time interval, the following further comprises: S140a: In response to the second socket being unreadable or the reading of the second socket failing, after a preset time interval, determining whether the next second socket in the receiving group is readable.

[0104] Optionally, after extracting the data body from the data and determining whether the length of the data body meets a preset length, the method further includes: In response to the data body length not meeting the preset length, or the data body receiving fails, it is determined again whether any second socket in the receiving group is readable after a preset time interval.

[0105] Specifically, Figure 5 As shown, the second core obtains the execution command and determines the command type of the execution command, including: S210: Acquire an execution command sent by the command execution module; S220: Determine whether the second socket is writable; S230: In response to the second socket being writable, sending an execution command to the second socket.

[0106] The socket serves as the interface of the throne network, establishing a communication connection between the remote controller and the second core through the network.

[0107] Optionally, after determining whether the second socket is writable, the method further includes: S230a: In response to the second socket being unwritable, resending the execution command.

[0108] Specifically, according to the command type, according to the command type of the execution command, controlling the dual-core controller to restart includes: S310: In response to the type of the execution command being to restart the dual-core controller, restart the dual-core controller by resetting the timer; Specifically, the reset function of the reset timer is blocked, and after the reset timer reaches a preset time, the dual-core controller is restarted.

[0109] Optionally, S320: feeding back the execution result to the remote control end.

[0110] Optionally, according to the command type of the execution command, controlling the dual-core controller to restart, or restarting the process running in the non-real-time operating system through inter-core communication between the second core and the first core, further includes: S320a: In response to the type of the execution command being to restart the process, determining whether the process supports restarting; S330a: In response to the process supporting restart, the process ID of the process is sent to the first core, and the process corresponding to the process ID is restarted through the first core.

[0111] The communication between the second core and the first core is carried out with the help of the inter-core communication module, and the content of the communication is stored in the shared memory. Take the transmission of information from the second core to the first core as an example: the second core sends a soft interrupt instruction to the first core, and the first core receives the soft interrupt instruction, obtains the corresponding information from the shared memory, and completes the inter-core communication.

[0112] Optionally, in response to the type of the execution command being to restart the process, after determining whether the process supports restarting, the method further includes: S330b: In response to the process not supporting restart, the scope restart fails.

[0113] Preferably, before the remote control terminal sends the execution command to the second core, the method further includes: S000: Initialize the second core.

[0114] Specifically, Figure 6 As shown, initializing the second core includes at least one of the following: S010: Initializing the inter-core communication module of the second core; S020: Initializing the command execution module of the second core; S030: Initializing the command transceiver module of the second core; And S040: Initialize the network module of the second core.

[0115] Specifically, initializing the inter-core communication module of the second core includes: S011: Register interrupt processing function.

[0116] Specifically, the command execution module of the second core is initialized, including: S021: Register execution command; S022: Associating the execution command with the called function to complete the initialization of the command execution module.

[0117] Specifically, initializing the command transceiver module of the second core includes: S031: Create a receiving group for storing the second socket; S032: Create a message queue for transmitting execution results.

[0118] Specifically, initializing the network module of the second core includes: S041: Obtaining a second core network address through a dynamic host configuration protocol; S042: Print the second core network address through the serial port; S043: Send the second core network address to the first core for display by the operating system running on the first core.

[0119] In some other embodiments, a computer program product includes a computer program, and when the computer program is executed by a processor, the remote restart method described above is implemented. Specifically, it includes: In response to a non-real-time operating system failure, when the remote control end is unable to control the first core to restart the dual-core controller or the process running in the non-real-time operating system through the first network interface controller, the remote control end sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restart the process running in the non-real-time operating system through inter-core communication between the second core and the first core.

[0120] A dual-core controller is a controller with two cores, one of which has better performance and is used to handle almost all business operations, while the other core is used to assist in the work.

[0121] Preferably, the dual-core controller is a baseboard management controller (BMC). The baseboard management controller is an embedded processor used to monitor, report and control the status of server hardware. The baseboard management controller is an independent system under the server system, with its own processor and memory. Even if the server host is down or shut down, the baseboard management controller can still manage the server. The baseboard management controller can monitor various parameters of the host, such as temperature, voltage, fan speed, power status, etc., and can realize functions such as remote power on and off, remote reinstallation of the host system, and remote display of the host screen. The baseboard management controller provides users with a remote access interface, and users can access the baseboard management controller through the network interface to achieve the purpose of remote management of the server.

[0122] Among them, the core with better performance is used to run the operating system, such as the Linux system; the other core is used to run a lightweight system, such as RTOS, to assist the operating system. There is a reset timer in the baseboard management controller. When the reset timer times out, the baseboard management controller firmware will be restarted. When the Linux system is running normally, the reset timer will be reset and the timing will start again. When the Linux system fails, the reset timer is usually not reset. Therefore, when the reset timer times out, the baseboard management controller firmware will be restarted.

[0123] For network services, there are one or several processes running in the Linux operating system. When these processes crash, the processes end, and the systemd tool that comes with the Linux operating system will restart these processes.

[0124] In some special fault conditions, although the Linux operating system shows a fault state, it does not block the reset timer from being reset. When the network service fails but does not crash, it is impossible to restart the network service. At this time, the only way is to manually go to the computer room to power on and off the system, which brings great inconvenience.

[0125] Figure 1 The figure shows a dual-core BMC architecture. Both RTOS and Linux implement network protocol stacks, command processing modules, and inter-core communication modules. Linux and RTOS are independent of each other and have their own IP addresses. Linux has good performance and implements a web server through which users can remotely control the server. Due to memory and frequency limitations, RTOS uses a relatively lightweight open source TCP / IP protocol. Linux and RTOS communicate through the inter-core communication module.

[0126] In the dual-core BMC architecture, the overall process of using the RTOS core to process commands is as follows: Figure 2 shown.

[0127] 1. The remote control terminal sends a command to the RTOS core. The RTOS core command transceiver module receives the command through the network; 2. The RTOS command transceiver module sends the received data to the RTOS command execution module, and the command execution module executes the command, which in this patent is to restart the baseboard management controller firmware or restart a specific process of the baseboard management controller; 3. After the command is executed, the result is returned to the command transceiver module; 4. The command transceiver module sends the data back to the remote control terminal through the network.

[0128] Specifically, Figure 3 As shown, the remote control end controls the dual-core controller or restarts the process running on the non-real-time operating system, including: S100: Sending the execution command to the second core at the remote control end; S200: The second core obtains an execution command and determines the command type of the execution command; S300: Restart the dual-core controller or the process running in the non-real-time operating system according to the command type of the execution command.

[0129] like Figure 4 As shown, the remote control terminal sends the execution command to the second core, including: S110: creating a first socket, adding the first socket to a connection group, and determining whether the first socket in the connection group includes a connection request; S120: In response to the first socket including a connection request, receiving the connection request, and adding a second socket generated by receiving the connection request to a receiving group of the second core, the receiving group corresponding to the connection group; S130: At every preset time interval, the second core determines whether any second socket in the receiving group is readable; S140: In response to the second socket being readable, obtaining data carried in the second socket from the second socket; S150: The second core extracts a data body from the data, and determines whether the length of the data body meets a preset length; S160: In response to the data body length meeting the preset length, the data body is parsed into a corresponding execution command, and the execution command is added to a message queue, and the execution command is sent to a command execution module running on the first core through the message queue to wait for execution.

[0130] Optionally, after adding the first socket to the connection group, the method further includes: S120a: In response to the first socket not including a connection request, the second core determines whether any second socket in the receiving group is readable at every preset time interval.

[0131] Optionally, after the second core determines whether any second socket in the receiving group is readable at each preset time interval, the following further comprises: S140a: In response to the second socket being unreadable or the reading of the second socket failing, after a preset time interval, determining whether the next second socket in the receiving group is readable.

[0132] Optionally, after extracting the data body from the data and determining whether the length of the data body meets a preset length, the method further includes: In response to the data body length not meeting the preset length, or the data body receiving fails, it is determined again whether any second socket in the receiving group is readable after a preset time interval.

[0133] Specifically, Figure 5 As shown, the second core obtains the execution command and determines the command type of the execution command, including: S210: Acquire an execution command sent by the command execution module; S220: Determine whether the second socket is writable; S230: In response to the second socket being writable, sending an execution command to the second socket.

[0134] The socket serves as the interface of the throne network, establishing a communication connection between the remote controller and the second core through the network.

[0135] Optionally, after determining whether the second socket is writable, the method further includes: S230a: In response to the second socket being unwritable, resending the execution command.

[0136] Specifically, according to the command type, according to the command type of the execution command, controlling the dual-core controller to restart includes: S310: In response to the type of the execution command being to restart the dual-core controller, restart the dual-core controller by resetting the timer; Specifically, the reset function of the reset timer is blocked, and after the reset timer reaches a preset time, the dual-core controller is restarted.

[0137] Optionally, S320: feeding back the execution result to the remote control end.

[0138] Optionally, according to the command type of the execution command, controlling the dual-core controller to restart, or restarting the process running in the non-real-time operating system through inter-core communication between the second core and the first core, further includes: S320a: In response to the type of the execution command being to restart the process, determining whether the process supports restarting; S330a: In response to the process supporting restart, the process ID of the process is sent to the first core, and the process corresponding to the process ID is restarted through the first core.

[0139] The communication between the second core and the first core is carried out with the help of the inter-core communication module, and the content of the communication is stored in the shared memory. Take the transmission of information from the second core to the first core as an example: the second core sends a soft interrupt instruction to the first core, and the first core receives the soft interrupt instruction, obtains the corresponding information from the shared memory, and completes the inter-core communication.

[0140] Optionally, in response to the type of the execution command being to restart the process, after determining whether the process supports restarting, the method further includes: S330b: In response to the process not supporting restart, the scope restart fails.

[0141] Preferably, before the remote control terminal sends the execution command to the second core, the method further includes: S000: Initialize the second core.

[0142] Specifically, Figure 6 As shown, initializing the second core includes at least one of the following: S010: Initializing the inter-core communication module of the second core; S020: Initializing the command execution module of the second core; S030: Initializing the command transceiver module of the second core; And S040: Initialize the network module of the second core.

[0143] Specifically, initializing the inter-core communication module of the second core includes: S011: Register interrupt processing function.

[0144] Specifically, the command execution module of the second core is initialized, including: S021: Register execution command; S022: Associating the execution command with the called function to complete the initialization of the command execution module.

[0145] Specifically, initializing the command transceiver module of the second core includes: S031: Create a receiving group for storing the second socket; S032: Create a message queue for transmitting execution results.

[0146] Specifically, initializing the network module of the second core includes: S041: Obtaining a second core network address through a dynamic host configuration protocol; S042: Print the second core network address through the serial port; S043: Send the second core network address to the first core for display by the operating system running on the first core.

[0147] By implementing the remote restart method, device, storage medium and computer program product provided in the embodiments of the present application, when an abnormality occurs in the Linux system but the timeout restart mechanism has not been triggered, the baseboard management controller or network service is remotely restarted by running the network service provided by the processor from the RTOS to restore the normal operation of the system.

[0148] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program loaded on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory, or installed from a ROM. When the computer program is executed by an external processor, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0149] It should be noted that the computer-readable medium of the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0150] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: in response to detecting that the peripheral mode of the terminal is not activated, obtains the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determines whether the user is obtaining the screen information of the terminal; in response to the judgment result that the user is not obtaining the screen information of the terminal, controls the screen to enter the immediate dimming mode.

[0151] Computer program code for performing the operation of the embodiments of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0152] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0153] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.

[0154] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A remote restart method, characterized in that: Applied to a dual-core controller, the dual-core controller includes a first core and a second core, the first core is used to run a non-real-time operating system, the second core is used to run a real-time operating system, the first core communicates with a remote control terminal through a first network interface controller, and the second core communicates with the remote control terminal through a second network interface controller; The method comprises: In response to the non-real-time operating system failure, the remote control end is unable to control the first core through the first network interface controller to restart the dual-core controller or the process running in the non-real-time operating system; The remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core.

2. A remote restart method according to claim 1, characterized in that: The remote control terminal sends an execution command to the second core through the second network interface to control the dual-core controller to restart, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, including: Sending an execution command to the second core at the remote control end; The second core obtains the execution command and determines the command type of the execution command; According to the command type of the execution command, the dual-core controller is controlled to restart, or the process running in the non-real-time operating system is restarted through inter-core communication between the second core and the first core.

3. A remote restart method according to claim 2, characterized in that: After the second core controls the dual-core controller to restart according to the command type of the execution command, or restarts the process running in the non-real-time operating system through inter-core communication between the second core and the first core, the process further includes: An operation instruction is sent to the first core through the remote control terminal, so as to manage the dual-core controller through the non-real-time operating system running on the first core.

4. A remote restart method according to claim 2, characterized in that: The controlling the dual-core controller to restart according to the command type of the execution command, or restarting the process running in the non-real-time operating system through inter-core communication between the second core and the first core, includes: In response to the type of the execution command being to restart the dual-core controller, the dual-core controller is restarted by resetting a timer.

5. A remote restart method according to claim 4, characterized in that: The step of controlling the dual-core controller to restart according to the command type of the execution command, or restarting the process running in the non-real-time operating system through inter-core communication between the second core and the first core, further includes: In response to the type of the execution command being restarting a process, determining whether the process supports restarting; In response to the process supporting restart, the process ID of the process is sent to the first core, and the process corresponding to the process ID is restarted through the first core.

6. A remote restart method according to claim 5, characterized in that: In response to the type of the execution command being a restart process, after determining whether the process supports restarting, the method further includes: In response to the process not supporting restart, restart failure is returned.

7. A remote restart method according to claim 2, characterized in that: The step of sending the execution command to the second core at the remote control end includes: Creating a first socket, adding the first socket to a connection group, and determining whether the first socket in the connection group includes a connection request; In response to the first socket containing a connection request, receiving the connection request, and adding a second socket generated by receiving the connection request to a receiving group of the second core, the receiving group corresponding to the connecting group; At each preset time interval, the second core determines whether any second socket in the receiving group is readable; In response to the second socket being readable, obtaining the data carried in the second socket from the second socket; The second core extracts a data body from the data, and determines whether the length of the data body meets a preset length; In response to the data body length meeting the preset length, the data body is parsed into a corresponding execution command, and the execution command is added to a message queue, and the execution command is sent to a command execution module running on the first core through the message queue to wait for execution.

8. A remote restart method according to claim 7, characterized in that: After adding the first socket to the connection group, the method further includes: In response to the first socket not including a connection request, the second core determines whether any second socket in the receiving group is readable at every preset time interval.

9. A remote restart method according to claim 7, characterized in that: After the second core determines whether any second socket in the receiving group is readable at each preset time interval, the second core further includes: In response to the second socket being unreadable or the reading of the second socket failing, it is determined whether the next second socket in the receiving group is readable after the preset time interval.

10. A remote restart method according to claim 7, characterized in that: After extracting the data body from the data and determining whether the length of the data body meets the preset length, the method further includes: In response to the data body length not satisfying the preset length, or receiving the data body fails, it is re-determined whether any second socket in the receiving group is readable after the preset time interval.

11. A remote restart method according to claim 2, characterized in that: The second core obtains the execution command and determines the command type of the execution command, including: Obtain the execution command sent by the command execution module; Determine whether the second socket is writable; In response to the second socket being writable, the execution command is sent to the second socket.

12. A remote restart method according to claim 11, characterized in that: After determining whether the second socket is writable, the method further includes: In response to the second socket being not writable, resending the execute command.

13. A remote restart method according to claim 2, characterized in that: Before the remote control terminal sends the execution command to the second core, the method further includes at least one of the following: Initializing the inter-core communication module of the second core; Initializing the command execution module of the second core; Initializing the command transceiver module of the second core; And initialize the network module of the second core.

14. A remote restart method according to claim 13, characterized in that: Initializing the inter-core communication module of the second core includes: Register an interrupt handler.

15. A remote restart method according to claim 13, characterized in that: Initializing the command execution module of the second core includes: Register execution order; The execution command is associated with the called function to complete the initialization of the command execution module.

16. A remote restart method according to claim 13, characterized in that: Initializing the command transceiver module of the second core includes: Create a receiving group to hold the second socket; Create a message queue for transmitting execution results.

17. A remote restart method according to claim 13, characterized in that: Initializing the network module of the second core includes: Obtaining a second core network address through a dynamic host configuration protocol; Print the second core network address through the serial port; The second core network address is sent to the first core for display by the operating system running on the first core.

18. Computer device, characterized in that The invention comprises a memory, a processor and a remote restart program stored in the memory and executable on the processor. When the processor executes the remote restart program, a remote restart method according to any one of claims 1 to 17 is implemented.

19. A computer-readable storage medium, characterized in that A remote restart program is stored thereon, and when the remote restart program is executed by the processor, a remote restart method according to any one of claims 1 to 17 is implemented.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, a remote restart method as described in any one of claims 1 to 17 is implemented.

Citation Information

Patent Citations

  • Baseboard management controller of computer system and starting method

    CN113934471A

  • Operation control method and device of embedded system, electronic equipment and storage medium

    CN116991637A

  • Server exception handling method and device, electronic equipment and medium

    CN118656245A

Cited By

  • Agent method for operating system high-frequency polling, electronic equipment and storage medium

    CN119883579A