Fault message locating method, device, computer equipment and storage medium

By receiving the index of the response message and using the business mapping table and status code in the shared memory, the problem of inaccurate SAS protocol message positioning is solved, and fast and low-cost fault message positioning is achieved, improving the customer experience.

CN118984267BActive Publication Date: 2025-09-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410972529.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-09-19
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

The existing fault message location method based on the SAS protocol cannot accurately identify the business corresponding to the fault message, resulting in a long fault resolution cycle and high cost, affecting customer experience.

Method used

By receiving the index of the response message and using the service mapping table and status code in the shared memory, it is determined whether the SAS protocol message is a fault message, and the corresponding service is located based on the service number, reducing data copying and improving efficiency.

Benefits of technology

It achieves accurate positioning of fault messages, shortens the fault resolution cycle, reduces positioning costs, and improves customer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984267B_ABST
    Figure CN118984267B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of network communication technology, and discloses a method, device, computer equipment and storage medium for locating a fault message. The method includes: when a reply message is a response message generated for a SAS protocol message, receiving an index of a reply message sent from a collection device, wherein the SAS protocol message is sent by a server to a hard disk when a service needs to be executed; based on the index of the reply message, obtaining the reply message, and determining the service number corresponding to the SAS protocol message in a shared memory of the server, wherein the reply message carries a status code; determining whether the SAS protocol message is a fault message based on the status code and a preset corresponding relationship; if so, locating the service corresponding to the SAS protocol message based on the service number and a service mapping table in the shared memory, wherein the service mapping table includes multiple services and a service number corresponding to each service. The present invention can solve the problem of being unable to accurately locate the service corresponding to the fault message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a method, device, computer equipment and storage medium for locating a fault message. Background Art

[0002] With the rapid development of digitalization and intelligence, all businesses are increasingly evolving towards intelligence and precision. However, the prerequisite for intelligence and digitalization is the collection of large amounts of data. This process not only relies on increasingly powerful computing power, but also requires hardware and software support for high-speed and reliable data storage and retrieval. For example, Linux systems support the Serial Attached SCSI (SAS) protocol or SAS disks that support high-speed read and write operations.

[0003] Due to the complex and tedious nature of the underlying protocol interface, when a fault occurs during protocol message transmission based on the SAS protocol, the protocol message at the time of the fault is usually captured (with a high probability of missing the point at which the error occurred) and fed back to the back-end R&D personnel, who then use various methods to analyze, reproduce, and resolve the problem. This approach relies on strong professional capabilities and cannot accurately locate the business corresponding to the faulty message. This results in the need to repeatedly initiate a new round of capture, reproduction, location, and resolution before the problem is resolved, resulting in a long troubleshooting cycle, affecting the customer experience, and relatively high consumption costs. Summary of the Invention

[0004] In view of this, the present invention provides a method, apparatus, computer device and storage medium for locating a fault message to solve the problem of being unable to accurately locate the service corresponding to the fault message.

[0005] In a first aspect, the present invention provides a method for locating a fault message, the method comprising: in a case where the reply message is a response message generated for a SAS protocol message, receiving an index of the reply message sent from a collection device, the SAS protocol message being sent by the server to the hard disk when a service needs to be executed; based on the index of the reply message, obtaining the reply message, and determining the service number corresponding to the SAS protocol message in the shared memory of the server, the reply message carrying a status code; determining whether the SAS protocol message is a fault message based on the status code and a preset correspondence; if so, locating the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory, the service mapping table including multiple services and the service number corresponding to each service.

[0006] Based on the method provided in the first aspect above, when the reply message is a response message generated for a SAS protocol message, the index of the reply message sent from the collection device can be received, and based on the index of the reply message, the reply message can be obtained in the shared memory of the server, and the service number corresponding to the SAS protocol message can be determined. According to the status code and the preset correspondence, it is determined whether the SAS protocol message is a fault message; if so, the service corresponding to the SAS protocol message is located based on the service number and the service mapping table in the shared memory.

[0007] Since the reply message is a response message generated for the SAS protocol message, the reply message can be obtained in the shared memory of the server according to the index of the reply message, and the business number corresponding to the SAS protocol message associated with the index of the reply message can be determined. This shared memory method can reduce data copying between devices and improve efficiency.

[0008] In addition, based on the status code of the response message and the preset correspondence, it can be determined whether the SAS protocol message corresponding to the response message is a fault message. When it is determined to be a fault message, the service code is determined based on the one-to-one correspondence between the service number and the service mapping table in the shared memory, and the service corresponding to the faulty SAS protocol message is accurately located. This achieves the identification of the service corresponding to the fault message with a single confirmation, avoiding the time-consuming multiple identifications. This method improves the customer experience, shortens the time to locate the service corresponding to the fault message, and thus reduces the location cost.

[0009] In an optional embodiment, based on the index of the reply message, the reply message is obtained in the shared memory of the server, and the business number corresponding to the SAS protocol message is determined, including: based on the index of the reply message, the reply message is obtained in the shared memory of the server; among multiple descriptors in the shared memory, the target descriptor including the index of the reply message is screened, the target descriptor is a shared descriptor corresponding to the SAS protocol message and the reply message, and the target descriptor includes the business number corresponding to the SAS protocol message.

[0010] Based on the above method, based on the index of the response message, the target descriptor including the index of the response message can be determined in the shared memory, and then the service number corresponding to the SAS protocol message can be accurately determined, which facilitates the subsequent determination of the service corresponding to the SAS protocol message based on the service number.

[0011] In an optional embodiment, the method further includes: determining the fault cause of the SAS protocol message based on the status code and the status code conversion table; storing the fault cause in a shared memory, and deleting the target descriptor, the SAS protocol message, and the response message from the shared memory.

[0012] Based on the above method, the fault cause of the faulty SAS protocol message can be accurately determined based on the status code and the status code conversion table, so as to solve the problem corresponding to the SAS protocol message fault based on the fault cause.

[0013] In a second aspect, the present invention provides a method for locating a fault message, which is applied to a collection device, the method comprising: obtaining a SAS protocol message and an index of the SAS protocol message sent by a server to a hard disk, wherein the SAS protocol message includes a SAS protocol message identifier; receiving a response message sent from the hard disk, and determining whether the response message is a response message generated for the SAS protocol message based on the SAS protocol message identifier and the response message identifier, wherein the response message includes the response message identifier;

[0014] If so, the index of the reply message is sent to the analysis device, which is used to locate the service number corresponding to the SAS protocol message in the shared memory of the server and obtain the reply message based on the index of the reply message, and determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the reply message.

[0015] Based on the method provided in the second aspect above, the SAS protocol message sent by the server to the hard disk and the index of the SAS protocol message can be obtained; a response message sent from the hard disk is received, and based on the SAS protocol message identifier and the response message identifier, it is determined whether the response message is a response message generated for the SAS protocol message; if so, the index of the response message is sent to the analysis device, and the analysis device is used to locate the service number corresponding to the SAS protocol message in the shared memory of the server based on the index of the response message and obtain the response message, and determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the response message.

[0016] Since it is possible to determine whether the reply message is a response message generated for the SAS protocol message based on the SAS protocol message identifier and the reply message identifier, that is, first determine whether the reply message matches the SAS protocol message. If it matches, the index of the reply message is sent to the analysis device, so that the analysis device can determine whether the SAS protocol message is a fault message and locate the business corresponding to the SAS protocol message, avoiding the problem of long fault resolution cycle caused by multiple fault message locating corresponding businesses, improving customer experience, and reducing the cost of locating fault messages.

[0017] In an optional implementation, the shared memory includes a protocol area, and the protocol area is used to store messages. The method further includes: copying the SAS protocol message to a corresponding position in the protocol area according to an index of the SAS protocol message.

[0018] Based on the above method, the SAS protocol message can be stored in the corresponding position of the protocol area, which is convenient for subsequent acquisition of the SAS protocol message and parsing it to obtain the corresponding message.

[0019] In an optional embodiment, the shared memory also includes a configuration area, receives a reply message sent from the hard disk, and determines whether the reply message is a response message generated for the SAS protocol message based on the SAS protocol message identifier and the reply message identifier, including: obtaining the business number corresponding to the SAS protocol message; allocating a first descriptor to the SAS protocol message in the configuration area, the first descriptor including the SAS protocol message identifier, the index of the SAS protocol message and the business number corresponding to the SAS protocol message; receiving the reply message sent from the hard disk, and copying the reply message to the corresponding position of the protocol area based on the index of the reply message; and searching in the configuration area based on the reply message identifier to see whether the SAS protocol message identifier included in the descriptor is consistent with the reply message identifier.

[0020] If so, it is determined that the reply message is a response message generated for the SAS protocol message, the reply message identifier and the reply message index are stored in the first descriptor, and the target descriptor corresponding to the SAS protocol message and the reply message is obtained.

[0021] Based on the above method, a search can be performed in the configuration area based on the response message identifier to determine whether the SAS protocol message identifier included in the descriptor is consistent with the response message identifier, thereby determining whether the response message is a response message generated in response to the SAS protocol message. If the response message is a response message generated in response to the SAS protocol message, the first descriptor is updated to obtain a target descriptor, so that the response message identifier in the target descriptor can be subsequently sent to the analysis device.

[0022] In a third aspect, the present invention provides an analysis device, which includes: a transceiver module for receiving an index of a response message sent from a collection device when the response message is a response message generated for a SAS protocol message, the SAS protocol message being sent by the server to the hard disk; a processing module for obtaining the response message in the shared memory of the server based on the index of the response message, and determining the service number corresponding to the SAS protocol message, the response message carrying a status code; the processing module is also used to determine whether the SAS protocol message is a fault message based on the status code and a preset correspondence; the processing module is also used to locate the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory if so, the service mapping table including multiple services and the service number corresponding to each service.

[0023] In a fourth aspect, the present invention provides a collection device, which includes: a transceiver module for obtaining a SAS protocol message and an index of the SAS protocol message sent by a server to a hard disk, the SAS protocol message including a SAS protocol message identifier; a processing module for receiving a reply message sent from the hard disk, and determining whether the reply message is a response message generated for the SAS protocol message based on the SAS protocol message identifier and the reply message identifier, the reply message including a reply message identifier; the transceiver module is also used to send the index of the reply message to an analysis device if so, the analysis device being used to locate the service number corresponding to the SAS protocol message in the shared memory of the server and obtain the reply message based on the index of the reply message, and to determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the reply message.

[0024] In a fifth aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the fault message locating method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0025] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for locating a fault message according to the first aspect or any corresponding embodiment thereof.

[0026] In a seventh aspect, the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods described in the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0028] Figure 1 1 is a schematic diagram of the architecture of a fault message locating system 10 according to an embodiment of the present invention;

[0029] Figure 2 is a schematic diagram of a shared memory according to an embodiment of the present invention;

[0030] Figure 3 1 is a flow chart of a method for locating a fault message according to an embodiment of the present invention;

[0031] Figure 4 1 is a flow chart of another method for locating a fault message according to an embodiment of the present invention;

[0032] Figure 5 is a flowchart of another method for locating a fault message according to an embodiment of the present invention;

[0033] Figure 6 is a structural block diagram of an analysis device according to an embodiment of the present invention;

[0034] Figure 7 is a structural block diagram of a collection device according to an embodiment of the present invention;

[0035] Figure 8 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0037] As described in the background technology, during the protocol message transmission process based on the SAS protocol, once a fault occurs, multiple cycles of message capture, reproduction, location, and resolution are required to locate the business corresponding to the faulty message. This results in a long fault resolution cycle, affects customer experience, and consumes relatively high costs.

[0038] In order to solve the above problems, an embodiment of the present invention provides a method for locating a fault message, which is applied to an analysis device. The method includes receiving an index of a response message sent from a collection device when the response message is a response message generated for a SAS protocol message, and the SAS protocol message is sent by the server to the hard disk; based on the index of the response message, obtaining the response message in the shared memory of the server, and determining the business number corresponding to the SAS protocol message, and the response message carries a status code; determining whether the SAS protocol message is a fault message based on the status code and the preset correspondence; if so, locating the business corresponding to the SAS protocol message based on the business number and the business mapping table in the shared memory, the business mapping table includes multiple businesses and the business number corresponding to each business. This method can accurately locate the business corresponding to the fault message, shorten the cycle of resolving the fault message, improve customer experience, and reduce costs.

[0039] like Figure 1 As shown, Figure 1FIG. 1 is a schematic diagram of the architecture of a fault message locating system 10 according to an embodiment of the present invention. Figure 1 In the present invention, the fault message positioning system 10 may include an analysis device 101, a collection device 102, a server 103, a shared memory 104 and a hard disk 105. Figure 1 In the shared memory, storage services can be provided for analysis devices, collection devices, and servers.

[0040] The analysis device in the embodiments of the present application, for example, analysis device 101, can be any device with computing and communication functions. The analysis device may include a receiving module, a display module, and an analysis module. The receiving module is configured to receive information from the collection device. The display module is configured to display alarm information or fault causes processed by the analysis module. The analysis module is configured to locate the service corresponding to the fault message and analyze the fault cause of the fault message.

[0041] The collecting device in the embodiment of the present application, for example, the collecting device 102, is a device with wireless transceiver function, and is used to collect protocol messages or other information from points that need to be collected, such as the kernel layer, kernel driver layer, and application layer.

[0042] The server in the embodiment of the present application, such as server 103, is a device with computing and communication functions, including but not limited to cloud servers, tower servers, etc.

[0043] The shared memory in the embodiment of the present application, for example, shared memory 104, is a relatively large continuous physical address that is separately allocated and mapped when the server kernel starts. The shared memory is functionally divided into a configuration area and a message protocol area (also called a protocol area). The configuration area and the message protocol area are allocated in a default ratio of 1:9 based on the total byte size of the shared memory. It is understandable that the ratio can be set according to actual needs without limitation. Figure 2 As shown, Figure 2 Schematic diagram of a shared memory according to an embodiment of the present invention; the configuration area is used to store service mapping tables and descriptors, and the message protocol area is used to store multiple messages.

[0044] For the configuration area, the server reads the configuration file and maintains a global service mapping table in the configuration area. All services must be reflected in this service mapping table. It is understandable that the level of detail in the mapping table determines the specific service level that can be achieved during error location. The server calculates the maximum number of descriptors that the configuration area can support based on the allocated message protocol area size. When the descriptors are filled, they are repeatedly saved by re-overwriting the header. The configuration area includes a dedicated descriptor to record the repeatedly saved descriptors.

[0045] For the message protocol area, the message protocol area stores paired protocol messages (SAS protocol messages and response messages). Similarly, after the protocol message area is fully filled, the server repetitively saves the message by re-covering the header.

[0046] For the shared memory, the server starts a periodic timer to check whether the message saved in the message protocol area is within the validity period. If not, a message is sent to the analysis device.

[0047] The hard disk in the embodiment of the present application, for example, the hard disk 105, is any hard disk with a storage function, including but not limited to a mechanical hard disk, a solid-state hard disk, a hybrid hard disk, and the like.

[0048] Figure 1 The fault message locating system 10 shown is for illustrative purposes only and is not intended to limit the technical solutions of the present application. Those skilled in the art will appreciate that, in a specific implementation, the fault message locating system 10 may also include other devices, and the number of hard disks may also be determined based on specific needs, without limitation.

[0049] According to an embodiment of the present invention, an embodiment of a method for locating a fault message is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0050] In this embodiment, a method for locating a fault message is provided, which can be used in the above-mentioned collection device. Figure 3 FIG. 1 is a flow chart of a method for locating a fault message according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0051] S301: Acquire a SAS protocol message and an index of the SAS protocol message sent by a server to a hard disk.

[0052] The SAS protocol message is a message for data transmission based on the SAS protocol. The SAS protocol message includes a SAS protocol message identifier. For example, the SAS protocol message identifier is a protocol sequence number identifier SEQID.

[0053] In the embodiment of the present invention, the index of the SAS protocol message is the storage address of the SAS protocol message in the protocol area in the shared memory.

[0054] As you can understand, SAS protocol messages are sent by the server to the hard drive when a service needs to be executed. After receiving the SAS protocol message, the hard drive will return a response message and, based on the received SAS protocol message, obtain the service information that the hard drive needs to execute and execute the service corresponding to the SAS protocol message.

[0055] In one example, when a server sends a SAS protocol message to a hard disk, a collection device obtains the SAS protocol message sent by the server to the hard disk, allocates a first descriptor to the SAS protocol message in a configuration area, and obtains an index of the SAS protocol message.

[0056] It can be understood that when the server sends multiple SAS protocol messages to the hard disk, the collection device obtains the multiple SAS protocol messages sent by the server to the hard disk, and allocates multiple descriptors to the SAS protocol messages in the configuration area in a forward-to-backward order to obtain indexes of the multiple SAS protocol messages.

[0057] S302: Receive a response message sent from the hard disk, and determine whether the response message is a response message generated for the SAS protocol message according to the SAS protocol message identifier and the response message identifier.

[0058] The response message includes a response message identifier.

[0059] In some optional embodiments, the collection device obtains the service number corresponding to the SAS protocol message; allocates a first descriptor to the SAS protocol message in the configuration area; receives a response message sent from the hard disk; and searches in the configuration area based on the response message identifier to determine whether the SAS protocol message identifier included in the descriptor is consistent with the response message identifier.

[0060] If so, the collection device determines that the reply message is a response message generated for the SAS protocol message, stores the reply message identifier and the reply message index in the first descriptor, obtains the target descriptor corresponding to the SAS protocol message and the reply message, and copies the reply message to the corresponding position in the protocol area according to the reply message index.

[0061] The first descriptor includes a SAS protocol message identifier, an index of the SAS protocol message, and a service number corresponding to the SAS protocol message.

[0062] In the embodiment of the present invention, the target descriptor includes a SAS protocol message identifier, an index of the SAS protocol message, a service number corresponding to the SAS protocol message, a response message identifier, and an index of the response message.

[0063] In one example, when the server sends a SAS protocol message to the hard disk, the collection device obtains the service number corresponding to the SAS protocol message in the configuration area of ​​the shared memory.

[0064] In some optional implementations, the collection device copies the SAS protocol message to a corresponding position in the protocol area according to an index of the SAS protocol message.

[0065] Optionally, the collection device retrieves the SAS protocol message identifier included in the non-existent descriptor in the configuration area based on the reply message identifier and finds that it is consistent with the reply message identifier, then determines that the reply message is not a response message generated for the SAS protocol message, and allocates a second descriptor to the reply message in the configuration area.

[0066] The second descriptor includes a response message identifier, an index of the response message, and a response service number of the response message.

[0067] It can be understood that the collection device determines that the reply message is not a response message generated for the SAS protocol message, which means that the reply message may be an invalid message or a reply message of other SAS protocol messages. In this case, the reply message identifier, the reply message index and the reply service number of the reply message need to be stored in the second descriptor to facilitate subsequent judgment of whether other SAS protocol messages are fault messages.

[0068] S203: If yes, send the index of the response message to the analysis device.

[0069] Among them, the analysis device is used to locate the service number corresponding to the SAS protocol message in the shared memory of the server and obtain the response message based on the index of the response message, and determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the response message.

[0070] It can be understood that the relevant information of the response message and the SAS protocol message are all stored in the same descriptor, which makes it easier for the subsequent analysis device to determine the target descriptor according to the index of the response message and then find the service code corresponding to the SAS protocol message.

[0071] Based on the above S201-S203, the collection device can receive the index of the response message sent from the collection device when the response message is a response message generated for the SAS protocol message, obtain the response message in the shared memory of the server based on the index of the response message, and determine the service number corresponding to the SAS protocol message, and determine whether the SAS protocol message is a fault message based on the status code and the preset correspondence; if so, locate the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory.

[0072] Since the reply message is a response message generated for the SAS protocol message, the reply message can be obtained in the shared memory of the server according to the index of the reply message, and the business number corresponding to the SAS protocol message associated with the index of the reply message can be determined. This shared memory method can reduce data copying between devices and improve efficiency.

[0073] In addition, based on the status code of the response message and the preset correspondence, it can be determined whether the SAS protocol message corresponding to the response message is a fault message. When it is determined to be a fault message, the service code is determined based on the one-to-one correspondence between the service number and the service mapping table in the shared memory, and the service corresponding to the faulty SAS protocol message is accurately located. This achieves the identification of the service corresponding to the fault message with a single confirmation, avoiding the time-consuming multiple identifications. This method improves the customer experience, shortens the time to locate the service corresponding to the fault message, and thus reduces the location cost.

[0074] In this embodiment, a method for locating a fault message is provided, which can be used in the above-mentioned analysis device. Figure 4 FIG. 1 is a flow chart of a method for locating a fault message according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0075] S401: In the case where the reply message is a response message generated for the SAS protocol message, an index of the reply message sent from the collection device is received.

[0076] S402: Based on the index of the response message, obtain the response message from the shared memory of the server, and determine the service number corresponding to the SAS protocol message.

[0077] The response message carries a status code.

[0078] In some optional embodiments, the analysis device obtains the response message in the shared memory of the server based on the index of the response message, and determines the service number corresponding to the SAS protocol message, including: obtaining the response message in the shared memory of the server based on the index of the response message; and screening the target descriptor including the index of the response message among multiple descriptors in the shared memory.

[0079] The target descriptor is a shared descriptor corresponding to the SAS protocol message and the response message, and the target descriptor includes the service number corresponding to the SAS protocol message.

[0080] S403: Determine whether the SAS protocol message is a fault message according to the status code and the preset correspondence.

[0081] The status code indicates the status of the response message and can indicate various states of the SAS protocol message.

[0082] Exemplarily, taking the status code as the first status code, the second status code or the third status code as an example, the preset corresponding relationship includes that the first status code corresponds to the SAS protocol message as a fault message, the second status code corresponds to the SAS protocol message as a normal message, and the third status code corresponds to the SAS protocol message as an invalid message.

[0083] It is understandable that the status code may also include more status codes, and different status codes indicate different statuses of the SAS protocol message.

[0084] S404: If yes, locate the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory.

[0085] The service mapping table includes multiple services and a service number corresponding to each service.

[0086] It can be understood that the analysis device matches the corresponding

[0087] In some optional implementations, the analysis device determines the cause of the failure of the SAS protocol message based on the status code and the status code conversion table; stores the cause of the failure in a shared memory, and deletes the target descriptor, the SAS protocol message, and the response message from the shared memory.

[0088] The status code conversion table is used to convert the status code into the fault cause.

[0089] For example, taking the status code "CHECK_CONDITION error code" as an example, the analysis device converts the "CHECK_CONDITION error code" into the fault cause as illegal command parameters, that is, the sent parameters are incorrect, based on the "CHECK_CONDITION error code" and the status code conversion table.

[0090] It can be understood that the analysis device deletes the target descriptor, SAS protocol message and response message from the shared memory, and can reset the target descriptor to an unused state to be allocated to the next message.

[0091] In some optional implementations, the analyzing device obtains a message type of the SAS protocol message, and determines the message content corresponding to the SAS protocol message according to the message type of the SAS protocol message.

[0092] The message type may be a data message type or a management message type.

[0093] It is understood that if the message type is a data message type, the analysis device determines that the message content corresponding to the SAS protocol message is the SAS protocol message. If the message type is a management message type, the analysis device determines that the message content corresponding to the SAS protocol message is the specific meaning of the message content parsed according to the protocol.

[0094] Similarly, the analysis device obtains the message type of the response message, and determines the message content corresponding to the response message according to the message type of the response message.

[0095] It is understandable that the display module included in the analysis device can display the message content corresponding to the SAS protocol message, the message content corresponding to the response message, the fault cause and the business corresponding to the SAS protocol message, so that management personnel can find relevant information of the fault message in time.

[0096] Based on the above S401-S404, when the reply message is a response message generated for the SAS protocol message, the index of the reply message sent from the collection device can be received, and based on the index of the reply message, the reply message can be obtained in the shared memory of the server, and the service number corresponding to the SAS protocol message can be determined. According to the status code and the preset correspondence, it is determined whether the SAS protocol message is a fault message; if so, the service corresponding to the SAS protocol message is located based on the service number and the service mapping table in the shared memory.

[0097] Since the reply message is a response message generated for the SAS protocol message, the reply message can be obtained in the shared memory of the server according to the index of the reply message, and the business number corresponding to the SAS protocol message associated with the index of the reply message can be determined. This shared memory method can reduce data copying between various devices and improve efficiency. In addition, based on the status code of the reply message and the preset correspondence, it can be determined whether the SAS protocol message corresponding to the reply message is a fault message. Since the business number and the business mapping table in the shared memory have a one-to-one correspondence, it is possible to accurately locate the business corresponding to the SAS protocol message based on the determined business code, avoiding multiple fault message positioning of the corresponding business, resulting in a long cycle for resolving faults, improving customer experience, and reducing the cost of locating fault messages.

[0098] In this embodiment, another method for locating fault messages is provided, such as Figure 5 As shown, Figure 5 FIG. 1 is a flow chart of another method for locating a fault message according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0099] S501: The collection device obtains a SAS protocol message sent by the server to the hard disk and an index of the SAS protocol message in the first descriptor.

[0100] S502: The collection device obtains the service number corresponding to the SAS protocol message.

[0101] S503: The collection device receives a response message sent from the hard disk.

[0102] S504: Determine, according to the SAS protocol message identifier and the reply message identifier, whether the reply message is a response message generated for the SAS protocol message.

[0103] S505: If yes, the collecting device sends the index of the response message to the analyzing device.

[0104] S506: If not, the collection device allocates a second descriptor for the response message in the configuration area.

[0105] S507: The analysis device receives the index of the response message sent from the collection device.

[0106] S508: The analysis device obtains the response message from the shared memory of the server based on the index of the response message, and determines the service number corresponding to the SAS protocol message.

[0107] S509: The analysis device determines whether the SAS protocol message is a fault message based on the status code and the preset correspondence.

[0108] S510: If yes, the analysis device locates the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory.

[0109] S511: If not, the analysis device deletes the target descriptor, the SAS protocol message and the response message from the shared memory.

[0110] This embodiment also provides a fault message location device, which is used to implement the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0111] This embodiment provides an analysis device, such as Figure 6 As shown, Figure 6 It is a structural block diagram of an analysis device according to an embodiment of the present invention; it includes: a transceiver module 601, which is used to receive the index of the response message sent from the collection device when the response message is a response message generated for the SAS protocol message, and the SAS protocol message is sent by the server to the hard disk.

[0112] Processing module 602 is used to obtain the response message in the shared memory of the server based on the index of the response message and determine the service number corresponding to the SAS protocol message. The response message carries a status code.

[0113] The processing module 602 is further configured to determine whether the SAS protocol message is a fault message according to the status code and the preset correspondence relationship.

[0114] The processing module 602 is further configured to locate the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory if yes, where the service mapping table includes multiple services and a service number corresponding to each service.

[0115] In some optional embodiments, the processing module 602 is specifically used to obtain a response message in the shared memory of the server based on the index of the response message; the processing module 602 is also specifically used to filter a target descriptor including the index of the response message from multiple descriptors in the shared memory, where the target descriptor is a shared descriptor corresponding to the SAS protocol message and the response message, and the target descriptor includes the service number corresponding to the SAS protocol message.

[0116] In some optional embodiments, the processing module 602 is further used to determine the fault cause of the SAS protocol message based on the status code and the status code conversion table, and the status code conversion table is used to convert the status code into the fault cause; the processing module 602 is further used to store the fault cause in the shared memory and delete the target descriptor, SAS protocol message and response message from the shared memory.

[0117] This embodiment provides a collection device, such as Figure 7 As shown, Figure 7 It is a structural block diagram of a collection device according to an embodiment of the present invention; it includes: a transceiver module 701, which is used to obtain a SAS protocol message and an index of the SAS protocol message sent by the server to the hard disk, wherein the SAS protocol message includes a SAS protocol message identifier.

[0118] The processing module 702 is configured to receive a response message sent from the hard disk and determine whether the response message is a response message generated for the SAS protocol message according to the SAS protocol message identifier and the response message identifier, wherein the response message includes the response message identifier.

[0119] The transceiver module 701 is also used to send the index of the reply message to the analysis device if yes, and the analysis device is used to locate the service number corresponding to the SAS protocol message in the shared memory of the server and obtain the reply message based on the index of the reply message, and determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the reply message.

[0120] In some optional implementations, the shared memory includes a protocol area, and the processing module 702 is further configured to copy the SAS protocol message to a corresponding position in the protocol area according to an index of the SAS protocol message.

[0121] In some optional embodiments, the shared memory also includes a configuration area, and the processing module 702 is further specifically used to obtain the business number corresponding to the SAS protocol message; the processing module 702 is further specifically used to allocate a first descriptor to the SAS protocol message in the configuration area, the first descriptor including a SAS protocol message identifier, an index of the SAS protocol message and a business number corresponding to the SAS protocol message; the processing module 702 is further specifically used to receive a response message sent from the hard disk, and according to the response message identifier, search in the configuration area whether the SAS protocol message identifier included in the descriptor is consistent with the response message identifier; the processing module 702 is further specifically used to, if yes, determine that the response message is a response message generated for the SAS protocol message, store the response message identifier and the index of the response message in the first descriptor, obtain the SAS protocol message and the target descriptor corresponding to the response message, and copy the response message to the corresponding position in the protocol area according to the index of the response message.

[0122] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0123] The analysis device / collection device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0124] The embodiment of the present invention also provides a computer device having the above Figure 6 The analytical device shown or Figure 7 The collection device shown.

[0125] See also Figure 8 , Figure 8 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 8As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0126] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0127] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0128] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0129] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0130] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0131] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0132] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0133] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for locating a fault message, characterized in that: Applied to an analytical device, the method comprises: In the case where the reply message is a response message generated for a SAS protocol message, receiving an index of the reply message sent from the collection device, wherein the SAS protocol message is sent by the server to the hard disk when a service needs to be executed; Based on the index of the response message, obtaining the response message in the shared memory of the server and determining the service number corresponding to the SAS protocol message, wherein the response message carries a status code; Determining whether the SAS protocol message is a fault message according to the status code and a preset corresponding relationship; If yes, the service corresponding to the SAS protocol message is located based on the service number and the service mapping table in the shared memory, where the service mapping table includes multiple services and a service number corresponding to each service.

2. The method according to claim 1, characterized in that The step of obtaining the response message from the shared memory of the server based on the index of the response message and determining the service number corresponding to the SAS protocol message includes: Retrieving the response message from the shared memory of the server based on the index of the response message; Among the multiple descriptors in the shared memory, a target descriptor including an index of the response message is screened, the target descriptor is a shared descriptor corresponding to the SAS protocol message and the response message, and the target descriptor includes a service number corresponding to the SAS protocol message.

3. The method according to claim 2, characterized in that The method further comprises: Determining a fault cause of the SAS protocol message according to the status code and a status code conversion table, wherein the status code conversion table is used to convert the status code into the fault cause; The fault cause is stored in the shared memory, and the target descriptor, the SAS protocol message and the response message are deleted from the shared memory.

4. A method for locating a fault message, characterized in that: Applied to a collection device, the method comprises: Obtaining a SAS protocol message and an index of the SAS protocol message sent by the server to the hard disk, wherein the SAS protocol message includes a SAS protocol message identifier; Receiving a response message sent from the hard disk, and determining whether the response message is a response message generated for the SAS protocol message according to the SAS protocol message identifier and the response message identifier, wherein the response message includes the response message identifier; If so, the index of the reply message is sent to the analysis device, which is used to locate the service number corresponding to the SAS protocol message in the shared memory of the server and obtain the reply message based on the index of the reply message, and determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the reply message.

5. The method according to claim 4, characterized in that The shared memory includes a protocol area, and the protocol area is used to store messages. The method further includes: According to the index of the SAS protocol message, the SAS protocol message is copied to the corresponding position of the protocol area.

6. The method according to claim 5, characterized in that The shared memory further includes a configuration area, and the receiving of a response message sent from the hard disk, and determining whether the response message is a response message generated for the SAS protocol message according to the SAS protocol message identifier and the response message identifier, includes: Obtain the service number corresponding to the SAS protocol message; Allocating a first descriptor for the SAS protocol message in the configuration area, where the first descriptor includes the SAS protocol message identifier, the index of the SAS protocol message, and the service number corresponding to the SAS protocol message; receiving a response message sent from the hard disk, and searching, according to the response message identifier, whether a SAS protocol message identifier included in a descriptor in the configuration area is consistent with the response message identifier; If so, determine that the reply message is the response message generated for the SAS protocol message, store the reply message identifier and the index of the reply message in the first descriptor, obtain the target descriptor corresponding to the SAS protocol message and the reply message, and copy the reply message to the corresponding position of the protocol area according to the index of the reply message.

7. An analysis device, characterized in that The analysis device comprises: a transceiver module configured to receive an index of the reply message sent from the collection device when the reply message is a response message generated for a SAS protocol message, wherein the SAS protocol message is sent by the server to the hard disk when a service needs to be executed; A processing module, configured to obtain the response message from the shared memory of the server based on the index of the response message, and determine the service number corresponding to the SAS protocol message, wherein the response message carries a status code; The processing module is further configured to determine whether the SAS protocol message is a fault message based on the status code and a preset corresponding relationship; The processing module is further configured to locate the service corresponding to the SAS protocol message based on the service number and the service mapping table in the shared memory if the SAS protocol message is determined to be a fault message according to the status code and the preset correspondence relationship, wherein the service mapping table includes multiple services and a service number corresponding to each service.

8. A collecting device, characterized in that: The collecting device comprises: A transceiver module, configured to obtain a SAS protocol message and an index of the SAS protocol message sent by the server to the hard disk, wherein the SAS protocol message includes a SAS protocol message identifier; a processing module, configured to receive a response message sent from the hard disk, and determine whether the response message is a response message generated for the SAS protocol message according to the SAS protocol message identifier and the response message identifier, wherein the response message includes the response message identifier; The transceiver module is further configured to, if it is determined that the reply message is a response message generated for the SAS protocol message, send the index of the reply message to the analysis device, wherein the analysis device is configured to locate the service number corresponding to the SAS protocol message in the shared memory of the server based on the index of the reply message and obtain the reply message, and determine whether the SAS protocol message is a fault message and locate the service corresponding to the SAS protocol message based on the service number and the reply message.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fault message locating method according to any one of claims 1 to 6 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the fault message locating method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • SAS link fault positioning method and device, equipment and storage medium

    CN112783703A

  • SAS link fault diagnosis method and device, equipment and storage medium

    CN117811903A