CN111949485A - SAS port monitoring method, system and related device - Google Patents

SAS port monitoring method, system and related device Download PDF

Info

Publication number
CN111949485A
CN111949485A CN202010820151.7A CN202010820151A CN111949485A CN 111949485 A CN111949485 A CN 111949485A CN 202010820151 A CN202010820151 A CN 202010820151A CN 111949485 A CN111949485 A CN 111949485A
Authority
CN
China
Prior art keywords
change value
value
period
alarm threshold
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010820151.7A
Other languages
Chinese (zh)
Inventor
韩廷卯
宋以强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010820151.7A priority Critical patent/CN111949485A/en
Publication of CN111949485A publication Critical patent/CN111949485A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a monitoring method of an SAS port, which comprises the following steps: reading the current period of the SAS port in the current monitoring period; determining an accumulated change value according to the difference value of the change values of the current period and the previous period; judging whether the accumulated change value is larger than an alarm threshold value; and if so, taking the SAS port as a fault port. The method and the device have the advantages that PHY change frequency of the SAS port is periodically acquired, faults of the SAS port are predicted, and when the accumulated change value is larger than the alarm threshold value or not, the port is used as the fault port so that the SAS port can be eliminated, an alarm is reported, and risks are prompted. The application also provides a monitoring system of the SAS port, a computer readable storage medium and electronic equipment, which have the beneficial effects.

Description

SAS port monitoring method, system and related device
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to a method, a system, and a related device for monitoring an SAS port.
Background
The storage is a product with high requirement on reliability, and daily operation and maintenance management is very important. The hard disk communication at the back end of the storage product generally adopts SAS (Serial Attached SCSI) protocol. Currently, a common SAS port for storage products is a wide port including a plurality of PHYs (physical layer chips). When a PHY of the SAS port fails, the PHY selected for communication of the SAS port may be changed, and even an I/O access failure may be caused when the PHY is serious.
Therefore, how to monitor the SAS port is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a monitoring method, a monitoring system, a computer readable storage medium and electronic equipment of an SAS port, which can monitor the state of the SAS port and improve the storage reliability.
In order to solve the above technical problems, the present application provides a method for monitoring an SAS port, which has the following specific technical solutions:
reading a period change value in the current monitoring period of the SAS port;
determining an accumulated change value according to the difference value of the change value of the period and the change value of the previous period;
judging whether the accumulated change value is larger than an alarm threshold value;
and if so, taking the SAS port as a fault port.
Optionally, before reading the cycle change value in the current cycle of the SAS port, the method further includes:
initializing port parameters of the SAS port;
the SAS port parameters comprise a monitoring period, the alarm threshold, the accumulated change value, the change value of the previous period and the change value of the current period.
Optionally, before determining whether the accumulated variation value is greater than the alarm threshold, the method further includes:
correcting the accumulated change value according to the size relation between the accumulated change value and an alarm threshold value to obtain a corrected value;
the determining whether the accumulated change value is greater than an alarm threshold value comprises:
and judging whether the correction value is larger than the alarm threshold value.
Optionally, the correcting the accumulated change value according to the magnitude relationship between the accumulated change value and the alarm threshold to obtain a correction value includes:
if the accumulated change value is larger than the alarm threshold value, obtaining a correction value according to a first correction formula;
if the accumulated change value is smaller than the alarm threshold value, obtaining a correction value according to a second correction formula;
wherein the first correction formula is M ═ C + N/2, and the second correction formula is M ═ C + T;
m is a correction value, C is an accumulated change value, N is the alarm threshold value, and T is the difference value between the change value of the period and the change value of the previous period.
Optionally, if the accumulated variation value is smaller than the alarm threshold, the method further includes:
and updating the change value of the previous period by using the change value of the current period.
The present application further provides a monitoring system for an SAS port, including:
the reading module is used for reading the period change value in the current monitoring period of the SAS port;
the calculation module is used for determining an accumulated change value according to the difference value of the cycle change value and the previous cycle change value;
the judging module is used for judging whether the accumulated change value is larger than an alarm threshold value;
and the alarm module is used for taking the SAS port as a fault port when the judgment result of the judgment module is yes.
Optionally, the method further includes:
the initialization module is used for initializing port parameters of the SAS port;
the SAS port parameters comprise a monitoring period, the alarm threshold, the accumulated change value, the change value of the previous period and the change value of the current period.
Optionally, the method further includes:
the correction module is used for correcting the accumulated change value according to the magnitude relation between the accumulated change value and the alarm threshold value before judging whether the accumulated change value is larger than the alarm threshold value or not to obtain a corrected value;
the judging module is a module for judging whether the correction value is greater than the alarm threshold value.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
The present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when calling the computer program in the memory.
The application provides a monitoring method of an SAS port, which comprises the following steps: reading a period change value in the current monitoring period of the SAS port; determining an accumulated change value according to the difference value of the change value of the period and the change value of the previous period; judging whether the accumulated change value is larger than an alarm threshold value; and if so, taking the SAS port as a fault port.
The method and the device have the advantages that PHY change frequency of the SAS port is periodically acquired, faults of the SAS port are predicted, and when the accumulated change value is larger than the alarm threshold value or not, the port is used as the fault port so that the SAS port can be eliminated, an alarm is reported, and risks are prompted. The application also provides a monitoring system of the SAS port, a computer readable storage medium and an electronic device, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a monitoring method for an SAS port according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a monitoring system of an SAS port according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for monitoring an SAS port according to an embodiment of the present disclosure, where the method includes:
s101: reading a period change value in the current monitoring period of the SAS port;
the SAS port generally includes a plurality of PHYs, and the number of PHYs included in the SAS port in this embodiment is not particularly limited, and may be 4, 8, or another number. When the fixed PHY does not stably send and receive signals, the SAS chip automatically selects other PHYs for the port to be used for communication, and the PHY change count of the port is increased by 1. In other words, when the fixed PHY signal is unstable, the period change value is incremented by 1, and whether the PHY is a fixed PHY during communication through the SAS port specifically determines whether the signal is stable. Of course, the signal stability may also be determined according to real-time communication data during communication, and the period change value in the current monitoring period may be updated. Every time the SAS port communicates using a non-fixed PHY, the value of the cycle change is incremented by 1.
It is understood that the present embodiment generally requires port parameter initialization for the SAS port before executing the present step. The port parameters comprise a monitoring period, an alarm threshold value, an accumulated change value, a change value of a previous period and a change value of the current period. The monitoring period refers to a monitoring period of the SAS port, the accumulated change value and the change value of the current period are both 0 at the beginning, and the change value of the previous period is the change value of the current period in the previous monitoring period. It should be noted that, in this embodiment, neither the monitoring period nor the alarm threshold is specifically limited, and may be set by a person skilled in the art. For example, the monitoring period may be 1 minute or 2 minutes, etc.
S102: determining an accumulated change value according to the difference value of the change value of the period and the change value of the previous period;
before executing the step, the change value of the previous period needs to be acquired by default, specifically, the change value of the current period in each period can be recorded by using a storage structure such as a log, and the change value of the previous period can be read from the storage structure.
The step is to determine the accumulated change value, and obviously, if the SAS port is working normally, the change value of the previous cycle should be small, and if the difference between the change value of the cycle and the change value of the previous cycle is large, it indicates that the change value of the cycle is large, which means that the SAS port is communicating with a non-fixed PHY more, and there is a large probability of abnormality, at least, it indicates that the PHY is abnormal, resulting in unstable communication, and the SAS port is abnormal to the outside.
S103: judging whether the accumulated change value is larger than an alarm threshold value; if yes, entering S104;
s104: and taking the SAS port as a failure port.
The step aims to judge the size relation between the accumulated change value and the alarm threshold, if the accumulated change value is larger than the alarm threshold, the SAS is used as a fault port, the SAS port can be temporarily eliminated as a communication port, an alarm is reported to prompt that the communication risk exists in the SAS, and the normal communication function of the SAS is recovered after the SAS is repaired. Of course, if the value is smaller than the alarm threshold, it indicates that there is no abnormality in the SAS port, and the SAS port does not need to be processed, and the change value of the previous cycle may be updated by using the change value of the current cycle.
In particular, this embodiment may be repeatedly executed multiple times in one monitoring period, and corresponding steps are executed according to the read change value of this period each time.
It should be noted that, if an SAS port in a certain monitoring period is abnormal, the change value of the previous period in the period is not suitable for being used as the change value of the previous period in the next monitoring period, and when the SAS port is initialized before the next monitoring period starts, the change value of the previous period, the accumulated change value, and the change value of the current period may be initialized to 0, which does not affect the subsequent monitoring process.
In the embodiment of the application, the PHY change frequency of the SAS port is periodically acquired, the fault of the SAS port is predicted, and when the accumulated change value is larger than the alarm threshold value or not, the port is used as the fault port so as to be removed from the SAS port, and an alarm is reported to prompt risks.
Based on the foregoing embodiment, as a preferred embodiment, since the communication process is easily affected by external factors, for example, changes of communication objects, and the like, and thus the change value of the present period of each monitoring period is easily different, in order to reduce the influence of additional factors on the SAS port monitoring, before performing S103 to determine whether the accumulated change value is greater than the alarm threshold, the method may further include:
correcting the accumulated change value according to the magnitude relation between the accumulated change value and the alarm threshold value to obtain a corrected value;
it may be determined whether the correction value is greater than the warning threshold when S103 is executed.
At this time, the complete execution flow of the monitoring method for the SAS port provided in this embodiment is as follows:
s201: reading a period change value in the current monitoring period of the SAS port;
s202: determining an accumulated change value according to the difference value of the change value of the period and the change value of the previous period;
s203: correcting the accumulated change value according to the magnitude relation between the accumulated change value and the alarm threshold value to obtain a corrected value
S204: judging whether the corrected value is larger than an alarm threshold value; if yes, go to S205;
s205: and taking the SAS port as a failure port.
Specifically, how to correct the accumulated change value according to the magnitude relationship between the accumulated change value and the alarm threshold is not limited herein. Preferably, the accumulated change value is corrected according to the magnitude relationship between the accumulated change value and the alarm threshold, and the correction value may be obtained by the following execution mode:
if the accumulated change value is larger than the alarm threshold value, obtaining a correction value according to a first correction formula;
if the accumulated change value is smaller than the alarm threshold value, a correction value is obtained according to a second correction formula;
the first correction formula is M ═ C + N/2, and the second correction formula is M ═ C + T;
m is a correction value, C is an accumulated change value, N is an alarm threshold value, and T is a difference value between the change value of the period and the change value of the previous period.
It is easily understood that the above provided correction formula is only a better correction formula implemented on the basis of the monitoring method of the SAS port disclosed in the present application, and those skilled in the art can also adopt other correction formulas to reduce accidental errors.
In the following, a monitoring system of an SAS port provided in an embodiment of the present application is introduced, and the monitoring system described below and the monitoring method of the SAS port described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a monitoring system of an SAS port according to an embodiment of the present disclosure, and the present disclosure further provides a monitoring system of an SAS port, including:
a reading module 100, configured to read a change value of the current period in the current monitoring period of the SAS port;
a calculating module 200, configured to determine an accumulated variation value according to a difference between the variation value of the current period and the variation value of the previous period;
a judging module 300, configured to judge whether the accumulated change value is greater than an alarm threshold;
and the alarm module 400 is configured to use the SAS port as a failed port if the determination result of the determination module is yes.
Based on the above embodiment, as a preferred embodiment, the method may further include:
the initialization module is used for initializing port parameters of the SAS port;
the SAS port parameters comprise a monitoring period, the alarm threshold, the accumulated change value, the change value of the previous period and the change value of the current period.
Based on the above embodiment, as a preferred embodiment, the method may further include:
the correction module is used for correcting the accumulated change value according to the magnitude relation between the accumulated change value and the alarm threshold value before judging whether the accumulated change value is larger than the alarm threshold value or not to obtain a corrected value;
the judging module 300 is a module for judging whether the correction value is greater than the alarm threshold.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application further provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the electronic device may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A monitoring method of an SAS port is characterized by comprising the following steps:
reading a period change value in the current monitoring period of the SAS port;
determining an accumulated change value according to the difference value of the change value of the period and the change value of the previous period;
judging whether the accumulated change value is larger than an alarm threshold value;
and if so, taking the SAS port as a fault port.
2. The monitoring method according to claim 1, wherein before reading the cycle change value in the current cycle of the SAS port, further comprising:
initializing port parameters of the SAS port;
the port parameters comprise a monitoring period, the alarm threshold, the accumulated change value, the change value of the previous period and the change value of the current period.
3. The monitoring method of claim 1, wherein before determining whether the accumulated change value is greater than an alarm threshold, further comprising:
correcting the accumulated change value according to the size relation between the accumulated change value and an alarm threshold value to obtain a corrected value;
the determining whether the accumulated change value is greater than an alarm threshold value comprises:
and judging whether the correction value is larger than the alarm threshold value.
4. The monitoring method of claim 3, wherein the modifying the accumulated change value according to the magnitude relationship between the accumulated change value and the alarm threshold comprises:
if the accumulated change value is larger than the alarm threshold value, obtaining a correction value according to a first correction formula;
if the accumulated change value is smaller than the alarm threshold value, obtaining a correction value according to a second correction formula;
wherein the first correction formula is M ═ C + N/2, and the second correction formula is M ═ C + T;
m is a correction value, C is an accumulated change value, N is the alarm threshold value, and T is the difference value between the change value of the period and the change value of the previous period.
5. The method of claim 1, wherein if the accumulated change value is less than an alarm threshold, further comprising:
and updating the change value of the previous period by using the change value of the current period.
6. A monitoring system for an SAS port, comprising:
the reading module is used for reading the period change value in the current monitoring period of the SAS port;
the calculation module is used for determining an accumulated change value according to the difference value of the cycle change value and the previous cycle change value;
the judging module is used for judging whether the accumulated change value is larger than an alarm threshold value;
and the alarm module is used for taking the SAS port as a fault port when the judgment result of the judgment module is yes.
7. The monitoring system of claim 6, further comprising:
the initialization module is used for initializing port parameters of the SAS port;
the port parameters comprise a monitoring period, the alarm threshold, the accumulated change value, the change value of the previous period and the change value of the current period.
8. The monitoring system of claim 6, further comprising:
the correction module is used for correcting the accumulated change value according to the magnitude relation between the accumulated change value and the alarm threshold value before judging whether the accumulated change value is larger than the alarm threshold value or not to obtain a corrected value;
the judging module is a module for judging whether the correction value is greater than the alarm threshold value.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
10. An electronic device, comprising a memory in which a computer program is stored and a processor which, when called upon in the memory, implements the steps of the method according to any one of claims 1-5.
CN202010820151.7A 2020-08-14 2020-08-14 SAS port monitoring method, system and related device Withdrawn CN111949485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010820151.7A CN111949485A (en) 2020-08-14 2020-08-14 SAS port monitoring method, system and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010820151.7A CN111949485A (en) 2020-08-14 2020-08-14 SAS port monitoring method, system and related device

Publications (1)

Publication Number Publication Date
CN111949485A true CN111949485A (en) 2020-11-17

Family

ID=73342349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010820151.7A Withdrawn CN111949485A (en) 2020-08-14 2020-08-14 SAS port monitoring method, system and related device

Country Status (1)

Country Link
CN (1) CN111949485A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760668A (en) * 2021-08-30 2021-12-07 浪潮电子信息产业股份有限公司 Fault warning method, system and related device of cloud platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164289A (en) * 2011-12-09 2013-06-19 鸿富锦精密工业(深圳)有限公司 Switching method and switching system for physical layer of storage device
CN110018943A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of disk alarm method, system and electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164289A (en) * 2011-12-09 2013-06-19 鸿富锦精密工业(深圳)有限公司 Switching method and switching system for physical layer of storage device
CN110018943A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of disk alarm method, system and electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760668A (en) * 2021-08-30 2021-12-07 浪潮电子信息产业股份有限公司 Fault warning method, system and related device of cloud platform

Similar Documents

Publication Publication Date Title
CN110661659B (en) Alarm method, device and system and electronic equipment
CN110968061B (en) Equipment fault early warning method and device, storage medium and computer equipment
CN112732477B (en) Method for fault isolation by out-of-band self-checking
CN111143104A (en) Memory exception processing method and system, electronic device and storage medium
CN101626275B (en) Method and device for detecting system fault
CN110659147B (en) Self-repairing method and system based on module self-checking behavior
CN113590429A (en) Server fault diagnosis method and device and electronic equipment
CN111176952A (en) Monitoring method, monitoring system and related device for I2C channel
CN111949485A (en) SAS port monitoring method, system and related device
CN113487182B (en) Device health state evaluation method, device, computer device and medium
CN111400142B (en) Method and device for monitoring abnormity of virtual machine and storage medium
CN114860487A (en) Memory fault identification method and memory fault isolation method
CN110855484B (en) Method, system, electronic device and storage medium for automatically detecting traffic change
CN113590405A (en) Hard disk error detection method and device, storage medium and electronic device
CN108959025A (en) A kind of server alarm method, device and server
CN111930719A (en) Database access method, device and system
CN105101276B (en) A kind of monitoring method and device of mobile network signals stability
CN110955587A (en) Method and device for determining equipment to be replaced
CN114115503B (en) System and method for automatically adjusting CPU voltage alarm threshold
CN114328141A (en) Hard disk fault early warning method and related components
CN108829417B (en) Upgrading device, method, equipment and storage medium of CPLD
CN109104299B (en) Method and device for reducing cluster oscillation
CN112530505A (en) Hard disk delay detection method and device and computer readable storage medium
CN113722192B (en) Alarm grading method and device, electronic equipment and storage medium
CN116795602B (en) Method and device for constructing biological sample information database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20201117