CN115757042A - Fault positioning method and device for abnormal restart of BMC (baseboard management controller), electronic equipment and storage medium - Google Patents
Fault positioning method and device for abnormal restart of BMC (baseboard management controller), electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115757042A CN115757042A CN202211510743.4A CN202211510743A CN115757042A CN 115757042 A CN115757042 A CN 115757042A CN 202211510743 A CN202211510743 A CN 202211510743A CN 115757042 A CN115757042 A CN 115757042A
- Authority
- CN
- China
- Prior art keywords
- preset
- bmc
- value
- timestamp
- fault
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application discloses a fault positioning method and device for abnormal restarting of BMC, electronic equipment and a storage medium. The method comprises the following steps: the method comprises the steps of monitoring the dog feeding operation of the BMC in real time, acquiring a current timestamp under the condition that the BMC performs the dog feeding operation each time, determining a preset storage position, and storing the acquired timestamp in the preset storage position. After the abnormal restart of the BMC system every time, a timestamp stored between restarts is acquired, a fault occurrence time period is determined based on the timestamp before the restart, then log information of the BMC system in the fault occurrence time period is acquired, and finally the fault of the abnormal restart of the BMC system is positioned according to the log information. Based on the method, after the restart, the time period of the fault occurrence can be determined according to the timestamp stored before the restart, and then the abnormal restart fault can be more accurately and comprehensively positioned according to the log information recorded by the system in the time period.
Description
Technical Field
The embodiment of the application relates to the technical field of fault monitoring, in particular to a fault positioning method and device for abnormal restarting of BMC, electronic equipment and a storage medium.
Background
A Baseboard Management Controller (BMC) system is a Linux operating system running on a BMC chip, and because the system has higher complexity, the probability of failure is also higher during daily operation.
In order to avoid the situation that the BMC system is continuously unable to work when the BMC system fails, a hardware watchdog (Watch dog) mechanism is usually set on the BMC chip, and a timer watchdog is set in the kernel of the BMC system, so that if the BMC system fails or has an error, the timer watchdog operation is affected, and the timer watchdog cannot be regularly fed.
At present, in order to determine the reason for abnormal restart of a BMC system, the state of a hardware watchdog is usually monitored, after it is monitored that the watchdog triggers an interrupt, and before the abnormal restart of the BMC system, collection of abnormal information of a specific process is performed, and after the abnormal restart is successful, a fault reason causing the abnormal restart of the system is located based on the collected abnormal information. However, this method can only be used for a specific application process, and cannot perform fault location based on the entire BMC system, and the time interval between the trigger interrupt and the abnormal restart of the BMC system is short, and may not be able to completely acquire abnormal information of the specific process, thereby causing a problem of inaccurate fault location or even failure location.
Disclosure of Invention
The embodiment of the application provides a fault positioning method and device for abnormal restart of BMC, electronic equipment and a storage medium, so as to improve the accuracy of fault positioning.
In a first aspect, an embodiment of the present application provides a fault location method for BMC abnormal restart, where the method includes:
monitoring the dog feeding operation of a BMC (baseboard management controller) system, and acquiring a current timestamp under the condition that the BMC system performs the dog feeding operation each time;
determining a preset storage position, and storing the acquired timestamp in the preset storage position;
after the abnormal restart of the BMC system every time, acquiring a timestamp stored before the restart;
determining a fault occurrence time period based on the timestamp stored before restarting, and acquiring log information of the BMC system in the fault occurrence time period;
and positioning the abnormal restarting fault of the BMC system according to the log information in the fault occurrence time period.
Optionally, the determining the preset storage location includes:
acquiring a value of a preset cache identification bit, and setting a first cache region in a pre-applied memory space as a preset storage position if the value of the preset cache identification bit is a first preset value;
and if the value of the preset cache identification bit is a second preset value, setting a second cache region in the memory space applied in advance as a preset storage position.
Among the above-mentioned technical scheme, introduce two buffer areas and predetermine the buffer identification position, can realize through predetermineeing the buffer area that buffer identification position discernment will be deposited in, guarantee that the timestamp of feeding the dog before certain trouble takes place is not covered by the feeding dog timestamp after the trouble.
Optionally, the method further includes:
and after the abnormal restart of the BMC system every time, updating the value of the preset cache identification bit.
In the above embodiment, the abnormal restart of the BMC system is set as a trigger mechanism for updating the preset cache identification bit, so that the independent storage of the timestamps before and after the restart can be realized, and the timestamp stored before the restart cannot be covered during the storage of the timestamp after the restart.
Optionally, after the BMC system is abnormally restarted each time, updating the value of the preset cache identification bit includes:
and after the abnormal restart of the BMC system, determining the value of the current preset cache identification bit.
If the value of the preset cache identification bit is a first preset value, updating the value of the preset cache identification bit to a second preset value;
and if the current value of the preset cache identification bit is a second preset value, updating the value of the preset cache identification bit to a first preset value.
In the above embodiment, after the restart, the preset cache identification bit is updated by using the transition between the first preset value and the second preset value.
Optionally, before the determining the preset storage location, the method further includes:
and judging whether the timestamp is stored for the first time or not, emptying the first cache region, the second cache region and the corresponding offset pointer in the memory space which is applied in advance under the condition of the first time, and initializing the value of the preset cache identification bit.
In the embodiment, the influence of invalid data possibly existing in the buffer area and the offset pointer on the storage process during the first storage is avoided.
Optionally, the method further includes:
under the condition of receiving a timestamp reading request, acquiring the current value of a preset cache identification bit;
if the current value of the preset cache identification bit is a first preset value, reading a timestamp from a first cache region in a pre-applied memory space;
if the current value of the preset cache identification bit is a second preset value, reading a timestamp from a second cache region in a pre-applied memory space;
the read time stamp is stored in a file form in a file directory created in advance.
In the above embodiment, the currently stored timestamp information may be read from the corresponding cache region by using the current value of the preset cache identification bit, and may be stored in a file form so as to be conveniently displayed to the application layer, so as to be operated by the application layer.
Optionally, the method further includes:
and after the abnormal restart of the BMC system, transferring the file in the pre-established file directory into the nonvolatile memory.
In the embodiment, the timestamp data is prevented from being lost when power is lost, and the reliability of timestamp storage is improved.
In a second aspect, an embodiment of the present application further provides a fault location device for abnormal restart of a BMC, where the fault location device for abnormal restart of a BMC includes:
the system comprises a timestamp acquisition module, a timestamp acquisition module and a control module, wherein the timestamp acquisition module is used for monitoring the dog feeding operation of the BMC system and acquiring a current timestamp under the condition that the BMC system performs the dog feeding operation each time;
the storage module is used for determining a preset storage position and storing the acquired timestamp in the preset storage position;
the time stamp reading module is used for acquiring the time stamp stored before the restart after the abnormal restart of the BMC system;
the log acquisition module is used for determining a fault occurrence time period based on the timestamp stored before restarting and acquiring log information of the BMC system in the fault occurrence time period;
and the fault positioning module is used for positioning the fault of abnormal restart of the BMC system according to the log information in the fault occurrence time period.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device to store one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the fault location method for BMC exception restart as provided in any embodiment of the present application.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the fault location method for BMC abnormal restart according to any embodiment of the present application.
According to the technical scheme, the dog feeding operation of the BMC system is monitored in real time, the current timestamp is acquired under the condition that the BMC system performs the dog feeding operation each time, then the preset storage position is determined, and the acquired timestamp is stored in the preset storage position. After the abnormal restarting of the BMC system every time, a timestamp stored between restarting is obtained, a fault occurrence time period is determined based on the timestamp before restarting, then log information of the BMC system in the fault occurrence time period is obtained, and finally the fault of the abnormal restarting of the BMC system is located according to the log information. Based on this, when the BMC system normally operates, the dog feeding operation can be executed regularly, but the dog feeding operation can be stopped after the fault occurs, at this moment, a timestamp capable of being stored does not occur, then after the restart, a time period in which the fault occurs can be determined according to the timestamp stored before the restart, and then the fault of the abnormal restart can be more accurately and comprehensively positioned according to log information recorded by the time period system.
Drawings
Fig. 1 is a schematic flowchart of a fault location method for BMC abnormal restart according to an embodiment of the present application;
fig. 2 is a schematic diagram of a fault locating process of abnormal restart of the BMC according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a fault location device for BMC abnormal restart according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application. It should be further noted that, for the convenience of description, only some of the structures associated with the present application are shown in the drawings, not all of them.
Example one
Fig. 1 is a schematic flowchart of a fault location method for BMC abnormal restart according to an embodiment of the present application, which is applicable to a fault location scenario for BMC abnormal restart. The method can be executed by a fault positioning device for abnormal restart of the BMC, the device can be realized in a hardware and/or software mode, and can be generally integrated in electronic equipment such as a computer with data operation capability, and the method specifically comprises the following steps:
Because the BMC system may periodically execute the dog feeding operation when the BMC system normally operates, and the dog feeding operation is usually to send a dog feeding instruction to the watchdog system, this embodiment may monitor whether the BMC system sends the dog feeding instruction, and if it is monitored that the dog feeding instruction is sent, it is determined that the BMC system is executing the dog feeding operation.
Specifically, the method can be implemented by detecting all information sent by the BMC system to the watchdog system, and when the BMC system sends out the information that the sending target is the watchdog system, the information is analyzed, whether a dog feeding instruction is included in an analysis result is judged, and if the dog feeding instruction is included, it can be judged that the dog feeding instruction is sent out.
By the means, when the BMC system is detected to execute the dog feeding operation, the timestamp at the moment can be obtained, namely the timestamp when the BMC system is detected to execute the dog feeding operation is obtained. It should be noted that the format of the time stamp may be "year/month/day/hour/minute/second/millisecond", and in a specific example, the time stamp may be "2022/10/11/08/24/35/65".
And 102, determining a preset storage position, and storing the acquired time stamp in the preset storage position.
In this step, the preset storage location is located in a memory space partitioned from a reserved memory of the BMC system in advance, and in order to implement independent storage of the timestamps before and after restarting and avoid the timestamp after restarting, the condition that the timestamp before restarting is lost due to the fact that the offset pointer used for caching after restarting is reset and stored in the storage location of the timestamp before restarting is covered can be set as a double-cache structure.
Specifically, a first buffer area and a second buffer area are set in the memory space, corresponding preset values are set for the first buffer area and the second buffer area respectively, and then a preset buffer identification bit is set for storing the preset values. And judging the current position for storing the timestamp by identifying the value of the preset cache identification bit, and changing the current position for storing the timestamp by modifying the value of the preset cache identification bit.
Based on the preset setting, when the preset storage position is determined in the step, the value of the preset cache identification bit can be obtained first, and if the value of the preset cache identification bit is a first preset value, a first cache region in a memory space which is applied in advance is set as the preset storage position; and if the value of the preset cache identification bit is a second preset value, setting a second cache region in the memory space which is applied in advance as a preset storage position.
In a specific example, the first preset value may be "0", the second preset value may be "1", the identifier of the first buffer is the first preset value, and the identifier of the second buffer is the second preset value. When the preset storage position is determined, firstly, a value in the preset cache identification bit is obtained, then, whether the value is '1' or '0' is judged, if the value is '1', namely a second preset value, the preset storage position is a second cache region, and if the value is '0', namely a first preset value, the preset storage position is a first cache region.
It should be noted that before the preset storage location is determined, it is determined whether the timestamp is currently stored for the first time, and if the timestamp is stored for the first time, the first buffer area, the second buffer area and the offset pointers corresponding to the first buffer area and the second buffer area in the pre-applied memory space are emptied, and the value of the preset buffer identification bit is initialized.
Specifically, the log record may be performed for each storage operation, before the preset storage location is determined each time, it may be determined whether the current storage is the first storage according to the log record, and if there is a related log record, the current storage is not the first storage, and at this time, the step of determining the preset storage location may be directly performed.
If no related log record exists, the first buffer area, the second buffer area, the corresponding offset pointer and the preset buffer identification bit are initialized to the first preset value or the second preset value for the first storage. And then the step of determining the preset storage position is performed.
In this step, after the preset storage location is determined, the acquired timestamp may be stored in the preset storage location. It should be noted that, because each cache region has a plurality of storage bits, determining a specific storage bit may be obtained by using an offset pointer, and the storage process may refer to a related technology of storing data in the cache region by using an offset pointer, which is not described herein again.
Further, after the abnormal restart of the BMC system, the value of the preset cache identification bit is updated. Usually, the first preset value is updated to the second preset value or the second preset value is updated to the first preset value.
Based on the updating operation, when the timestamps are stored before and after restarting, the determined preset storage positions are respectively the first cache region and the second cache region. For example, the preset storage location determined before the restart is a first cache region, the value of the preset cache identification bit is updated after the restart, the first preset value is updated to be a second preset value, and the preset storage location determined after the restart is a second cache region, so that the preset storage locations determined before and after the restart are different.
The specific updating process may be that, after the BMC system is abnormally restarted each time, the value of the current preset cache identification bit is determined; if the value of the current preset cache identification bit is a first preset value, updating the value of the preset cache identification bit to a second preset value; and if the current value of the preset cache identification bit is the second preset value, updating the value of the preset cache identification bit to the first preset value.
In a specific example, after the abnormal restart, the value of the current preset cache identification bit is determined to be "1", which indicates that the preset storage location determined before the restart is the second cache region, at this time, "1" is updated to "0", and the preset storage location determined thereafter is the first cache region.
It should be noted that the updated occurrence time may be any time occurring in the time period after the restart and before the first execution of the dog feeding operation after the restart.
In order to avoid data loss in the cache region after power failure, in this embodiment, after the BMC system is abnormally restarted each time, a file in a pre-created file directory may be transferred to the nonvolatile memory. Because the nonvolatile memory cannot be influenced by power failure, namely the data stored after power failure cannot be lost, after the operation, the stored timestamp cannot be lost or damaged due to power failure of the system, and subsequent fault location based on the timestamp can be carried out at any time, so that convenience is provided for later comprehensive analysis.
It should be noted that the files in the pre-created file directory are obtained after a read operation. Since the present embodiment stores the timestamp in a double-cache-area manner, during reading, the read position needs to be determined according to the value in the preset cache identification bit.
Specifically, under the condition that a timestamp reading request is received, the current value of a preset cache identification bit is obtained; if the current value of the preset cache identification bit is a first preset value, reading a timestamp from a first cache region in a pre-applied memory space; if the current value of the preset cache identification bit is a second preset value, reading a timestamp from a second cache region in a pre-applied memory space; the read time stamp is stored in a file form in a file directory created in advance.
The timestamp reading request can be generated and sent periodically, so that the timestamp in the cache region can be read into the file, and the reliability of timestamp storage is improved by matching with the unloading operation (namely unloading the file into the nonvolatile memory).
In addition, in order to avoid repeated reading of the time stamp in the buffer, each time reading is performed, a specific position of the read buffer may be recorded, and the next reading may be started from a next storage address of the specific position.
Specifically, after the timestamp is read, the value of the preset cache identification bit corresponding to the read cache region and the read address at the tail end are recorded, when reading is performed next time, whether the value of the preset cache identification bit is consistent with the value recorded at the previous time or not is judged first, if so, reading is started from the next address of the read address at the tail end, and if not, all timestamps are read from the corresponding cache region.
Further, the timestamp reading request may also be sent by the user layer, and the user may generate and send the timestamp reading request in the user layer according to the requirement, and then read the corresponding file from the file directory to obtain the read timestamp.
It should be noted that, in addition to the time stamp, the content stored in the file may further include a reading location (for example, the first buffer or the second buffer) and the number of time stamps stored before the reading location changes, that is, the number of time stamps stored by the device before each system restart and after the previous system restart.
In this step, when the fault occurrence time period is determined, the latest timestamp before restart may be used as the start time of the fault occurrence time period, the current time may be used as the end time of the fault occurrence time period, and the start time and the end time constitute the fault occurrence time period.
Further, sometimes, after the fault occurs, a period of time is accumulated to result in that the dog feeding operation cannot be performed, and the determined fault occurrence period may not include the time when the fault occurs. Therefore, the present embodiment may preset a tolerant time, and then advance the start time by the tolerant time to obtain a new start time, and use the new start time and the new end time to form the fault occurrence time period.
In a specific example, the allowance time may be 20 seconds, the latest timestamp corresponds to 30 minutes and 25 seconds at 31/10/2022, and 30 minutes and 5 seconds at 8/31/10/2022 after the allowance time is advanced, the new start time is 20 seconds at 5/30 minutes at 31/10/2022.
After the fault occurrence time period is determined, the log information of the BMC system in the fault occurrence time period can be obtained. It should be noted that each log has a corresponding log time, and the logs corresponding to all the log times belonging to the fault occurrence time period may be screened, so as to obtain the log information in the fault occurrence time period.
And step 104, positioning the abnormal restarting fault of the BMC system according to the log information in the fault occurrence time period.
In this step, fault location is performed according to the log information, and it should be noted that the specific process of location may refer to related technologies, which are not described herein again.
According to the technical scheme, the dog feeding operation of the BMC system is monitored in real time, the current timestamp is acquired under the condition that the BMC system performs the dog feeding operation each time, then the preset storage position is determined, and the acquired timestamp is stored in the preset storage position. After the abnormal restarting of the BMC system every time, a timestamp stored between restarting is obtained, a fault occurrence time period is determined based on the timestamp before restarting, then log information of the BMC system in the fault occurrence time period is obtained, and finally the fault of the abnormal restarting of the BMC system is located according to the log information. Based on this, when the BMC system normally operates, the dog feeding operation can be executed regularly, but the dog feeding operation can be stopped after the fault occurs, at this moment, a timestamp capable of being stored does not occur, then after the restart, a time period in which the fault occurs can be determined according to the timestamp stored before the restart, and then the fault of the abnormal restart can be more accurately and comprehensively positioned according to log information recorded by the time period system.
Example two
Fig. 2 is a schematic diagram of a fault locating process of abnormal restart of the BMC according to a second embodiment of the present application. As shown in fig. 2, the fault location process of BMC abnormal restart provided in this embodiment may include:
And step 203, acquiring the current time stamp under the condition that the BMC system performs the dog feeding operation each time.
And step 206, if the value of the preset cache identification bit is a second preset value, setting a second cache region in the memory space applied in advance as a preset storage position.
And step 207, storing the acquired time stamp in a preset storage position.
And step 208, after the abnormal restart of the BMC system every time, determining whether the value of the current preset cache identification bit is a first preset value.
And step 211, after the abnormal restart of the BMC system every time, acquiring a timestamp stored before the restart.
And step 213, acquiring the log information of the BMC system in the fault occurrence time period.
And 214, positioning the abnormal restarting fault of the BMC system according to the log information in the fault occurrence time period.
According to the scheme of the embodiment, when the BMC system normally runs, the dog feeding operation can be executed regularly, but the dog feeding operation can be stopped after a fault occurs, a timestamp which can be stored cannot occur at the moment, after the system is restarted, the time period of the fault occurrence can be determined according to the timestamp stored before the system is restarted, and then the abnormal restarting fault can be more accurately and comprehensively positioned according to log information recorded by the time period system.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a fault location device for BMC abnormal restart according to a third embodiment of the present application. The fault positioning device for abnormal restarting of BMC provided by the embodiment of the application can execute the fault positioning method for abnormal restarting of BMC provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method. The device can be implemented in a software and/or hardware manner, and as shown in fig. 3, the fault location device for BMC abnormal restart specifically includes: the system comprises a timestamp acquisition module 301, a storage module 302, a timestamp reading module 303, a log acquisition module 304 and a fault location module 305.
The system comprises a time stamp acquisition module, a time stamp acquisition module and a data processing module, wherein the time stamp acquisition module is used for monitoring the dog feeding operation of the BMC system and acquiring the current time stamp under the condition that the BMC system performs the dog feeding operation each time;
the storage module is used for determining a preset storage position and storing the acquired timestamp in the preset storage position;
the time stamp reading module is used for acquiring the time stamp stored before the restart after the abnormal restart of the BMC system every time;
the log acquisition module is used for determining a fault occurrence time period based on the timestamp stored before restarting and acquiring the log information of the BMC system in the fault occurrence time period;
and the fault positioning module is used for positioning the fault of abnormal restart of the BMC system according to the log information in the fault occurrence time period.
According to the technical scheme, when the BMC system operates normally, the dog feeding operation can be executed regularly, however, the dog feeding operation can be stopped after a fault occurs, a timestamp capable of being stored cannot occur at the moment, after the system is restarted, the time period of the fault occurrence can be determined according to the timestamp stored before the system is restarted, and then the abnormal restarting fault can be positioned more accurately and comprehensively according to log information recorded by the time period system.
Further, the memory module includes:
the first storage unit is used for acquiring a value of a preset cache identification bit, and setting a first cache region in a pre-applied memory space as a preset storage position if the value of the preset cache identification bit is a first preset value;
and the second storage unit is used for setting a second cache region in the memory space which is applied in advance as a preset storage position if the value of the preset cache identification bit is a second preset value.
Further, the apparatus further comprises:
and the identification bit updating module is used for updating the value of the preset cache identification bit after the abnormal restart of the BMC system every time.
Further, the identification bit update module comprises:
the flag bit value determining unit is used for determining the value of the current preset cache identification bit after the abnormal restart of the BMC system every time;
the first updating unit is used for updating the value of the preset cache identification bit to a second preset value if the value of the current preset cache identification bit is a first preset value;
and the second updating unit is used for updating the value of the preset cache identification bit to the first preset value if the value of the current preset cache identification bit is the second preset value.
Further, the apparatus further comprises:
and the initialization module is used for judging whether the timestamp is stored for the first time at present, emptying the first cache region, the second cache region and the offset pointer corresponding to the first cache region in the memory space which is applied in advance under the condition of the first time, and initializing the value of the preset cache identification bit.
Further, the apparatus further comprises:
the identification bit value acquisition module is used for acquiring the current value of the preset cache identification bit under the condition of receiving the timestamp reading request;
the first reading module is used for reading a timestamp from a first cache region in a pre-applied memory space if the current value of the preset cache identification bit is a first preset value;
the second reading module is used for reading the timestamp from a second cache region in the memory space applied in advance if the current value of the preset cache identification bit is a second preset value;
and the file storage module is used for storing the read time stamp in a file form in a pre-established file directory.
Further, the apparatus further comprises:
and the unloading module is used for unloading the file in the pre-established file directory into the nonvolatile memory after the abnormal restart of the BMC system every time.
Example four
Fig. 4 is a schematic structural diagram of an electronic apparatus according to a fourth embodiment of the present application, as shown in fig. 4, the electronic apparatus includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of the processors 410 in the electronic device may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the memory 420, the input device 430 and the output device 440 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 4.
The memory 420 serves as a computer-readable storage medium, and may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the fault location method for BMC abnormal restart in the embodiment of the present invention (for example, the timestamp obtaining module 301, the storage module 302, the timestamp reading module 303, the log obtaining module 304, and the fault location module 305 in the fault location device for BMC abnormal restart). The processor 410 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 420, that is, the fault location method for BMC exception reboot described above is implemented:
monitoring the dog feeding operation of the BMC system, and acquiring a current timestamp under the condition that the BMC system performs the dog feeding operation each time;
determining a preset storage position, and storing the acquired timestamp in the preset storage position;
after the BMC system is abnormally restarted every time, acquiring a timestamp stored before the BMC system is restarted, determining a fault occurrence time period based on the timestamp stored before the BMC system is restarted, and acquiring log information of the BMC system in the fault occurrence time period;
and positioning the abnormal restarting fault of the BMC system according to the log information in the fault occurrence time period.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to an electronic device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
EXAMPLE five
A storage medium containing computer-executable instructions, which when executed by a computer processor, is configured to perform a fault location method for BMC exception reboot, the method including:
monitoring the dog feeding operation of the BMC, and acquiring a current timestamp under the condition that the BMC performs the dog feeding operation each time;
determining a preset storage position, and storing the acquired timestamp in the preset storage position;
after the BMC system is abnormally restarted each time, acquiring a timestamp stored before the restart, determining a fault occurrence time period based on the timestamp stored before the restart, and acquiring log information of the BMC system in the fault occurrence time period;
and positioning the abnormal restarting fault of the BMC system according to the log information in the fault occurrence time period.
Of course, the storage medium including the computer-executable instructions provided in the embodiments of the present application is not limited to the above method operations, and may also perform related operations in the fault location method for BMC abnormal restart provided in any embodiment of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods of the embodiments of the present application.
It should be noted that, in the embodiment of the search apparatus, each included unit and each included module are merely divided according to functional logic, but are not limited to the above division, as long as corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments illustrated herein, and that various obvious changes, rearrangements and substitutions may be made therein by those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims (10)
1. A fault location method for abnormal restarting of BMC is characterized by comprising the following steps:
monitoring the dog feeding operation of a BMC (baseboard management controller) system, and acquiring a current timestamp under the condition that the BMC system performs the dog feeding operation each time;
determining a preset storage position, and storing the acquired timestamp in the preset storage position;
after the BMC system is abnormally restarted each time, acquiring a timestamp stored before restarting, determining a fault occurrence time period based on the timestamp stored before restarting, and acquiring log information of the BMC system in the fault occurrence time period;
and positioning the abnormal restarting fault of the BMC system according to the log information in the fault occurrence time period.
2. The method of claim 1, wherein determining the predetermined storage location comprises:
acquiring a value of a preset cache identification bit, and setting a first cache region in a pre-applied memory space as a preset storage position if the value of the preset cache identification bit is a first preset value;
and if the value of the preset cache identification bit is a second preset value, setting a second cache region in the memory space applied in advance as a preset storage position.
3. The method of claim 2, further comprising:
and updating the value of the preset cache identification bit after the abnormal restart of the BMC system every time.
4. The method of claim 3, wherein updating the value of the preset cache flag bit after each abnormal reboot of the BMC system comprises:
after the BMC system is abnormally restarted each time, determining the value of the current preset cache identification bit;
if the value of the preset cache identification bit is a first preset value, updating the value of the preset cache identification bit to a second preset value;
and if the current value of the preset cache identification bit is a second preset value, updating the value of the preset cache identification bit to a first preset value.
5. The method of claim 1, wherein prior to said determining the preset storage location, the method further comprises:
judging whether the timestamp is stored for the first time or not, emptying a first cache region, a second cache region and a corresponding offset pointer in a pre-applied memory space under the condition of the first time, and initializing the value of a preset cache identification bit.
6. The method of claim 1, further comprising:
under the condition of receiving a timestamp reading request, acquiring the current value of a preset cache identification bit;
if the current value of the preset cache identification bit is a first preset value, reading a timestamp from a first cache region in a pre-applied memory space;
if the current value of the preset cache identification bit is a second preset value, reading a timestamp from a second cache region in a pre-applied memory space;
the read time stamp is stored in a file form in a file directory created in advance.
7. The method of claim 6, further comprising:
and after the abnormal restart of the BMC system, transferring the file in the pre-established file directory into a nonvolatile memory.
8. A fault locating device for abnormal restart of BMC, the device comprising:
the system comprises a timestamp acquisition module, a timestamp acquisition module and a control module, wherein the timestamp acquisition module is used for monitoring the dog feeding operation of the BMC system and acquiring a current timestamp under the condition that the BMC system performs the dog feeding operation each time;
the storage module is used for determining a preset storage position and storing the acquired timestamp in the preset storage position;
the time stamp reading module is used for acquiring the time stamp stored before restarting after each abnormal restart of the BMC system;
the log acquisition module is used for determining a fault occurrence time period based on the timestamp stored before restarting and acquiring log information of the BMC system in the fault occurrence time period;
and the fault positioning module is used for positioning the fault of abnormal restart of the BMC system according to the log information in the fault occurrence time period.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the fault location method for BMC exception restart as claimed in any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out a method for fault localization for BMC exception restart according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211510743.4A CN115757042A (en) | 2022-11-29 | 2022-11-29 | Fault positioning method and device for abnormal restart of BMC (baseboard management controller), electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211510743.4A CN115757042A (en) | 2022-11-29 | 2022-11-29 | Fault positioning method and device for abnormal restart of BMC (baseboard management controller), electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115757042A true CN115757042A (en) | 2023-03-07 |
Family
ID=85340232
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211510743.4A Pending CN115757042A (en) | 2022-11-29 | 2022-11-29 | Fault positioning method and device for abnormal restart of BMC (baseboard management controller), electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115757042A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117290164A (en) * | 2023-11-22 | 2023-12-26 | 荣耀终端有限公司 | Information recording method at restarting, electronic device and readable storage medium |
-
2022
- 2022-11-29 CN CN202211510743.4A patent/CN115757042A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117290164A (en) * | 2023-11-22 | 2023-12-26 | 荣耀终端有限公司 | Information recording method at restarting, electronic device and readable storage medium |
CN117290164B (en) * | 2023-11-22 | 2024-05-10 | 荣耀终端有限公司 | Information recording method at restarting, electronic device and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111290918B (en) | Server running state monitoring method and device and computer readable storage medium | |
CN108363659B (en) | Method and device for processing abnormity of electronic equipment | |
EP3355197B1 (en) | Fault processing method, related apparatus, and computer | |
CN102081573B (en) | Device and method for recording equipment restart reason | |
CN112506702B (en) | Disaster recovery method, device, equipment and storage medium for data center | |
CN110895488B (en) | Task scheduling method and device | |
CN109413164B (en) | Access service recovery method, device, equipment and readable storage medium | |
CN110413432B (en) | Information processing method, electronic equipment and storage medium | |
CN115757042A (en) | Fault positioning method and device for abnormal restart of BMC (baseboard management controller), electronic equipment and storage medium | |
CN111324423A (en) | Method and device for monitoring processes in container, storage medium and computer equipment | |
CN111796954A (en) | Watchdog control method, device, equipment and storage medium based on JVM | |
US11023335B2 (en) | Computer and control method thereof for diagnosing abnormality | |
CN109586989B (en) | State checking method, device and cluster system | |
CN115658113A (en) | Server self-starting method and device, readable storage medium and electronic equipment | |
CN114020526A (en) | Firmware upgrading method and device and computer storage medium | |
CN110895486A (en) | Distributed task scheduling system | |
CN110505177B (en) | Information collection system, terminal equipment and remote host | |
CN113138791A (en) | Upgrade processing method and device based on embedded system and electronic equipment | |
CN107396389B (en) | Method and system for diagnosing abnormal restart time of wireless access equipment | |
CN114257492B (en) | Fault processing method and device for intelligent network card, computer equipment and medium | |
CN112650613B (en) | Error information processing method and device, electronic equipment and storage medium | |
CN113961395A (en) | Plug and play method of chip protection device and control device | |
US6446067B2 (en) | Information processing unit, information processing system, method of correcting abnormality of christian calendar year in information processing unit, and computer readable record medium having christian calendar year abnormality correction program recorded therein | |
CN112988442A (en) | Method and equipment for transmitting fault information in server operation stage | |
CN113064750A (en) | Tracking method, device and medium for BIOS log information |
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 |