CN113806127B - Server log collection method, device and readable storage medium - Google Patents

Server log collection method, device and readable storage medium Download PDF

Info

Publication number
CN113806127B
CN113806127B CN202111065397.9A CN202111065397A CN113806127B CN 113806127 B CN113806127 B CN 113806127B CN 202111065397 A CN202111065397 A CN 202111065397A CN 113806127 B CN113806127 B CN 113806127B
Authority
CN
China
Prior art keywords
log
server
bmc
storage area
system log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111065397.9A
Other languages
Chinese (zh)
Other versions
CN113806127A (en
Inventor
郭艳杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202111065397.9A priority Critical patent/CN113806127B/en
Publication of CN113806127A publication Critical patent/CN113806127A/en
Application granted granted Critical
Publication of CN113806127B publication Critical patent/CN113806127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis

Abstract

The invention provides a server log collection method, equipment and a storage medium, wherein the method comprises the following steps: acquiring a system log and a BMC log in real time, and respectively storing the system log and the BMC log into a first storage area and a second storage area; and analyzing log information in the system log and/or the BMC log, and storing the system log and/or the BMC log into a third storage area in response to the system log and/or the BMC log matching a preset log rule. By the method, the system logs of the server and the BMC logs of the server are stored in real time, log content is analyzed, and the system logs of the server and the BMC logs before and after operation which possibly affect the stability of the server are combined and stored in an independent storage space. When the server fails, the log which may cause the server crash can be almost completely saved, so that the operation and maintenance personnel can efficiently locate the problem.

Description

Server log collection method, device and readable storage medium
Technical Field
The invention belongs to the field of server hardware monitoring, and particularly relates to a method and equipment for collecting server logs and a readable storage medium.
Background
The server is a product with extremely high reliability requirements, and the accurate positioning of the server faults is a very important part in the use and maintenance of the server. Server problem location is located by reading log information to determine error information in the log record. However, the prior art server log collection requires the problem to be located based on the normal running of the server's operating system or manually during the server startup process or by collecting the log through a management module of the server motherboard. However, there are cases where the server is problematic because it is instantaneously irreproducible, and if log traces are not kept at the first time, the problem cannot be located, repair is difficult, and comprehensive after-sales information cannot be collected, so that the server product is optimized. The existing log display and collection method is as follows:
the following problems exist in the BIOS log display collection method: A. and outputting through the serial port of the processor, enabling a maintainer to plug the serial port on site with a computer to restart the system, and checking. The problems are: 1. when a problem occurs, a log cannot be saved in time, and 2, maintenance personnel miss fault information. B. The BIOS saves the log information into the memory, and reads the log through the operating system after the operating system is started. The problems are: some failures of the BIOS may cause the operating system to fail to boot, and the log is saved to memory but without an interface read. Such fault localization difficulties are encountered. C. The BIOS sends the log to the BMC (on-board controller) for storage during the boot process. The problems are: the relationship between BIOS and BMC, in addition to sending logs, has a lot of startup information to interact. And some BIOS failures not only can cause BIOS errors, but also can cause BMC starting abnormality. In this case, the log is not output although it is stored, and the function of the positioning problem cannot be started.
BMC log collection method and problems: A. the log is collected in real time by connecting the serial ports in the BMC starting process; the problems are that: collecting logs in real time cannot collect history logs. B. Logging in a BMC network port or a serial port to collect history logs after the BMC is started; the problems are that: failure of the BMC to start up normally would result in a log that cannot be collected. Summarizing the problems: log history log collection of BIOS and BMC is dependent on each other or on manual operations. The capture capability of the transient fault log is weak.
Therefore, a more convenient and efficient method is needed to solve the above problems.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method, an apparatus and a storage medium for collecting server logs, wherein the method includes:
acquiring a system log and a BMC log in real time, and respectively storing the system log and the BMC log into a first storage area and a second storage area;
and analyzing log information in the system log and/or the BMC log, and storing the system log and/or the BMC log into a third storage area in response to the system log and/or the BMC log matching a preset log rule.
In some embodiments of the invention, responding to the system log and/or BMC log matching a predetermined log rule comprises:
analyzing the obtained system log, and in response to sensitive operation in the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In some embodiments of the present invention, the responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the obtained system log, and if the resources of the server are fully loaded in response to the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In some embodiments of the present invention, responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the acquired BMC log of the server, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server, merging and storing the system log of the server and the BMC log of the server in a second preset time before and after the BMC log in the third storage area.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively includes:
analyzing the obtained system log, and adding a first preset mark into the system log of the server in a first preset time before and after the system log and storing the first preset mark in the first storage area in response to the fact that sensitive operation is related to and/or resources of the server are fully loaded in an analysis result of the system log;
analyzing the acquired BMC log of the server, and adding a second preset mark to the BMC log of the server in a second preset time before and after the BMC log and storing the second preset mark in the second storage area in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively further includes:
analyzing the acquired BMC logs of the server and the system log, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC logs of the server, and if full load and/or sensitive operation occurs to the resources of the server in the analysis result of the system log of the server, merging and storing the system log of the server and the BMC log of the server in the third storage area in a second preset time before and after the BMC log.
In some embodiments of the invention, the method further comprises:
in response to the log data of the first storage area and the second storage area being higher than the guard value, old log data to which the first or second flag is not added will be preferentially deleted according to the log data writing time.
And in response to the log data of the third storage area being higher than the warning value, deleting the first-written log data according to the writing time of the log data.
In some embodiments of the present invention, in response to the server failing, log data in the third storage area, the first storage area, and the second storage area is output by wireless transmission.
In yet another aspect, the present invention also provides a computer device, including:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any of the above embodiments.
Yet another aspect of the invention proposes a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method of any of the above embodiments.
By the method, the system logs of the server and the BMC logs of the server are stored in real time, log content is analyzed, and the system logs of the server and the BMC logs before and after operation which possibly affect the stability of the server are combined and stored in an independent storage space. When the server fails, the log which may cause the server crash can be almost completely saved, so that the operation and maintenance personnel can efficiently locate the problem.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating a method for collecting logs of a server according to an embodiment of the present invention;
FIG. 2 is a topology diagram of a method for collecting server logs according to the present invention;
FIG. 3 is a block diagram of a computer device of a method for collecting server logs according to the present invention;
fig. 4 is a schematic structural diagram of a computer readable storage medium of a server log collection method according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
As shown in fig. 1, in a first aspect of the embodiment of the present invention, a method, an apparatus, and a storage medium for collecting a server log are provided, where the method includes:
s1, acquiring a system log and a BMC log in real time, and respectively storing the system log and the BMC log into a first storage area and a second storage area;
and S2, analyzing log information in the system log and/or the BMC log, and storing the system log and/or the BMC log into a third storage area in response to the system log and/or the BMC log matching a preset log rule.
In this embodiment, as shown in fig. 2, the log collecting module 3 provided by the method of the present invention is connected to the system log output module 1 of the server through the serial bus of the server, and receives the BMC log from the log output interface of the BMC2 in real time through the BMC log output interface.
In step S1, after the log collection module 3 obtains the server system log through the serial bus and obtains the server system log and the BMC log through the BMC log output interface, the system log of the server is stored in the first storage area 4, and the BMC log of the server is stored in the second storage area 6.
In step S2, the log collection module 3 analyzes the obtained server system log and BMC log, determines the obtained server system log and BMC log according to a predetermined log matching rule, and stores the system log and/or BMC log meeting the matching rule in the third storage area 5.
In some embodiments of the invention, responding to the system log and/or BMC log matching a predetermined log rule comprises:
analyzing the obtained system log, and in response to sensitive operation in the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
Specifically, in this embodiment, the log collecting module 3 analyzes the collected system log of the server, and determines the sensitivity of the log to the operation type of the server or the type of the executed program or instruction, and if the operation type of the server or the executed program or instruction described in the log relates to a sensitive resource to the server or a potentially dangerous operation, the system log and the BMC log within 1 minute before and after the acquisition time of the log data are merged into the third storage area 5. Specifically, log data of the first 1 minute is read from the first storage area 4 and the second storage area, and a server system log and a BMC log of a log passing output interface of the system log output module 1 and the BMC2 in the subsequent 1 minute are received and stored in the third storage area 5 after being combined.
In some embodiments of the present invention, the responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the obtained system log, and if the resources of the server are fully loaded in response to the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In this embodiment, as described above, when the system log is analyzed, if the resources in the server are found to be fully loaded, that is, the CPU core is exhausted or the memory is exhausted, or the disk read/write speed is fully loaded, the system log and the BMC log within 1 minute before and after the log data acquisition time are also merged and stored in the third storage area 5. Specifically, log data of the first 1 minute is read from the first storage area 4 and the second storage area, and a server system log and a BMC log of a log passing output interface of the system log output module 1 and the BMC2 in the subsequent 1 minute are received and stored in the third storage area 5 after being combined.
In some embodiments of the present invention, responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the acquired BMC log of the server, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server, merging and storing the system log of the server and the BMC log of the server in a second preset time before and after the BMC log in the third storage area.
In this embodiment, after receiving the BMC logs, the log collecting module 3 analyzes each BMC log to determine whether each hardware state of the server monitored by the BMC is abnormal, including: some state parameters that identify the stability of the hardware layer of the server, such as CPU temperature, chassis temperature, GPU temperature, etc. Similarly, if the abnormality is found in the BMC log, the system log and the BMC log within 3 minutes before and after the acquisition time of the BMC log data are merged and stored in the third storage area 5. Specifically, log data of the first 1 minute is read from the first storage area 4 and the second storage area, and a server system log and a BMC log of a log passing output interface of the system log output module 1 and the BMC2 in the subsequent 3 minutes are received and stored in the third storage area 5 after being combined.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively includes:
analyzing the obtained system log, and adding a first preset mark into the system log of the server in a first preset time before and after the system log and storing the first preset mark in the first storage area in response to the fact that sensitive operation is related to and/or resources of the server are fully loaded in an analysis result of the system log;
analyzing the acquired BMC log of the server, and adding a second preset mark to the BMC log of the server in a second preset time before and after the BMC log and storing the second preset mark in the second storage area in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server.
In this embodiment, after receiving the BMC log and after receiving the server system log, the log collection module 3 analyzes each BMC log and the server system log, determines whether each hardware state of the server monitored by the BMC is abnormal, and determines whether sensitive operations are involved in the analysis result of the system log and/or resources of the server are fully loaded.
When the state of each hardware of the server is abnormal, the BMC log and the service log are not stored in the third storage area 5, but the BMC log of 3 minutes before and after is stored in the second storage area 6, and a second mark is added to the data of 3 minutes before and after.
When the analysis result of the system log of the server involves sensitive operations and/or resources of the server are fully loaded, the system log of the server is not stored in the third storage area 5, but the system log of the server for 1 minute before and after is added with the first mark and then is stored in the first storage area.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively further includes:
analyzing the acquired BMC logs of the server and the system log, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC logs of the server, and if full load and/or sensitive operation occurs to the resources of the server in the analysis result of the system log of the server, merging and storing the system log of the server and the BMC log of the server in the third storage area in a second preset time before and after the BMC log.
In this embodiment, as described above, when the data collection module 3 parses the server system log and the BMC log to meet the requirements of sensitive operations and/or full loading of resources of the server and abnormal states of various hardware states of the server, the server system log and the BMC log within 3 minutes before and after are merged and stored in the third storage area 5.
In some embodiments of the invention, the method further comprises:
in response to the log data of the first storage area and the second storage area being higher than the guard value, old log data to which the first or second flag is not added will be preferentially deleted according to the log data writing time.
And in response to the log data of the third storage area being higher than the warning value, deleting the first-written log data according to the writing time of the log data.
In this embodiment, when the log data in the three storage areas exceeds 80% of the own storage space, the log data in the own storage space is cleaned. When the first storage area 4 and the second storage area 6 are cleaned, the log data to which the first mark or the second mark is not added is preferentially deleted in a first-in-first-out manner. The data with earliest time is cleared in the third storage area 5 directly in a first-in-first-out manner.
In some embodiments of the present invention, in response to the server failing, log data in the third storage area, the first storage area, and the second storage area is output by wireless transmission.
As shown in fig. 2, in this embodiment, when a server fails, the log collecting module 3 cannot collect a server system log or a BMC log, and at this time, the log collecting module 3 activates the bluetooth communication module, changes the name of bluetooth to the number of the server where the log collecting module is located according to the number of the server, and makes bluetooth in a state where it can be found and paired. The log summarizing device in the machine room where the server is located is connected to the bluetooth and obtains the devices in the third storage area 3 and the second storage area 6 and the first storage area 4 of the server. After the log data is transmitted through bluetooth, the log collection module 3 turns off the bluetooth communication module.
By the method, the system logs of the server and the BMC logs of the server are stored in real time, log content is analyzed, and the system logs of the server and the BMC logs before and after operation which possibly affect the stability of the server are combined and stored in an independent storage space. When the server fails, the log which may cause the server crash can be almost completely saved, so that the operation and maintenance personnel can efficiently locate the problem.
As shown in fig. 3, in yet another aspect of the present invention, there is also provided a computer apparatus, including:
at least one processor 21; and
a memory 22, said memory 22 storing computer instructions 23 executable on said processor 21, said instructions 23 when executed by said processor 21 implementing a server log collection method comprising the steps of:
acquiring a system log and a BMC log in real time, and respectively storing the system log and the BMC log into a first storage area and a second storage area;
and analyzing log information in the system log and/or the BMC log, and storing the system log and/or the BMC log into a third storage area in response to the system log and/or the BMC log matching a preset log rule.
In some embodiments of the invention, responding to the system log and/or BMC log matching a predetermined log rule comprises:
analyzing the obtained system log, and in response to sensitive operation in the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In some embodiments of the present invention, the responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the obtained system log, and if the resources of the server are fully loaded in response to the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In some embodiments of the present invention, responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the acquired BMC log of the server, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server, merging and storing the system log of the server and the BMC log of the server in a second preset time before and after the BMC log in the third storage area.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively includes:
analyzing the obtained system log, and adding a first preset mark into the system log of the server in a first preset time before and after the system log and storing the first preset mark in the first storage area in response to the fact that sensitive operation is related to and/or resources of the server are fully loaded in an analysis result of the system log;
analyzing the acquired BMC log of the server, and adding a second preset mark to the BMC log of the server in a second preset time before and after the BMC log and storing the second preset mark in the second storage area in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively further includes:
analyzing the acquired BMC logs of the server and the system log, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC logs of the server, and if full load and/or sensitive operation occurs to the resources of the server in the analysis result of the system log of the server, merging and storing the system log of the server and the BMC log of the server in the third storage area in a second preset time before and after the BMC log.
In some embodiments of the invention, the steps further comprise:
in response to the log data of the first storage area and the second storage area being higher than the guard value, old log data to which the first or second flag is not added will be preferentially deleted according to the log data writing time.
And in response to the log data of the third storage area being higher than the warning value, deleting the first-written log data according to the writing time of the log data.
In some embodiments of the present invention, in response to the server failing, log data in the third storage area, the first storage area, and the second storage area is output by wireless transmission.
As shown in fig. 4, still another aspect of the present invention further proposes a computer readable storage medium 401 storing a computer program 402, which when executed by a processor implements a method for collecting server logs, comprising the steps of: acquiring a system log and a BMC log in real time, and respectively storing the system log and the BMC log into a first storage area and a second storage area;
and analyzing log information in the system log and/or the BMC log, and storing the system log and/or the BMC log into a third storage area in response to the system log and/or the BMC log matching a preset log rule.
In some embodiments of the invention, responding to the system log and/or BMC log matching a predetermined log rule comprises:
analyzing the obtained system log, and in response to sensitive operation in the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In some embodiments of the present invention, the responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the obtained system log, and if the resources of the server are fully loaded in response to the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log.
In some embodiments of the present invention, responding to the system log and/or BMC log matching a predetermined log rule further comprises:
analyzing the acquired BMC log of the server, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server, merging and storing the system log of the server and the BMC log of the server in a second preset time before and after the BMC log in the third storage area.
In some embodiments of the present invention, obtaining a system log and a BMC log in real time, and storing the system log and the BMC log in a first storage area and a second storage area respectively includes:
analyzing the obtained system log, and adding a first preset mark into the system log of the server in a first preset time before and after the system log and storing the first preset mark in the first storage area in response to the fact that sensitive operation is related to and/or resources of the server are fully loaded in an analysis result of the system log;
analyzing the acquired BMC log of the server, and adding a second preset mark to the BMC log of the server in a second preset time before and after the BMC log and storing the second preset mark in the second storage area in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server.
In some embodiments of the present invention, a system log and a BMC log are obtained in real time, and the system log and the BMC log are respectively stored in a first storage area and a second storage area, and the method further includes:
analyzing the acquired BMC logs of the server and the system log, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC logs of the server, and if full load and/or sensitive operation occurs to the resources of the server in the analysis result of the system log of the server, merging and storing the system log of the server and the BMC log of the server in the third storage area in a second preset time before and after the BMC log.
In some embodiments of the invention, the steps further comprise:
in response to the log data of the first storage area and the second storage area being higher than the guard value, old log data to which the first or second flag is not added will be preferentially deleted according to the log data writing time.
And in response to the log data of the third storage area being higher than the warning value, deleting the first-written log data according to the writing time of the log data.
In some embodiments of the present invention, in response to the server failing, log data in the third storage area, the first storage area, and the second storage area is output by wireless transmission.
It should be noted that, each component or step in each embodiment may be intersected, replaced, added, and deleted, and therefore, the combination formed by these reasonable permutation and combination transformations shall also belong to the protection scope of the present invention, and shall not limit the protection scope of the present invention to the embodiments.
The foregoing is an exemplary embodiment of the present disclosure, and the order in which the embodiments of the present disclosure are disclosed is merely for the purpose of description and does not represent the advantages or disadvantages of the embodiments. It should be noted that the above discussion of any of the embodiments is merely exemplary and is not intended to suggest that the scope of the disclosure of embodiments of the invention (including the claims) is limited to these examples and that various changes and modifications may be made without departing from the scope of the invention as defined in the claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, and the like, which are made within the spirit and principles of the embodiments of the invention, are included within the scope of the embodiments of the invention.

Claims (3)

1. A server log collection method, comprising:
acquiring a system log and a BMC log in real time, and respectively storing the system log and the BMC log into a first storage area and a second storage area;
analyzing log information in the system log and/or the BMC log, storing the system log and/or the BMC log in a third storage area in response to the system log and/or the BMC log matching a predetermined log rule,
the responding to the system log and/or BMC log matching a predetermined log rule comprises:
analyzing the acquired system log, and in response to sensitive operation in the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log;
analyzing the obtained system log, and if the resources of the server are fully loaded in response to the analysis result of the system log, merging and storing the system log of the server and the BMC log of the server in the third storage area in a first preset time before and after the system log;
analyzing the acquired BMC log of the server, and in response to the abnormal state of the equipment of the server in the analysis result of the BMC log of the server, merging and storing the system log of the server and the BMC log of the server in a second preset time before and after the BMC log in the third storage area;
the obtaining the system log and the BMC log in real time, and the storing the system log and the BMC log in a first storage area and a second storage area respectively includes:
analyzing the obtained system log, and adding a first preset mark into the system log of the server in a first preset time before and after the system log and storing the first preset mark in the first storage area in response to the fact that sensitive operation is related to and/or resources of the server are fully loaded in an analysis result of the system log;
analyzing the acquired BMC log of the server, and adding a second preset mark to the BMC log of the server in a second preset time before and after the BMC log and storing the second preset mark in the second storage area in response to the abnormal state of equipment of the server in the analysis result of the BMC log of the server;
analyzing the acquired BMC logs of the server and the system log, and in response to abnormal state of equipment of the server in the analysis result of the BMC logs of the server, and if full load and/or sensitive operation occurs to resources of the server in the analysis result of the system log of the server, merging and storing the system log of the server and the BMC log of the server in the third storage area in a second preset time before and after the BMC log;
and, the method further comprises:
in response to the log data of the first storage area and the second storage area being higher than an alert value, old log data to which the first or second flag is not added will be preferentially deleted according to the log data writing time;
deleting the first written log data according to the writing time of the log data in response to the log data of the third storage area being higher than the guard value;
and responding to the server failure, and outputting the log data in the third storage area, the first storage area and the second storage area in a wireless transmission mode.
2. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of claim 1.
3. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of claim 1.
CN202111065397.9A 2021-09-12 2021-09-12 Server log collection method, device and readable storage medium Active CN113806127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111065397.9A CN113806127B (en) 2021-09-12 2021-09-12 Server log collection method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111065397.9A CN113806127B (en) 2021-09-12 2021-09-12 Server log collection method, device and readable storage medium

Publications (2)

Publication Number Publication Date
CN113806127A CN113806127A (en) 2021-12-17
CN113806127B true CN113806127B (en) 2024-02-13

Family

ID=78895092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111065397.9A Active CN113806127B (en) 2021-09-12 2021-09-12 Server log collection method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN113806127B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691223B (en) * 2022-03-21 2023-08-22 深圳市同泰怡信息技术有限公司 Method and device for transmitting BIOS logs through network
CN116383012B (en) * 2023-05-26 2023-08-18 苏州浪潮智能科技有限公司 Method and device for acquiring boot log and method for transmitting boot log

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03225536A (en) * 1990-01-31 1991-10-04 Nec Corp Method and device for log data collection
JP2000047909A (en) * 1998-07-31 2000-02-18 Nec Corp Device and method for recording system log, and storage medium
JP2018160009A (en) * 2017-03-22 2018-10-11 Necプラットフォームズ株式会社 Failure information processing program, computer, failure notification method, and computer system
CN109086155A (en) * 2018-07-27 2018-12-25 郑州云海信息技术有限公司 Server failure localization method, device, equipment and computer readable storage medium
CN109726091A (en) * 2018-12-28 2019-05-07 乐蜜有限公司 A kind of blog management method and relevant apparatus
CN109753413A (en) * 2019-01-09 2019-05-14 郑州云海信息技术有限公司 A kind of system log resolution system being integrated in server internal
CN111143181A (en) * 2019-12-26 2020-05-12 苏州浪潮智能科技有限公司 Server maintenance method, system, equipment and computer readable storage medium
CN111427743A (en) * 2020-03-13 2020-07-17 苏州浪潮智能科技有限公司 BMC monitoring log processing method, device, equipment and medium
WO2020233077A1 (en) * 2019-05-21 2020-11-26 深圳壹账通智能科技有限公司 System service monitoring method, device, and apparatus, and storage medium
CN112231130A (en) * 2020-09-18 2021-01-15 苏州浪潮智能科技有限公司 Method, system, equipment and medium for positioning fault according to log

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010033678A (en) * 2008-07-30 2010-02-12 Toshiba Storage Device Corp Disk device, circuit board, and error log information recording method
JP6098146B2 (en) * 2012-12-10 2017-03-22 株式会社リコー Information processing apparatus, information processing method, and program
WO2018090249A1 (en) * 2016-11-16 2018-05-24 Huawei Technologies Co., Ltd. Log-structured storage method and server
CN108875075A (en) * 2018-07-09 2018-11-23 深圳市道通智能航空技术有限公司 The storage method and unmanned plane image transmission system of UAV system log

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03225536A (en) * 1990-01-31 1991-10-04 Nec Corp Method and device for log data collection
JP2000047909A (en) * 1998-07-31 2000-02-18 Nec Corp Device and method for recording system log, and storage medium
JP2018160009A (en) * 2017-03-22 2018-10-11 Necプラットフォームズ株式会社 Failure information processing program, computer, failure notification method, and computer system
CN109086155A (en) * 2018-07-27 2018-12-25 郑州云海信息技术有限公司 Server failure localization method, device, equipment and computer readable storage medium
CN109726091A (en) * 2018-12-28 2019-05-07 乐蜜有限公司 A kind of blog management method and relevant apparatus
CN109753413A (en) * 2019-01-09 2019-05-14 郑州云海信息技术有限公司 A kind of system log resolution system being integrated in server internal
WO2020233077A1 (en) * 2019-05-21 2020-11-26 深圳壹账通智能科技有限公司 System service monitoring method, device, and apparatus, and storage medium
CN111143181A (en) * 2019-12-26 2020-05-12 苏州浪潮智能科技有限公司 Server maintenance method, system, equipment and computer readable storage medium
CN111427743A (en) * 2020-03-13 2020-07-17 苏州浪潮智能科技有限公司 BMC monitoring log processing method, device, equipment and medium
CN112231130A (en) * 2020-09-18 2021-01-15 苏州浪潮智能科技有限公司 Method, system, equipment and medium for positioning fault according to log

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Windows操作系统日志安全的防范手段及设想;刘桂英;;硅谷(第20期);114 *
硬盘数据隐藏方法研究;高志鹏;尤俊生;;保密科学技术(第10期);38-42 *

Also Published As

Publication number Publication date
CN113806127A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
US11360842B2 (en) Fault processing method, related apparatus, and computer
CN113806127B (en) Server log collection method, device and readable storage medium
CN106598790A (en) Server hardware failure detection method, apparatus of server, and server
CN107241229B (en) Service monitoring method and device based on interface testing tool
KR101712172B1 (en) The preliminary diagnosis and analysis and recovery system of computer error, and method thereof
CN111274059A (en) Software exception handling method and device for slave equipment
EP3534259B1 (en) Computer and method for storing state and event log relevant for fault diagnosis
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN111290893A (en) OSES (open service systems) read log testing device, method, terminal and storage medium
CN115470056A (en) Method, system, device and medium for troubleshooting power-on starting of server hardware
CN112231170B (en) Data interaction card supervision method, system, terminal and storage medium
CN114816022A (en) Server power supply abnormity monitoring method, system and storage medium
CN114816822A (en) Server management method, device and system based on memory fault
CN106610878A (en) Fault debugging method for dual-controller system
CN106909489B (en) Method and device for testing EventLog state
CN111865719A (en) Automatic testing method and device for fault injection of switch
CN113708986A (en) Server monitoring apparatus, method and computer-readable storage medium
CN115150254B (en) PCIe link fault detection method, detection device, equipment and medium
CN113900890B (en) Method, device, equipment and medium for collecting server component information
CN113867994B (en) Cabinet VPD information processing method and device, storage equipment and readable storage medium
CN112463504B (en) Double-control storage product testing method, system, terminal and storage medium
CN115687056A (en) Test method and device for database storage engine and electronic equipment
CN117234862A (en) Method, system, terminal and medium for alarming health condition of server memory
CN117687849A (en) Server fault test method and device, electronic equipment and storage medium
CN116489001A (en) Switch fault diagnosis and recovery method and device, switch and storage medium

Legal Events

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