CN117075705A - Method, device and system for avoiding abnormal work of BMC after power failure - Google Patents

Method, device and system for avoiding abnormal work of BMC after power failure Download PDF

Info

Publication number
CN117075705A
CN117075705A CN202311044126.4A CN202311044126A CN117075705A CN 117075705 A CN117075705 A CN 117075705A CN 202311044126 A CN202311044126 A CN 202311044126A CN 117075705 A CN117075705 A CN 117075705A
Authority
CN
China
Prior art keywords
pao
gpio
server
bmc
shutdown
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311044126.4A
Other languages
Chinese (zh)
Inventor
蒙家全
张声坤
李耀彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhongke Yixin Technology Co ltd
Original Assignee
Shenzhen Zhongke Yixin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhongke Yixin Technology Co ltd filed Critical Shenzhen Zhongke Yixin Technology Co ltd
Priority to CN202311044126.4A priority Critical patent/CN117075705A/en
Publication of CN117075705A publication Critical patent/CN117075705A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/30Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/20Cooling means
    • G06F1/206Cooling means comprising thermal management
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C5/00Details of stores covered by group G11C11/00
    • G11C5/14Power supply arrangements, e.g. power down, chip selection or deselection, layout of wirings or power grids, or multiple supply levels
    • G11C5/141Battery and back-up supplies

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention discloses a method, a device and a system for avoiding abnormal work after BMC power failure, which are characterized in that by opening and configuring GPIO device files, setting PAO and PBO as input/output ports, registering and processing GPIO interrupt service threads, realizing key detection and duration calculation, and controlling an LED lamp and system shutdown preparation. When the alternating current power supply of the server needs to be pulled out, the server positioning lamp button can be pressed for a long time, so that the server BMC performs shutdown operation first, and the safety of flash data is ensured. The invention further comprises a server BMC power failure abnormal work protection system consisting of the embedded Linux system and the shutdown module, and under the condition of not adding additional hardware, the problem that flash data are abnormal due to the fact that an AC is unplugged is effectively solved through software, and an economical and reliable solution is provided.

Description

Method, device and system for avoiding abnormal work of BMC after power failure
Technical Field
The invention relates to the field of server hardware management and control, in particular to a method, a device and a system for avoiding abnormal work after BMC power failure.
Background
In modern server systems, baseboard Management Controllers (BMCs) play a critical role in monitoring and controlling for managing various aspects of server hardware. The BMC can monitor the temperature, voltage, fans, power supply and the like of the system in real time and perform corresponding adjustment work so as to ensure the health state of the system. In addition, the BMC can also record information and logs of various hardware for prompting by a user and positioning subsequent problems.
AST2500 chips are widely used in numerous server BMC applications. However, this chip has an important drawback: if the AST2500 is reading and writing the flash, it encounters abnormal disconnection of the alternating current power supply (AC power), which may cause data loss on the flash, thereby causing abnormal operation of the BMC.
The server is typically provided with a position light button (e.g., UUID light button) that when pressed causes a position indicator light (UUID light) on the server to illuminate. In the application of AST2500, the position light button is actually an input GPIO, and when this button is pressed, a program on the BMC can detect this low level signal and control the position light to light up by outputting an active level through another GPIO.
It is an inevitable situation that server AC power is often required to be unplugged during development, testing and operation of the server. The existing processing method is to increase a super capacitor to ensure that the BMC can work briefly after the AC is powered off, so that the integrity and effectiveness of data on the flash are ensured. However, this solution requires additional hardware costs and design difficulties.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method, apparatus and system for avoiding abnormal operation of a BMC after power failure, which aims to overcome the above drawbacks and ensure stable operation of a server under abnormal power failure in a more efficient and low-cost manner.
The invention is realized by the following technical scheme: a server BMC power failure abnormal work protection method comprises the following steps:
step one, opening and configuring GPIO device files, which specifically comprises the following steps:
(1) Opening GPIO device files;
(2) Configuring PAO as an input port for receiving UUID button signals;
step two, configuring PBO as an output port for controlling UUID lamps, which comprises the following steps of;
(1) Registering and processing GPIO interrupt service threads:
(2) Registering GPIO interrupt service threads;
(3) Specially used for handling PAO interrupts;
step three, key detection, specifically comprising:
(1) Waiting for a PAO falling edge interrupt;
(2) Monitoring by polling or blocking reading;
(3) Reading key-press time start_time;
(4) Setting a key detection mark as true;
step four, key release judgment and duration calculation, which specifically comprises the following steps:
firstly, judging whether a key is released or not;
(II) if released, reading the release time end_time;
(III) calculating the duration time of the key;
(IV) if the time is less than 10 seconds, setting the detection mark as false;
fifthly, otherwise, setting a shutdown mark of the control thread;
step five, LED control and system shutdown preparation, specifically comprising:
setting PBO to be high level, and lighting an LED;
(II) after waiting for 10 seconds, the LED is lighted again;
step six, system shutdown operation, specifically comprising:
calling a shutdown command;
(II) executing system shutdown;
and (III) ending the process.
As a preferable technical scheme, the PAO is connected with the UUID button, and the PBO is connected with the UUID lamp.
The invention discloses a server BMC power failure abnormal work protection device, which comprises:
the GPIO device file configuration module is used for opening and configuring GPIO device files and respectively setting PAO and PBO as input/output;
the interrupt service thread registration module is used for registering GPIO interrupt service threads and processing PAO interrupts;
and the key monitoring and control module is used for executing key monitoring and controlling related operations of LED lighting and system shutdown.
The invention discloses a server BMC power failure abnormal work protection system, which comprises a server BMC power failure abnormal work protection device and further comprises:
the embedded Linux system is used for executing the operations of saving the current configuration and closing the existing applications and services;
and the shutdown module is used for executing system shutdown operation and ensuring the safety of flash data.
As a preferable technical scheme, the GPIO device file configuration module further comprises an input/output setting module of PAO and PBO.
The beneficial effects of the invention are as follows: the invention effectively avoids the negative influence of Alternating Current (AC) power failure on a Baseboard Management Controller (BMC) under certain conditions through software under the condition of not adding additional hardware circuits. The method comprises the steps that when the active power-down of the server is needed, a server positioning lamp button is pressed for 20 seconds, so that the server BMC firstly performs power-off operation on a host computer, then an embedded Linux system on the BMC is triggered to store the current configuration, the existing application and service are closed, and finally the server enters a power-off state, and the safety of flash data is ensured;
compared with the increase of hardware cost and design difficulty, the intelligent matching of the positioning lamp button and the BMC software effectively solves the problem that flash data is abnormal due to the fact that an AC needs to be unplugged in certain scenes, and finally the BMC cannot work when powered on next time, and achieves an economical and reliable solution.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of the operation of the present invention.
Detailed Description
All of the features disclosed in this specification, or all of the steps in a method or process disclosed, may be combined in any combination, except for mutually exclusive features and/or steps.
Any feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. That is, each feature is one example only of a generic series of equivalent or similar features, unless expressly stated otherwise.
As shown in fig. 1, the method for protecting the server BMC from abnormal power failure of the present invention, assuming that the PAO is connected to the UUID button and the PBO is connected to the UUID lamp, includes the following steps:
step one, opening and configuring GPIO device files, which specifically comprises the following steps:
(1) Opening GPIO device files;
(2) Configuring PAO as an input port for receiving UUID button signals;
step two, configuring PBO as an output port for controlling UUID lamps, which comprises the following steps of;
(1) Registering and processing GPIO interrupt service threads:
(2) Registering GPIO interrupt service threads;
(3) Specially used for handling PAO interrupts;
step three, key detection, specifically comprising:
(1) Waiting for a PAO falling edge interrupt;
(2) Monitoring by polling or blocking reading;
(3) Reading key-press time start_time;
(4) Setting a key detection mark as true;
step four, key release judgment and duration calculation, which specifically comprises the following steps:
firstly, judging whether a key is released or not;
(II) if released, reading the release time end_time;
(III) calculating the duration time of the key;
(IV) if the time is less than 10 seconds, setting the detection mark as false;
fifthly, otherwise, setting a shutdown mark of the control thread;
step five, LED control and system shutdown preparation, specifically comprising:
setting PB0 to a high level, and lighting an LED;
(II) after waiting for 10 seconds, the LED is lighted again;
step six, system shutdown operation, specifically comprising:
calling a shutdown command;
(II) executing system shutdown;
and (III) ending the process.
In this embodiment, PA0 is connected to the UUID button, and PB0 is connected to the UUID lamp.
The invention discloses a server BMC power failure abnormal work protection device, which comprises:
the GPIO device file configuration module is used for opening and configuring GPIO device files and respectively setting PAO and PBO as input/output;
the interrupt service thread registration module is used for registering GPIO interrupt service threads and processing PAO interrupts;
and the key monitoring and control module is used for executing key monitoring and controlling related operations of LED lighting and system shutdown.
The invention discloses a server BMC power failure abnormal work protection system, which comprises a server BMC power failure abnormal work protection device and further comprises:
the embedded Linux system is used for executing the operations of saving the current configuration and closing the existing applications and services;
and the shutdown module is used for executing system shutdown operation and ensuring the safety of flash data.
The GPIO device file configuration module further comprises an input/output setting module of PAO and PBO.
In addition, in the invention, the triggering by the positioning lamp button is realized by a reference, different designs exist on different servers, and other modes of triggering are also possible, for example, a HOST on-off button and the like can be a direct mode and an indirect mode as long as the on-site interaction with the server BMC can be realized.
The invention effectively avoids the negative influence of Alternating Current (AC) power failure on a Baseboard Management Controller (BMC) under certain conditions through software under the condition of not adding additional hardware circuits. The method comprises the steps that when the active power-down of the server is needed, a server positioning lamp button is pressed for 20 seconds, so that the server BMC firstly performs power-off operation on a host computer, then an embedded Linux system on the BMC is triggered to store the current configuration, the existing application and service are closed, and finally the server enters a power-off state, and the safety of flash data is ensured;
compared with the increase of hardware cost and design difficulty, the intelligent matching of the positioning lamp button and the BMC software effectively solves the problem that flash data is abnormal due to the fact that an AC needs to be unplugged in certain scenes, and finally the BMC cannot work when powered on next time, and achieves an economical and reliable solution.
The foregoing is merely illustrative of specific embodiments of the present invention, and the scope of the invention is not limited thereto, but any changes or substitutions that do not undergo the inventive effort should be construed as falling within the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope defined by the claims.

Claims (5)

1. The method for protecting the server BMC from abnormal power failure is characterized by comprising the following steps:
step one, opening and configuring GPIO device files, which specifically comprises the following steps:
(1) Opening GPIO device files;
(2) Configuring PAO as an input port for receiving UUID button signals;
step two, configuring PBO as an output port for controlling UUID lamps, which comprises the following steps of;
(1) Registering and processing GPIO interrupt service threads:
(2) Registering GPIO interrupt service threads;
(3) Specially used for handling PAO interrupts;
step three, key detection, specifically comprising:
(1) Waiting for a PAO falling edge interrupt;
(2) Monitoring by polling or blocking reading;
(3) Reading key-press time start_time;
(4) Setting a key detection mark as true;
step four, key release judgment and duration calculation, which specifically comprises the following steps:
firstly, judging whether a key is released or not;
(II) if the release is already released, reading the release time end_time;
(III) calculating the duration time of the key;
(IV) if the time is less than 10 seconds, setting the detection mark as false;
fifthly, otherwise, setting a shutdown mark of the control thread;
step five, LED control and system shutdown preparation, specifically comprising:
setting PBO to be high level, and lighting an LED;
(II) after waiting for 10 seconds, the LED is lighted again;
step six, system shutdown operation, specifically comprising:
calling a shutdown command;
(II) executing system shutdown;
and (III) ending the process.
2. The server BMC power down abnormal operation protection method according to claim 1, wherein: wherein the PAO is connected with the UUID button and the PBO is connected with the UUID lamp.
3. The utility model provides a server BMC abnormal operation protector that loses power which characterized in that: comprising the following steps:
the GPIO device file configuration module is used for opening and configuring GPIO device files and respectively setting PAO and PBO as input/output;
the interrupt service thread registration module is used for registering GPIO interrupt service threads and processing PAO interrupts;
and the key monitoring and control module is used for executing key monitoring and controlling related operations of LED lighting and system shutdown.
4. A server BMC power failure abnormal work protection system is characterized in that: a server BMC power down abnormal operation protection device comprising the server BMC of claim 3, further comprising:
the embedded Linux system is used for executing the operations of saving the current configuration and closing the existing applications and services;
and the shutdown module is used for executing system shutdown operation and ensuring the safety of flash data.
5. The server BMC power down abnormal operation protection system according to claim 4, wherein: wherein the GPIO device file configuration module further comprises an input/output setup module for PAO and PBO.
CN202311044126.4A 2023-08-17 2023-08-17 Method, device and system for avoiding abnormal work of BMC after power failure Pending CN117075705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311044126.4A CN117075705A (en) 2023-08-17 2023-08-17 Method, device and system for avoiding abnormal work of BMC after power failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311044126.4A CN117075705A (en) 2023-08-17 2023-08-17 Method, device and system for avoiding abnormal work of BMC after power failure

Publications (1)

Publication Number Publication Date
CN117075705A true CN117075705A (en) 2023-11-17

Family

ID=88718971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311044126.4A Pending CN117075705A (en) 2023-08-17 2023-08-17 Method, device and system for avoiding abnormal work of BMC after power failure

Country Status (1)

Country Link
CN (1) CN117075705A (en)

Similar Documents

Publication Publication Date Title
US10394293B2 (en) Method for preventing over-heating of a device within a data processing system
FR2722017B1 (en) MULTIPROCESSOR SYSTEM
TWI436588B (en) Setting method of power lock-up and electronic apparatus thereof
RU2667033C2 (en) Systems and methods for host detection of usb asynchronous notification capability
US6289467B1 (en) Installation of processor and power supply modules in a multiprocessor system
CN109086192B (en) IPMI-based onboard SATA hard disk lighting system and method
WO2020015116A1 (en) Database monitoring method and terminal device
CN101521568B (en) Device for network isolation fast switching by one key and controlling method thereof
US9158646B2 (en) Abnormal information output system for a computer system
US6943463B2 (en) System and method of testing connectivity between a main power supply and a standby power supply
CN117075705A (en) Method, device and system for avoiding abnormal work of BMC after power failure
CN111858178B (en) Method, device and equipment for judging power supply starting type and readable medium
CN114816539A (en) Equipment board card, electronic equipment and control method of equipment board card
US6854027B2 (en) Hard disk device capable of detecting channels of a host to which hard disk controllers belong
CN107632782B (en) BMC code protection method and device based on ARM whole cabinet server node
US6910083B2 (en) Method for detecting channels of a host to which hard disk controllers belong
TWI719461B (en) Server power managing method and system thereof
CN113835971A (en) Monitoring method for abnormal lighting of server backboard and related components
CN1512641A (en) Detecting and protective device for preventing device frmo forming short circuit on circuit board
US20200210201A1 (en) Information processing system and relay device
US10921875B2 (en) Computer system, operational method for a microcontroller, and computer program product
CN109710323A (en) A kind of control method and electronic equipment
CN214795825U (en) Computer expansion card based on internet of things technology
CN111966548B (en) Fault detection method and system for slow startup of server
CN210324184U (en) Multi-node computer monitoring device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination