CN107153600B - Method for recording system log when system is started - Google Patents

Method for recording system log when system is started Download PDF

Info

Publication number
CN107153600B
CN107153600B CN201610117707.XA CN201610117707A CN107153600B CN 107153600 B CN107153600 B CN 107153600B CN 201610117707 A CN201610117707 A CN 201610117707A CN 107153600 B CN107153600 B CN 107153600B
Authority
CN
China
Prior art keywords
flag
power
self
test
management controller
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.)
Active
Application number
CN201610117707.XA
Other languages
Chinese (zh)
Other versions
CN107153600A (en
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.)
Shencloud Technology Co Ltd
Kunda Computer Technology Kunshan Co Ltd
Original Assignee
Shencloud Technology Co Ltd
Kunda Computer Technology Kunshan 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 Shencloud Technology Co Ltd, Kunda Computer Technology Kunshan Co Ltd filed Critical Shencloud Technology Co Ltd
Priority to CN201610117707.XA priority Critical patent/CN107153600B/en
Publication of CN107153600A publication Critical patent/CN107153600A/en
Application granted granted Critical
Publication of CN107153600B publication Critical patent/CN107153600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2284Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for recording system logs during system startup, which comprises the following steps: after a starting button of the system is pressed and the power-on is completed, setting initial values of a recording flag and an ignoring flag respectively; the system carries out power-on self-test for the first time, the voltage state Of the Start Of POST GPIO is set to be low level from high level, when the baseboard management controller monitors that the voltage state Of the Start Of POST GPIO is changed to be low level from high level, the system log at the beginning Of the first power-on self-test is recorded according to the initial values Of the recording flag and the neglecting flag, and meanwhile, the modification values Of the recording flag and the ignoring flag are set; the system carries out second power-on self-test, the voltage state Of the Start Of POST GPIO is set to be low level from high level, and when the baseboard management controller monitors that the voltage state Of the Start Of POST GPIO is changed from high level to low level, the baseboard management controller does not record the system log at the beginning Of the second power-on self-test according to the recording flag and the modification value Of the neglecting flag.

Description

Method for recording system log when system is started
Technical Field
The invention relates to the field of system program control and data access, in particular to a method for recording system logs during system startup.
Background
The system log records the information of all the states and problems in the hardware, software and system, and also monitors the events occurred in the system. The user can check the cause of the error occurrence through it, or find the trace left by the attacker when the System is under attack, in the System startup process, when the Basic Input/Output System (BMC) needs to start Power-On Self-Test (POST) by the Basic Input/Output System (BIOS), a System Event Log (SEL) is recorded, but when the System is started, the BIOS will perform the related setting of the fast channel Interconnect (QPI) soon (within about four seconds and five seconds) after the POST is started, so that the reset of the Low Pin Count Interface (LPC) is generated, so the Basic Input/Output System needs to be powered On again for Self-Test to make the above setting effective, so far, since the substrate Management Controller performs the Self-Test twice during the System, therefore, the system will record the system log (Start Of POST event log) Of the Start Of two power-on self-tests, which is easy to cause trouble when the user checks the log record afterwards.
For the above reasons, it is necessary to overcome the above disadvantages and provide a method for recording system logs during system startup, so that only one system log at which power-on self-test starts is recorded during system startup, which is convenient for a user to check after the system log is started, and is not easy to cause troubles.
Disclosure of Invention
Therefore, in view of the above situation, an object of the present invention is to provide a method for recording system logs during system startup, so that a baseboard management controller only records a system log at the beginning of a power-on self-test during system startup, which is convenient for a user to view.
In order to achieve the above object, the present invention provides a method for recording a system log when a system is powered on, the method comprising:
after a starting button of the system is pressed and the power-on is completed, setting initial values of a recording flag and an ignoring flag respectively;
when a base plate management controller Of the system monitors that the voltage state Of the Start Of POST GPIO is changed from high level to low level, recording a system log at the beginning Of the first power-on self-test according to the initial values Of the recording flag and the neglecting flag, and resetting the modified values Of the recording flag and the neglecting flag;
the basic input/output system carries out a second power-on self-test, the voltage state Of a general purpose output/input interface (Start Of POST GPIO) representing the Start Of the power-on self-test is set to be low level from high level, when a baseboard management controller Of the system monitors that the voltage state Of the Start Of POST GPIO is changed from high level to low level, the baseboard management controller does not record the system log Of the Start Of the second power-on self-test according to the modified values Of the recording flag and the neglecting flag.
Specifically, the initial values of the record flag and the ignore flag are 1 and 0, respectively, when the bmc determines that the value of the record flag is 1, a system log at which the power-on self-test starts is recorded, and when the bmc determines that the value of the ignore flag is 0, the system log is not ignored.
Specifically, the modified values of the record flag and the ignore flag are 0 and 1, respectively, when the bmc determines that the value of the record flag is 0, a system log of the start of power-on self-test is not recorded, and when the bmc determines that the value of the ignore flag is 1, the system log is ignored.
In particular, after the basic input and output system of the system performs the first power-on self-test, the system performs the setting of the fast channel interconnection, and generates the reset of the low pin count interface, and the basic input and output system performs the second power-on self-test.
Specifically, after the system is powered on, the baseboard management controller receives the PSGood signal generated by the system.
Compared with the prior art, the method for recording the system log when the system is started in the invention only records a system event log at the start of the power-on self-test in the starting process of the system by changing the high/low level state of a General Purpose Input/Output (GPIO) representing the power-on self-test state and matching with the setting of the ignore flag and the recording flag, thereby being convenient for a user to check the system event log after the system is started and not easy to cause trouble.
[ description of the drawings ]
FIG. 1 is a flowchart of a method for logging system logs when the system is powered on.
[ detailed description ] embodiments
The method for recording the system log when the system is started ensures that only one system event log at the beginning of the power-on self-test is recorded in the starting process of the system by changing the high/low level state of the general output/input interface of the power-on self-test and matching with the setting of the ignore flag and the recording flag, thereby being convenient for a user to check the system event log after the system is started and not easy to cause troubles.
Referring to fig. 1, a flow chart of a method for recording system logs when the system of the present invention is powered on is shown,
step 11: judging whether a starting button of the system is pressed (the substrate management controller receives a PSgood signal sent by the system), if so, turning to the step 12, otherwise, ending the process;
step 12: setting the initial value of the record flag as 1, ignoring the initial value of the flag as 0, and proceeding to step 13;
step 13: the basic input and output system of the system is electrified and self-checked, and then the step 14 is carried out;
step 14: the BIOS sets the voltage state Of a general purpose output/input interface (Start Of POST GPIO) representing the Start Of the power-on self-test from a high level to a low level, the substrate management controller monitors the general purpose output/input interface and goes to the step 15;
step 15: judging whether the value of the ignore flag is constantly equal to 1, if yes, going to step 16, if no, going to step 17;
step 16: setting the ignore flag to recover its initial value to 0 and ending the process;
and step 17: judging whether the value of the recording flag is constantly equal to 1, if yes, going to step 18, if no, going to step 19;
step 18: setting the modified value of the record flag to 0, ignoring the modified value of the flag to 1, and proceeding to step 19;
step 19: recording a system log of the start of the power-on self-test, and turning to the step 20;
step 20: setting a fast channel interconnection for a basic input and output system of the system, and turning to step 21;
step 21: the BIOS of the system resets the low pin count interface, and goes to step 13, the BIOS of the system performs a second power-on self-test, and further continues to determine whether the value of the ignore flag is equal to 1, and goes to step 16 to set the ignore flag to return to its initial value of 0 and end the process because the ignore flag is a modified value of 0.
In this embodiment, the present invention is a method of firmware executed by a Baseboard Management Controller (BMC), and in the above steps, except that the steps 14, 20, and 21 are executed by a basic input/output system of a system, the other steps are executed by the BMC.
In this embodiment, when the bmc determines that the value of the record flag is 1, a system log at the start of the power-on self-test is recorded, and when the bmc determines that the value of the ignore flag is 0, the system log is not ignored.
In this embodiment, when the bmc determines that the value of the record flag is 0, a system log at the start of power-on self-test is not recorded, and when the bmc determines that the value of the ignore flag is 1, the system log is ignored.
In this embodiment, after the bios of the system performs the first power-on self-test, the bios performs the fast channel interconnect setting, and generates the reset of the low pin count interface, and then performs the second power-on self-test.
In this embodiment, after the system is powered on, the bmc receives the PSGood signal generated by the system, that is, when the system is powered on when the system power-on button is pressed, the system generates a PSGood signal (power supplied power good signal), that is, the BIOS can start the POST process only after the system is powered on, and thus the bmc must receive the PSGood signal (indicating that the system is powered on).
It can be seen from the above flowchart that, since the initial values of the record flag and the ignore flag are set, and the modified values of the record flag and the ignore flag are reset after the system log at the beginning of the power-on self-test is recorded for the first time, the step of recording the system log at the beginning of the power-on self-test is not executed any more after the basic input/output system of the system performs the second power-on self-test, and therefore, only the system log at the first power-on self-test is recorded in the whole startup process of the system, which is convenient for the user to check and is not easy to cause trouble.
The embodiments and examples of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the embodiments and examples, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present invention.

Claims (3)

1. A method for recording system logs when a system is started is characterized by comprising the following steps:
after a starting button of the system is pressed and the power-on is finished, setting initial values of a recording flag and an ignoring flag to be 1 and 0 respectively;
the basic input and output system Of the system carries out first power-on self-test, the basic input and output system sets the voltage state Of a general purpose output/input interface Start Of POST GPIO representing the Start Of the power-on self-test from high level to low level, a base plate management controller Of the system monitors the general purpose output/input interface, when the base plate management controller Of the system monitors that the voltage state Of the Start Of POST GPIO is changed from high level to low level, the base plate management controller judges that the value Of a recording flag is 1, the value Of an ignore flag is 0, the base plate management controller records the system log starting the first power-on self-test according to the initial values Of the recording flag and the ignore flag, and the base plate management controller simultaneously resets the modification values Of the recording flag and the ignore flag to 0 and 1 respectively;
the basic input/output system carries out a second power-on self-test, the basic input/output system Of the system sets the voltage state Of a general purpose output/input interface (Start Of POST GPIO) representing the Start Of the power-on self-test from high level to low level, a baseboard management controller Of the system monitors the general purpose output/input interface, when the baseboard management controller Of the system monitors that the voltage state Of the Start Of POST GPIO is changed from high level to low level, the baseboard management controller judges that the value Of a recording flag is 0 and the value Of an ignore flag is 1, and the baseboard management controller does not record the system log Of the Start Of the second power-on self-test according to the recording flag and the modified value Of the ignore flag.
2. The method according to claim 1, wherein when the bios of the system performs a first power-on self-test, the bios sets the fast channel interconnect, and generates a reset of the low pin count interface, the bios performs a second power-on self-test.
3. The method as claimed in claim 1, wherein the bmc receives PSGood signals generated by the system after the system is powered on.
CN201610117707.XA 2016-03-02 2016-03-02 Method for recording system log when system is started Active CN107153600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610117707.XA CN107153600B (en) 2016-03-02 2016-03-02 Method for recording system log when system is started

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610117707.XA CN107153600B (en) 2016-03-02 2016-03-02 Method for recording system log when system is started

Publications (2)

Publication Number Publication Date
CN107153600A CN107153600A (en) 2017-09-12
CN107153600B true CN107153600B (en) 2021-07-09

Family

ID=59792011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610117707.XA Active CN107153600B (en) 2016-03-02 2016-03-02 Method for recording system log when system is started

Country Status (1)

Country Link
CN (1) CN107153600B (en)

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002131401A (en) * 2000-10-27 2002-05-09 Ando Electric Co Ltd Data log acquisition circuit and acquisition method
US7562387B2 (en) * 2001-09-07 2009-07-14 International Business Machines Corporation Method and apparatus for selective disabling of tracking of click stream data
US20030079007A1 (en) * 2001-10-22 2003-04-24 Merkin Cynthia M. Redundant source event log
US7343534B2 (en) * 2004-05-27 2008-03-11 International Business Machines Corporation Method for deferred data collection in a clock running system
TWI370394B (en) * 2008-09-19 2012-08-11 Asustek Comp Inc Computer, booting software production and method thereof
CN102244591B (en) * 2010-05-10 2015-04-15 淮南东正电子科技有限公司 Client server and method for full process monitoring on function text of client server
CN102375765A (en) * 2010-08-19 2012-03-14 鸿富锦精密工业(深圳)有限公司 Server power failure detection system and method
CN102567177B (en) * 2010-12-25 2014-12-10 鸿富锦精密工业(深圳)有限公司 System and method for detecting error of computer system
CN102831032A (en) * 2011-06-17 2012-12-19 鸿富锦精密工业(深圳)有限公司 Repair system and method for master boot record of hard disc
CN103455397A (en) * 2013-09-06 2013-12-18 杭州华为数字技术有限公司 System self-test method, equipment and system
CN104679626A (en) * 2013-11-30 2015-06-03 鸿富锦精密工业(深圳)有限公司 System and method for debugging and detecting BIOS (Basic Input / Output System)
CN104317685A (en) * 2014-10-14 2015-01-28 英业达科技有限公司 Starting method of calculator system
CN104601666B (en) * 2014-12-22 2018-04-27 杭州华为数字技术有限公司 Log services method and cloud platform
CN104850485A (en) * 2015-05-25 2015-08-19 深圳国鑫恒宇技术有限公司 BMC based method and system for remote diagnosis of server startup failure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于IPMI的智能平台管理系统的实现";童燕;《中国优秀硕士学位论文全文数据库•信息科技辑》;20081115;第2008年卷(第11期);I140-483 *

Also Published As

Publication number Publication date
CN107153600A (en) 2017-09-12

Similar Documents

Publication Publication Date Title
US8060785B2 (en) Method for tuning parameters in memory and computer system using the same
US10049010B2 (en) Method, computer, and apparatus for migrating memory data
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
US7600110B2 (en) Method for simulating an intelligent platform management interface using BIOS
CN109976816B (en) Computer system configuration method and server
US8074000B2 (en) Hotkey processing method and computer system
US20110276829A1 (en) Client server and method for monitoring function tests thereof
US20140068350A1 (en) Self-checking system and method using same
US10869176B1 (en) Near field communication (NFC) enhanced computing systems
US10496128B2 (en) Method for obtaining timestamp and computer device using the same
US10445503B2 (en) Secure persistent software updates
WO2021056393A1 (en) Test method, electronic device and computer-readable storage medium
CN105814541A (en) Computer device and memory starting method for computer device
US10212272B1 (en) Near field communication enhanced computing systems
KR20170138365A (en) Apparatus for integrally managing of error generating of hardware and software in computer system
WO2019137220A1 (en) Volume adjustment method under lock screen state, and mobile terminal and storage medium
WO2022267345A1 (en) Chassis intrusion state detection device and method, and edge server
CN107153600B (en) Method for recording system log when system is started
US8478979B2 (en) Disable a feature of a computing machine
WO2024131133A1 (en) Data processing method and apparatus for electronic device, and electronic device and storage medium
WO2024119787A1 (en) Method and apparatus for amd server system installation power-off processing, device and medium
CN109491825B (en) Method, device, storage medium and terminal for positioning abnormal starting problem
KR101941105B1 (en) A method of collectively managing the occurrence of errors in the hardware included in the computer system and performing backup and recovery to inform the external terminal
CN115168119A (en) PCIE (peripheral component interface express) link detection method, device and medium for server
CN115016329A (en) Control method, control device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant