SAS link state monitoring method and device, electronic equipment and medium

By obtaining multiple preset indicator data of SAS links, using scoring rules and weight summary to quantify link status, solving the problem of untimely monitoring of SAS link status and insufficient prevention capabilities in the prior art, realizing SAS Real-time, efficient monitoring and failure prevention of links.

CN119201640APending Publication Date: 2024-12-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411037741.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing technology cannot monitor the SAS link status in real time, resulting in untimely fault detection and lack of preventive capabilities for potential faults. Traditional monitoring methods mainly focus on the occurrence of faults rather than potential faults.

Method used

By obtaining data of multiple preset indicators, converting them into indicator scores using scoring rules, and using weight summary to obtain the total link score. Combining the preset score interval and link state mapping relationship, the link state is realized Quantize, trigger an alarm and perform a failback operation.

Benefits of technology

It realizes comprehensive, real-time, efficient and accurate monitoring of SAS link status, significantly improves the stability, reliability and maintenance efficiency of the link, can catch exceptions before failure, and improves fault prevention capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201640A_ABST
    Figure CN119201640A_ABST
Patent Text Reader

Abstract

The invention provides an SAS link state monitoring method and device, electronic equipment and a medium, and relates to the technical field of computers. The method comprises the following steps: respectively acquiring index data corresponding to various preset indexes in an SAS link; converting the index data into component values by using scoring rules corresponding to the preset indexes to obtain index scores corresponding to the preset indexes; summarizing all the index scores by using weights corresponding to the preset indexes to obtain a total link score; and matching the link total score with a preset score interval and link state mapping relation to obtain a target link state. According to the scheme of the invention, the quantification of the link state is realized by combining multiple indexes, the link total score and the score interval are combined to represent the intermediate state of more links, the flexibility of link state monitoring is remarkably improved, and the stability, reliability and maintenance efficiency of the links can also be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a SAS link status monitoring method, device, electronic equipment and medium. Background Art

[0002] With the development of information technology, storage systems are playing an increasingly important role in enterprise and personal applications. The performance stability of storage systems is directly related to the security and integrity of data. As a high-speed and reliable storage device interface, SAS links (Serial Attached SCSI) have been widely used in storage systems. During operation, SAS links may fail due to hardware aging, external interference and other factors, thus affecting the overall performance of the storage system. Therefore, it is particularly important to monitor SAS links and detect failures in a timely manner.

[0003] At present, most storage systems use traditional monitoring methods for SAS link fault management, such as regular inspections and manual troubleshooting. Although these methods can detect some faults, they have the following shortcomings: On the one hand, fault detection is not timely. Traditional monitoring methods cannot monitor the status of SAS links in real time, so it is difficult to detect potential faults in time. On the other hand, the fault prevention capability is limited. Traditional monitoring methods mainly focus on faults that have occurred, but lack the ability to prevent potential faults. Summary of the invention

[0004] The present invention provides a SAS link status monitoring method, device, electronic equipment and medium, which are used to solve the defects of the prior art that the SAS link status monitoring has limitations and cannot meet the high requirements for SAS link fault management, and realize comprehensive, real-time, efficient and accurate SAS link monitoring.

[0005] According to a first aspect of the present invention, the present invention provides a SAS link status monitoring method, the method comprising: Obtain the indicator data corresponding to various preset indicators in the SAS link respectively; The indicator data is converted into values ​​using scoring rules corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator; The weights corresponding to the preset indicators are used to aggregate the scores of all the indicators to obtain the total link score; The target link state is obtained by matching the total link score with a preset score interval and link state mapping relationship.

[0006] According to the SAS link status monitoring method of the present invention, the multiple preset indicators include Link status, negotiation rate, link error and Change Count, and the indicator data corresponding to each preset indicator in the SAS link is obtained respectively, including: The preset query command is periodically executed at a preset time interval to obtain the Link status, negotiation rate, link error, and Change Count corresponding data of the current cycle of the SAS link.

[0007] According to the SAS link status monitoring method of the present invention, when the preset indicator is the Link status, converting the indicator data into values ​​to obtain indicator scores corresponding to the preset indicators using scoring rules corresponding to the preset indicators includes: If the Link status of the current cycle is link disconnection, the corresponding indicator score is set to be equal to the first preset score; If the Link state of the current cycle is link connection, the corresponding indicator score is set to be equal to a second preset score, wherein the first preset score is less than the second preset score.

[0008] According to the SAS link status monitoring method of the present invention, when the preset indicator is the negotiation rate, the step of converting the indicator data into values ​​to obtain indicator scores corresponding to the preset indicators using scoring rules corresponding to the preset indicators includes: If the negotiation rate value of the current period does not exceed the preset negotiation rate value, the corresponding indicator score is set equal to the first preset score; If the negotiation rate value of the current period exceeds the preset negotiation rate value, the corresponding indicator score is set equal to the second preset score.

[0009] According to the SAS link status monitoring method of the present invention, when the preset indicator is Change Count, the step of converting the indicator data into values ​​to obtain indicator scores corresponding to the preset indicators using scoring rules corresponding to the preset indicators includes: If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is less than or equal to the first preset ratio, then the corresponding indicator score is set to be equal to the first preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the first preset ratio and less than or equal to the second preset ratio, then the corresponding indicator score is set equal to the third preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the second preset ratio and less than the third preset ratio, the corresponding indicator score is set equal to the fourth preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the third preset ratio, the corresponding indicator score is set equal to the second preset score; Among them, the first preset ratio, the second preset ratio and the third preset ratio increase in sequence, the third preset score is greater than the first preset score and less than the fourth preset score, and the fourth preset score is less than the second preset score.

[0010] According to the SAS link status monitoring method of the present invention, when the preset indicator is a link error, converting the indicator data into values ​​to obtain indicator scores corresponding to the preset indicators using scoring rules corresponding to the preset indicators includes: Selecting the maximum value among multiple parameters included in the link bit error as the target parameter; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is less than or equal to the first preset ratio, then the corresponding indicator score is set to be equal to the first preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the first preset ratio and less than or equal to the second preset ratio, then the corresponding indicator score is set equal to the third preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the second preset ratio and less than the third preset ratio, then the corresponding indicator score is set equal to the fourth preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the third preset ratio, the corresponding indicator score is set equal to the second preset score; Among them, the first preset ratio, the second preset ratio and the third preset ratio increase in sequence, the third preset score is greater than the first preset score and less than the fourth preset score, and the fourth preset score is less than the second preset score.

[0011] According to the SAS link status monitoring method of the present invention, the method of aggregating all the indicator scores using the weights corresponding to the preset indicators to obtain the total link score includes: Calculate the product of the indicator score and weight corresponding to each preset indicator respectively; The sum of all products is calculated and used as the total score of the link.

[0012] According to the SAS link status monitoring method of the present invention, the preset score interval and link status mapping relationship is obtained by the following steps: Dividing the minimum value and the maximum value of the total link score into a first score interval, a second score interval, a third score interval, and a fourth score interval that are successively increasing and continuous; The SAS link status corresponding to the first score interval is set as fault, the SAS link status corresponding to the second score interval is set as severe warning, the SAS link status corresponding to the third score interval is set as prompt alarm, and the SAS link status corresponding to the fourth score interval is set as healthy; The step of matching the total link score with a preset score interval and link state mapping relationship to obtain a target link state includes: Taking the interval to which the total link score belongs among the first score interval, the second score interval, the third score interval, and the fourth score interval as the target interval; The SAS link state corresponding to the target interval is used as the target link state.

[0013] According to the SAS link status monitoring method of the present invention, after the step of matching the link total score with a preset score interval and link status mapping relationship to obtain a target link status, the method further includes: When the target link status is a prompt alarm or a severe warning, an alarm is triggered and the indicator data corresponding to each preset indicator and the recommended measures matching the target link status found in the fault library are fed back in the alarm; In the case that the target link status is a fault, a preset fault recovery operation is performed, wherein the preset fault recovery operation is restarting the SAS link or replacing hardware.

[0014] According to the SAS link status monitoring method of the present invention, the method is applied to each SAS link of the storage system, and the SAS links in the storage system include: a SAS link between a RAID card and an expansion card and a SAS link between an expansion card and any hard disk.

[0015] According to the SAS link status monitoring method of the present invention, the weights corresponding to the Link status, the negotiation rate, the link error, and the ChangeCount decrease in sequence and the sum of all the weights is equal to one.

[0016] According to a second aspect of the present invention, the present invention further provides a SAS link status monitoring device, the device comprising: An acquisition module, used to respectively acquire indicator data corresponding to multiple preset indicators in the SAS link; A conversion module, used to convert the indicator data into a score using a scoring rule corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator; A summarizing module, used to summarize all the indicator scores using the weights corresponding to the preset indicators to obtain a total link score; The matching module is used to match the total link score with a preset score interval and link state mapping relationship to obtain a target link state.

[0017] According to a third aspect of the present invention, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a SAS link status monitoring method as described above is implemented.

[0018] According to a fourth aspect of the present invention, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the SAS link status monitoring method as described in any one of the above is implemented.

[0019] The present invention provides a SAS link status monitoring method, which first obtains indicator data corresponding to multiple preset indicators, then converts the indicator data into indicator scores using scoring rules corresponding to each preset indicator, then uses weights corresponding to each preset indicator to aggregate multiple indicator scores to obtain a total link score, and finally uses a preset score interval and link status mapping relationship to match the link status corresponding to the total link score, and combines multiple indicators to achieve quantification of the link status. In addition, the total link score is combined with the score interval to represent the intermediate states of more links, and anomalies can be captured before failures, which not only significantly improves the flexibility of link status monitoring, but also improves the stability, reliability and maintenance efficiency of the link.

[0020] In addition, a SAS link status monitoring device, an electronic device, and a non-transitory computer-readable storage medium provided by the present invention can also achieve the above technical effects, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the 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 creative work.

[0022] Figure 1 This is one of the flow charts of the SAS link status monitoring method provided by the present invention.

[0023] Figure 2 It is a schematic diagram of the topological structure of the storage system provided by the present invention.

[0024] Figure 3 This is the second flow chart of the SAS link status monitoring method provided by the present invention.

[0025] Figure 4 It is a data schematic diagram of the corresponding link status and negotiation rate provided by the present invention.

[0026] Figure 5 It is a data schematic diagram corresponding to the indicator Change Count provided by the present invention.

[0027] Figure 6 It is a data schematic diagram corresponding to the indicator link bit error provided by the present invention.

[0028] Figure 7 The present invention is a schematic diagram of the structure of a SAS link status monitoring device.

[0029] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] First, the English abbreviations used in the present invention are explained as follows. Unless otherwise specified, the English abbreviations used hereinafter can be explained by the following explanation.

[0032] SAS:Serial Attached SCSI, serial attached SCSI interface.

[0033] PHY: Port Physical Layer, port physical layer.

[0034] MTBF: Mean Time Between Failures.

[0035] Change Count, change count or change count, is used to indicate the number of times an object, event, or state has changed.

[0036] Two commonly used SAS link status monitoring methods in related technologies are as follows: The first is the threshold monitoring method: This method sets the threshold of each SAS link indicator and triggers an alarm when the indicator value exceeds the threshold. However, since different systems have different requirements for SAS links, it is difficult to set a reasonable threshold, and this method can only reflect the status of the SAS link from a single indicator.

[0037] The second method is the monitoring method based on log analysis: This method finds faults by analyzing the log information of the SAS link. However, the log information is often large and complex, and it is difficult to extract effective fault information from it. In addition, this method cannot reflect the actual status of the SAS link in real time.

[0038] Combine the following Figures 1 to 8 The present invention describes a SAS link status monitoring method, a SAS link status monitoring device, an electronic device and a non-transitory computer-readable storage medium.

[0039] Figure 1 is a flow chart of a SAS link status monitoring method provided by an embodiment of the present invention, please refer to Figure 1 As shown, this embodiment provides a SAS link status monitoring method, which can be implemented by steps S101 to S104, and each step will be described in detail below: Step S101, respectively obtaining indicator data corresponding to a plurality of preset indicators in a SAS link.

[0040] In this embodiment, the SAS link can be a link formed by any SAS device communicating with other devices, and the SAS devices include but are not limited to SAS hard disks, SAS expansion cabinets, SAS controllers, etc. The preset index is a pre-set indicator that can characterize the link status or performance. The number of preset indicators should be greater than or equal to two. The combination of multiple preset indicators can be set according to user needs, such as the combined use of Link status, negotiation rate, and Change Count three preset indicators to achieve link status monitoring, and the combined negotiation rate, Change Count and link error three preset indicators to achieve link status monitoring. It should be noted that the specific combination form and number of the above multiple preset indicators are only used for illustration and should not be understood as a limitation on this embodiment.

[0041] There are many ways to obtain indicator data during the specific implementation process, for example, it can be obtained from the system log file by searching for keywords or fields; it can also be pre-installed in the system to which the SAS link belongs, and the indicator data can be captured in real time with the help of the monitoring tool; it can also be used to use a pre-written indicator query script to obtain the corresponding indicator data by calling the pre-written indicator query script; it can also be implemented with the help of machine learning and predictive analysis, for example, using a machine learning model to analyze historical indicator data to predict indicator data; it can also be run in the command line interface. Query commands to obtain corresponding indicator data. It should be noted that the indicator data acquisition methods listed above are only used for illustration and should not be understood as limitations on the scheme of the present invention.

[0042] Step S102: convert the indicator data into values ​​using scoring rules corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator.

[0043] In this embodiment, the scoring rules correspond to the preset indicators one by one, and different preset indicators correspond to different scoring rules. For example, if there are four preset indicators, four scoring rules need to be pre-set accordingly. The scoring rules can convert quantitative parameters or non-quantitative parameters into numerical values ​​representing scores.

[0044] Step S103: Aggregate all the indicator scores using the weights corresponding to the preset indicators to obtain a total link score.

[0045] In this embodiment, the weights correspond to the preset indicators one by one, and the weights are used to characterize the importance of each preset indicator. In the specific implementation process, the weights can be set with reference to the influence of the preset indicators on the link status. For example, the weights corresponding to the preset indicators with higher influence are set relatively larger, and the weights corresponding to the preset indicators with lower influence are set relatively smaller. The weights corresponding to different preset indicators can be the same or different.

[0046] Step S104: Match the total link score with a preset mapping relationship between a score range and a link state to obtain a target link state.

[0047] The SAS link status monitoring method of this embodiment first obtains indicator data corresponding to multiple preset indicators, then converts the indicator data into indicator scores using the scoring rules corresponding to each preset indicator, then uses the weights corresponding to each preset indicator to aggregate multiple indicator scores to obtain a total link score, and finally uses the preset score interval and link status mapping relationship to match the link status corresponding to the total link score, and combines multiple indicators to achieve quantification of the link status. In addition, the total link score is combined with the score interval to represent the intermediate states of more links, and anomalies can be captured before failures, which not only significantly improves the flexibility of link status monitoring, but also improves the stability, reliability and maintenance efficiency of the link.

[0048] In some possible implementations, the multiple preset indicators include Link status, negotiation rate, link error, and Change Count. The aforementioned step S101 obtains indicator data corresponding to each preset indicator in the SAS link, specifically including: The preset query command is periodically executed at a preset time interval to obtain the Link status, negotiation rate, link error, and Change Count corresponding data of the current cycle of the SAS link.

[0049] In some possible implementations, when the preset indicator is in Link state, the aforementioned step S102, using the scoring rules corresponding to each preset indicator, converts the indicator data into a score to obtain an indicator score corresponding to each preset indicator, specifically including: If the Link status of the current cycle is link disconnection, the corresponding indicator score is set to be equal to the first preset score; If the Link state of the current cycle is link connection, the corresponding indicator score is set to be equal to a second preset score, wherein the first preset score is less than the second preset score.

[0050] The SAS link status monitoring method of this embodiment sets corresponding assignment methods for two different Link states, realizes the quantification of non-numerical Link state indicators, so that the Link state indicators can be used for link state evaluation and can be combined with other indicators, which helps to improve the accuracy of link state evaluation.

[0051] In some possible implementations, when the preset indicator is a negotiation rate, the aforementioned step S102, using a scoring rule corresponding to each preset indicator, converts the indicator data into a score to obtain an indicator score corresponding to each preset indicator, specifically including: If the negotiation rate value of the current period does not exceed the preset negotiation rate value, the corresponding indicator score is set equal to the first preset score; If the negotiation rate value of the current period exceeds the preset negotiation rate value, the corresponding indicator score is set equal to the second preset score.

[0052] The SAS link status monitoring method of this embodiment sets a reference negotiation rate for the negotiation rate, and converts the negotiation rate value into a component value with the help of the reference negotiation rate, so that the negotiation rate indicator can be used for link status evaluation and can be combined with other indicators, which helps to improve the accuracy of link status evaluation.

[0053] In some possible implementations, when the preset indicator is Change Count, the aforementioned step S102, using the scoring rules corresponding to each preset indicator, converts the indicator data into a score to obtain an indicator score corresponding to each preset indicator, specifically including: If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is less than or equal to the first preset ratio, then the corresponding indicator score is set to be equal to the first preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the first preset ratio and less than or equal to the second preset ratio, then the corresponding indicator score is set equal to the third preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the second preset ratio and less than the third preset ratio, the corresponding indicator score is set equal to the fourth preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the third preset ratio, the corresponding indicator score is set equal to the second preset score; Among them, the first preset ratio, the second preset ratio and the third preset ratio increase in sequence, the third preset score is greater than the first preset score and less than the fourth preset score, and the fourth preset score is less than the second preset score.

[0054] The SAS link status monitoring method of this embodiment first uses the increment between the current cycle and the previous week and the cycle interval to convert the ratio for the Change Count indicator, and assigns values ​​to the ratio using four scoring intervals divided by three reference ratios, so that Change Count can be used for link status evaluation and can be combined with other indicators, which helps to improve the accuracy of link status evaluation.

[0055] In some possible implementations, when the preset indicator is a link bit error, the aforementioned step S102, using a scoring rule corresponding to each preset indicator to convert the indicator data into a score to obtain an indicator score corresponding to each preset indicator, specifically includes: A maximum value among multiple parameters included in the link error is selected as the target parameter; wherein the multiple parameters included in the link error may be InvalidWordCount, DisparityErrorCount, LossSyncCount, and ResetSeqFailCount; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is less than or equal to the first preset ratio, then the corresponding indicator score is set to be equal to the first preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the first preset ratio and less than or equal to the second preset ratio, then the corresponding indicator score is set equal to the third preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the second preset ratio and less than the third preset ratio, then the corresponding indicator score is set equal to the fourth preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the third preset ratio, the corresponding indicator score is set equal to the second preset score; Among them, the first preset ratio, the second preset ratio and the third preset ratio increase in sequence, the third preset score is greater than the first preset score and less than the fourth preset score, and the fourth preset score is less than the second preset score.

[0056] The SAS link status monitoring method of this embodiment first selects a parameter with the largest value from multiple parameters as a target parameter for the link error index, and then converts the increment of the target parameter between the current cycle and the previous week into a ratio, and assigns a value to the ratio using four scoring intervals divided by three reference ratios, so that the link error can be used for link status evaluation and can be combined with other indicators, which helps to improve the accuracy of link status evaluation.

[0057] In some possible implementations, the aforementioned step S103, using the weights corresponding to the preset indicators, summarizes all the indicator scores to obtain the total link score, specifically including: Calculate the product of the indicator score and weight corresponding to each preset indicator respectively; The sum of all products is calculated and used as the total score of the link.

[0058] In some possible implementations, in order to further improve the flexibility of status monitoring, a weight modification function can be set. Specifically, users can change the weights corresponding to each preset indicator in the operation interface. After each weight change and before it takes effect, the newly set weight needs to be compared with the weight range corresponding to each preset indicator to check whether each new weight is within the allowed range. If all newly set weights are within the allowed range, this weight modification is allowed to take effect. If any newly set weight is not within the allowed range, the application of this modified value is prohibited. On the one hand, this method can further improve the flexibility of link averaging and provide users with personalized monitoring strategies. On the other hand, the use of reference weight values ​​can also avoid unreasonable weight settings and ensure the effectiveness of the total link score to a certain extent.

[0059] The SAS link status monitoring method of this embodiment calculates the total link score by multiplying the weight of each preset indicator by the corresponding indicator score and then adding them together. This indicator score aggregation method has a low calculation overhead and is applicable to situations where there are more or fewer preset indicators.

[0060] In some possible implementations, the preset mapping relationship between the score interval and the link state is obtained by the following steps: Dividing the minimum value and the maximum value of the total link score into a first score interval, a second score interval, a third score interval, and a fourth score interval that are successively increasing and continuous; The SAS link status corresponding to the first score interval is set as fault, the SAS link status corresponding to the second score interval is set as severe warning, the SAS link status corresponding to the third score interval is set as prompt alarm, and the SAS link status corresponding to the fourth score interval is set as healthy; The aforementioned step S104, matching the total link score with a preset mapping relationship between a score range and a link state to obtain a target link state, specifically includes: Taking the interval to which the total link score belongs among the first score interval, the second score interval, the third score interval, and the fourth score interval as the target interval; The SAS link state corresponding to the target interval is used as the target link state.

[0061] The SAS link status monitoring method of this embodiment divides the value range of the link total score into four intervals, and also associates a SAS link status with each interval. When the link status needs to be determined, it is only necessary to match the specific link total score with the four intervals, so that the target link status can be found quickly and accurately. Compared with the two state distinction methods of fault and non-fault, the four link states can better calibrate some intermediate states, and will not cause overly complicated management.

[0062] In some possible implementations, in step S104, after matching the total link score with a preset mapping relationship between a score range and a link state to obtain a target link state, the method further includes: When the target link status is a prompt alarm or a severe warning, an alarm is triggered and the indicator data corresponding to each preset indicator and the recommended measures matching the target link status found in the fault library are fed back in the alarm; In the case that the target link status is a fault, a preset fault recovery operation is performed, wherein the preset fault recovery operation is restarting the SAS link or replacing hardware.

[0063] The SAS link status monitoring method of this embodiment can provide feedback on suggested measures while reminding the administrator in response to two situations: an alarm or a serious warning, thereby reducing the risk of further deterioration of the link status. For fault conditions, repairs can be performed with the help of preset repair operations, thereby reducing the workload of operation and maintenance personnel, avoiding long-term link failures, and improving operation and maintenance efficiency.

[0064] In some possible implementations, the method is applied to each SAS link of a storage system, where the SAS links in the storage system include: a SAS link between a RAID card and an expansion card and a SAS link between an expansion card and any hard disk.

[0065] The SAS link status monitoring method of this embodiment can monitor the connection links of each hard disk of the storage system, which helps the storage system maintain the optimal performance state and improves data transmission efficiency and system response speed.

[0066] In some possible implementations, the weights corresponding to the link state, the negotiation rate, the link error, and the Change Count decrease in sequence, and the sum of all the weights is equal to one.

[0067] The SAS link status monitoring device of this embodiment makes link evaluation more accurate and reasonable by further limiting the weights corresponding to the indicators, thereby improving the accuracy of status monitoring.

[0068] In another embodiment, in order to facilitate understanding of the solution of the present invention, the following takes the application of the method to a storage system as an example. Figure 2 As shown, all possible SAS included in the storage system are monitored as objects. This embodiment provides another SAS link status monitoring method. Please refer to Figure 3 The specific implementation process is as follows: Step 1: Determine key indicators and weight ratios.

[0069] When implementing the SAS link fault management method, it is first necessary to determine the key indicators of the SAS link and their weight ratios. These key indicators include link status, negotiation rate, change count, and link error, which directly reflect the performance and stability of the SAS link. The weight ratio is allocated according to the importance and impact of each indicator on the SAS link performance, and the sum of all weight ratios is 10. The indicator allocation weights and reasons can be found in Table 1.

[0070] Table 1 Reference table of weights of different indicators

[0071] Step 2: Get the results of key indicators regularly.

[0072] After determining the key indicators and weight ratios, the system begins to periodically obtain the key indicator data of the SAS link. This process can be obtained through the scrtyncli command interface to ensure that the key indicator data of the SAS link, such as Link status, negotiation rate, Change Count, and link error, are captured. These data will serve as the basis for subsequent scoring and status classification. Please refer to Figure 4 As shown, you can query the following parameters. The first column PHY in the echo corresponds to different SAS links. The Link status is obtained through the enable column, and the negotiated rate is obtained through the speed column. Please refer to Figure 5As shown, you can query the following parameters. The first column of PHY in the output corresponds to different SAS links. You can get the Change Count through the PHY CHG CNT column. Figure 6 As shown, you can query the following parameters. The first column of PHY in the command output corresponds to different SAS links. The following four columns are used to obtain different link error codes for each PHY.

[0073] Step 3: Calculate the score for each indicator.

[0074] Based on the key indicator data obtained in real time, the system calculates a score for each indicator of the link. The calculation method of the score varies according to the characteristics of the indicator, with the highest score being 10 and the lowest score being 0. The indicator score is calculated according to the following standards. This embodiment does not limit the detection period, which can be determined according to actual conditions. In the specific implementation process, the indicator scores of Link status, negotiation rate, Change Count and link error can be implemented with reference to Table 1.

[0075] Table 2 Scoring rules for different indicators

[0076] Step 4: Calculate the total score.

[0077] Because the score of each link is also 10 points, the sum of all weighted ratios is 10, so the comprehensive score is also 0-10 points. This total score will be used for subsequent status classification and fault handling. Link comprehensive score calculation method: Comprehensive score = Link status score * 0.4 + negotiation rate score * 0.3 + link error score * 0.2 + ChangeCount score * 0.1.

[0078] Step 5: Link status classification.

[0079] According to the total score, the system divides the SAS link status into four categories: healthy, warning, serious warning and fault. In the specific implementation process, the corresponding relationship between the total link score and the SAS link status can be set according to Table 3.

[0080] Table 3 Correspondence between total link score and SAS link status

[0081] Step 6: Real-time monitoring and troubleshooting.

[0082] Real-time monitoring: The system continuously monitors the performance indicator data of the SAS link and calculates the score and status in real time. The automatic fault handling strategy is as follows: When the SAS link enters the warning or severe warning state, the system triggers an alarm to notify the administrator and provides relevant performance indicator data and recommended measures. When the SAS link enters the fault state, the system automatically performs fault recovery operations, such as restarting the SAS link, replacing hardware, etc., and continuously monitors the recovery process. If the recovery fails, the alarm will continue to be triggered to notify the administrator.

[0083] Step 7. Logging and reporting.

[0084] The system records the performance indicator data, scores, status changes, and fault handling process of the SAS link, and generates detailed logs and reports for administrators to analyze and audit. These logs and reports can be used for subsequent troubleshooting, performance analysis, and system optimization.

[0085] The SAS link status monitoring method of this embodiment has at least the following beneficial effects: It can improve system reliability: by real-time monitoring of the performance indicators of the SAS link, and scoring and status classification based on these indicators, it can promptly detect potential faults, thereby avoiding system interruption due to SAS link failures, which greatly improves the reliability and stability of the storage system. It can optimize system performance: by continuously monitoring the performance indicators of the SAS link, it can promptly identify factors that may affect system performance, which helps to maintain the optimal performance state of the storage system and improve data transmission efficiency and system response speed. It can provide decision support: the logs and reports generated by the system provide administrators with rich data support to help them better understand the operating status, fault history and performance trends of the SAS link. This helps administrators make more informed decisions, such as adjusting system configuration, optimizing resource allocation, etc.

[0086] The SAS link status monitoring device provided by the present invention is described below. The SAS link status monitoring device described below and the SAS link status monitoring method described above can be referred to each other.

[0087] Please refer to Figure 7 As shown, this embodiment provides a SAS link status monitoring device, specifically, the device includes: an acquisition module 701, a conversion module 702, a summary module 703 and a matching module 704, and the above modules are described in detail below: An acquisition module 701 is used to respectively acquire indicator data corresponding to multiple preset indicators in a SAS link; A conversion module 702, configured to convert the indicator data into a score using a scoring rule corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator; A summarizing module 703 is used to summarize all the indicator scores using the weights corresponding to the preset indicators to obtain a total link score; The matching module 704 is used to match the total link score with a preset mapping relationship between a score range and a link state to obtain a target link state.

[0088] The SAS link status monitoring device of this embodiment first obtains indicator data corresponding to multiple preset indicators, and then converts the indicator data into indicator scores using the scoring rules corresponding to each preset indicator, and then uses the weights corresponding to each preset indicator to summarize multiple indicator scores to obtain a total link score, and finally uses the preset score interval and link status mapping relationship to match the corresponding link status for the total link score, and combines multiple indicators to achieve quantification of the link status. In addition, the total link score is combined with the score interval to represent the intermediate states of more links, and anomalies can be captured before failures, which not only significantly improves the flexibility of link status monitoring, but also improves the stability, reliability and maintenance efficiency of the link.

[0089] It should be noted that each module in the above-mentioned SAS link status monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0090] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the SAS link status monitoring method, which includes: respectively obtaining indicator data corresponding to multiple preset indicators in the SAS link; using the scoring rules corresponding to each preset indicator to convert the indicator data into a score to obtain an indicator score corresponding to each preset indicator; using the weight corresponding to each preset indicator to summarize all the indicator scores to obtain a total link score; matching the total link score with the preset score interval and link status mapping relationship to obtain the target link status.

[0091] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0092] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the SAS link status monitoring method provided by the above methods, and the method includes: respectively obtaining indicator data corresponding to multiple preset indicators in the SAS link; using the scoring rules corresponding to each preset indicator to convert the indicator data into scores to obtain indicator scores corresponding to each preset indicator; using the weights corresponding to each preset indicator to summarize all the indicator scores to obtain a total link score; matching the total link score with a preset score range and link status mapping relationship to obtain a target link status.

[0093] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the SAS link status monitoring method provided by the above-mentioned methods, the method comprising: respectively obtaining indicator data corresponding to multiple preset indicators in the SAS link; using the scoring rules corresponding to each preset indicator to convert the indicator data into scores to obtain indicator scores corresponding to each preset indicator; using the weights corresponding to each preset indicator to aggregate all the indicator scores to obtain a total link score; matching the total link score with a preset score range and link status mapping relationship to obtain a target link status.

[0094] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A SAS link status monitoring method, characterized in that: The method comprises: Obtain the indicator data corresponding to various preset indicators in the SAS link respectively; The indicator data is converted into values ​​using scoring rules corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator; The weights corresponding to the preset indicators are used to aggregate the scores of all the indicators to obtain the total link score; The target link state is obtained by matching the total link score with a preset score interval and link state mapping relationship.

2. The SAS link status monitoring method according to claim 1, characterized in that: The multiple preset indicators include Link status, negotiation rate, link error, and Change Count. The indicator data corresponding to each preset indicator in the SAS link is obtained respectively, including: The preset query command is periodically executed at a preset time interval to obtain the Link status, negotiation rate, link error, and Change Count corresponding data of the current cycle of the SAS link.

3. The SAS link status monitoring method according to claim 2, characterized in that: When the preset indicator is in Link state, converting the indicator data into values ​​using scoring rules corresponding to each preset indicator to obtain indicator scores corresponding to each preset indicator includes: If the Link status of the current cycle is link disconnection, the corresponding indicator score is set to be equal to the first preset score; If the Link state of the current cycle is link connection, the corresponding indicator score is set to be equal to a second preset score, wherein the first preset score is less than the second preset score.

4. The SAS link status monitoring method according to claim 2, characterized in that: In the case where the preset indicator is a negotiation rate, converting the indicator data into a value by using a scoring rule corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator includes: If the negotiation rate value of the current period does not exceed the preset negotiation rate value, the corresponding indicator score is set equal to the first preset score; If the negotiation rate value of the current period exceeds the preset negotiation rate value, the corresponding indicator score is set equal to the second preset score.

5. The SAS link status monitoring method according to claim 2, characterized in that: In the case where the preset indicator is Change Count, converting the indicator data into values ​​using scoring rules corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator includes: If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is less than or equal to the first preset ratio, then the corresponding indicator score is set to be equal to the first preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the first preset ratio and less than or equal to the second preset ratio, then the corresponding indicator score is set equal to the third preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the second preset ratio and less than the third preset ratio, the corresponding indicator score is set equal to the fourth preset score; If the ratio of the Change Count increment of the current cycle relative to the previous cycle to the preset time interval is greater than the third preset ratio, the corresponding indicator score is set equal to the second preset score; Among them, the first preset ratio, the second preset ratio and the third preset ratio increase in sequence, the third preset score is greater than the first preset score and less than the fourth preset score, and the fourth preset score is less than the second preset score.

6. The SAS link status monitoring method according to claim 2, characterized in that: In the case where the preset indicator is a link bit error, converting the indicator data into values ​​using scoring rules corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator includes: Selecting the maximum value among multiple parameters included in the link bit error as the target parameter; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is less than or equal to the first preset ratio, then the corresponding indicator score is set to be equal to the first preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the first preset ratio and less than or equal to the second preset ratio, then the corresponding indicator score is set equal to the third preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the second preset ratio and less than the third preset ratio, then the corresponding indicator score is set equal to the fourth preset score; If the ratio of the target parameter increment of the current cycle relative to the previous cycle to the preset time interval is greater than the third preset ratio, the corresponding indicator score is set equal to the second preset score; Among them, the first preset ratio, the second preset ratio and the third preset ratio increase in sequence, the third preset score is greater than the first preset score and less than the fourth preset score, and the fourth preset score is less than the second preset score.

7. The SAS link status monitoring method according to claim 1, characterized in that: The method of aggregating all the indicator scores using the weights corresponding to the preset indicators to obtain the total link score includes: Calculate the product of the indicator score and weight corresponding to each preset indicator respectively; The sum of all products is calculated and used as the total score of the link.

8. The SAS link status monitoring method according to claim 1, characterized in that: The preset mapping relationship between the score interval and the link state is obtained by the following steps: Dividing the minimum value and the maximum value of the total link score into a first score interval, a second score interval, a third score interval, and a fourth score interval that are successively increasing and continuous; The SAS link status corresponding to the first score interval is set as fault, the SAS link status corresponding to the second score interval is set as severe warning, the SAS link status corresponding to the third score interval is set as prompt alarm, and the SAS link status corresponding to the fourth score interval is set as healthy; The step of matching the total link score with a preset score interval and link state mapping relationship to obtain a target link state includes: Taking the interval to which the total link score belongs among the first score interval, the second score interval, the third score interval, and the fourth score interval as the target interval; The SAS link state corresponding to the target interval is used as the target link state.

9. The SAS link status monitoring method according to claim 8, characterized in that: After the step of matching the total link score with a preset score interval and link state mapping relationship to obtain a target link state, the method further includes: When the target link status is a prompt alarm or a severe warning, an alarm is triggered and the indicator data corresponding to each preset indicator and the recommended measures matching the target link status found in the fault library are fed back in the alarm; In the case that the target link status is a fault, a preset fault recovery operation is performed, wherein the preset fault recovery operation is restarting the SAS link or replacing hardware.

10. The SAS link status monitoring method according to claim 1, characterized in that: The method is applied to each SAS link of a storage system, wherein the SAS links in the storage system include: a SAS link between a RAID card and an expansion card, and a SAS link between an expansion card and any hard disk.

11. The SAS link status monitoring method according to claim 2, characterized in that: The weights of link status, negotiation rate, link error, and Change Count decrease in sequence, and the sum of all weights is equal to one.

12. A SAS link status monitoring device, characterized in that: The device comprises: An acquisition module, used to respectively acquire indicator data corresponding to multiple preset indicators in the SAS link; A conversion module, used to convert the indicator data into a score using a scoring rule corresponding to each preset indicator to obtain an indicator score corresponding to each preset indicator; A summarizing module, used to summarize all the indicator scores using the weights corresponding to the preset indicators to obtain a total link score; The matching module is used to match the total link score with a preset score interval and link state mapping relationship to obtain a target link state.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the SAS link status monitoring method according to any one of claims 1 to 11 is implemented.

14. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the SAS link status monitoring method according to any one of claims 1 to 11 is implemented.