CN112905415B - Serial port log file acquisition method and device and related components - Google Patents

Serial port log file acquisition method and device and related components Download PDF

Info

Publication number
CN112905415B
CN112905415B CN202110189150.1A CN202110189150A CN112905415B CN 112905415 B CN112905415 B CN 112905415B CN 202110189150 A CN202110189150 A CN 202110189150A CN 112905415 B CN112905415 B CN 112905415B
Authority
CN
China
Prior art keywords
raid card
log file
serial port
raid
acquiring
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
CN202110189150.1A
Other languages
Chinese (zh)
Other versions
CN112905415A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202110189150.1A priority Critical patent/CN112905415B/en
Publication of CN112905415A publication Critical patent/CN112905415A/en
Application granted granted Critical
Publication of CN112905415B publication Critical patent/CN112905415B/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/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • 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
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Abstract

The application discloses a serial port log file acquisition method, which is applied to BMC and comprises the following steps: sending broadcast messages to each RAID card according to the terminal id of each RAID card, wherein the terminal id of each RAID card corresponds to a PCIe bus address; acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by firmware of the RAID card; and recording the feedback messages corresponding to the RAID cards. According to the method and the device, when the system is abnormal, the serial port log file of the corresponding RAID card is captured from the BMC for analysis at the first time, and the problem is solved quickly. The application also discloses a serial port log file acquisition device, electronic equipment and a computer readable storage medium, which have the beneficial effects.

Description

Serial port log file acquisition method and device and related components
Technical Field
The present application relates to the field of servers, and in particular, to a method and an apparatus for acquiring a serial log file, and related components.
Background
In the current server field, RAID (Redundant Arrays of Independent Disks) card applications are common for creating disk Arrays. However, in the research and development test report maintenance stage, when the RAID card normally operates, the physical serial port of the RAID card is in an unconnected state, and therefore when a problem occurs in the RAID card and causes a server system to be down, the RAID card needs to be additionally connected to the physical serial port of the RAID to try to reproduce the problem again to capture a serial port log file, which delays a problem analysis time and wastes a large amount of time on problem reproduction.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method and a device for acquiring a serial log file, electronic equipment and a computer readable storage medium, when a system is abnormal, the serial log file of a corresponding RAID card is captured from a BMC for analysis at the first time, and the problem is solved quickly.
In order to solve the technical problem, the application provides a method for acquiring a serial log file, which is applied to a BMC and comprises the following steps:
sending broadcast messages to the RAID cards according to the terminal id of each RAID card, wherein the terminal id of each RAID card corresponds to a PCIe bus address;
acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by firmware of the RAID card according to a recording period;
and recording the feedback message corresponding to each RAID card.
Preferably, the feedback message further includes a controller status of the RAID card.
Preferably, the controller status includes manufacturer, firmware version, RAID configuration status, and disk status to which the RAID card is connected.
Preferably, the process of sending the broadcast packet to each RAID card according to the terminal id of each RAID card includes:
and sending broadcast messages to each RAID card according to the sending period and the terminal id of each RAID card.
Preferably, the method for acquiring the serial log file further comprises the following steps:
analyzing the state of the RAID card through a target serial port log file of the RAID card;
the target serial port log file is obtained in n nearest sending periods at the current moment, and n is a positive integer.
Preferably, the process of acquiring the feedback message sent by each RAID card after receiving the broadcast message includes:
and acquiring a feedback message sent by each RAID card after receiving the broadcast message through an MCTP over PCIe protocol.
In order to solve the technical problem, the present application further provides a serial log file obtaining apparatus, which is applied to a BMC, and includes:
the sending module is used for sending broadcast messages to the RAID cards according to the terminal id of each RAID card, and the terminal id of each RAID card corresponds to a PCIe bus address;
the receiving module is used for acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by firmware of the RAID card;
and the recording module is used for recording the feedback messages corresponding to the RAID cards.
Preferably, the feedback message further includes a controller status of the RAID card.
In order to solve the above technical problem, the present application further provides an electronic device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the serial port log file acquisition method in any item when the computer program is executed.
In order to solve the technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the serial port log file obtaining method as described in any one of the above are implemented.
The application provides a serial port log file obtaining method, which does not need to be additionally connected with an RAID card physical serial port isomorphism to try to reproduce again to capture a serial port log file, but records the serial port log file of the RAID card according to a recording period through firmware of the RAID card, after BMC sends a broadcast message to each RAID card, each RAID card feeds back a feedback message including the serial port log file to the BMC, and the BMC stores the feedback message of each RAID card, and when a system is abnormal, the serial port log file of the corresponding RAID card can be captured from the BMC for analysis at the first time so as to rapidly solve the problem. The application also provides a serial port log file acquisition device, electronic equipment and a computer readable storage medium, and the serial port log file acquisition device, the electronic equipment and the computer readable storage medium have the same beneficial effects as the serial port log file acquisition method.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart illustrating steps of a method for acquiring a serial log file according to the present application;
fig. 2 is a schematic structural diagram of a serial log file acquisition apparatus provided in the present application.
Detailed Description
The core of the application is to provide a method and a device for acquiring a serial log file, electronic equipment and a computer readable storage medium, when a system is abnormal, the serial log file of a corresponding RAID card is captured from a BMC for analysis at the first time, and the problem is solved quickly.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but 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 application.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a method for acquiring a serial log file according to the present application, where the method includes:
s101: sending broadcast messages to each RAID card according to the terminal id of each RAID card, wherein the terminal id of each RAID card corresponds to a PCIe bus address;
specifically, before this step is performed, an operation of enumerating a PCIe (Peripheral Component Interconnect Express) device by the server BIOS is further included, and it is understood that the RAID card is a PCIe device, and the purpose of the operation of enumerating the PCIe device is to determine all RAID cards in the system. And then allocating independent PCIe bus addresses for the RAID card and the BMC (Baseboard Management Controller), and allocating terminal ids corresponding to the PCIe bus addresses for the RAID card and the BMC by the server system Management engine, so that the RAID card can be managed directly according to the terminal ids in the following process, and the Management efficiency is improved. After the terminal ids of the RAID cards and the BMC are allocated, the BMC acquires the terminal id of each RAID card, and each RAID card may also acquire the terminal id of the BMC. After the operation is executed, the BMC sends the broadcast message to each RAID card through each terminal id, all RAID cards can be informed at one time in a mode of sending the broadcast message, data do not need to be sent to each RAID card independently, the flow load of the server is low, and correspondingly, each RAID card can also send a feedback message to the BMC according to the terminal id of the BMC.
In this step, after receiving the sending instruction, the broadcast message may be sent to each RAID card, or the broadcast message may be sent to each RAID card according to the sending period, where the condition for sending the broadcast message is not specifically limited.
S102: acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by a firmware of the RAID card according to a recording period;
as a preferred embodiment, the feedback message further includes a controller status of the RAID card.
As a preferred embodiment, the controller status includes vendor, firmware version, RAID configuration status, and disk status to which the RAID card is attached.
It is understood that the firmware of the RAID card serves as a controller core, and the state of the RAID card controller can be grasped in real time, including the state of the controller itself, such as the manufacturer, firmware version, RAID configuration state, and the state of the disk to which the RAID card is connected. The RAID card firmware records the serial port log files according to the recording period, after receiving the broadcast message sent by the BMC, the RAID card interacts with the BMC through an MCTP over PCIe protocol and sends the corresponding serial port log files, and therefore the serial port log files can be stored to the BMC without being connected with a physical serial port connector on the RAID card.
The recording period can be set to be relatively short so as to achieve the purpose of recording serial port log files in real time, the comprehensiveness and integrity of log records are achieved, and later-stage analysis is facilitated.
S103: and recording the feedback messages corresponding to the RAID cards.
Specifically, the BMC records the feedback messages corresponding to the RAID cards and the terminal ids of the RAID cards, can capture the corresponding serial port log files for analysis at the first time when the system is abnormal, and can perform positioning according to the terminal ids so as to solve the problems quickly.
It can be seen that in this embodiment, it is not necessary to additionally connect the RAID card physical serial port to try to reproduce the problem again to capture the serial port log file, but the serial port log file of the RAID card is recorded according to the recording period by the firmware of the RAID card, after the BMC sends the broadcast message to each RAID card, each RAID card feeds back the feedback message including the serial port log file to the BMC, and the BMC stores the feedback message of each RAID card, and when the system is abnormal, the serial port log file of the corresponding RAID card can be captured from the BMC at the first time to be analyzed, so that the problem can be quickly solved.
On the basis of the above-described embodiment:
as a preferred embodiment, the process of sending the broadcast message to each RAID card according to the terminal id of each RAID card includes:
and sending broadcast messages to each RAID card according to the sending period and the terminal id of each RAID card.
As a preferred embodiment, the method for acquiring a serial log file further includes:
analyzing the state of the RAID card through a target serial port log file of the RAID card;
the target serial port log file is obtained in n nearest sending periods at the current moment, and n is a positive integer.
Specifically, the BMC may send a broadcast message to each RAID according to a sending period, and correspondingly, the BMC obtains a feedback message sent by the RAID in the sending period. The problem can be reflected by the serial port log file which is closer to the current moment, so that when analysis is needed, the target serial port log file acquired in the n nearest sending periods to the current moment can be selected for analysis, and the efficiency is improved.
In conclusion, by adopting the scheme of the application, the serial port log file of the RAID card can be stored without connecting a serial port line. When a system downtime problem caused by an RAID card occurs in the research, development and test process and the operation of a data center server, the serial port log file can be analyzed at the first time, the root cause is searched to achieve rapid debug and solve the problem, a large amount of time for reproducing the problem and capturing the serial port log file is saved, the problem solution in the product research and development process is accelerated, if the problem occurs at a client, the problem can be timely solved, and the customer satisfaction degree is increased.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a serial log file obtaining apparatus provided in the present application, which is applied to a BMC, and includes:
the sending module 1 is used for sending broadcast messages to each RAID card according to the terminal id of each RAID card;
the receiving module 2 is used for acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by the firmware of the RAID card;
and the recording module 3 is used for recording the feedback messages corresponding to the RAID cards.
It can be seen that in this embodiment, it is not necessary to additionally connect the RAID card physical serial port to try to reproduce the problem again to capture the serial port log file, but the serial port log file of the RAID card is recorded according to the recording period by the firmware of the RAID card, after the BMC sends the broadcast message to each RAID card, each RAID card feeds back the feedback message including the serial port log file to the BMC, and the BMC stores the feedback message of each RAID card, and when the system is abnormal, the serial port log file of the corresponding RAID card can be captured from the BMC at the first time to be analyzed, so that the problem can be quickly solved.
As a preferred embodiment, the feedback message further includes a controller status of the RAID card.
As a preferred embodiment, the controller status includes vendor, firmware version, RAID configuration status, and disk status to which the RAID card is attached.
As a preferred embodiment, the process of sending the broadcast message to each RAID card according to the terminal id of each RAID card includes:
and sending broadcast messages to each RAID card according to the sending period and the terminal id of each RAID card.
As a preferred embodiment, the serial log file obtaining apparatus further includes:
the analysis module is used for analyzing the state of the RAID card through a target serial port log file of the RAID card;
the target serial port log file is obtained in n nearest sending periods at the current moment, and n is a positive integer.
As a preferred embodiment, the process of acquiring the feedback message sent by each RAID card after receiving the broadcast message includes:
and obtaining a feedback message sent by each RAID card after receiving the broadcast message through an MCTP over PCIe protocol.
In another aspect, the present application further provides an electronic device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the serial port log file acquisition method in any item when executing the computer program.
For an introduction of an electronic device provided in the present application, please refer to the above embodiments, which are not described herein again.
The electronic equipment provided by the application has the same beneficial effect as the serial port log file acquisition method.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the serial log file obtaining method as described in any one of the above are implemented.
For the introduction of a computer-readable storage medium provided in the present application, please refer to the above embodiments, which are not described herein again.
The computer-readable storage medium has the same beneficial effect as the serial port log file acquisition method.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A serial port log file acquisition method is applied to BMC and comprises the following steps:
sending broadcast messages to the RAID cards according to the terminal id of each RAID card, wherein the terminal id of each RAID card corresponds to a PCIe bus address;
acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by firmware of the RAID card according to a recording period;
and recording the feedback message corresponding to each RAID card.
2. The method for acquiring the serial port log file according to claim 1, wherein the feedback message further includes a controller state of the RAID card.
3. The method according to claim 2, wherein the controller status includes a manufacturer, a firmware version, a RAID configuration status, and a disk status to which a RAID card is connected.
4. The method for acquiring the serial port log file according to claim 1, wherein the process of sending the broadcast message to each RAID card according to the terminal id of each RAID card includes:
and sending broadcast messages to each RAID card according to the sending period and the terminal id of each RAID card.
5. The method for acquiring the serial log file according to claim 4, wherein the method for acquiring the serial log file further comprises:
analyzing the state of the RAID card through a target serial port log file of the RAID card;
the target serial port log file is obtained in n nearest sending periods at the current moment, and n is a positive integer.
6. The method for acquiring the serial port log file according to any one of claims 1 to 5, wherein the process of acquiring the feedback message sent by each RAID card after receiving the broadcast message comprises:
and acquiring a feedback message sent by each RAID card after receiving the broadcast message through an MCTP over PCIe protocol.
7. The utility model provides a serial ports log file acquisition device which characterized in that, is applied to the BMC, includes:
the sending module is used for sending broadcast messages to the RAID cards according to the terminal id of each RAID card, and the terminal id of each RAID card corresponds to a PCIe bus address;
the receiving module is used for acquiring a feedback message sent by each RAID card after receiving the broadcast message, wherein the feedback message comprises a serial port log file recorded by firmware of the RAID card;
and the recording module is used for recording the feedback messages corresponding to the RAID cards.
8. The serial port log file acquisition device according to claim 7, wherein the feedback message further includes a controller status of the RAID card.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the serial log file acquisition method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the serial log file acquisition method according to any one of claims 1 to 6.
CN202110189150.1A 2021-02-19 2021-02-19 Serial port log file acquisition method and device and related components Active CN112905415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110189150.1A CN112905415B (en) 2021-02-19 2021-02-19 Serial port log file acquisition method and device and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110189150.1A CN112905415B (en) 2021-02-19 2021-02-19 Serial port log file acquisition method and device and related components

Publications (2)

Publication Number Publication Date
CN112905415A CN112905415A (en) 2021-06-04
CN112905415B true CN112905415B (en) 2022-06-07

Family

ID=76123741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110189150.1A Active CN112905415B (en) 2021-02-19 2021-02-19 Serial port log file acquisition method and device and related components

Country Status (1)

Country Link
CN (1) CN112905415B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003417B (en) * 2021-09-23 2023-12-26 苏州浪潮智能科技有限公司 Method, device and storage medium for realizing automatic fault transfer of RAID card

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004259079A (en) * 2003-02-27 2004-09-16 Hitachi Ltd Data processing system
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
JP2017151511A (en) * 2016-02-22 2017-08-31 日本電気株式会社 Information processing device, operation log acquisition method and operation log acquisition program
CN105955875A (en) * 2016-05-04 2016-09-21 浪潮电子信息产业股份有限公司 Device and method for monitoring logs of RAID cards
CN108459932A (en) * 2018-03-02 2018-08-28 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of management RAID card
CN110704287B (en) * 2019-08-31 2022-07-08 苏州浪潮智能科技有限公司 RAID card abnormal log collection method and system under Linux system and storage medium
CN111240879B (en) * 2020-01-10 2022-11-25 苏州浪潮智能科技有限公司 SAS card firmware log collection method, system, device and storage medium

Also Published As

Publication number Publication date
CN112905415A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN108768730B (en) Method and device for operating intelligent network card
CN111988200B (en) Automatic regression testing method and device based on real flow
CN105373899A (en) Server asset management method and apparatus
CN104536860A (en) Hard disk sequence marshalling method based on real-time JBOD monitoring mode
CN104518917A (en) Automatic server patrol inspection method
CN101771565B (en) Analogy method for realizing multitudinous or different baseboard management controllers by single server
CN112905415B (en) Serial port log file acquisition method and device and related components
CN112818307A (en) User operation processing method, system, device and computer readable storage medium
CN115858221A (en) Management method and device of storage equipment, storage medium and electronic equipment
CN113672451A (en) BMC service detection method, device, equipment and readable storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN112000535A (en) SAS Expander card-based hard disk abnormity identification method and processing method
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN114237957A (en) Method and device for processing abnormal disk partition
CN209821817U (en) Electronic equipment and cluster server system
CN110365627B (en) Application program synchronization method and device, computing equipment and storage medium
CN109491846B (en) Method and system for capturing SATA hard disk trace by server
CN113626278A (en) Hardware topology generation method and related equipment thereof
TW201014262A (en) Remote monitoring system and the monitoring method using the same
CN113766038B (en) Address configuration access method and server system
CN107438259B (en) Method for positioning network management system performance module fault
CN111198796B (en) Disk hot plug management method and device
CN111124889B (en) ICOS system-based host Numa test method, system and equipment
CN111858239B (en) Server hard disk monitoring method, device, equipment and medium
CN110430093B (en) Data processing method and device 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