Electronic device and method for detecting power failure type
AssigneesHONG FU JIN PRECISION INDUSTRY (ShenZhen) CO., LTD., Hon Hai Precision Industry Co., Ltd.
InventorJian Peng
Life of this patent
Estimating the term…
Abstract
A method for detecting a power failure type of an electronic device sets a shutdown flag as a first value when the electronic device is turned on, modifies the shutdown flag to a second value if a shutdown status of the electronic device is detected, and modifies the shutdown flag to a third value when the electronic device keeps the shutdown status for a predetermined time. The method further determines the power failure type of the electronic device according to a value of the shutdown flag when the electronic device is turned on the next time.
Claims16
A method for detecting a power failure type of an electronic device, the method comprising:
- setting a shutdown flag as a first value when the electronic device is turned on, and storing the shutdown flag in a storage device of a baseboard management controller (BMC) of the electronic device;
- modifying the shutdown flag to a second value if a shutdown status of the electronic device is detected;
- modifying the shutdown flag to a third value when the electronic device keeps the shutdown status for a predetermined time;
- reading a value of the shutdown flag from the storage device of the BMC when the electronic device is turned on at a next time;
- and
- determining that the electronic device is shut down because of a direct current (DC) power failure upon the condition that the read value of the shutdown flag is the first value, and recording a DC power failure log into the storage device of the BMC.
An electronic device, comprising:
- a storage device;
- a baseboard management controller (BMC);
- at least one processor;
- and
- one or more modules that are stored in the storage device and are executed by the at least one processor, the one or more modules comprising instructions:
- to set a shutdown flag as a first value when the electronic device is turned on, and store the shutdown flag in a storage device of the BMC of the electronic device;
- to modify the shutdown flag to a second value if a shutdown status of the electronic device is detected;
- to modify the shutdown flag to a third value when the electronic device keeps the shutdown status for a predetermined time;
- to read a value of the shutdown flag from the storage device of the BMC when the electronic device is turned on at a next time;
- and
- to determine that the electronic device is shut down because of a direct current (DC) power failure upon the condition that the read value of the shutdown flag is the first value, and record a DC power failure log into the storage device of the BMC.
A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, causes the processor to perform a method for detecting a power failure type of the electronic device, the method comprising:
- setting a shutdown flag as a first value when the electronic device is turned on, and storing the shutdown flag in a storage device of a baseboard management controller (BMC) of the electronic device;
- modifying the shutdown flag to a second value if a shutdown status of the electronic device is detected;
- modifying the shutdown flag to a third value when the electronic device keeps the shutdown status for a predetermined time;
- reading a value of the shutdown flag from the storage device of the BMC when the electronic device is turned on at a next time;
- and
- determining that the electronic device is shut down because of a direct current (DC) power failure upon the condition that the read value of the shutdown flag is the first value, and recording a DC power failure log into the storage device of the BMC.
Dependencies are inferred from the claim text.