CN115114898A - Method, device, equipment and medium for analyzing operation and maintenance logs of server - Google Patents

Method, device, equipment and medium for analyzing operation and maintenance logs of server Download PDF

Info

Publication number
CN115114898A
CN115114898A CN202210735442.5A CN202210735442A CN115114898A CN 115114898 A CN115114898 A CN 115114898A CN 202210735442 A CN202210735442 A CN 202210735442A CN 115114898 A CN115114898 A CN 115114898A
Authority
CN
China
Prior art keywords
analyzed
log
text field
fault
comparison table
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
Application number
CN202210735442.5A
Other languages
Chinese (zh)
Inventor
王书博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210735442.5A priority Critical patent/CN115114898A/en
Publication of CN115114898A publication Critical patent/CN115114898A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a method, a device, equipment and a medium for analyzing an operation and maintenance log of a server. The method comprises the following steps: obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed; the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table. By adopting the method, the user-defined log is not required to be wholly analyzed, and only the text field to be analyzed is required to be analyzed so as to obtain the descriptive text containing the fault information, thereby improving the analysis efficiency; and by analyzing the custom log, the problem that the difficulty of operation and maintenance of the server is high because an engineer can acquire fault information only by comparing documents one by one because the custom log cannot be analyzed in the prior art is solved.

Description

Method, device, equipment and medium for analyzing operation and maintenance logs of server
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a medium for parsing an operation and maintenance log of a server.
Background
The server operation and maintenance log records every detail of the server operation and plays an important role in stable operation of the server. By checking the operation and maintenance logs of the server, the user can find out the position and the type of the server with the fault in time.
A more common server operation and maintenance Log is a System Event Log (SEL), which includes a standard Log and a manufacturer's custom Log. A user may parse a standard log into a descriptive text through a standard log parsing Tool, such as an Intelligent Platform Management Interface Tool (IPMI Tool), so as to determine an event, an error, and a fault occurring in the server during the operation process.
However, the standard log parsing tool cannot parse the custom log into a descriptive text, which causes the user to need to interpret the document one by one, and cannot intuitively obtain specific information included in the log, thereby increasing difficulty in operation and maintenance of the server.
Disclosure of Invention
Therefore, the method, the device, the equipment and the medium for analyzing the operation and maintenance logs of the server are provided, and the difficulty of the operation and maintenance of the server is reduced.
In a first aspect, a method for parsing an operation and maintenance log of a server is provided, where the method includes:
obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed;
the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
With reference to the first aspect, in a first implementable manner of the first aspect, the step of comparing the text field to be parsed in the comparison table to obtain a position and a sequence of the text field to be parsed in the comparison table, and obtaining a descriptive text including fault information according to the position and the sequence of the text field to be parsed in the comparison table includes:
acquiring each target system data of the text field to be analyzed;
circularly searching each target system data in the comparison table to obtain the position of each target system data in the comparison table and a corresponding fault character, wherein the comparison table is used for indicating the mapping relation between the system data and the fault character;
obtaining a sequence of the text field to be analyzed in the comparison table according to the position of each target system data in the comparison table and the corresponding fault character;
and obtaining a descriptive text comprising fault information according to the sequence of the text field to be analyzed in the comparison table.
With reference to the first aspect, in a second implementable manner of the first aspect, the step of decomposing the custom log to obtain a text field to be parsed includes:
scanning the custom log, and calling a decomposition function when the custom log is scanned to include an identifier;
and decomposing the user-defined log through the decomposition function to obtain the text field to be analyzed.
With reference to the first aspect, in a third implementable manner of the first aspect, the step of decomposing the custom log by using the decomposition function to obtain the text field to be parsed includes:
acquiring a preset decomposition digit, and decomposing the user-defined log data according to the decomposition digit to obtain at least one text field;
acquiring preset standard definition information, and determining the text field to be analyzed from at least one text field according to the standard definition information, wherein the standard definition information is used for indicating the starting address and the ending address of the text field to be analyzed.
With reference to the first aspect, in a fourth implementable manner of the first aspect, the step of decomposing the custom log to obtain a text field to be parsed includes:
acquiring a preset fault device type template;
and decomposing the user-defined log according to the fault device type template to obtain a text field to be analyzed including the fault device type.
With reference to the first aspect, in a fifth implementable manner of the first aspect, the step of decomposing the custom log to obtain a text field to be parsed includes:
acquiring a preset fault device identification number template;
and decomposing the user-defined log according to the fault device identification number template to obtain a text field to be analyzed, wherein the text field comprises the fault device identification number.
With reference to the first aspect, in a sixth implementable manner of the first aspect, the step of decomposing the custom log to obtain a text field to be parsed includes:
acquiring a preset fault type template;
and decomposing the user-defined log according to the fault type template to obtain a text field to be analyzed including the fault type.
In a second aspect, an apparatus for parsing a server operation and maintenance log is provided, where the apparatus includes:
the decomposition unit is used for acquiring a custom log and decomposing the custom log to obtain a text field to be analyzed;
and the analysis unit is used for acquiring a preset comparison table, comparing the text field to be analyzed in the comparison table to obtain the position and the sequence of the text field to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the position and the sequence of the text field to be analyzed in the comparison table.
In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed;
the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed;
the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
According to the analysis method and device for the server operation and maintenance log, the computer equipment and the storage medium, the user-defined log is obtained and decomposed to obtain the text field to be analyzed; acquiring a preset comparison table, comparing the text field to be analyzed in the comparison table to obtain the position and the sequence of the text field to be analyzed in the comparison table, and acquiring a descriptive text including fault information according to the position and the sequence of the text field to be analyzed in the comparison table; by using the method, the user-defined log is not required to be wholly analyzed, and only the text field to be analyzed is required to be analyzed to obtain the descriptive text containing the fault information, so that the analysis efficiency is improved; and by analyzing the custom log, the problem that the difficulty of operation and maintenance of the server is high because an engineer can acquire fault information only by comparing documents one by one because the custom log cannot be analyzed in the prior art is solved.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for parsing a server operation log according to an embodiment;
FIG. 2 is a flowchart illustrating the step of converting a text field to be parsed in one embodiment;
FIG. 3 is a flowchart illustrating the step of parsing the custom log in one embodiment;
FIG. 4 is a flowchart illustrating the step of parsing the custom log in one embodiment;
FIG. 5 is a flowchart illustrating the step of parsing the custom log in one embodiment;
FIG. 6 is a flowchart illustrating the step of parsing the custom log in one embodiment;
FIG. 7 is a flowchart illustrating the step of parsing the custom log in one embodiment;
FIG. 8 is a block diagram illustrating an exemplary embodiment of a device for parsing server operation and maintenance logs;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The structures, proportions, sizes, and other dimensions shown in the drawings and described in the specification are for understanding and reading the present disclosure, and are not intended to limit the scope of the present disclosure, which is defined in the claims, and are not essential to the art, and any structural modifications, changes in proportions, or adjustments in size, which do not affect the efficacy and attainment of the same are intended to fall within the scope of the present disclosure.
References in this specification to "upper", "lower", "left", "right", "middle", "longitudinal", "lateral", "horizontal", "inner", "outer", "radial", "circumferential", etc., indicate orientations and positional relationships based on those shown in the drawings, and are for convenience only to simplify the description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
By looking at the server operation and maintenance Log, the user can determine the location and reason of the server failure, wherein a System Event Log (SEL) is more commonly used. The system event log comprises a standard log and a custom log, and for the standard log, a user can analyze the standard log through a standard log analysis tool so as to obtain fault information. However, the standard log analysis tool cannot analyze the custom log, so that the user needs to read the document one by one to obtain the fault information, which increases the difficulty of the user in operation and maintenance of the server.
Therefore, the application provides a method, a device, equipment and a medium for analyzing a server operation and maintenance log, wherein the method comprises the following steps: splitting the user-defined log to obtain a text field to be analyzed; and comparing the text field to be analyzed with a preset comparison table, so as to convert the text field to be analyzed into a descriptive text, wherein the comparison table is used for indicating the mapping relation between the binary data and the fault character. By adopting the method, the whole user-defined log does not need to be analyzed, and only the text field to be analyzed needs to be analyzed, so that the descriptive text containing the fault information can be obtained, and the efficiency of log analysis is improved; and the user can acquire the fault information contained in the custom log through the descriptive text, so that the log analysis compatibility is improved, the problem that the user needs to read the custom log one by contrasting the documents in the prior art is also improved, and the difficulty in the operation and maintenance of the server is reduced.
In one embodiment, as shown in fig. 1, a method for parsing a server operation and maintenance log is provided, including the following steps:
s1: and obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed.
Note that the custom log is a log related to a Central Processing Unit (CPU) and defined by a manufacturer. The user-defined log is split to obtain the text field to be analyzed, so that the text field to be analyzed can be directly analyzed subsequently, the whole user-defined log is not required to be analyzed, and the log analysis efficiency is improved.
S2: the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
It should be noted that, the comparison table is used to indicate a mapping relationship between the binary data and the fault character, and compare the text field to be analyzed in the comparison table to obtain a position of the text field to be analyzed in the comparison table; determining a corresponding sequence of the text field to be analyzed in the comparison table according to the position of the text field to be analyzed in the comparison table; and obtaining the descriptive text including the fault information according to the position and the sequence of the text field to be analyzed in the comparison table without reading the document one by one. Illustratively, the fault information may include: a failed device type, a failed device identification number, and a failure type. The user can determine whether the server has a fault according to the descriptive text, and if the server has the fault, the type and the identification number of the device having the fault and the specific fault type of the device can be further determined, so that the user can operate and maintain the server, and the operation and maintenance difficulty of the server is reduced.
The above steps can adopt various timing control modes, such as a parallel timing control mode and a serial timing control mode. From the perspective of improving the efficiency of log parsing, in this embodiment, a parallel timing control manner may be adopted, for example, when mapping each target system data of the text field to be parsed into a corresponding fault character according to the comparison table, each target system data may be mapped at the same time, and the fault characters obtained after mapping are sorted according to the arrangement order of the original target system data, so as to determine the sequence of the text field to be parsed in the comparison table. In other embodiments, a serial timing control manner may also be adopted, for example, when mapping each target system data of the text field to be analyzed to a corresponding fault character according to the comparison table, each target system data may be mapped to a corresponding fault character in sequence according to the sequence of each target system data of the text field to be analyzed, and then sequencing is performed, so as to determine the sequence of the text field to be analyzed in the comparison table.
In the analysis method of the server operation and maintenance log, a text field to be analyzed is obtained by decomposing the custom log; comparing the text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table; by using the method, the user-defined log is not required to be wholly analyzed, and only the text field to be analyzed is required to be analyzed to obtain the descriptive text containing the fault information, so that the analysis efficiency is improved; by analyzing the custom log, documents do not need to be compared and read one by one, and the problem that in the prior art, the custom log cannot be analyzed, so that an engineer can acquire fault information only by comparing the documents one by one, and the difficulty of operation and maintenance of the server is high is solved.
As a specific implementation manner of the foregoing embodiment, as shown in fig. 2, the step of comparing the text field to be analyzed in the comparison table to obtain a position and a sequence of the text field to be analyzed in the comparison table, and obtaining a descriptive text including fault information according to the position and the sequence of the text field to be analyzed in the comparison table includes:
s21: acquiring each target system data of the text field to be analyzed;
s22: circularly searching each target system data in the comparison table to obtain the position of each target system data in the comparison table and a corresponding fault character, wherein the comparison table is used for indicating the mapping relation between the system data and the fault character;
s23: obtaining a sequence of the text field to be analyzed in the comparison table according to the position of each target system data in the comparison table and the corresponding fault character;
s24: and obtaining a descriptive text comprising fault information according to the sequence of the text field to be analyzed in the comparison table.
It should be noted that the text field to be parsed includes at least one target binary data, where the type of the target binary data may be 16, 8, or 2, and the like, and the present application is not limited herein. The step of parsing the text field to be parsed into the descriptive text may be implemented by calling a function, which illustratively shows that each target system data of the text field to be parsed is searched in the comparison table and mapped into a corresponding fault character by calling the function; then, sequencing is carried out according to each fault character, and a sequence of the text field to be analyzed in the comparison table can be obtained; and then aggregating the sequences to obtain a descriptive text containing fault information.
As a specific implementation manner of the foregoing embodiment, as shown in fig. 3, the step of decomposing the custom log to obtain a text field to be parsed includes:
s11: scanning the custom log, and calling a decomposition function when the custom log is scanned to include an identifier;
s12: and decomposing the user-defined log through the decomposition function to obtain the text field to be analyzed.
It should be noted that an identification bit is preset in a custom log of a manufacturer, the custom log is scanned to check whether the custom log includes the identification bit, if so, the custom log is determined to be a log meeting the specification defined by the manufacturer, and a decomposition function is called to decompose the custom log to obtain the text field to be analyzed. The phenomenon that the error analysis operation is caused by decomposing the logs which do not accord with the custom specification of a manufacturer can be avoided to a certain extent.
As a specific implementation manner of the foregoing embodiment, as shown in fig. 4, the step of decomposing the custom log by using the decomposition function to obtain the text field to be analyzed includes:
s121: acquiring a preset decomposition digit, and decomposing the user-defined log data according to the decomposition digit to obtain at least one text field;
s122: acquiring preset standard definition information, and determining the text field to be analyzed from at least one text field according to the standard definition information, wherein the standard definition information is used for indicating the starting address and the ending address of the text field to be analyzed.
For example, assuming that the custom log includes 64-bit target system data, and the preset decomposition bit number is 8 bits, the custom log may be decomposed into 8 text fields; the standard definition information is obtained by self-defining by a manufacturer and is used for indicating the starting address and the ending address of the text field to be analyzed; and determining a text field to be analyzed according to the starting address and the ending address.
As a specific implementation manner of the foregoing embodiment, as shown in fig. 5, the step of decomposing the custom log to obtain a text field to be parsed includes:
s131: acquiring a preset fault device type template;
s132: and decomposing the user-defined log according to the fault device type template to obtain a text field to be analyzed including the fault device type.
It should be noted that the fault device type template is obtained by the customization of the manufacturer, and the customized log is decomposed according to the fault device type template, so that the text field to be analyzed including the fault device type can be obtained. According to the analysis mode of the text field to be analyzed, the text field to be analyzed including the type of the fault device can be converted into the descriptive text including the type of the fault device, and a user can visually and definitely recognize the type of the fault device, so that operation and maintenance operations are performed on the server in a targeted manner, and the difficulty in operation and maintenance of the server is reduced to a certain extent. The above detailed description is made of the parsing manner of the text field to be parsed, and the related description is referred to the above, which is not repeated herein.
As a further implementation manner of the foregoing embodiment, as shown in fig. 6, the step of decomposing the custom log to obtain a text field to be parsed includes:
s141: acquiring a preset fault device identification number template;
s142: and decomposing the user-defined log according to the fault device identification number template to obtain a text field to be analyzed comprising the fault device identification number.
It should be noted that the fault device identification number template is obtained by a manufacturer through customization, and the customized log is decomposed according to the fault device identification number template, so that a text field to be analyzed including the fault device identification number can be obtained. According to the analysis mode of the text field to be analyzed, the text field to be analyzed including the identification number of the fault device can be converted into the descriptive text including the identification number of the fault device, and a user can visually and definitely recognize the specific device with the fault, so that operation and maintenance operations are performed on the server in a targeted manner, and the difficulty in operation and maintenance of the server is further reduced. The above is described in detail in terms of the parsing manner of the text field to be parsed, and for related description, reference is made to the above, which is not repeated herein.
As a further implementation manner of the foregoing embodiment, as shown in fig. 7, the step of decomposing the custom log to obtain a text field to be parsed includes:
s151: acquiring a preset fault type template;
s152: and decomposing the user-defined log according to the fault type template to obtain a text field to be analyzed including the fault type.
It should be noted that the fault type template is obtained by a manufacturer through customization, and the customized log is decomposed according to the fault type template, so that a text field to be analyzed including a fault type can be obtained. According to the analysis mode of the text field to be analyzed, the text field to be analyzed including the fault type can be converted into the descriptive text including the fault type, and a user can intuitively and certainly identify the specific reason of the fault, so that operation and maintenance operations are performed on the server in a targeted manner, and the difficulty of operation and maintenance of the server is further reduced. The above detailed description is made of the parsing manner of the text field to be parsed, and the related description is referred to the above, which is not repeated herein.
The method for obtaining the text field to be analyzed including the type of the fault device, the identification number of the fault device and the type of the fault can adopt various time sequence control modes, such as a parallel time sequence control mode and a serial time sequence control mode. From the perspective of improving the log analysis efficiency, in this embodiment, a parallel time sequence control mode may be adopted to simultaneously obtain a preset fault device type template, a fault device identification number template, and a fault type template; then, decomposing the self-defined log according to the fault device type template, the fault device identification number template and the fault type template to obtain a text field to be analyzed including the fault device type, the fault device identification number and the fault type and other text fields which do not need to be analyzed; and subsequently, analyzing the text field to be analyzed including the type of the fault device, the identification number of the fault device and the fault type at the same time to obtain a descriptive text including the type of the fault device, the identification number of the fault device and the fault type. In other embodiments, a serial timing control manner may be adopted, and the acquisition of the preset time sequences of the failed device type template, the failed device identification number template, and the failed device type template need not be performed in sequence, which is not described herein again.
The user-defined log is decomposed into text fields to be analyzed including the type of the fault device, the identification number of the fault device, the type of the fault device and text fields which do not need to be analyzed and other text fields which do not need to be analyzed by obtaining a template of the type of the fault device, a template of the identification number of the fault device and a template of the type of the fault device; and subsequently, only the field to be analyzed needs to be analyzed, and the whole user-defined log does not need to be analyzed, so that the log analysis efficiency is improved.
It should be understood that although the various steps in the flow charts of fig. 1-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided a parsing apparatus for a server operation and maintenance log, including: a decomposition unit and an analysis unit, wherein:
the decomposition unit is used for acquiring a custom log and decomposing the custom log to obtain a text field to be analyzed;
and the analysis unit is used for acquiring a preset comparison table, comparing the text field to be analyzed in the comparison table to obtain the position and the sequence of the text field to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the position and the sequence of the text field to be analyzed in the comparison table.
Specifically, the analyzing unit compares the text field to be analyzed in the comparison table to obtain the position and the sequence of the text field to be analyzed in the comparison table, and obtains the descriptive text including the fault information according to the position and the sequence of the text field to be analyzed in the comparison table, including: acquiring target system data of the text field to be analyzed; circularly searching each target system data in the comparison table to obtain the position of each target system data in the comparison table and a corresponding fault character, wherein the comparison table is used for indicating the mapping relation between the system data and the fault character; obtaining a sequence of the text field to be analyzed in the comparison table according to the position of each target system data in the comparison table and the corresponding fault character; and obtaining a descriptive text comprising fault information according to the sequence of the text field to be analyzed in the comparison table.
Specifically, the step of decomposing the user-defined log by the decomposition unit to obtain the text field to be analyzed includes: scanning the custom log, and calling a decomposition function when the custom log is scanned to include an identifier; and decomposing the user-defined log through the decomposition function to obtain the text field to be analyzed.
Specifically, the step of decomposing the user-defined log by the decomposition unit through the decomposition function to obtain the text field to be analyzed includes: acquiring a preset decomposition digit, and decomposing the user-defined log data according to the decomposition digit to obtain at least one text field; acquiring preset standard definition information, and determining the text field to be analyzed from at least one text field according to the standard definition information, wherein the standard definition information is used for indicating the starting address and the ending address of the text field to be analyzed.
Specifically, the step of decomposing the user-defined log by the decomposition unit to obtain the text field to be analyzed includes: acquiring a preset fault device type template; and decomposing the user-defined log according to the fault device type template to obtain a text field to be analyzed including the fault device type.
Specifically, the step of decomposing the user-defined log by the decomposition unit to obtain a text field to be analyzed includes: acquiring a preset fault device identification number template; and decomposing the user-defined log according to the fault device identification number template to obtain a text field to be analyzed comprising the fault device identification number.
Specifically, the step of decomposing the user-defined log by the decomposition unit to obtain a text field to be analyzed includes: acquiring a preset fault type template; and decomposing the user-defined log according to the fault type template to obtain a text field to be analyzed including the fault type.
For specific limitations of the parsing apparatus for the server operation and maintenance log, reference may be made to the above limitations on the parsing method for the server operation and maintenance log, which are not described herein again. All or part of the modules in the analysis device for the server operation and maintenance log can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to realize a method for analyzing the operation and maintenance log of the server. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
s1: obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed;
s2: the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s21: acquiring target system data of the text field to be analyzed;
s22: circularly searching each target system data in the comparison table to obtain the position of each target system data in the comparison table and a corresponding fault character, wherein the comparison table is used for indicating the mapping relation between the system data and the fault character;
s23: obtaining a sequence of the text field to be analyzed in the comparison table according to the position of each target system data in the comparison table and the corresponding fault character;
s24: and obtaining a descriptive text comprising fault information according to the sequence of the text field to be analyzed in the comparison table.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s11: scanning the custom log, and calling a decomposition function when the custom log is scanned to include an identifier;
s12: and decomposing the user-defined log through the decomposition function to obtain the text field to be analyzed.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s121: acquiring a preset decomposition digit, and decomposing the user-defined log data according to the decomposition digit to obtain at least one text field;
s122: acquiring preset standard definition information, and determining the text field to be analyzed from at least one text field according to the standard definition information, wherein the standard definition information is used for indicating the starting address and the ending address of the text field to be analyzed.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s131: acquiring a preset fault device type template;
s132: and decomposing the user-defined log according to the fault device type template to obtain a text field to be analyzed including the fault device type.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s141: acquiring a preset fault device identification number template;
s142: and decomposing the user-defined log according to the fault device identification number template to obtain a text field to be analyzed comprising the fault device identification number.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
s151: acquiring a preset fault type template;
s152: and decomposing the user-defined log according to the fault type template to obtain a text field to be analyzed, which comprises the fault type.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
s1: obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed;
s2: the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s21: acquiring target system data of the text field to be analyzed;
s22: circularly searching each target system data in the comparison table to obtain the position of each target system data in the comparison table and a corresponding fault character, wherein the comparison table is used for indicating the mapping relation between the system data and the fault character;
s23: obtaining a sequence of the text field to be analyzed in the comparison table according to the position of each target system data in the comparison table and the corresponding fault character;
s24: and obtaining a descriptive text comprising fault information according to the sequence of the text field to be analyzed in the comparison table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s11: scanning the custom log, and calling a decomposition function when the custom log is scanned to include an identifier;
s12: and decomposing the user-defined log through the decomposition function to obtain the text field to be analyzed.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s121: acquiring a preset decomposition digit, and decomposing the user-defined log data according to the decomposition digit to obtain at least one text field;
s122: acquiring preset standard definition information, and determining the text field to be analyzed from at least one text field according to the standard definition information, wherein the standard definition information is used for indicating the starting address and the ending address of the text field to be analyzed.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s131: acquiring a preset fault device type template;
s132: and decomposing the user-defined log according to the fault device type template to obtain a text field to be analyzed including the fault device type.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s141: acquiring a preset fault device identification number template;
s142: and decomposing the user-defined log according to the fault device identification number template to obtain a text field to be analyzed comprising the fault device identification number.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s151: acquiring a preset fault type template;
s152: and decomposing the user-defined log according to the fault type template to obtain a text field to be analyzed including the fault type.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A method for analyzing a server operation and maintenance log is characterized by comprising the following steps:
obtaining a custom log, and decomposing the custom log to obtain a text field to be analyzed;
the method comprises the steps of obtaining a preset comparison table, comparing text fields to be analyzed in the comparison table to obtain the positions and sequences of the text fields to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the positions and sequences of the text fields to be analyzed in the comparison table.
2. The method for parsing the server operation and maintenance log according to any one of claim 1, wherein the step of comparing the text field to be parsed in the lookup table to obtain a position and a sequence of the text field to be parsed in the lookup table, and obtaining a descriptive text including fault information according to the position and the sequence of the text field to be parsed in the lookup table includes:
acquiring target system data of the text field to be analyzed;
circularly searching each target system data in the comparison table to obtain the position of each target system data in the comparison table and a corresponding fault character, wherein the comparison table is used for indicating the mapping relation between the system data and the fault character;
obtaining a sequence of the text field to be analyzed in the comparison table according to the position of each target system data in the comparison table and the corresponding fault character;
and obtaining a descriptive text comprising fault information according to the sequence of the text field to be analyzed in the comparison table.
3. The method for parsing the operation and maintenance log of the server according to claim 1, wherein the step of parsing the custom log to obtain a text field to be parsed comprises:
scanning the custom log, and calling a decomposition function when the custom log is scanned to include an identifier;
and decomposing the user-defined log through the decomposition function to obtain the text field to be analyzed.
4. The method for parsing the server operation and maintenance log according to claim 3, wherein the step of parsing the custom log through the parsing function to obtain the text field to be parsed includes:
acquiring a preset decomposition digit, and decomposing the user-defined log data according to the decomposition digit to obtain at least one text field;
acquiring preset standard definition information, and determining the text field to be analyzed from at least one text field according to the standard definition information, wherein the standard definition information is used for indicating the starting address and the ending address of the text field to be analyzed.
5. The method for parsing the operation and maintenance log of the server according to claim 1, wherein the step of parsing the custom log to obtain a text field to be parsed comprises:
acquiring a preset fault device type template;
and decomposing the user-defined log according to the fault device type template to obtain a text field to be analyzed, wherein the text field comprises the fault device type.
6. The method for parsing the operation and maintenance log of the server according to claim 1, wherein the step of parsing the custom log to obtain a text field to be parsed comprises:
acquiring a preset fault device identification number template;
and decomposing the user-defined log according to the fault device identification number template to obtain a text field to be analyzed comprising the fault device identification number.
7. The method for parsing the operation and maintenance log of the server according to claim 1, wherein the step of parsing the custom log to obtain a text field to be parsed comprises:
acquiring a preset fault type template;
and decomposing the user-defined log according to the fault type template to obtain a text field to be analyzed, which comprises the fault type.
8. An apparatus for parsing a server operation log, the apparatus comprising:
the decomposition unit is used for acquiring a custom log and decomposing the custom log to obtain a text field to be analyzed;
and the analysis unit is used for acquiring a preset comparison table, comparing the text field to be analyzed in the comparison table to obtain the position and the sequence of the text field to be analyzed in the comparison table, and obtaining a descriptive text comprising fault information according to the position and the sequence of the text field to be analyzed in the comparison table.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for parsing a server operation and maintenance log according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the method for parsing a server operation and maintenance log according to any one of claims 1 to 7.
CN202210735442.5A 2022-06-27 2022-06-27 Method, device, equipment and medium for analyzing operation and maintenance logs of server Pending CN115114898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210735442.5A CN115114898A (en) 2022-06-27 2022-06-27 Method, device, equipment and medium for analyzing operation and maintenance logs of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210735442.5A CN115114898A (en) 2022-06-27 2022-06-27 Method, device, equipment and medium for analyzing operation and maintenance logs of server

Publications (1)

Publication Number Publication Date
CN115114898A true CN115114898A (en) 2022-09-27

Family

ID=83330710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210735442.5A Pending CN115114898A (en) 2022-06-27 2022-06-27 Method, device, equipment and medium for analyzing operation and maintenance logs of server

Country Status (1)

Country Link
CN (1) CN115114898A (en)

Similar Documents

Publication Publication Date Title
CN110647438B (en) Event monitoring method and device, computer equipment and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN109446068B (en) Interface test method, device, computer equipment and storage medium
CN110135129B (en) Code segment protection method and device, computer equipment and storage medium
CN108804159B (en) Javascript module loading method and preprocessing method and device thereof, and computer equipment
CN108427613B (en) Abnormal interface positioning method and device, computer equipment and storage medium
CN107329894B (en) Application program system testing method and device and electronic equipment
CN109062925B (en) Method, device, computer equipment and storage medium for automatically generating insert sentences
CN109308305B (en) Monitoring data query method and device and computer equipment
CN110990362A (en) Log query processing method and device, computer equipment and storage medium
CN110955608B (en) Test data processing method, device, computer equipment and storage medium
CN109325058B (en) Rule batch comparison method, device, computer equipment and storage medium
CN111107042B (en) Message parsing method and device, computer equipment and storage medium
CN112363937B (en) Differential coverage rate testing method, differential coverage rate testing device, computer equipment and storage medium
CN113282513B (en) Interface test case generation method and device, computer equipment and storage medium
CN111324375A (en) Code management method and device, computer equipment and storage medium
CN111709026B (en) Static security detection method, device, computer equipment and storage medium
CN115809288A (en) Data conversion method, device, equipment and storage medium
CN112612706A (en) Automated testing method, computer device and storage medium
CN115114898A (en) Method, device, equipment and medium for analyzing operation and maintenance logs of server
CN111176882A (en) Specific data processing method, specific data processing device, computer equipment and storage medium
CN111901383A (en) Data request processing method and device, computer equipment and storage medium
CN113259154B (en) Method and device for informing middle station data verification, computer equipment and storage medium
CN113918384A (en) Data saving method, device, equipment and storage medium
CN112417020B (en) Service expansion realization method, device, computer equipment 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