Soft switching method for power button of mobile server and storage medium
By using the power-on control chip in a mobile server device to connect to the serial port or GPIO interface of the CPU, the soft shutdown function of the device is realized, solving the damage and resource waste caused by frequent switch-off of the device.
Patent Information
- Application Number
- CN202411725799.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-14
AI Technical Summary
Mobile server devices are difficult to achieve soft shutdown during frequent power-on and shutdown operations, resulting in equipment damage and waste of resources.
The power-on control chip is connected to the CPU's serial port or GPIO interface, forming a shutdown command line issuance link, notifying the operating system to perform shutdown operations, and perform power-down operations after completion. If the shutdown completion signal is not detected, a hard shutdown is performed.
The power button soft shutdown of mobile server devices is realized, avoiding file corruption caused by frequent shutdown of devices, saving resources, and reducing dependence on monitors and keyboards.
Smart Images

Figure CN119621635A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of server security control, for example, to a mobile server power button soft switch method and storage medium. Background Art
[0002] There are generally two application scenarios for servers. The first application scenario is the traditional data center, where server equipment is deployed in a computer room environment with constant temperature and humidity, and servers are generally connected to the Internet, mainly for Internet services, providing users with shopping websites, email management, database processing, game access and other services. Server equipment needs to work continuously and stably 24*7 hours a day in order to provide uninterrupted services to the outside world. Another application scenario is a mobile data center, where server equipment is installed in mobile environments such as vehicles, ships, and aircraft. Server equipment will perform frequent power on and off operations according to the actual needs of the mobile environment. In mobile environments such as vehicles, ships, and aircraft, space is limited, and server equipment is generally not equipped with a display and keyboard and mouse, and cannot implement soft shutdown operations under the operating system.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application. Summary of the invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] The present disclosure provides a method for soft switching a power button of a mobile server, the method comprising:
[0006] The power-on control chip is connected to the CPU through a serial port or a GPIO interface to form a shutdown command line issuing link, which notifies the shutdown monitoring service software running in the operating system. The shutdown monitoring service software executes the shutdown command and notifies the operating system to perform the shutdown operation.
[0007] After the operating system completes the shutdown operation, it sends a shutdown completion signal to the power-on control chip, and the power-on control chip performs a power-off operation.
[0008] In some embodiments, the method further comprises:
[0009] If the power-on control chip does not detect the shutdown completion signal within the first preset time period, the power-on control chip directly cuts off the power supply to perform a hard shutdown operation.
[0010] In some embodiments, the power-on control chip is connected to the CPU through a serial port or a GPIO interface to form a shutdown command line issuing link, and notifies the shutdown monitoring service software running in the operating system. The shutdown monitoring service software executes the shutdown command and notifies the operating system to perform the shutdown operation, including:
[0011] After receiving the external shutdown signal, the MCU / CPLD sends a shutdown command "0xff0x050x500xfe" to the operating system through the serial port or GPIO interface connected to the CPU. The operating system returns the "0xff0x050x500xfe" data within the second preset time period, indicating that the system is working normally, and notifies the operating system to perform the shutdown operation.
[0012] In some embodiments, after the operating system completes the shutdown operation, it sends a shutdown completion signal to the power-on control chip, and the power-on control chip performs a power-off operation; if the power-on control chip does not detect the shutdown completion signal within a first preset time period, the power-on control chip directly cuts off the power supply to perform a hard shutdown operation, including:
[0013] After the operating system completes the shutdown operation, it sends a shutdown completion signal to the MCU / CPLD. After receiving the data returned by the system, the MCU / CPLD starts a timeout. If no soft shutdown signal sent by the system is received within the first preset time period, a power-off hard shutdown is performed; if the operating system does not return the "0xff0x050x500xfe" data within the third preset time period, it indicates that the system is working abnormally and a hard shutdown is performed directly.
[0014] In some embodiments, the method further comprises:
[0015] The shutdown monitoring service software runs in the operating system. The shutdown monitoring service software monitors the serial port communication in real time. When receiving the shutdown command sent by the MCU / CPLD, the same command data is returned to the MCU / CPLD through the GPIO or serial port, and then the shutdown command is executed to perform a soft shutdown.
[0016] In some embodiments, the method further comprises:
[0017] The server device is turned on when the power button signal is pressed;
[0018] If the server device power button is not pressed, the BMC cannot be turned on.
[0019] In some embodiments, the method further comprises:
[0020] After receiving the shutdown signal from the BMC interface or the server device power button, the MCU / CPLD uploads the shutdown signal to the operating system, and the operating system monitoring script detects and executes the shutdown.
[0021] The embodiment of the present disclosure provides a storage medium storing program instructions, which, when running, execute the above-mentioned mobile server power button soft switching method.
[0022] The mobile server power button soft switch method and storage medium provided by the embodiments of the present disclosure can achieve the following technical effects:
[0023] The server device disclosed in the present invention meets the application requirements of frequent shutdown of mobile server devices through soft shutdown with the power button, and also meets the requirements of equipment maintenance shutdown in fixed computer room environments, creating a precedent for soft shutdown with the power button of server devices. The shutdown monitoring service software and chip firmware included in the soft shutdown with the power button of the server device are all independently developed, controllable and safe; and the solution only needs to lead out an additional serial port or I2C of the CPLD / MCU, without additional hardware design and no additional cost; the server device solves the problem of frequent shutdown of mobile server devices and damages files through the soft shutdown function with the power button, and also saves the configuration of keyboards and monitors, saves resources, and protects the equipment.
[0024] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0026] Figure 1 It is a schematic diagram of a mobile server power button soft switch method provided by an embodiment of the present disclosure;
[0027] Figure 2 is a block diagram of a soft shutdown system provided by an embodiment of the present disclosure;
[0028] Figure 3 It is a MCU / CPLD logic block diagram provided by an embodiment of the present disclosure;
[0029] Figure 4 is a schematic diagram of a serial communication setting provided by an embodiment of the present disclosure;
[0030] Figure 5 It is a schematic diagram of a code corresponding to a one-key shutdown signal provided in an embodiment of the present disclosure;
[0031] Figure 6 The present invention is a schematic diagram of a mobile server power button soft switch system structure provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0033] The terms "first", "second", etc. in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0034] Unless otherwise stated, the term "plurality" means two or more.
[0035] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0036] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0037] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0038] The mobile server power button soft switch method and storage medium provided by the embodiments of the present disclosure are described below in conjunction with the accompanying drawings.
[0039] Figure 1 The present invention is a flowchart of a soft-switch method for a power button of a mobile server provided by an embodiment of the present invention.
[0040] like Figure 1 As shown, the mobile server power button soft switch method may include:
[0041] S01, the power-on control chip is connected to the CPU through the serial port or GPIO interface to form a shutdown command line issuing link, and the shutdown monitoring service software running in the operating system is notified. The shutdown monitoring service software executes the shutdown command and notifies the operating system to perform the shutdown operation;
[0042] S02, after completing the shutdown operation, the operating system sends a shutdown completion signal to the power-on control chip, and the power-on control chip performs a power-off operation.
[0043] Figure 2 is a block diagram of a soft shutdown system provided by an embodiment of the present disclosure, Figure 3 is a MCU / CPLD logic block diagram provided by an embodiment of the present disclosure, Figure 4 is a schematic diagram of a serial communication setting provided by an embodiment of the present disclosure, Figure 5 This is a schematic diagram of a code corresponding to a one-key shutdown signal provided by an embodiment of the present disclosure, combined with Figures 2 to 5 ,right Figure 1 The soft switching method of the power button of the mobile server is further described.
[0044] In some embodiments, Figure 1 The method may also include:
[0045] If the power-on control chip does not detect the shutdown completion signal within the first preset time period, the power-on control chip directly cuts off the power supply to perform a hard shutdown operation. The first preset time period may be 60 seconds, and may also be adjusted according to actual conditions.
[0046] In some embodiments, the power-on control chip is connected to the CPU through a serial port or a GPIO interface to form a shutdown command line issuing link, and notifies the shutdown monitoring service software running in the operating system. The shutdown monitoring service software executes the shutdown command and notifies the operating system to perform the shutdown operation, including:
[0047] After receiving the external shutdown signal, the MCU / CPLD sends a shutdown command "0xff0x050x500xfe" to the operating system through the serial port or GPIO interface connected to the CPU. The operating system returns "0xff0x050x500xfe" data within the second preset time period, indicating that the system is working normally, and notifies the operating system to perform the shutdown operation. The second preset time period can be specifically 5s, and can also be adjusted according to actual conditions.
[0048] In some embodiments, after the operating system completes the shutdown operation, it sends a shutdown completion signal to the power-on control chip, and the power-on control chip performs a power-off operation; if the power-on control chip does not detect the shutdown completion signal within a first preset time period, the power-on control chip directly cuts off the power supply to perform a hard shutdown operation, including:
[0049] After the operating system completes the shutdown operation, it sends a shutdown completion signal to the MCU / CPLD. After receiving the system return data, the MCU / CPLD performs a timeout. If the soft shutdown signal sent by the system is not received within the first preset time period, a power-off hard shutdown is performed; if the operating system does not return the "0xff0x050x500xfe" data within the third preset time period, it indicates that the system is working abnormally, and a hard shutdown is performed directly. The third preset time period can be specifically 10s, and can also be adjusted according to actual conditions.
[0050] In some embodiments, Figure 1 The method may also include:
[0051] The shutdown monitoring service software runs in the operating system. The shutdown monitoring service software monitors the serial port communication in real time. When receiving the shutdown command sent by the MCU / CPLD, the same command data is returned to the MCU / CPLD through the GPIO or serial port, and then the shutdown command is executed to perform a soft shutdown.
[0052] In some embodiments, Figure 1 The method may also include:
[0053] The server device is turned on when the power button signal is pressed;
[0054] If the server device power button is not pressed, the BMC cannot be turned on.
[0055] In some embodiments, Figure 1 The method may also include:
[0056] After receiving the shutdown signal from the BMC interface or the server device power button, the MCU / CPLD uploads the shutdown signal to the operating system, and the operating system monitoring script detects and executes the shutdown.
[0057] In a specific example, drawing on the experience of a project where the server equipment was forced to power off and shut down at the customer's site, and the hard disk system was damaged, in the firmware design of the server equipment, the power switch was designed and implemented with the embedded firmware and system driver to soft shut down the power button, greatly improving the reliability and flexibility of the server equipment.
[0058] The hard shutdown process is that the MCU / CPLD directly performs a power-off operation. The soft shutdown process is that the power-on control chip (CPLD or MCU, etc.) is connected to the CPU through a serial port or GPIO interface to form a shutdown command line issuance link, notifying the shutdown monitoring service software running in the operating system. The shutdown monitoring service software executes the poweroff or shutdown command, notifies the operating system to perform a shutdown operation, and at the same time, notifies the power-on control chip that the shutdown command has been received. After the operating system completes the shutdown operation, it sends a shutdown completion signal PWR_CTR0&1 to the power-on control chip, and the power-on control chip performs a power-off operation. If the power-on control chip does not detect the shutdown completion signal PWR_CTR0&1 within 60 seconds, the power-on control chip directly cuts off the power and performs a hard shutdown operation. The shutdown operating system block diagram is as follows: Figure 2 shown.
[0059] There are two types of external shutdown signals: (a) the power button signal on the front panel; (b) the shutdown signal on the BMC interface;
[0060] The soft shutdown solution is: after the MCU / CPLD receives the external shutdown signal, it sends the shutdown command "0xff0x050x500xfe" to the operating system through the serial port connected to the CPU. The operating system returns 0xff0x050x500xfe data within 5 seconds, indicating that the system is working normally. After the MCU / CPLD receives the data returned by the system, it will time out (60 seconds). If it has not received the soft shutdown signal sent by the system after the timeout, it will power off and perform a hard shutdown. If the operating system does not return 0xff0x050x500xfe data within 10 seconds, it means that the system is working abnormally and a hard shutdown is performed directly.
[0061] The shutdown monitoring service software runs in the operating system. The shutdown monitoring service software monitors the serial port communication in real time. When receiving the shutdown command sent by the MCU / CPLD, it returns the same command data to the MCU / CPLD through the GPIO or serial port, and then executes the shutdown command to perform a soft shutdown. The logic block diagram is as follows Figure 3 shown.
[0062] The shutdown signal of the server device power button: when lifted, it is high (shutdown) by default, and when pressed, it is low level.
[0063] Upload shutdown signal (serial port): Serial port communication settings are as follows Figure 4 shown.
[0064] After receiving the one-key soft shutdown signal, the serial port sends 0xff0x050x500xfe data to the operating system. The operating system returns 0xff0x050x500xfe data within 5 seconds, indicating that the system is working normally. After receiving the data, the timeout (15 seconds) begins. If the following soft shutdown signal is not received after the timeout, a hard shutdown is performed. If the operating system does not return 0xff0x050x500xfe data within 5 seconds, it means that the system is working abnormally and a hard shutdown is performed directly.
[0065] Code example:
[0066] / / Send a one-key shutdown signal
[0067] u8 uart3_buff[4]={0xFF,0x05,0x50,0xFE};
[0068] UartSendData(UART3,uart3_buff,4);
[0069] / / Receive the data returned by the operating system
[0070] The code example can be specifically as follows Figure 5 shown.
[0071] Soft shutdown signal: The soft shutdown signal PWR_CTR0&1 sent by the system.
[0072] The server can only be powered on when the power button is pressed. If the button is not pressed, the BMC cannot be powered on. After the CPLD / MCU receives the shutdown signal from the BMC interface and the server power button, it uploads the shutdown signal pin to the operating system, and the monitoring script under the system detects and executes the shutdown.
[0073] In the present disclosure, the specific configuration of the server device soft shutdown resources is shown in Table 1.
[0074] Table 1
[0075]
[0076] The present invention realizes the soft shutdown of the server equipment by pressing the power button. The shutdown monitoring service software unique to the server version operating system can monitor the shutdown signal transmitted by the hardware and provide feedback. In addition, the link between the CPU and the power-on control chip for the transmission of the soft shutdown command is that the CPLD / MCU communicates with the CPU through the serial port, and the transmission is fast and stable with high scalability. In addition to the serial port communication, the shutdown monitoring service software also reserves two communication modes, GPIO and I2C, and the hardware design can be selected according to the actual situation.
[0077] The present disclosure provides a mobile server power button soft switch method, in which the server device meets the application requirements of frequent shutdown of mobile server devices through power button soft shutdown, and also meets the requirements of equipment maintenance shutdown in fixed computer room environments, creating a precedent for server device power button soft shutdown. The shutdown monitoring service software and chip firmware included in the server device power button soft shutdown are all independently developed, controllable and safe; and the solution only needs to lead out an additional serial port or I2C of the CPLD / MCU, without additional hardware design and no additional cost; the server device solves the problem of frequent shutdown of mobile server devices and damages files through the power button soft shutdown function, and also saves the configuration of keyboards and monitors, saves resources, and protects the equipment.
[0078] In addition, the present disclosure has opened up a new method for soft shutdown of server devices by pressing the power button, so that the server device can smoothly trigger the operating system to perform software shutdown operations by pressing the power switch like a computer device. This avoids damage to the operating system files and hard disk of the server device. At the same time, there is no need to connect a monitor and keyboard and mouse, which greatly saves space and cost in a mobile environment.
[0079] Combination Figure 6 As shown, the embodiment of the present disclosure also provides a mobile server power button soft switch system 600, including a processor 604 and a memory 601. Optionally, the system may also include a communication interface 602 and a bus 603. The processor 604, the communication interface 602, and the memory 601 may communicate with each other through the bus 603. The communication interface 602 may be used for information transmission. The processor 604 may call the logic instructions in the memory 601 to execute the mobile server power button soft switch method of the above embodiment.
[0080] In addition, the logic instructions in the memory 601 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0081] The memory 601 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 604 executes the function application and data processing by running the program instructions / modules stored in the memory 601, that is, the mobile server power button soft switch method in the above embodiment is implemented.
[0082] The memory 601 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 601 may include a high-speed random access memory and may also include a non-volatile memory.
[0083] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute a soft-switch method for a power button of a mobile server.
[0084] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0085] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0086] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. As used in the description of the embodiments, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations listed in association with one or more. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0087] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the systems, devices and units described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0088] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. 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 units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0089] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A mobile server power button soft switch method, characterized in that: The method comprises: The power-on control chip is connected to the CPU through a serial port or a GPIO interface to form a shutdown command line issuing link, which notifies the shutdown monitoring service software running in the operating system. The shutdown monitoring service software executes the shutdown command and notifies the operating system to perform the shutdown operation. After the operating system completes the shutdown operation, it sends a shutdown completion signal to the power-on control chip, and the power-on control chip performs a power-off operation.
2. The method according to claim 1, characterized in that The method further comprises: If the power-on control chip does not detect the shutdown completion signal within the first preset time period, the power-on control chip directly cuts off the power supply to perform a hard shutdown operation.
3. The method according to claim 1, characterized in that The power-on control chip is connected to the CPU via a serial port or a GPIO interface to form a shutdown command line issuing link, and notifies the shutdown monitoring service software running in the operating system. The shutdown monitoring service software executes the shutdown command and notifies the operating system to perform the shutdown operation, including: After receiving the external shutdown signal, the MCU / CPLD sends a shutdown command "0xff0x050x500xfe" to the operating system through the serial port or GPIO interface connected to the CPU. The operating system returns "0xff0x050x500xfe" data within the second preset time period, indicating that the system is working normally, and notifies the operating system to perform the shutdown operation.
4. The method according to claim 3, characterized in that After the operating system completes the shutdown operation, it sends a shutdown completion signal to the power-on control chip, and the power-on control chip performs a power-off operation; If the power-on control chip does not detect the shutdown completion signal within the first preset time period, the power-on control chip directly cuts off the power supply to perform a hard shutdown operation, including: After the operating system completes the shutdown operation, it sends a shutdown completion signal to the MCU / CPLD. After receiving the data returned by the system, the MCU / CPLD starts a timeout. If no soft shutdown signal sent by the system is received within the first preset time period, a power-off hard shutdown is performed; if the operating system does not return the "0xff0x050x500xfe" data within the third preset time period, it indicates that the system is working abnormally and a hard shutdown is performed directly.
5. The method according to claim 1, characterized in that The method further comprises: The shutdown monitoring service software runs in the operating system. The shutdown monitoring service software monitors the serial port communication in real time. When receiving the shutdown command sent by the MCU / CPLD, the same command data is returned to the MCU / CPLD through the GPIO or serial port, and then the shutdown command is executed to perform a soft shutdown.
6. The method according to claim 1, characterized in that The method further comprises: The server device is turned on when the power button signal is pressed; If the server device power button is not pressed, the BMC cannot be turned on.
7. The method according to claim 6, characterized in that The method further comprises: After receiving the shutdown signal from the BMC interface or the server device power button, the MCU / CPLD uploads the shutdown signal to the operating system, and the operating system monitoring script detects and executes the shutdown.
8. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the mobile server power button soft switch method according to any one of claims 1 to 7 is executed.