CN110704287B - RAID card abnormal log collection method and system under Linux system and storage medium - Google Patents

RAID card abnormal log collection method and system under Linux system and storage medium Download PDF

Info

Publication number
CN110704287B
CN110704287B CN201910820066.8A CN201910820066A CN110704287B CN 110704287 B CN110704287 B CN 110704287B CN 201910820066 A CN201910820066 A CN 201910820066A CN 110704287 B CN110704287 B CN 110704287B
Authority
CN
China
Prior art keywords
raid card
log
logs
deadline
computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910820066.8A
Other languages
Chinese (zh)
Other versions
CN110704287A (en
Inventor
周传华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201910820066.8A priority Critical patent/CN110704287B/en
Publication of CN110704287A publication Critical patent/CN110704287A/en
Application granted granted Critical
Publication of CN110704287B publication Critical patent/CN110704287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The invention relates to a method, a system and a storage medium for collecting abnormal logs of a RAID card in a Linux system, wherein the method comprises the following steps: refreshing the RAID card firmware again, and performing communication connection between the RAID card and the computer; whether the logs of the RAID card can be printed in real time at the computer end or not can be judged, if not, the abnormal end is ended, the reason of the abnormal is prompted, if so, the state of the RAID card can be verified, and normal communication between the RAID card and the computer is ensured; judging whether the starting of the operating system is normal or not, if not, ending the abnormity and prompting the reason of the abnormity; if the log data are normal, clearing the original log data of the RAID card; restarting the operating system, and executing the capture deadline log by the RAID card and storing the capture deadline log into a first test file; the RAID card generates an initial deadline log and stores the initial deadline log in a second test file; and comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, stopping printing the serial port logs of the computer, and collecting MegaMon logs.

Description

RAID card abnormal log collection method and system under Linux system and storage medium
Technical Field
The invention belongs to the technical field of server stability test, and relates to a technical scheme for collecting abnormal logs, in particular to a method, a system and a storage medium for collecting abnormal logs of a RAID card in a Linux system; the method can accurately keep abnormal phenomena and capture abnormal logs while ensuring the test accuracy.
Background
RAID is a technique that combines multiple independent physical hard disks in different ways to form a logical hard disk, providing higher performance than a single hard disk and providing data redundancy. The data redundancy function of the RAID card is that the damaged data can be recovered by using the redundancy information once the user data is damaged, so that the safety of the user data is guaranteed.
In the server stability test, abnormal phenomena of RAID cards and storage media often occur, such as server restart, disk drop, downtime, disk disorder and the like; in order to avoid the problems, an effective mode is to collect abnormal logs of the Raid card and discover the root cause of the abnormal phenomenon through analysis of the abnormal logs; however, because the register capacity of the Raid card is small, the abnormal log cannot be timely collected when a problem occurs, so that the real-time log when the problem occurs is flushed by the new log, and then the abnormal log cannot be collected. This is a drawback and deficiency in the prior art.
In view of the above, the present invention provides a method, a system and a storage medium for collecting abnormal logs of a RAID card in a Linux system; to address the above-mentioned deficiencies and problems in the prior art.
Disclosure of Invention
The invention provides a method, a system and a storage medium for collecting abnormal logs of a RAID card in a Linux system, aiming at the defects and the defects that the abnormal logs can not be collected in time when problems occur due to the fact that the capacity of a register of the Raid card is small in the prior art, real-time logs in the problems are flushed by new logs, and then the abnormal logs can not be collected.
In order to achieve the purpose, the invention provides the following technical scheme:
in a first aspect, the invention provides a method for collecting abnormal logs of a RAID card in a Linux system, comprising the following steps:
s1: refreshing the RAID card firmware again, and performing communication connection on the RAID card and the computer;
s2: configuring a RAID array at a computer end, and installing an operating system;
s3: judging whether the logs of the RAID card can be printed in real time at the computer end, if not, ending the abnormity and prompting the reason of the abnormity, and if the logs of the RAID card can be printed in real time at the computer end, turning to step S4;
s4: verifying the state of the RAID card and ensuring normal communication between the RAID card and a computer;
s5: judging whether the starting of the operating system is normal or not, if the starting of the operating system is abnormal, ending the abnormality and prompting the reason of the abnormality; if the operating system is started normally, go to step S6;
s6: clearing original log data of the RAID card;
s7: restarting the operating system, and executing the capture deadline log by the RAID card and storing the capture deadline log into a first test file;
s8: the RAID card generates an initial deadline log and stores the initial deadline log in a second test file;
s9: comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are consistent, going to step S7 to continue execution, and if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, going to step S10;
s10: and stopping printing the computer serial port log, entering a MegaMon grabbing mode, and collecting the MegaMon log.
As another preferred embodiment of the present invention, in step S1, the internal firmware of the RAID card is refreshed into a debug firmware, a log serial port printing function of the RAID card is configured, and the RAID card is connected to the computer through a serial port tool. And printing and transmitting the log information data of the RAID card.
As another preferred embodiment of the present application, the method further comprises the following steps between steps S4 and S5:
and entering an operating system, and installing a RAID card management tool. The operating system can effectively control and manage the log data information of the RAID card.
As another preferred embodiment of the present application, the RAID card management tool is a storcli tool; the installation is simple, and control is accurate.
In a second aspect, the present invention provides a system for collecting an abnormal log of a RAID card in a Linux system, including:
the RAID card firmware refreshing module refreshes the RAID card firmware and connects the RAID card with the computer in a communication way;
the computer side configuration module is used for configuring the RAID array and installing an operating system;
the log judging and printing module is used for judging whether the logs of the RAID card can be printed in real time at the computer end, if the logs of the RAID card cannot be printed in real time at the computer end, the abnormal condition is ended and the abnormal reason is prompted, and if the logs of the RAID card can be printed in real time at the computer end, the state of the RAID card is verified, and normal communication between the RAID card and the computer is ensured;
judging whether the operating system is started normally or not, if the operating system is started abnormally, ending the abnormity and prompting an abnormal reason; if the operation system is started normally, the original log data of the RAID card is cleared;
the system comprises a test collection log module, an RAID card and a second test file, wherein the test collection log module is used for restarting an operating system, the RAID card is used for capturing a time limit log and storing the time limit log into the first test file, and the RAID card is used for generating an initial time limit log and storing the initial time limit log into the second test file; and comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are consistent, the operating system continues to restart the test, and if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, the serial port logs in the computer stop printing, the MegaMon capture mode is entered, and the MegaMon logs are collected.
As another preferred embodiment of the technical scheme of the application, in the RAID card firmware refreshing module, the built-in firmware of the RAID card is refreshed into the debugging firmware, the log serial port printing function of the RAID card is configured, and the RAID card is connected to the computer through a serial port tool. And printing and transmitting the log information data of the RAID card.
As another preferred embodiment of the technical solution of the present application, the system for collecting an abnormal log of a RAID card in a Linux system further includes: and the RAID card management tool installation module enters an operating system and installs the RAID card management tool. The operating system can effectively control and manage the log data information of the RAID card.
As another preferred embodiment of the present application, the RAID card management tool is a storcli tool; the installation is simple, and control is accurate.
In a third aspect, there is provided a computer storage medium having stored therein instructions that, when run on a computer, cause the computer to perform the method of the first aspect.
In a fourth aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is adapted to retrieve and execute the computer program from the memory so that the terminal performs the method according to the first aspect.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect.
The method has the advantages that in the problem recurrence process, when the system and the RAID are abnormal, the problem analysis timeliness is prevented from being poor due to the fact that an unattended person cannot capture RAID logs in time; the method realizes automatic reproduction test, can accurately keep abnormal phenomena and capture logs while ensuring the test accuracy, and improves the efficiency.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flowchart of a method for collecting abnormal logs of a RAID card in a Linux system.
FIG. 2 is a schematic block diagram of a RAID card abnormal log collection system in a Linux system provided by the present invention.
The system comprises a RAID card firmware refreshing module, a computer end configuration module, a 3-judging log printing module, a 4-judging operating system starting abnormity module, a 5-testing log collecting module and a 6-RAID card management tool installing module.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in fig. 1, the method for collecting an abnormal log of a RAID card in a Linux system according to this embodiment includes the following steps:
s1: refreshing the RAID card firmware again, and performing communication connection on the RAID card and the computer; in step S1, the internal firmware of the RAID card is refreshed into the debug firmware, the log serial port printing function of the RAID card is configured, and the RAID card is connected to the computer through the serial port tool. And printing and transmitting the log information data of the RAID card.
S2: configuring an RAID array at a computer end, and installing an operating system;
s3: judging whether the log of the RAID card can be printed in real time at the computer end, if not, finishing the abnormity and prompting the reason of the abnormity, and if the log of the RAID card can be printed in real time at the computer end, turning to the step S4;
s4: verifying the state of the RAID card and ensuring normal communication between the RAID card and a computer;
s5: judging whether the starting of the operating system is normal or not, if the starting of the operating system is abnormal, ending the abnormality and prompting the reason of the abnormality; if the operating system is started normally, go to step S6;
between the steps S4 and S5, the following steps are also included:
and entering an operating system, and installing a RAID card management tool. The operating system can effectively control and manage the log data information of the RAID card. The RAID card management tool is a storcli tool; the installation is simple, and control is accurate.
S6: clearing original log data of the RAID card;
s7: restarting the operating system, and executing the capture deadline log by the RAID card and storing the capture deadline log into a first test file;
s8: the RAID card generates an initial deadline log and stores the initial deadline log in a second test file;
s9: comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are consistent, going to step S7 to continue execution, and if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, going to step S10;
s10: and stopping printing the computer serial port log, entering a MegaMon grabbing mode, and collecting the MegaMon log.
Example 2:
as shown in fig. 2, the RAID card abnormal log collecting system in the Linux system according to this embodiment includes:
the RAID card firmware refreshing module 1 is used for refreshing the RAID card firmware and connecting the RAID card with a computer in a communication way; and refreshing the built-in firmware of the RAID card into debugging firmware, configuring a log serial port printing function of the RAID card, and connecting the RAID card with a computer through a serial port tool. And printing and transmitting the log information data of the RAID card.
A computer end configuration module 2, wherein the computer end configures an RAID array and is provided with an operating system;
the log printing judging module 3 is used for judging whether the logs of the RAID card can be printed in real time at the computer end, if the logs of the RAID card cannot be printed in real time at the computer end, the abnormality is ended and the reason for the abnormality is prompted, and if the logs of the RAID card can be printed in real time at the computer end, the state of the RAID card is verified, and normal communication between the RAID card and a computer is ensured;
judging whether the operating system is started normally by the operating system starting abnormal module 4, if the operating system is started abnormally, ending the abnormality and prompting the reason of the abnormality; if the operation system is started normally, the original log data of the RAID card is cleared;
the test collection log module 5 restarts the operating system, the RAID card captures the deadline log and stores the deadline log into a first test file, and the RAID card generates an initial deadline log and stores the initial deadline log into a second test file; and comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are consistent, the operating system continues to restart the test, and if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, the serial port logs in the computer stop printing, the MegaMon capture mode is entered, and the MegaMon logs are collected.
The system for collecting the abnormal logs of the RAID card under the Linux system further comprises: and the RAID card management tool installation module 6 enters an operating system and installs the RAID card management tool. The operating system can effectively control and manage the log data information of the RAID card. The RAID card management tool is a storcli tool; the installation is simple, and control is accurate.
Example 3:
the present embodiment provides a computer storage medium having stored therein instructions that, when run on a computer, cause the computer to perform the method of embodiment 1.
Example 4:
the present embodiment provides a terminal, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is adapted to retrieve and run the computer program from the memory, so that the terminal performs the method according to embodiment 1.
Example 5:
the present embodiment provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of embodiment 1.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A method for collecting RAID card abnormal logs in a Linux system is characterized by comprising the following steps:
s1: refreshing the RAID card firmware again, and performing communication connection on the RAID card and the computer;
s2: configuring a RAID array at a computer end, and installing an operating system;
s3: judging whether the log of the RAID card can be printed in real time at the computer end, if not, finishing the abnormity and prompting the reason of the abnormity, and if the log of the RAID card can be printed in real time at the computer end, turning to the step S4;
s4: verifying the state of the RAID card and ensuring normal communication between the RAID card and a computer;
s5: judging whether the starting of the operating system is normal, if the starting of the operating system is abnormal, ending the abnormality and prompting an abnormal reason; if the operating system is started normally, go to step S6;
s6: clearing original log data of the RAID card;
s7: restarting the operating system, and executing the capture deadline log by the RAID card and storing the capture deadline log into a first test file;
s8: the RAID card generates an initial deadline log and stores the initial deadline log in a second test file;
s9: comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are consistent, going to step S7 to continue execution, and if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, going to step S10;
s10: and stopping printing the computer serial port log, entering a MegaMon grabbing mode, and collecting the MegaMon log.
2. The method for collecting abnormal logs of the RAID card in the Linux system according to claim 1, wherein in the step S1, the internal firmware of the RAID card is refreshed into a debugging firmware, a log serial port printing function of the RAID card is configured, and the RAID card is connected to a computer through a serial port tool.
3. The method for collecting RAID card abnormal logs under a Linux system according to claim 2, further comprising the following steps between the steps S4 and S5:
and entering an operating system, and installing a RAID card management tool.
4. The method for collecting the RAID card abnormal log in the Linux system according to claim 3, wherein the RAID card management tool is a storcli tool.
5. A RAID card abnormal log collection system under a Linux system is characterized by comprising:
the RAID card firmware refreshing module refreshes the RAID card firmware and connects the RAID card with the computer in a communication way;
the computer side configuration module is used for configuring the RAID array and installing an operating system;
the log printing judging module is used for judging whether the logs of the RAID card can be printed in real time at the computer end, if the logs of the RAID card cannot be printed in real time at the computer end, the abnormality is ended and the reason of the abnormality is prompted, and if the logs of the RAID card can be printed in real time at the computer end, the state of the RAID card is verified, and normal communication between the RAID card and a computer is ensured;
judging whether the operating system is started normally or not, if the operating system is started abnormally, ending the abnormity and prompting an abnormal reason; if the operation system is started normally, the original log data of the RAID card is cleared;
the system comprises a test collection log module, an RAID card and a second test file, wherein the test collection log module is used for restarting an operating system, the RAID card is used for capturing a time limit log and storing the time limit log into the first test file, and the RAID card is used for generating an initial time limit log and storing the initial time limit log into the second test file; and comparing the deadline logs in the first test file and the second test file, if the deadline logs in the first test file and the deadline logs in the second test file are consistent, the operating system continues to restart the test, and if the deadline logs in the first test file and the deadline logs in the second test file are inconsistent, the serial port logs in the computer stop printing, the MegaMon capture mode is entered, and the MegaMon logs are collected.
6. The system for collecting abnormal logs of the RAID card in the Linux system according to claim 5, wherein in the RAID card firmware refreshing module, the built-in firmware of the RAID card is refreshed into debugging firmware, a log serial port printing function of the RAID card is configured, and the RAID card is connected to a computer through a serial port tool.
7. The system for collecting RAID card abnormality log under Linux system of claim 6, wherein the system for collecting RAID card abnormality log under Linux system further comprises: and the RAID card management tool installation module enters an operating system and installs the RAID card management tool.
8. The system according to claim 7, wherein the RAID card management tool is a storcli tool.
9. A computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-4.
CN201910820066.8A 2019-08-31 2019-08-31 RAID card abnormal log collection method and system under Linux system and storage medium Active CN110704287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910820066.8A CN110704287B (en) 2019-08-31 2019-08-31 RAID card abnormal log collection method and system under Linux system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910820066.8A CN110704287B (en) 2019-08-31 2019-08-31 RAID card abnormal log collection method and system under Linux system and storage medium

Publications (2)

Publication Number Publication Date
CN110704287A CN110704287A (en) 2020-01-17
CN110704287B true CN110704287B (en) 2022-07-08

Family

ID=69194249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910820066.8A Active CN110704287B (en) 2019-08-31 2019-08-31 RAID card abnormal log collection method and system under Linux system and storage medium

Country Status (1)

Country Link
CN (1) CN110704287B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905415B (en) * 2021-02-19 2022-06-07 浪潮电子信息产业股份有限公司 Serial port log file acquisition method and device and related components
CN113064774B (en) * 2021-03-10 2023-02-28 山东英信计算机技术有限公司 Server-based memory integrated refresh diagnosis method and system and storage medium
CN113867998B (en) * 2021-08-25 2023-08-15 苏州浪潮智能科技有限公司 Method and system for collecting fault transient logs in authentication test
CN113886154B (en) * 2021-08-27 2023-07-14 苏州浪潮智能科技有限公司 Method, device and medium for automatically testing storage link controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105223889A (en) * 2015-10-13 2016-01-06 浪潮电子信息产业股份有限公司 A kind of method being applicable to the automatic monitoring PMC RAID card daily record of producing line
CN107066370A (en) * 2017-04-26 2017-08-18 郑州云海信息技术有限公司 A kind of automatic monitoring and the instrument and method for collecting faulty hard disk daily record
CN108459932A (en) * 2018-03-02 2018-08-28 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of management RAID card

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105223889A (en) * 2015-10-13 2016-01-06 浪潮电子信息产业股份有限公司 A kind of method being applicable to the automatic monitoring PMC RAID card daily record of producing line
CN107066370A (en) * 2017-04-26 2017-08-18 郑州云海信息技术有限公司 A kind of automatic monitoring and the instrument and method for collecting faulty hard disk daily record
CN108459932A (en) * 2018-03-02 2018-08-28 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of management RAID card

Also Published As

Publication number Publication date
CN110704287A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110704287B (en) RAID card abnormal log collection method and system under Linux system and storage medium
CN100504795C (en) Computer RAID array early-warning system and method
CN103019885B (en) Method and system for monitoring embedded Linux-based hard disc bad track
CN102147708B (en) Method and device for detecting discs
US9766965B2 (en) System and method for monitoring and detecting faulty storage devices
CN108536548B (en) Method and device for processing bad track of disk and computer storage medium
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
CN104714863A (en) Method for completely storing Raid card logs on basis of Linux operation system after system crashes
CN110750396A (en) Server operating system compatibility testing method and device and storage medium
CN110609778A (en) Method and system for storing server downtime log
CN103049345B (en) Based on Disk State transition detection method and the device of asynchronous mechanism
CN102369513A (en) Method for improving stability of computer system and computer system
CN104636242A (en) Method for automatically deleting repeated content in system logs on basis of Linux operating system
CN109684149A (en) A kind of hardware information monitoring method, device and the equipment of NVMe hard disk
CN101430658A (en) Exceptional reset information saving method and device
CN113590405A (en) Hard disk error detection method and device, storage medium and electronic device
CN110704228A (en) Solid state disk exception handling method and system
CN109741786A (en) A kind of solid state hard disk monitoring method, device and equipment
CN110543398A (en) method and system for recording fault information
CN111966543B (en) System and method for testing stability of storage OSES system
US8977892B2 (en) Disk control apparatus, method of detecting failure of disk apparatus, and recording medium for disk diagnosis program
US7546489B2 (en) Real time event logging and analysis in a software system
CN113742166B (en) Method, device and system for recording logs of server system devices
CN109783288A (en) It is a kind of to automate the method and system for restarting reset test server stability
CN112988442B (en) Method and equipment for transmitting fault information in server operation stage

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