CN111400153A - Serial port log starting method and device and computer readable storage medium - Google Patents

Serial port log starting method and device and computer readable storage medium Download PDF

Info

Publication number
CN111400153A
CN111400153A CN202010172440.0A CN202010172440A CN111400153A CN 111400153 A CN111400153 A CN 111400153A CN 202010172440 A CN202010172440 A CN 202010172440A CN 111400153 A CN111400153 A CN 111400153A
Authority
CN
China
Prior art keywords
self
power
server
test
preset
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.)
Withdrawn
Application number
CN202010172440.0A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010172440.0A priority Critical patent/CN111400153A/en
Publication of CN111400153A publication Critical patent/CN111400153A/en
Withdrawn legal-status Critical Current

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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating

Landscapes

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

Abstract

The embodiment of the invention discloses a method, a device and a medium for starting a serial port log, wherein when a server does not finish power-on self-test within preset starting time, the fact that the power-on self-test process is abnormal is indicated, the server can be restarted at the moment, and the restarting times are recorded. When the restart times of the server in the preset time period are greater than or equal to the preset threshold, it indicates that the power-on self-test abnormality still exists when the server is continuously restarted for multiple times, and at this time, a log recording mode of the power-on self-test can be started to record the serial port log of the server in the power-on self-test process. In the technical scheme, when the power-on self-test is normally operated, the log recording mode of the power-on self-test is not started, and the server executes the power-on self-test according to the conventional power-on self-test process without spending too long time. And only when the power-on self-test process of the server is judged to be abnormal, starting a log recording mode of the power-on self-test to record a serial port log of the power-on self-test process, so that the fault detection of the power-on self-test is realized.

Description

Serial port log starting method and device and computer readable storage medium
Technical Field
The invention relates to the technical field of servers, in particular to a method and a device for starting a serial port log and a computer readable storage medium.
Background
With the advent of big data, cloud computing and artificial intelligence era, the internet traffic and data volume are dramatically increased, the carrying pressure of a server is higher and higher, and the requirement on the link stability of the whole system is higher and higher. The health state of the server in the power-on starting and running processes needs to be monitored in real time, slight errors can be corrected through a verification mechanism in the starting and running processes, the influence on the running of the server is small, if serious faults occur, the system can be down, and the caused consequences are service interruption of a client, data loss and unpredictable loss.
The operation of the server is divided into two stages, namely a Power On Self Test (POST) stage and a system operation stage, wherein the two stages are closely connected. In the POST stage, after the server is powered on, a Basic Input Output System (BIOS) detects and initializes hardware of the server, the BIOS plays a leading role in the process, the BIOS starts to find and boot the System after the BIOS self-inspection is completed, at this time, the BIOS transfers control to the System, and the BIOS only has Basic functions such as interrupt processing.
After the control right is transferred to the system, some faults occurring in the server may be recorded in a system log and a Baseboard Management Controller (BMC) log, and the system log and the BMC log may be analyzed to perform problem location analysis. However, in the POST process, because the logs recorded and transmitted to the BMC by the BIOS are very few, and there is no place to record fault logs in relation to the BIOS code, there is no way to analyze and locate the fault if a serious fault such as downtime occurs in the POST process.
The most effective way to analyze such problems is to export the serial log of the BIOS during the POST process, which requires turning on the debug mode of the BIOS, which is off by default. If it is to be turned on, the BIOS version needs to be redeveloped and refreshed on the failed server, which results in the disappearance of the failure phenomenon.
Therefore, how to implement the fault detection of the power-on self-test is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for starting a serial port log and a computer readable storage medium, which can realize the fault detection of power-on self-test.
In order to solve the above technical problem, an embodiment of the present invention provides a method for starting a serial port log, including:
when the server does not finish power-on self-test within the preset starting time, restarting the server and recording the restarting times;
judging whether the restarting times of the server in a preset time period are greater than or equal to a preset threshold value or not;
if yes, starting a log recording mode of power-on self-test.
Optionally, when the server does not complete the power-on self-test within the preset starting time, restarting the server, and recording the number of times of restarting includes:
when a server is started, judging whether the server completes power-on self-test within preset starting time;
if not, restarting the server, triggering a preset watchdog program, and detecting whether the server completes power-on self-test within preset starting time by using the watchdog program;
correspondingly, judging whether the restart times of the server in a preset time period are greater than or equal to a preset threshold value comprises:
and judging whether the number of times of triggering the watchdog program in a preset time period is greater than or equal to a preset threshold value.
Optionally, after the logging mode of starting the power-on self-test, the method further includes:
judging whether the watchdog program is triggered within a second preset time period;
if not, closing the log recording mode of the power-on self-test.
Optionally, after the logging mode of starting the power-on self-test, the method further includes:
when the server is restarted and the power-on self-test is completed, judging whether the time interval between the current restarting time and the last server restarting time is greater than or equal to a preset time limit value;
if yes, closing the log recording mode of the power-on self-test.
Optionally, after the logging mode of starting the power-on self-test, the method further includes:
and when the server is not abnormal after two consecutive power-on self-tests, closing the log recording mode of the power-on self-tests.
Optionally, the starting of the logging mode of the power-on self-test includes:
adjusting a flag bit of a preset power-on self-inspection log recording program to be an effective flag bit so as to start log recording when a server is powered on for self-inspection;
correspondingly, the closing the logging mode of the power-on self-test comprises:
and adjusting the flag bit of the preset power-on self-test log recording program into an invalid flag bit so that the log recording mode is in a closed state when the server is powered on for self-test.
The embodiment of the invention also provides a device for starting the serial port log, which comprises a recording unit, a judging unit and a starting unit;
the recording unit is used for restarting the server and recording the restarting times when the server does not finish the power-on self-test within the preset starting time;
the judging unit is used for judging whether the restarting times of the server in a preset time period are greater than or equal to a preset threshold value; if yes, triggering the starting unit;
the starting unit is used for starting a log recording mode of the power-on self-test.
Optionally, the recording unit is specifically configured to, when the server is started, determine whether the server completes power-on self-test within a preset starting time; if not, restarting the server, triggering a preset watchdog program, and detecting whether the server completes power-on self-test within preset starting time by using the watchdog program;
correspondingly, the judging unit is specifically configured to judge whether the number of times that the watchdog program is triggered within a preset time period is greater than or equal to a preset threshold.
Optionally, the system further comprises a second judging unit and a closing unit;
the second judging unit is configured to judge whether the watchdog program is triggered within a second preset time period after the log recording mode of the power-on self-test is started; if not, triggering the closing unit;
and the closing unit is used for closing the log recording mode of the power-on self-test.
Optionally, the system further comprises a third judging unit and a closing unit;
the third judging unit is configured to, after the log recording mode of the power-on self-test is started and when the server is restarted and the power-on self-test is completed, judge whether a time interval between the current restart time and the last server restart time is greater than or equal to a preset time limit value; if yes, triggering the closing unit;
and the closing unit is used for closing the log recording mode of the power-on self-test.
Optionally, a closing unit is further included;
and the closing unit is used for closing the log recording mode of the power-on self-test when the server has no abnormality in the two consecutive power-on self-tests after the log recording mode of the power-on self-test is started.
Optionally, the starting unit is specifically configured to adjust a flag bit of a preset power-on self-inspection log recording program to be an effective flag bit, so that the server starts log recording during power-on self-inspection;
the closing unit is specifically configured to adjust a flag bit of a preset power-on self-test log recording program to an invalid flag bit, so that the log recording mode is in a closed state when the server is in power-on self-test.
The embodiment of the invention also provides a device for starting the serial port log, which comprises:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the steps of the serial port log starting method.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the serial port log starting method are implemented as in any one of the above.
According to the technical scheme, when the server does not finish the power-on self-test within the preset starting time, the fact that the power-on self-test process is abnormal is indicated, the server can be restarted at the moment, and the restarting times are recorded. And adding 1 to the restart times every time the server is restarted, and judging whether the restart times of the server in a preset time period are greater than or equal to a preset threshold value. When the restart times of the server in a preset time period are greater than or equal to a preset threshold value, it indicates that the power-on self-test abnormality still exists when the server is continuously restarted for multiple times, at this time, a log recording mode of the power-on self-test can be started, and a serial port log of the power-on self-test process after the server is restarted is recorded. In the technical scheme, when the power-on self-test is normally operated, the log recording mode of the power-on self-test is not started, and the server executes the power-on self-test according to the conventional power-on self-test process without spending too long time. And only when the power-on self-test process of the server is judged to be abnormal, starting a log recording mode of the power-on self-test to record a serial port log of the power-on self-test process, so that the fault detection of the power-on self-test is realized.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for starting a serial port log according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a serial port log starting apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a hardware structure of a serial port log startup device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a method for starting a serial log according to an embodiment of the present invention is described in detail. Fig. 1 is a flowchart of a method for starting a serial port log according to an embodiment of the present invention, where the method includes:
s101: and when the server does not finish the power-on self-test within the preset starting time, restarting the server and recording the restarting times.
The preset starting time can be set according to the time required by the power-on self-test when the server operates normally. For example, the preset activation time may be set to 6 minutes. The power-on self-test process can be completed within 6 minutes when the server is normally running.
And when the power-on self-test is not completed within the preset starting time after the server is started, the power-on self-test is abnormal.
The abnormality of the power-on self-test may be a transient abnormality or a fault abnormality. For transient abnormity, the server is restarted to solve the problem, and the server enters a power-on self-test stage after being restarted to complete power-on self-test within preset starting time.
For the fault abnormity, the problem often cannot be solved by restarting the server, the server enters a power-on self-test stage after being restarted, and when the server still cannot complete the power-on self-test within the preset starting time, the server can be restarted again. And adding 1 to the corresponding restart times of the server every time the server is restarted.
S102: and judging whether the restarting times of the server in the preset time period are greater than or equal to a preset threshold value.
The server is restarted once, so that when the power-on self-test is completed within the preset starting time, the last power-on self-test failure is caused by the transient abnormality of the server, and at the moment, the recording of the serial port log in the power-on self-test process is not required. Therefore, in the embodiment of the present invention, the value of the preset threshold is certainly greater than 1. For example, the preset threshold may be set to 2.
The preset time period may be set by integrating the time spent by the power-on self-test when the server operates normally and a preset threshold, for example, the preset time period may be set to 30 minutes.
The influence of the transient abnormality of the server on the power-on self-test can be reduced by setting a preset threshold value to judge the restarting times.
When the restart time of the server is greater than or equal to the preset threshold within the preset time period, it indicates that the power-on self-test is a fault abnormality, and at this time, S103 may be executed. When the restarting frequency of the server in the preset time period is smaller than the preset threshold value, the server can successfully complete the power-on self-test, the operation can be ended, and the server enters the system operation stage.
Taking the preset threshold value as 2 and the preset time period as 30 minutes as an example, when the server is restarted for the first time, the number of times of restarting is 1, and if the server still cannot complete the power-on self-test within the preset starting time after the first restart, the server is restarted for the second time, and at this time, the number of times of restarting is 2. When the server is restarted for the second time, the number of times of restarting reaches the preset threshold, and if the time interval between the first time of restarting the server and the second time of restarting the server is less than 30 minutes, it indicates that the server has executed continuous restarting for many times in a short time, and at this time, S103 may be executed.
S103: and starting a log recording mode of power-on self-test.
In the embodiment of the invention, a power-on self-test log recording program can be preset, and when the log recording mode is started, the power-on self-test log recording program starts to run, so that the serial port log of the server in the power-on self-test process is recorded.
In a specific implementation, the logging mode may be initiated by setting a flag bit. The flag bits can be divided into valid flag bits and invalid flag bits, for example, the valid flag bits can be represented by the number 1, and the invalid flag bits can be represented by the number 0.
When the flag bit of the power-on self-test log recording program is adjusted to be an effective flag bit, the server starts a log recording mode during power-on self-test, and therefore serial port logs in the power-on self-test process of the server are recorded.
In S101, the number of restarts is recorded, where there are various ways to record the number of restarts, one way may be recording by using a register, and another way may be setting a watchdog program. The watchdog program can realize the function of timing detection, and the watchdog program can be started once to detect whether the power-on self-check is completed within the preset starting time after the server is restarted. The number of times the watchdog program is started is the number of times the server is restarted.
In specific implementation, when the server is started, whether the server completes power-on self-test within preset starting time can be judged; and when the server cannot complete the power-on self-test within the preset starting time, restarting the server, triggering a preset watchdog program, and detecting whether the server completes the power-on self-test within the preset starting time by using the watchdog program.
Accordingly, it can be determined whether the number of times the watchdog program is triggered within the preset time period is greater than or equal to the preset threshold. When the number of times of the watchdog program being triggered within the preset time period is greater than or equal to the preset threshold, S103 is executed.
By setting the watchdog program, whether the server completes power-on self-test within the preset starting time can be detected, the starting times of the watchdog program can be used as the restarting times of the server, and extra storage resources are not required to be spent for recording the restarting times of the server.
According to the technical scheme, when the server does not finish the power-on self-test within the preset starting time, the fact that the power-on self-test process is abnormal is indicated, the server can be restarted at the moment, and the restarting times are recorded. And adding 1 to the restart times every time the server is restarted, and judging whether the restart times of the server in a preset time period are greater than or equal to a preset threshold value. When the restart times of the server in a preset time period are greater than or equal to a preset threshold value, it indicates that the power-on self-test abnormality still exists when the server is continuously restarted for multiple times, at this time, a log recording mode of the power-on self-test can be started, and a serial port log of the power-on self-test process after the server is restarted is recorded. In the technical scheme, when the power-on self-test is normally operated, the log recording mode of the power-on self-test is not started, and the server executes the power-on self-test according to the conventional power-on self-test process without spending too long time. And only when the power-on self-test process of the server is judged to be abnormal, starting a log recording mode of the power-on self-test to record a serial port log of the power-on self-test process, so that the fault detection of the power-on self-test is realized.
In practical application, the abnormality of the power-on self-test of the server is not always continuous through the maintenance of management personnel. If the log recording mode of the power-on self-test is always started, it takes a long time to perform the power-on self-test after each time the server is powered on and started. Therefore, in the embodiment of the present invention, after the log recording mode of the power-on self-test is started, the log recording mode of the power-on self-test may be closed when it is determined that the power-on self-test of the server is restored to the normal working state.
The trigger condition for closing the logging mode of the power-on self test can be various.
In combination with the above described watchdog program, a feasible way may be to determine whether the watchdog program is triggered within the second preset time period.
When the server does not complete the power-on self-test within the preset starting time, the watchdog program is triggered when the server is restarted.
In practical application, except for the restart of the server when the power-on self-test is abnormal, the server can also execute normal power-on restart due to service requirements.
After the server starts the log recording mode of the power-on self-test, timing is carried out when the server is powered on and restarted, or timing is started when the server triggers the watchdog program for the first time, when the watchdog program is not triggered in a second preset time period, the situation that the server is not abnormal in the power-on self-test does not occur in the second preset time period, and at the moment, the log recording mode of the power-on self-test can be closed.
The value of the second preset time period is greater than the value of the preset time period in S102, for example, the second preset time period may be set to 60 minutes.
After the server starts the log recording mode of the power-on self-test, taking the example that the server starts timing when the server triggers the watchdog program for the first time, if the watchdog program is not triggered again by the server within 60 minutes, the power-on self-test process of the server is recovered to be normal, and at this time, the log recording mode of the power-on self-test can be closed.
The second feasible trigger condition may be that after the log recording mode of the power-on self-test is started, when the server restarts and completes the power-on self-test, it is determined whether the time interval between the current restart time and the last restart time of the server is greater than or equal to a preset time limit value.
After the server starts a log recording mode of the power-on self-test, if the server still has the abnormal condition of the power-on self-test, the server can execute a plurality of times of restarting operations in a short time. Therefore, if the time interval between the current restart time and the last server restart time is greater than or equal to the preset time limit, it indicates that the server restart belongs to the normal service requirement, and the server restart is not caused by abnormal power-on self-test, the power-on self-test process of the server is recovered to be normal, and at this time, the log recording mode of the power-on self-test can be closed.
The third feasible trigger condition may be that after the log recording mode of the power-on self-test is started, when the server has no abnormality in the power-on self-test for two consecutive times, the log recording mode of the power-on self-test is closed.
It should be noted that, in the embodiment of the present invention, two consecutive power-on self-tests of the server do not have an abnormality, rather than the server executes two power-on self-tests within a short time, the two power-on self-tests may have a time interval, and the two consecutive power-on self-tests refer to two power-on self-tests that are adjacent in time.
When no abnormity occurs in the two continuous power-on self-tests, the power-on self-test process of the server is recovered to be normal, and at the moment, the log recording mode of the power-on self-test can be closed.
For closing the log recording mode of the power-on self-test, in a specific implementation, a flag bit of a preset power-on self-test log recording program may be adjusted to be an invalid flag bit, so that the log recording mode is in a closed state when the server is in the power-on self-test.
After the log recording mode of the power-on self-test is started, the working state of the power-on self-test of the server is detected, so that the log recording mode of the power-on self-test can be closed in time when the power-on self-test of the server is recovered to be normal, and the influence of long-time starting of the log recording mode on the power-on self-test time is reduced.
Fig. 2 is a schematic structural diagram of a serial port log starting apparatus provided in an embodiment of the present invention, including a recording unit 21, a determining unit 22, and an opening unit 23;
the recording unit 21 is configured to restart the server and record the restart times when the server does not complete the power-on self-test within the preset start time;
a judging unit 22, configured to judge whether the number of times of restarting the server within a preset time period is greater than or equal to a preset threshold; if yes, the starting unit 23 is triggered;
and the starting unit 23 is used for starting a log recording mode of the power-on self-test.
Optionally, the recording unit is specifically configured to, when the server is started, determine whether the server completes the power-on self-test within a preset starting time; if not, restarting the server, triggering a preset watchdog program, and detecting whether the server completes power-on self-test within preset starting time by using the watchdog program;
correspondingly, the judging unit is specifically configured to judge whether the number of times that the watchdog program is triggered within the preset time period is greater than or equal to a preset threshold.
Optionally, the system further comprises a second judging unit and a closing unit;
the second judgment unit is used for judging whether the watchdog program is triggered within a second preset time period after the log recording mode of the power-on self-test is started; if not, triggering a closing unit;
and the closing unit is used for closing the log recording mode of the power-on self-test.
Optionally, the system further comprises a third judging unit and a closing unit;
the third judging unit is used for judging whether the time interval between the current restarting time and the last restarting time of the server is greater than or equal to a preset time limit value or not when the server is restarted and the power-on self-test is completed after a log recording mode of the power-on self-test is started; if yes, triggering a closing unit;
and the closing unit is used for closing the log recording mode of the power-on self-test.
Optionally, a closing unit is further included;
and the closing unit is used for closing the log recording mode of the power-on self-test when the server has no abnormality in the power-on self-test for two consecutive times after the log recording mode of the power-on self-test is started.
Optionally, the starting unit is specifically configured to adjust a flag bit of a preset power-on self-inspection log recording program to be an effective flag bit, so that the server starts log recording during power-on self-inspection;
the closing unit is specifically configured to adjust a flag bit of a preset power-on self-test log recording program to an invalid flag bit, so that the log recording mode is in a closed state when the server is in the power-on self-test.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, when the server does not finish the power-on self-test within the preset starting time, the fact that the power-on self-test process is abnormal is indicated, the server can be restarted at the moment, and the restarting times are recorded. And adding 1 to the restart times every time the server is restarted, and judging whether the restart times of the server in a preset time period are greater than or equal to a preset threshold value. When the restart times of the server in a preset time period are greater than or equal to a preset threshold value, it indicates that the power-on self-test abnormality still exists when the server is continuously restarted for multiple times, at this time, a log recording mode of the power-on self-test can be started, and a serial port log of the power-on self-test process after the server is restarted is recorded. In the technical scheme, when the power-on self-test is normally operated, the log recording mode of the power-on self-test is not started, and the server executes the power-on self-test according to the conventional power-on self-test process without spending too long time. And only when the power-on self-test process of the server is judged to be abnormal, starting a log recording mode of the power-on self-test to record a serial port log of the power-on self-test process, so that the fault detection of the power-on self-test is realized.
Fig. 3 is a schematic diagram of a hardware structure of a serial port log starting apparatus 30 according to an embodiment of the present invention, including:
a memory 31 for storing a computer program;
a processor 32, configured to execute the computer program to implement the steps of the serial log starting method according to any of the above embodiments.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the serial port log starting method according to any of the above embodiments are implemented.
The method, the device and the computer-readable storage medium for starting the serial log provided by the embodiment of the invention are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (10)

1. A method for starting a serial port log is characterized by comprising the following steps:
when the server does not finish power-on self-test within the preset starting time, restarting the server and recording the restarting times;
judging whether the restarting times of the server in a preset time period are greater than or equal to a preset threshold value or not;
if yes, starting a log recording mode of power-on self-test.
2. The method of claim 1, wherein restarting the server when the server does not complete the power-on self-test within a preset startup time, and recording the number of times of restarting comprises:
when a server is started, judging whether the server completes power-on self-test within preset starting time;
if not, restarting the server, triggering a preset watchdog program, and detecting whether the server completes power-on self-test within preset starting time by using the watchdog program;
correspondingly, judging whether the restart times of the server in a preset time period are greater than or equal to a preset threshold value comprises:
and judging whether the number of times of triggering the watchdog program in a preset time period is greater than or equal to a preset threshold value.
3. The method of claim 2, further comprising, after the initiating the logging mode of the power-on self test:
judging whether the watchdog program is triggered within a second preset time period;
if not, closing the log recording mode of the power-on self-test.
4. The method of claim 1, further comprising, after the initiating the logging mode of the power-on self test:
when the server is restarted and the power-on self-test is completed, judging whether the time interval between the current restarting time and the last server restarting time is greater than or equal to a preset time limit value;
if yes, closing the log recording mode of the power-on self-test.
5. The method of claim 1, further comprising, after the initiating the logging mode of the power-on self test:
and when the server is not abnormal after two consecutive power-on self-tests, closing the log recording mode of the power-on self-tests.
6. The method according to any one of claims 3-5, wherein the initiating the logging mode of the power-on self test comprises:
adjusting a flag bit of a preset power-on self-inspection log recording program to be an effective flag bit so as to start log recording when a server is powered on for self-inspection;
correspondingly, the closing the logging mode of the power-on self-test comprises:
and adjusting the flag bit of the preset power-on self-test log recording program into an invalid flag bit so that the log recording mode is in a closed state when the server is powered on for self-test.
7. A starting device of a serial port log is characterized by comprising a recording unit, a judging unit and an opening unit;
the recording unit is used for restarting the server and recording the restarting times when the server does not finish the power-on self-test within the preset starting time;
the judging unit is used for judging whether the restarting times of the server in a preset time period are greater than or equal to a preset threshold value; if yes, triggering the starting unit;
the starting unit is used for starting a log recording mode of the power-on self-test.
8. The device according to claim 7, wherein the recording unit is specifically configured to, when a server is started, determine whether the server completes a power-on self-test within a preset starting time; if not, restarting the server, triggering a preset watchdog program, and detecting whether the server completes power-on self-test within preset starting time by using the watchdog program;
correspondingly, the judging unit is specifically configured to judge whether the number of times that the watchdog program is triggered within a preset time period is greater than or equal to a preset threshold.
9. The utility model provides a starting drive of serial ports log which characterized in that includes:
a memory for storing a computer program;
processor for executing said computer program for carrying out the steps of the method for starting a serial log according to any of claims 1 to 6.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for starting a serial port log according to any one of claims 1 to 6.
CN202010172440.0A 2020-03-12 2020-03-12 Serial port log starting method and device and computer readable storage medium Withdrawn CN111400153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010172440.0A CN111400153A (en) 2020-03-12 2020-03-12 Serial port log starting method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010172440.0A CN111400153A (en) 2020-03-12 2020-03-12 Serial port log starting method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111400153A true CN111400153A (en) 2020-07-10

Family

ID=71432382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010172440.0A Withdrawn CN111400153A (en) 2020-03-12 2020-03-12 Serial port log starting method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111400153A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111856248A (en) * 2020-07-22 2020-10-30 中国第一汽车股份有限公司 Electronic throttle valve driving circuit diagnosis method and system and readable storage medium
WO2022111048A1 (en) * 2020-11-30 2022-06-02 苏州浪潮智能科技有限公司 Power supply control method and apparatus, and server and non-volatile storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111856248A (en) * 2020-07-22 2020-10-30 中国第一汽车股份有限公司 Electronic throttle valve driving circuit diagnosis method and system and readable storage medium
WO2022111048A1 (en) * 2020-11-30 2022-06-02 苏州浪潮智能科技有限公司 Power supply control method and apparatus, and server and non-volatile storage medium

Similar Documents

Publication Publication Date Title
US20240086269A1 (en) Method, Apparatus and System for Locating Fault of Server, and Computer-readable Storage Medium
CN109783262B (en) Fault data processing method, device, server and computer readable storage medium
US11023302B2 (en) Methods and systems for detecting and capturing host system hang events
WO2022198972A1 (en) Method, system and apparatus for fault positioning in starting process of server
US5948112A (en) Method and apparatus for recovering from software faults
CN106682162B (en) Log management method and device
CN111400153A (en) Serial port log starting method and device and computer readable storage medium
US20030084376A1 (en) Software crash event analysis method and system
CN108958965B (en) Method, device and equipment for monitoring recoverable ECC errors by BMC
CN114816022B (en) Method, system and storage medium for monitoring server power supply abnormality
TWI779682B (en) Computer system, computer server and method of starting the same
US20050033952A1 (en) Dynamic scheduling of diagnostic tests to be performed during a system boot process
JP6880961B2 (en) Information processing device and log recording method
CN113868001B (en) Method, system and computer storage medium for checking memory repair result
CN107133130B (en) Computer operation monitoring method and device
CN115098291A (en) Method, system, storage medium and equipment for recording system restart reason
CN114385405A (en) Method, device and system for realizing server restart reason recording
JP6217086B2 (en) Information processing apparatus, error detection function diagnosis method, and computer program
CN100369009C (en) Monitor system and method capable of using interrupt signal of system management
CN114064420A (en) Flight management system and method for reporting outage errors
CN113064776A (en) BMC fault diagnosis method and device
US10108499B2 (en) Information processing device with watchdog timer
US11099838B1 (en) Method and system for recovery for custom integrated circuit
Zhu et al. System recovery benchmarking
US20220366034A1 (en) Concept for Monitoring Software Containers

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200710