CN113626232B - Method, device, equipment and readable medium for checking server log - Google Patents
Method, device, equipment and readable medium for checking server log Download PDFInfo
- Publication number
- CN113626232B CN113626232B CN202110736287.4A CN202110736287A CN113626232B CN 113626232 B CN113626232 B CN 113626232B CN 202110736287 A CN202110736287 A CN 202110736287A CN 113626232 B CN113626232 B CN 113626232B
- Authority
- CN
- China
- Prior art keywords
- log
- logs
- blacklist
- error
- linux system
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000004044 response Effects 0.000 claims abstract description 33
- 238000012216 screening Methods 0.000 claims abstract description 14
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012360 testing method Methods 0.000 abstract description 22
- 238000012795 verification Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 230000002159 abnormal effect Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000013515 script Methods 0.000 description 4
- 241000109539 Conchita Species 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011990 functional testing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 238000013112 stability test Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error 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/0766—Error or fault reporting or storing
- G06F11/0775—Content or structure details of the error report, e.g. specific table structure, specific error fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error 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/0766—Error or fault reporting or storing
- G06F11/0781—Error filtering or prioritizing based on a policy defined by the user or on a policy defined by a hardware/software module, e.g. according to a severity level
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
- G06F11/3072—Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/327—Alarm or error message display
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method, a device, equipment and a readable medium for checking a server log, wherein the method comprises the following steps: establishing a black list and a white list of each Linux system version log; responding to the received command of checking the server log, and judging the Linux system version of the current server; acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server; deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not; and outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log. By using the scheme of the invention, the verification efficiency can be improved, the manual repeated workload and the error rate can be effectively reduced, and the checking efficiency, accuracy and consistency of the test log are improved.
Description
Technical Field
The present invention relates to the field of computers, and more particularly, to a method, apparatus, device, and readable medium for checking server logs.
Background
The test cases of the server system are required to be checked against the system logs after the operation steps are finished, so that the whole operation of the server is ensured to be normal, the functional test also comprises a plurality of pressure, performance and stability tests, the test period of the tests is longer, the generated system logs are also very much, the current checking mode is to manually check according to the past project experience, the workload is large, and each project is not easy to unify.
The current test mode is to manually check and analyze the system log according to the abnormal log summarized by the test and the negligible log document summarized by experience. However, the manual comparison is required to have a large document content, and when the log is very large (for example, when a test with a long test cycle such as pressure and performance is performed), a large manpower time and cost are required, and the manual inspection is easy to be tired and omitted, so that the test efficiency and the test accuracy are difficult to be ensured.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, apparatus, device and readable medium for checking a server log, by using the technical solution of the present invention, the verification efficiency can be improved, the manual repeated workload and the error rate can be effectively reduced, and the checking efficiency, accuracy and consistency of the test log are improved.
Based on the above object, an aspect of an embodiment of the present invention provides a method of checking a server log, including the steps of:
establishing a black list and a white list of each Linux system version log;
responding to the received command of checking the server log, and judging the Linux system version of the current server;
acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server;
deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not;
and outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log.
According to one embodiment of the present invention, further comprising:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
According to one embodiment of the present invention, further comprising:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
According to one embodiment of the invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for checking a server log, including:
the system comprises a creation module, a storage module and a storage module, wherein the creation module is configured to create a blacklist and a whitelist of each Linux system version log;
the judging module is configured to respond to the received command for checking the server log and judge the Linux system version of the current server;
the screening module is configured to acquire and store the system logs, and screen the blacklist logs based on the blacklist corresponding to the Linux system version of the current server;
the deleting module is configured to delete the logs in the white list corresponding to the Linux system version of the current server from the screened blacklist logs, and judge whether error logs exist in the deleted blacklist logs or not;
and the output module is configured to output the deleted blacklist log in response to the fact that the deleted blacklist log does not have an error log.
According to one embodiment of the invention, the method further comprises an updating module configured to:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
According to one embodiment of the invention, the system further comprises an alarm module configured to:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
According to one embodiment of the invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
a memory storing computer instructions executable on a processor, the instructions when executed by the processor performing the steps of any of the methods described above, comprising:
establishing a black list and a white list of each Linux system version log;
responding to the received command of checking the server log, and judging the Linux system version of the current server;
acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server;
deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not;
and outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log.
According to one embodiment of the invention, the steps further comprise:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
According to one embodiment of the invention, the steps further comprise:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
According to one embodiment of the invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of any one of the methods described above, including:
establishing a black list and a white list of each Linux system version log;
responding to the received command of checking the server log, and judging the Linux system version of the current server;
acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server;
deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not;
and outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log.
According to one embodiment of the invention, the steps further comprise:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
According to one embodiment of the invention, the steps further comprise:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
According to one embodiment of the invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
The invention has the following beneficial technical effects: the method for checking the server log provided by the embodiment of the invention is characterized by establishing a black list and a white list of each Linux system version log; responding to the received command of checking the server log, and judging the Linux system version of the current server; acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server; deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not; in response to the technical scheme that no error log exists in the deleted blacklist log, the deleted blacklist log is output, so that verification efficiency can be improved, manual repeated workload and error rate can be effectively reduced, and inspection efficiency, accuracy and consistency of the test log are improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or 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 embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart diagram of a method of checking a server log in accordance with one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for checking server logs according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the 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.
Based on the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a method of checking a server log. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, establishing a black list and a white list of each Linux system version log.
And sorting, summarizing and optimizing the logs according to the reference documents obtained through test and conclusion, arranging the documents into the same format, establishing a unified blacklist library and a whitelist library under different types of systems, and realizing a unified system log checking mechanism. Meanwhile, most of the original manual analysis work can be converted into automatic analysis by means of a simple shell script, the analysis processes of all projects (all stages) are unified, all visual test experiences are shared, a black-and-white list library is optimized continuously, the time cost of manual analysis is reduced, and the test efficiency and the accuracy of test results are improved.
S2, responding to the received instruction for checking the server log, and judging the Linux system version of the current server.
The Linux system version comprises a Linux system of any version in RHEL, centos, debian, ubuntu and a Linux system of any version in sub, the formats of logs to be checked of the Linux systems of different versions are different, and the corresponding log formats are required to be checked according to each system version.
S3, acquiring and storing a system log, and screening the blacklist log based on the blacklist corresponding to the Linux system version of the current server.
All logs which are possible to be abnormal logs are screened out from the logs of the system according to a unified blacklist and used as suspected abnormal log sources, and note that different types of Linux systems have different log file names or acquisition modes, for example: the RHEL/centros version needs to check messages, mcelog, dmesg under the system log/var/log/folder, wherein when the/var/log/messages log is too large, a plurality of logs are divided, and the time is used as a suffix, such as messages-20200901, and all the logs need to be checked; the Debian/Ubuntu version needs to check syslog, dmesg under syslog/var/log/folder; the sub version needs to check the log of the messages, dmesg command print under the system log/var/log folder. Screening logs may be implemented by checking shell scripts or Linux commands, such as cat/var/log/messages |grep-i "blacklist field" > > messages-error.
S4, deleting the logs in the white list corresponding to the Linux system version of the current server from the screened blacklist logs, and judging whether error logs exist in the deleted blacklist logs.
For example, RHEL messages exist in the white list "kernel: virbr0: starting userspace STP failed, starting kernel STP", which can be excluded from suspected exception log sources by the linux command: sed-i "/kernel: virbr0: starting userspace STP failed, starting kernel STP/d" messages ".
And S5, outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log.
By the technical scheme, the verification efficiency can be improved, the manual repeated workload and the error rate can be effectively reduced, and the checking efficiency, accuracy and consistency of the test log are improved.
In a preferred embodiment of the present invention, further comprising:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log. Some logs, although error-reporting, are normal in certain situations, e.g., the project does not support a device, and the system log does not find the device, which is the normal log.
In a preferred embodiment of the present invention, further comprising:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
In a preferred embodiment of the present invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
By the technical scheme, the verification efficiency can be improved, the manual repeated workload and the error rate can be effectively reduced, and the checking efficiency, accuracy and consistency of the test log are improved.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
With the above object in view, in a second aspect of the embodiments of the present invention, there is provided an apparatus for checking a server log, as shown in fig. 2, an apparatus 200 includes:
the creation module 201 is configured to create a blacklist and a whitelist of each Linux system version log.
And sorting, summarizing and optimizing the logs according to the reference documents obtained through test and conclusion, arranging the documents into the same format, establishing a unified blacklist library and a whitelist library under different types of systems, and realizing a unified system log checking mechanism. Meanwhile, most of the original manual analysis work can be converted into automatic analysis by means of a simple shell script, the analysis processes of all projects (all stages) are unified, all visual test experiences are shared, a black-and-white list library is optimized continuously, the time cost of manual analysis is reduced, and the test efficiency and the accuracy of test results are improved.
The judging module 202 is configured to judge a Linux system version of the current server in response to receiving an instruction to check the server log.
The Linux system version comprises a Linux system of any version in RHEL, centos, debian, ubuntu and a Linux system of any version in sub, the formats of logs to be checked of the Linux systems of different versions are different, and the corresponding log formats are required to be checked according to each system version.
And the screening module 203 is configured to acquire and store the system log, and screen the blacklist log based on the blacklist corresponding to the Linux system version of the current server.
All logs which are possible to be abnormal logs are screened out from the logs of the system according to a unified blacklist and used as suspected abnormal log sources, and note that different types of Linux systems have different log file names or acquisition modes, for example: the RHEL/centros version needs to check messages, mcelog, dmesg under the system log/var/log/folder, wherein when the/var/log/messages log is too large, a plurality of logs are divided, and the time is used as a suffix, such as messages-20200901, and all the logs need to be checked; the Debian/Ubuntu version needs to check syslog, dmesg under syslog/var/log/folder; the sub version needs to check the log of the messages, dmesg command print under the system log/var/log folder. Screening logs may be implemented by checking shell scripts or Linux commands, such as cat/var/log/messages |grep-i "blacklist field" > > messages-error.
And the deleting module 204 is configured to delete the logs in the white list corresponding to the Linux system version of the current server from the screened blacklist logs, and judge whether error logs exist in the deleted blacklist logs.
For example, RHEL messages exist in the white list "kernel: virbr0: starting userspace STP failed, starting kernel STP", which can be excluded from suspected exception log sources by the linux command: sed-i "/kernel: virbr0: starting userspace STP failed, starting kernel STP/d" messages ".
And the output module 205 is configured to output the deleted blacklist log in response to the absence of the error log in the deleted blacklist log.
In a preferred embodiment of the present invention, further comprising an update module configured to:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
In a preferred embodiment of the invention, the system further comprises an alarm module configured to:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
In a preferred embodiment of the present invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor performing the method of:
establishing a black list and a white list of each Linux system version log;
responding to the received command of checking the server log, and judging the Linux system version of the current server;
acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server;
deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not;
and outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log.
In a preferred embodiment of the present invention, further comprising:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
In a preferred embodiment of the present invention, further comprising:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
In a preferred embodiment of the present invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium stores S31 a computer program S32 which, when executed by a processor, performs the following method:
establishing a black list and a white list of each Linux system version log;
responding to the received command of checking the server log, and judging the Linux system version of the current server;
acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server;
deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not;
and outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log.
In a preferred embodiment of the present invention, further comprising:
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
In a preferred embodiment of the present invention, further comprising:
in response to the error log being not a negligible log, the error log is marked and an alarm is raised.
In a preferred embodiment of the present invention, the Linux system version includes any of RHEL, centos, debian, ubuntu and Suse versions of the Linux system.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended 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.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
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 many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.
Claims (8)
1. A method of checking a server log, comprising the steps of:
establishing a black list and a white list of each Linux system version log;
responding to the received command of checking the server log, and judging the Linux system version of the current server;
acquiring and storing a system log, and screening a blacklist log based on a blacklist corresponding to a Linux system version of a current server;
deleting the logs in the white list corresponding to the Linux system version of the current server from the screened black list logs, and judging whether error logs exist in the deleted black list logs or not;
outputting the deleted blacklist log in response to the fact that no error log exists in the deleted blacklist log;
responding to the deleted blacklist logs to have error logs, and judging whether the error logs are negligible logs or not;
and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
2. The method as recited in claim 1, further comprising:
and marking the error log and alarming in response to the error log being not a negligible log.
3. The method of claim 1, wherein the Linux system version comprises any of RHEL, centos, debian, ubuntu and Suse.
4. An apparatus for checking a server log, the apparatus comprising:
the system comprises a creation module, a storage module and a storage module, wherein the creation module is configured to establish a blacklist and a whitelist of each Linux system version log;
the judging module is configured to respond to the received command for checking the server log and judge the Linux system version of the current server;
the screening module is configured to acquire and store the system logs, and screen the blacklist logs based on the blacklist corresponding to the Linux system version of the current server;
the deleting module is configured to delete the logs in the white list corresponding to the Linux system version of the current server from the screened blacklist logs, and judge whether error logs exist in the deleted blacklist logs or not;
the output module is configured to output the deleted blacklist logs in response to the fact that no error log exists in the deleted blacklist logs;
the updating module is configured to respond to the existence of the error log in the deleted blacklist log and judge whether the error log is an ignorable log or not; and deleting and adding the negligible log into a white list corresponding to the Linux system version of the current server in response to the error log being the negligible log.
5. The apparatus of claim 4, further comprising an alarm module configured to:
and marking and alarming the error log in response to the error log being not a negligible log.
6. The apparatus of claim 4, wherein the Linux system version comprises any of RHEL, centos, debian, ubuntu and Suse.
7. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which instructions when executed by the processor implement the steps of the method of any one of claims 1-3.
8. 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 any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110736287.4A CN113626232B (en) | 2021-06-30 | 2021-06-30 | Method, device, equipment and readable medium for checking server log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110736287.4A CN113626232B (en) | 2021-06-30 | 2021-06-30 | Method, device, equipment and readable medium for checking server log |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113626232A CN113626232A (en) | 2021-11-09 |
CN113626232B true CN113626232B (en) | 2023-07-14 |
Family
ID=78378648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110736287.4A Active CN113626232B (en) | 2021-06-30 | 2021-06-30 | Method, device, equipment and readable medium for checking server log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113626232B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114328408B (en) * | 2021-12-10 | 2024-01-16 | 苏州浪潮智能科技有限公司 | Log screening method, system, equipment and medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110825571A (en) * | 2019-10-29 | 2020-02-21 | 苏州浪潮智能科技有限公司 | Method and device for acquiring error information of test log of Linux system |
-
2021
- 2021-06-30 CN CN202110736287.4A patent/CN113626232B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110825571A (en) * | 2019-10-29 | 2020-02-21 | 苏州浪潮智能科技有限公司 | Method and device for acquiring error information of test log of Linux system |
Also Published As
Publication number | Publication date |
---|---|
CN113626232A (en) | 2021-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113114680B (en) | Detection method and detection device for file uploading vulnerability | |
CN105512015A (en) | Android target application crash calculation method and device | |
CN112988594A (en) | Integrated detection method and system for code quality evaluation | |
US9134975B1 (en) | Determining which computer programs are candidates to be recompiled after application of updates to a compiler | |
CN113626232B (en) | Method, device, equipment and readable medium for checking server log | |
CN108874441B (en) | Board card configuration method, device, server and storage medium | |
CN117494638B (en) | Verification method and verification platform for chip functions, electronic equipment and storage medium | |
CN112162761A (en) | Method, system and equipment for automatically deploying project to public cloud containerization platform | |
CN114138633A (en) | Method, device and equipment for testing software based on data driving and readable medium | |
CN111813382A (en) | Intangible asset management system and method | |
CN113535141A (en) | Database operation code generation method and device | |
CN110888791A (en) | Log processing method, device, equipment and storage medium | |
US20140289710A1 (en) | Monitoring software execution | |
CN111427777B (en) | SOL test method, system, equipment and medium | |
CN108984757A (en) | A kind of data lead-in method and equipment | |
CN110147313B (en) | Log output method and device | |
CN113934617A (en) | Data processing method, device, equipment and storage medium | |
CN114879985B (en) | Method, device, equipment and storage medium for installing certificate file | |
CN113986263A (en) | Code automation test method, device, electronic equipment and storage medium | |
CN106648985A (en) | Disaster-tolerant repair method and device of text database | |
CN114546749A (en) | Chip random test case regression method, device, equipment and readable medium | |
CN113626039A (en) | Method, device, equipment and readable medium for deploying out-of-band operating system | |
CN105827447A (en) | Service alarm method and apparatus | |
CN110109809B (en) | Method and equipment for testing log auditing function according to syslog | |
CN111522783B (en) | Data synchronization method, device, electronic equipment and computer readable 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 |