


技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种线缆检测方法及系统。The present application relates to the field of computer technology, in particular to a cable detection method and system.
背景技术Background technique
目前,在服务器(也可称之为“服务器节点”)中经常会使用高速线缆连接不同的硬件板卡,以跨板传输高速串行计算机扩展总线标准(peripheral component interconnectexpress,PCIE)、串行连接小型计算机系统接口(serial attached small computersystem interface,SCSI)等高速信号。而服务器中的基板管理控制器(baseboardmanagement controller,BMC)需要对于高速线缆的在位、插错等做精确检测。但是,在多胞胎服务器节点中,存在多个相同的服务器系统,这多个相同的服务器系统中往往具备相同的部件,如果高速线缆跨系统接反,基板管理控制器是无法检测出来的,这将会严重影响客户侧的业务。因此,如何对多胞胎节点内高速线缆是否插错进行检测是目前亟需解决的技术问题。At present, high-speed cables are often used in servers (also referred to as "server nodes") to connect different hardware boards to transmit high-speed serial computer expansion bus standards (peripheral component interconnect express, PCIE), serial Connect to high-speed signals such as serial attached small computer system interface (SCSI). The baseboard management controller (BMC) in the server needs to accurately detect the presence and wrong insertion of high-speed cables. However, in multiple server nodes, there are multiple identical server systems, and these multiple identical server systems often have the same components. If the high-speed cables are connected reversely across the system, the baseboard management controller cannot detect it. , which will seriously affect the business on the client side. Therefore, how to detect whether the high-speed cables in the multiple-birth node are inserted incorrectly is a technical problem that needs to be solved urgently.
发明内容Contents of the invention
本申请提供了一种线缆检测方法及系统,能够实现对多胞胎节点内高速线缆是否插错进行检测。The present application provides a cable detection method and system, which can detect whether a high-speed cable in a multiple-birth node is inserted incorrectly.
第一方面,本申请提供一种线缆检测方法,应用于包含检测设备和服务器的系统。其中,服务器中包括n个硬件系统,n≥2。该方法包括:检测设备获取用户下发的检测指令;响应于检测指令,检测设备依次控制n个硬件系统中的各个硬件系统上电,其中,当n个硬件系统中的一个硬件系统处于上电状态时,n个硬件系统中其他的硬件系统处于下电状态;服务器基于n个硬件系统中处于上电状态的硬件系统内各个线缆传输的信号,检测处于上电状态的硬件系统中是否存在线缆连接错误的情况,以得到处于上电状态的硬件系统对应的检测结果;检测设备获取n个硬件系统中各个硬件系统对应的检测结果,以得到n个检测结果;检测设备输出n个检测结果。In a first aspect, the present application provides a cable detection method, which is applied to a system including a detection device and a server. Wherein, the server includes n hardware systems, where n≥2. The method includes: the detection device acquires a detection instruction issued by a user; in response to the detection instruction, the detection device sequentially controls each of the n hardware systems to be powered on, wherein, when one of the n hardware systems is powered on state, other hardware systems in the n hardware systems are in the power-off state; the server detects whether there is a In the case of wrong cable connection, to obtain the detection results corresponding to the hardware system in the power-on state; the detection device obtains the detection results corresponding to each hardware system in n hardware systems to obtain n detection results; the detection device outputs n detection results result.
这样,在对包含多个硬件系统的服务器中的线缆进行检测时,分别对各个硬件系统中的线缆单独进行检测,且在检测过程中,对需进行线缆检测的硬件系统上电,并控制其他的硬件系统下电,由此避免了其他的硬件系统的干扰,使得可以准确的检测出当前的硬件系统中的线缆是否有连接错误的情况,提升了线缆检测在准确度。In this way, when the cables in the server containing multiple hardware systems are detected, the cables in each hardware system are detected separately, and during the detection process, the hardware systems that need to be detected are powered on, And control other hardware systems to power off, thereby avoiding the interference of other hardware systems, so that it can accurately detect whether the cables in the current hardware system are connected incorrectly, and improve the accuracy of cable detection.
示例性的,检测设备与服务器间可以但不限于通过网卡连接。每个硬件系统均可以但不限于为X86系统。Exemplarily, the detection device and the server may be connected through a network card, but not limited to. Each hardware system may be, but not limited to, an X86 system.
在一种可能的实现方式中,服务器基于n个硬件系统中处于上电状态的硬件系统内各个线缆传输的信号,检测处于上电状态的硬件系统中是否存在线缆连接错误的情况,具体包括:针对处于上电状态的硬件系统内的任意一个线缆,在服务器获取到任意一个线缆传输的信号的情况下,确定任意一个线缆未连接错误;在服务器未获取到任意一个线缆传输的信号的情况下,确定任意一个线缆连接错误。由于正在检测的硬件系统已上电,所以在其内线缆未连接错误的情况下,各个线缆均应有信号传输。因此,当某个线缆中未有信号传输时,则表明该线缆连接错误。In a possible implementation, the server detects whether there is a cable connection error in the hardware system in the power-on state based on the signal transmitted by each cable in the hardware system in the power-on state among the n hardware systems. Including: For any cable in the hardware system in the power-on state, if the server obtains the signal transmitted by any cable, it is determined that any cable is not connected; if the server does not obtain any cable In the case of transmitted signals, identify any cable connections that are incorrect. Since the hardware system being detected has been powered on, each cable should have signal transmission if the cables in it are not connected incorrectly. Therefore, when there is no signal transmission in a cable, it is an indication that the cable is connected incorrectly.
第二方面,本申请提供一种线缆检测方法,应用于服务器。该服务器中包括n个硬件系统,n≥2。该方法包括:获取检测设备下发的用于控制第i个硬件系统上电的指令,1≤i≤n;控制第i个硬件系统上电,且控制n个硬件系统中其他的硬件系统处于下电状态;获取第i个硬件系统的上电信号和第i个硬件系统内各个线缆传输的信号;根据第i个硬件系统的上电信号和第i个硬件系统内各个线缆传输的信号,检测第i个硬件系统中是否存在线缆连接错误的情况,以得到第i个硬件系统对应的检测结果。In a second aspect, the present application provides a cable detection method applied to a server. The server includes n hardware systems, where n≥2. The method includes: obtaining an instruction issued by a detection device for controlling the power-on of the i-th hardware system, 1≤i≤n; controlling the power-on of the i-th hardware system, and controlling other hardware systems in the n-th hardware systems to be in the Power-off state; obtain the power-on signal of the i-th hardware system and the signal transmitted by each cable in the i-th hardware system; according to the power-on signal of the i-th hardware system and the signal transmitted by each cable in the i-th hardware system signal to detect whether there is a cable connection error in the i-th hardware system, so as to obtain a detection result corresponding to the i-th hardware system.
在一种可能的实现方式中,根据第i个硬件系统的上电信号和第i个硬件系统内各个线缆传输的信号,检测第i个硬件系统中是否存在线缆连接错误的情况,具体包括:针对第i个硬件系统内的任意一个线缆,在获取到上电信号,且获取到任意一个线缆传输的信号的情况下,确定任意一个线缆未连接错误;在获取到上电信号,且未获取到任意一个线缆传输的信号的情况下,确定任意一个线缆连接错误。In a possible implementation, according to the power-on signal of the i-th hardware system and the signal transmitted by each cable in the i-th hardware system, it is detected whether there is a cable connection error in the i-th hardware system, specifically Including: For any cable in the i-th hardware system, when the power-on signal is obtained and the signal transmitted by any cable is obtained, it is determined that any cable is not connected; If the signal is not obtained and the signal transmitted by any cable is not obtained, it is determined that any cable is connected incorrectly.
在一种可能的实现方式中,在得到第i个硬件系统对应的检测结果之后,方法还包括:获取检测设备发送的结果读取指令;响应于结果读取指令,将第i个硬件系统对应的检测结果传输至检测设备。In a possible implementation, after obtaining the detection result corresponding to the i-th hardware system, the method further includes: obtaining a result reading instruction sent by the detection device; The test results are transmitted to the testing equipment.
在一种可能的实现方式中,检测设备与服务器间通过网卡连接。In a possible implementation manner, the detection device is connected to the server through a network card.
在一种可能的实现方式中,每个硬件系统均为X86系统。In a possible implementation manner, each hardware system is an X86 system.
第三方面,本申请提供一种线缆检测系统,包括检测设备和服务器。该服务器中包括n个硬件系统,n≥2。其中,检测设备用于获取用户下发的检测指令,以及依次控制n个硬件系统中的各个硬件系统上电,其中,当n个硬件系统中的一个硬件系统处于上电状态时,n个硬件系统中其他的硬件系统处于下电状态。In a third aspect, the present application provides a cable detection system, including a detection device and a server. The server includes n hardware systems, where n≥2. Among them, the detection device is used to obtain the detection instruction issued by the user, and sequentially control the power-on of each hardware system in the n hardware systems, wherein, when one hardware system in the n hardware systems is in the power-on state, the n hardware systems Other hardware systems in the system are powered off.
服务器用于基于n个硬件系统中处于上电状态的硬件系统内各个线缆传输的信号,检测处于上电状态的硬件系统中是否存在线缆连接错误的情况,以得到处于上电状态的硬件系统对应的检测结果。The server is used to detect whether there is a cable connection error in the hardware system in the power-on state based on the signal transmitted by each cable in the hardware system in the power-on state in the n hardware systems, so as to obtain the hardware in the power-on state The corresponding test results of the system.
检测设备还用于从服务器处获取n个硬件系统中各个硬件系统对应的检测结果,以得到n个检测结果,以及,输出n个检测结果。The detection device is also used to acquire the detection results corresponding to each of the n hardware systems from the server, so as to obtain n detection results, and output n detection results.
示例性的,检测设备与服务器间可以但不限于通过网卡连接。每个硬件系统均可以但不限于为X86系统。Exemplarily, the detection device and the server may be connected through a network card, but not limited to. Each hardware system may be, but not limited to, an X86 system.
在一种可能的实现方式中,服务器在基于n个硬件系统中处于上电状态的硬件系统内各个线缆传输的信号,检测处于上电状态的硬件系统中是否存在线缆连接错误的情况时,具体用于:针对处于上电状态的硬件系统内的任意一个线缆,在服务器获取到任意一个线缆传输的信号的情况下,确定任意一个线缆未连接错误;在服务器未获取到任意一个线缆传输的信号的情况下,确定任意一个线缆连接错误。由于正在检测的硬件系统已上电,所以在其内线缆未连接错误的情况下,各个线缆均应有信号传输。因此,当某个线缆中未有信号传输时,则表明该线缆连接错误。In a possible implementation, the server detects whether there is a cable connection error in the hardware system in the power-on state based on the signal transmitted by each cable in the hardware system in the power-on state in the n hardware systems , which is specifically used for: For any cable in the hardware system in the power-on state, if the server obtains the signal transmitted by any cable, it is determined that any cable is not connected; if the server does not obtain any In the case of a signal transmitted by a cable, determine that any cable is connected incorrectly. Since the hardware system being detected has been powered on, each cable should have signal transmission if the cables in it are not connected incorrectly. Therefore, when there is no signal transmission in a cable, it is an indication that the cable is connected incorrectly.
可以理解的是,上述第二方面至第三方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that, for the beneficial effects of the above-mentioned second aspect to the third aspect, reference may be made to the relevant description in the above-mentioned first aspect, and details are not repeated here.
附图说明Description of drawings
图1是本申请实施例提供的一种线缆检测系统的架构示意图;Fig. 1 is a schematic diagram of the architecture of a cable detection system provided by an embodiment of the present application;
图2是本申请实施例提供的一种线缆检测方法的流程示意图;FIG. 2 is a schematic flow diagram of a cable detection method provided in an embodiment of the present application;
图3是本申请实施例提供的一种服务器内硬件系统中的线缆连接示意图。FIG. 3 is a schematic diagram of cable connections in a hardware system in a server provided by an embodiment of the present application.
具体实施方式detailed description
本文中术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。本文中符号“/”表示关联对象是或者的关系,例如A/B表示A或者B。The term "and/or" in this article is an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone These three situations. The symbol "/" in this document indicates that the associated object is an or relationship, for example, A/B indicates A or B.
本文中的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一响应消息和第二响应消息等是用于区别不同的响应消息,而不是用于描述响应消息的特定顺序。The terms "first" and "second" and the like in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, the first response message and the second response message are used to distinguish different response messages, rather than describing a specific order of the response messages.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or illustrations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上,例如,多个处理单元是指两个或者两个以上的处理单元等;多个元件是指两个或者两个以上的元件等。In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units refer to two or more processing units, etc.; multiple A component refers to two or more components or the like.
示例性的,图1示出了一种线缆检测系统。如图1所示,该线缆检测系统100中包括:检测设备110和包括n个(n≥2)硬件系统的服务器120。检测设备110和服务器120间可以但不限于通过网卡建立连接;当然,也可以通过其他的方式建立连接,具体可根据实际情况而定。对于检测设备110和服务器120的供电方式,两者均可以使用单独的电源供电。Exemplarily, Fig. 1 shows a cable detection system. As shown in FIG. 1 , the cable detection system 100 includes: a detection device 110 and a server 120 including n (n≧2) hardware systems. The connection between the detection device 110 and the server 120 may be established through, but not limited to, a network card; of course, the connection may also be established through other methods, which may be determined according to actual conditions. Regarding the power supply modes of the detection device 110 and the server 120, both may be powered by separate power sources.
检测设备110用于对服务器120中的线缆是否接错进行检测。检测设备110可以但不限于通过智能平台管理接口(intelligent platform management interface,IPMI)指令对服务器120进行控制。比如,控制服务器120中的某个硬件系统上电或下电等。另外,检测设备110也可以通过IPMI指令读取服务器120中各个硬件系统中的线缆检测结果,以及输出这些检测结果。示例性的,检测设备110可以依次控制服务器120中的n个硬件系统中的各个硬件系统上电或下电。The detection device 110 is used to detect whether the cables in the server 120 are connected incorrectly. The detection device 110 may, but not limited to, control the server 120 through an intelligent platform management interface (intelligent platform management interface, IPMI) command. For example, controlling a certain hardware system in the server 120 to be powered on or off. In addition, the detection device 110 can also read the cable detection results of each hardware system in the server 120 through an IPMI command, and output these detection results. Exemplarily, the detection device 110 may sequentially control each of the n hardware systems in the server 120 to be powered on or off.
服务器120中每个硬件系统均是可以独立的一个系统。每个硬件系统中所包含的硬件均可以相同,或者部分相同,等。每个硬件系统中的硬件之间均可以但不限于通过线缆(比如高速线缆等)连接,当然也可以通过连接器连接。示例性的,硬件系统可以为X86系统。示例性的,每个硬件系统中均可以包括主板、中央处理器(central processing unit,CPU)、磁盘阵列(redundant arrays of independent disks,RAID)、复杂可编程逻辑器件(complex programmable logic device,CPLD)、基板管理控制器(baseboard managementcontroller,BMC)等。Each hardware system in the server 120 is an independent system. The hardware included in each hardware system may be the same, or partially the same, and so on. The hardware in each hardware system may be, but not limited to, connected through cables (such as high-speed cables, etc.), and of course may also be connected through connectors. Exemplarily, the hardware system may be an X86 system. Exemplarily, each hardware system may include a motherboard, a central processing unit (central processing unit, CPU), a disk array (redundant arrays of independent disks, RAID), a complex programmable logic device (complex programmable logic device, CPLD) , baseboard management controller (baseboard management controller, BMC), etc.
在服务器120中配置有信号检测器121。该信号检测器121与各个线缆下游的硬件间可以硬连接,比如通过连接器连接等。同时,该信号检测器121与各个硬件系统中用于传输相应的硬件系统的上下电状态的硬件(比如BMC或CPLD等)也可以硬连接。其中,该信号检测器121可以单独布置,也可以集成在其他的硬件(比如硬盘背板、用于管理风扇的板子等)上等。示例性的,该信号检测器121可以但不限于为CPLD。示例性的,通过线缆连接的两个硬件的连接方式,可以称之为软连接。A signal detector 121 is arranged in the server 120 . The signal detector 121 may be hard-connected to hardware downstream of each cable, for example, connected through a connector. At the same time, the signal detector 121 may also be hard-connected to the hardware (such as BMC or CPLD, etc.) used to transmit the power-on/off status of the corresponding hardware system in each hardware system. Wherein, the signal detector 121 may be arranged separately, or may be integrated on other hardware (such as a hard disk backplane, a board for managing fans, etc.) and the like. Exemplarily, the signal detector 121 may be, but not limited to, a CPLD. Exemplarily, a connection manner of two pieces of hardware connected by a cable may be called a soft connection.
检测设备110可以的分别控制服务器120中的各个硬件系统上电或下电。当用户通过检测设备110下发检测指令后,检测设备110可以先仅控制一个硬件系统上电,但完成对该硬件系统的检测后,可以控制该硬件系统下电,并控制另一个硬件系统上电,如此循环,直至完成对所有的硬件系统的检测。The detection device 110 can separately control each hardware system in the server 120 to be powered on or off. When the user issues a detection instruction through the detection device 110, the detection device 110 can first control only one hardware system to be powered on, but after completing the detection of the hardware system, it can control the hardware system to be powered off and another hardware system to be powered on. Power, and so on, until the detection of all hardware systems is completed.
在检测过程中,服务器120中的某个硬件系统上电后,该硬件系统中用于传输该系统上下电状态的硬件,可以通过两行式串行总线(inter-integrated circuit,I2C)或SGPIO(serial general purpose input/output)总线等向信号检测器121发送该系统已上电的信号。另外,在该硬件系统上电后,其所包含的硬件也将上电,此时通过线缆连接的硬件间将会有信号传输。当某个线缆上的信号传输至该线缆下游的硬件上时,该信号可以同时传输到信号检测器121中。如果信号检测器121既获取到该硬件系统已上电的信号,又获取到该硬件系统中各个线缆传输的信号,则表明该硬件系统中的线路均未连接错误。如果信号检测器121获取到该硬件系统已上电的信号,但其未获取到某个线缆传输的信号,则表明该线路连接错误,即插错。信号检测器121在完成对各个线缆的检测后,可以将检测结果发送至检测设备110,以通过该检测设备110呈现给用户。示例性的,信号检测器121与检测设备110之间可以直接连接,也可以间接连接。当两者间接连接时,两者之间可以通过各个硬件系统中的用于传输相应的系统上下电状态的硬件连接。在一些实施例中,信号检测器121可以将检测结果传输至硬件系统中的BMC中。之后,检测设备110可以向该硬件系统中的CPU发送读取检测结果的指令。接着,CPU可以与BMC通信,并获取到检测结果,以及将该检测结果传输至检测设备110。In the detection process, after a certain hardware system in the server 120 is powered on, the hardware used to transmit the power-on and power-off status of the system in the hardware system can pass through a two-line serial bus (inter-integrated circuit, I2C) or SGPIO The (serial general purpose input/output) bus and the like send a signal to the signal detector 121 that the system has been powered on. In addition, after the hardware system is powered on, the included hardware will also be powered on, and at this time, there will be signal transmission between the hardware connected through cables. When a signal on a cable is transmitted to hardware downstream of the cable, the signal can be transmitted to the signal detector 121 at the same time. If the signal detector 121 obtains both the signal that the hardware system is powered on and the signal transmitted by each cable in the hardware system, it indicates that the lines in the hardware system are not connected incorrectly. If the signal detector 121 obtains the signal that the hardware system is powered on, but fails to obtain the signal transmitted by a certain cable, it indicates that the connection of the line is wrong, that is, wrongly inserted. After the signal detector 121 completes the detection of each cable, the detection result may be sent to the detection device 110 to be presented to the user through the detection device 110 . Exemplarily, the signal detector 121 and the detection device 110 may be connected directly or indirectly. When the two are indirectly connected, the two can be connected through hardware for transmitting the corresponding system power-on/off status in each hardware system. In some embodiments, the signal detector 121 can transmit the detection result to the BMC in the hardware system. Afterwards, the detection device 110 may send an instruction to read the detection result to the CPU in the hardware system. Then, the CPU can communicate with the BMC, obtain the detection result, and transmit the detection result to the detection device 110 .
接下来,基于图1所示的系统,对本申请实施例提供的一种线缆检测方法进行介绍。Next, based on the system shown in FIG. 1 , a cable detection method provided in the embodiment of the present application is introduced.
示例性的,图2示出了一种线缆检测方法。如图2所示,该线缆检测方法可以包括以下步骤:Exemplarily, Fig. 2 shows a cable detection method. As shown in Figure 2, the cable detection method may include the following steps:
S201、检测设备110获取用户下发的检测指令。S201. The detection device 110 acquires a detection instruction issued by a user.
本实施例中,检测设备110可以提供可视化的界面。用户通过该界面可以下发检测指令,以对服务器120中的线缆进行检测。In this embodiment, the detection device 110 may provide a visual interface. Through this interface, the user can issue a detection command to detect the cables in the server 120 .
S202、检测设备110控制服务器120中的第i个硬件系统上电,i的初始值为1。S202. The detection device 110 controls the i-th hardware system in the server 120 to be powered on, and the initial value of i is 1.
本实施例中,检测设备110可以控制服务器120中的第i个硬件系统上电,以对第i个硬件系统中的线缆进行检测。其中,i的初始值为1。示例性的,检测设备110可以向服务器110或者服务器110中的第i个硬件系统发送上电指示,以使得服务器120控制第i个硬件系统上电。接着,服务器120可以控制第i个硬件系统上电。当第i个硬件系统上电后,该第i个硬件系统即处于上电状态。另外,服务器120中除第i个硬件系统之外的硬件系统均处于下电状态,即这些硬件系统均不上电。In this embodiment, the detection device 110 may control the i-th hardware system in the server 120 to be powered on, so as to detect the cables in the i-th hardware system. Among them, the initial value of i is 1. Exemplarily, the detection device 110 may send a power-on instruction to the server 110 or the i-th hardware system in the server 110, so that the server 120 controls the i-th hardware system to be powered on. Next, the server 120 may control the i-th hardware system to be powered on. After the i-th hardware system is powered on, the i-th hardware system is in a power-on state. In addition, all hardware systems except the i-th hardware system in the server 120 are in a power-off state, that is, these hardware systems are not powered on.
S203、第i个硬件系统中向信号检测器121发送用于表征第i个硬件系统已上电的信号。S203. The i-th hardware system sends a signal to the signal detector 121 indicating that the i-th hardware system has been powered on.
S204、信号检测器121获取第i个硬件系统中各个线缆传输的信号。S204. The signal detector 121 acquires signals transmitted by cables in the i-th hardware system.
S205、信号检测器121基于用于表征第i个硬件系统已上电的信号和其获取到的各个线缆传输的信号,确定第i个硬件系统中的线缆是否连接错误。S205. The signal detector 121 determines whether the cables in the i-th hardware system are connected incorrectly based on the signal representing that the i-th hardware system is powered on and the acquired signals transmitted by each cable.
本实施例中,当信号检测器121获取用于表征第i个硬件系统已上电的信号时,其可以确定第i个硬件系统已上电。因此,此时其应该获取到第i个硬件系统中各个线缆传输的信号。若其未获取到某个线缆传输的信号,则表明该线缆连接错误。In this embodiment, when the signal detector 121 obtains a signal indicating that the i-th hardware system has been powered on, it may determine that the i-th hardware system has been powered on. Therefore, at this time, it should obtain the signals transmitted by each cable in the i-th hardware system. If it does not obtain the signal transmitted by a certain cable, it indicates that the cable is connected incorrectly.
S206、信号检测器121向检测设备110发送包含有第i个硬件系统中线缆的检测结果的消息。S206. The signal detector 121 sends a message including the detection result of the cable in the i-th hardware system to the detection device 110.
本实施例中,信号检测器121在完成对第i个硬件系统中的线缆的检测后,可以将检测结果发送至检测设备110。示例性的,信号检测器121可以先将检测结果发送至第i个硬件系统,比如发送至第i个硬件系统中的BMC等,再由该第i个硬件系统将检测结果发送至检测设备110。In this embodiment, the signal detector 121 may send the detection result to the detection device 110 after completing the detection of the cable in the i-th hardware system. Exemplarily, the signal detector 121 may first send the detection result to the i-th hardware system, such as to the BMC in the i-th hardware system, and then the i-th hardware system sends the detection result to the detection device 110 .
在一些实施例中,检测设备110可以先向服务器120或者服务器120中的第i个硬件系统下发用于读取检测结果的结果读取指令。服务器120或者服务器120中的第i个硬件系统获取到该结果读取指令后,可以将检测结果传输至检测设备110。In some embodiments, the detection device 110 may first issue a result reading instruction for reading the detection result to the server 120 or the i-th hardware system in the server 120 . After the server 120 or the i-th hardware system in the server 120 obtains the result reading instruction, the detection result may be transmitted to the detection device 110 .
S207、检测设备110控制第i个硬件系统下电。S207. The detection device 110 controls the i-th hardware system to be powered off.
本实施例中,在完成对第i个硬件系统中的线缆的检测后,可以控制该硬件系统下电。In this embodiment, after the detection of the cables in the i-th hardware system is completed, the hardware system may be controlled to be powered off.
S208、检测设备110将i=i+1,并判断i是否大于n,n为服务器120中包含的硬件系统的数量。S208 , the detection device 110 sets i=i+1, and judges whether i is greater than n, where n is the number of hardware systems included in the server 120 .
本实施例中,在完成对第i个硬件系统中的线缆的检测后,可以对另一个硬件系统进行检测。此时,可以控制i=i+1。同时,判断i是否大于n,n为服务器120中包含的硬件系统的数量。若i大于n,则表示已完成对服务器120中所有的硬件系统中的线缆的检测,此时可以执行S209。若i小于或等于n,则表示未完成对服务器120中所有的硬件系统中的线缆的检测,此时可以返回执行S202。In this embodiment, after the detection of the cables in the i-th hardware system is completed, another hardware system may be detected. At this time, i=i+1 can be controlled. At the same time, it is judged whether i is greater than n, where n is the number of hardware systems included in the server 120 . If i is greater than n, it means that the detection of cables in all hardware systems in the server 120 has been completed, and S209 can be executed at this time. If i is less than or equal to n, it means that the detection of the cables in all the hardware systems in the server 120 has not been completed, and at this time, it may return to execute S202.
S209、检测设备110输出检测结果。S209. The detection device 110 outputs a detection result.
本实施例中,在完成对服务器120中所有的硬件系统中的线缆的检测后,检测设备110可以输出检测结果。在一些实施例中,检测设备110也可以每获取到一个硬件系统中线缆的检测结果,就直接显示该检测结果,也可以在获取到一部分硬件系统中线缆的检测结果后,在显示这些检测结果,具体可根据实际情况而定,此处不做限定。In this embodiment, after the detection of cables in all hardware systems in the server 120 is completed, the detection device 110 may output a detection result. In some embodiments, the detection device 110 may also directly display the detection result every time it obtains the detection results of cables in a hardware system, or may display these after obtaining the detection results of cables in a part of the hardware system. The test result may be determined according to the actual situation, and is not limited here.
由此,在对服务器中的硬件系统内的线缆进行检测时,通过单独对各个硬件系统中的线缆进行检测,且在检测过程中控制其他的硬件系统下电,避免了其他的硬件系统的干扰,实现了对相同的硬件系统间相同的线缆的检测,解决了相同的硬件系统间相同的线缆连接错误而无法检测的问题。Therefore, when detecting the cables in the hardware system in the server, by separately detecting the cables in each hardware system, and controlling other hardware systems to be powered off during the detection process, other hardware systems are avoided. The interference of the same hardware system realizes the detection of the same cable between the same hardware systems, and solves the problem that the same cable connection error between the same hardware systems cannot be detected.
在一些实施例中,图2中服务器120中某个部件所执行的步骤,也可以理解为是服务器120所执行的步骤。In some embodiments, the steps performed by a certain component in the server 120 in FIG. 2 may also be understood as the steps performed by the server 120 .
在一些实施例中,图2中所描述的过程可以描述为:检测设备获取用户下发的检测指令。响应于检测指令,检测设备依次控制n个硬件系统中的各个硬件系统上电,其中,当n个硬件系统中的一个硬件系统处于上电状态时,n个硬件系统中其他的硬件系统处于下电状态。服务器基于n个硬件系统中处于上电状态的硬件系统内各个线缆传输的信号,检测处于上电状态的硬件系统中是否存在线缆连接错误的情况,以得到处于上电状态的硬件系统对应的检测结果。检测设备获取n个硬件系统中各个硬件系统对应的检测结果,以得到n个检测结果;以及输出n个检测结果。In some embodiments, the process described in FIG. 2 can be described as: the detection device obtains the detection instruction issued by the user. In response to the detection instruction, the detection device sequentially controls each of the n hardware systems to be powered on, wherein, when one of the n hardware systems is in the power-on state, the other hardware systems in the n hardware systems are in the down state. power state. Based on the signal transmitted by each cable in the hardware system in the power-on state of the n hardware systems, the server detects whether there is a cable connection error in the hardware system in the power-on state, so as to obtain the corresponding information of the hardware system in the power-on state. test results. The detection device acquires detection results corresponding to each of the n hardware systems to obtain n detection results; and outputs n detection results.
另外,服务器基于n个硬件系统中处于上电状态的硬件系统内各个线缆传输的信号,检测处于上电状态的硬件系统中是否存在线缆连接错误的情况,具体可以描述为:针对处于上电状态的硬件系统内的任意一个线缆,在服务器获取到任意一个线缆传输的信号的情况下,确定任意一个线缆未连接错误;在服务器未获取到任意一个线缆传输的信号的情况下,确定任意一个线缆连接错误。In addition, based on the signal transmitted by each cable in the hardware system in the power-on state of the n hardware systems, the server detects whether there is a cable connection error in the hardware system in the power-on state. Specifically, it can be described as: For any cable in the hardware system in the power state, if the server obtains the signal transmitted by any cable, it is determined that any cable is not connected; if the server does not obtain the signal transmitted by any cable Next, identify any cable connections that are incorrect.
为便于理解,下面以服务器120中包括三个硬件系统为例进行介绍。For ease of understanding, the server 120 includes three hardware systems as an example for introduction below.
示例性的,如图3所示,硬件系统1、2和3中均包括CPU、硬件A、硬件B和BMC。对于硬件系统1,其内CPU和其内的硬件A硬连接,其内的硬件A和其内的硬件B间软连接,其内的硬件B和BMC均和服务器120中的信号检测器121件硬连接。对于硬件系统2,其内CPU和其内的硬件A硬连接,其内的硬件A和其内的硬件B间软连接,其内的硬件B和BMC均和服务器120中的信号检测器121间硬连接。对于硬件系统3,其内CPU和其内的硬件A硬连接,其内的硬件A和硬件系统2中的硬件B间软连接(即此处的线缆接错),其内的硬件B和BMC均和服务器120中的信号检测器121间硬连接。其中,图3中的双箭头线代表硬连接,未带箭头的曲线代表软连接。Exemplarily, as shown in FIG. 3 ,
在对服务器120中的线缆进行检测时,可以先对硬件系统1中的线缆进行检测,再对硬件系统2中的线缆进行检测,最后再对硬件系统3中的线缆进行检测。具体地,可以控制硬件系统1上电,并同时控制硬件系统2和3下电,即只对要检测的硬件系统上电。在硬件系统1上电后,硬件系统1中的BMC可以向信号检测器121传输该系统已上电的信号。同时,硬件A和硬件B间的线缆传输的信号,将由硬件B处透传至信号检测器121中。由于硬件系统1中的BMC和信号检测器121之间是硬连接,因此两者之间不会出现接错的情况,且信号检测器121大概率会接收到BMC传输的信号;而硬件A和硬件B之间是软连接,所以两者之间存在线缆接错的情况。当硬件A和硬件B间的线缆接错时,信号检测器121将不能获取到由硬件B处透传的信号。因此,若信号检测器121获取到硬件系统1中BMC传输的信号,且同时获取到硬件A和硬件B间线缆传输的信号,且表明硬件A和硬件B间的线缆未接错。在完成对硬件A和硬件B间的线缆的检测后,信号检测器121可以将检测结果传输至硬件系统1中的BMC,并由该BMC将检测结果传输至检测设备。When detecting the cables in the server 120 , the cables in the
进一步地,可以对硬件系统2中的线缆进行检测。此时,可以同时控制硬件系统1和3下电,并控制硬件系统2上电。对硬件系统2中的线缆的检测过程,可以参见对硬件系统1中的线缆的检测过程,此处不再赘述。Further, the cables in the
在完成对硬件系统2中的线缆的检测后,可以对硬件系统3中的线缆进行检测。此时,可以同时控制硬件系统1和2下电,并控制硬件系统3上电。由于硬件系统3中的硬件A和硬件B间的线缆接错,且硬件系统2处于下电状态,所以,信号检测器121将不能获取到该线缆传输的信号,而仅能获取到硬件系统3中的BMC传输的该系统已上电的信号。因此,信号检测器121可以判断出硬件系统3中的线缆接错,并将检测结果经硬件系统3中的BMC发送至检测设备。After the detection of the cables in the
可以理解的是,本申请的实施例中的处理器可以是中央处理单元(centralprocessing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signalprocessor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。It can be understood that the processor in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and may also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit (ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. A general-purpose processor can be a microprocessor, or any conventional processor.
本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。The method steps in the embodiments of the present application may be implemented by means of hardware, or may be implemented by means of a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (random access memory, RAM), flash memory, read-only memory (read-only memory, ROM), programmable read-only memory (programmable rom) , PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or known in the art any other form of storage medium. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be a component of the processor. The processor and storage medium can be located in the ASIC.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted via a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) , computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)) and the like.
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。It can be understood that the various numbers involved in the embodiments of the present application are only for convenience of description, and are not used to limit the scope of the embodiments of the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211181326.XACN115525488A (en) | 2022-09-27 | 2022-09-27 | Cable detection method and system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211181326.XACN115525488A (en) | 2022-09-27 | 2022-09-27 | Cable detection method and system |
| Publication Number | Publication Date |
|---|---|
| CN115525488Atrue CN115525488A (en) | 2022-12-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211181326.XAPendingCN115525488A (en) | 2022-09-27 | 2022-09-27 | Cable detection method and system |
| Country | Link |
|---|---|
| CN (1) | CN115525488A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN204681381U (en)* | 2015-05-27 | 2015-09-30 | 天津瑞能电气有限公司 | A kind of optical fiber cable tester |
| CN105425095A (en)* | 2015-11-26 | 2016-03-23 | 华为技术有限公司 | Wiring testing method and apparatus |
| JP2017059881A (en)* | 2015-09-14 | 2017-03-23 | Necプラットフォームズ株式会社 | Communication control device, communication control method, and communication control program |
| CN109753396A (en)* | 2019-01-16 | 2019-05-14 | 浪潮商用机器有限公司 | Cable self-checking method, system and server for storage system |
| CN111693819A (en)* | 2020-05-25 | 2020-09-22 | 北京旋极信息技术股份有限公司 | Detection method and device |
| CN112286747A (en)* | 2020-11-06 | 2021-01-29 | 苏州浪潮智能科技有限公司 | Method, system, device and medium for detecting server cable |
| CN112527582A (en)* | 2020-12-18 | 2021-03-19 | 浪潮电子信息产业股份有限公司 | Detection method, detection device, detection equipment and storage medium of server cable |
| CN112986865A (en)* | 2021-04-13 | 2021-06-18 | 深圳维普创新科技有限公司 | Cable function detection method, circuit and detector |
| CN114661546A (en)* | 2022-03-02 | 2022-06-24 | 南昌华勤电子科技有限公司 | Server cable detection system and communication method thereof |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN204681381U (en)* | 2015-05-27 | 2015-09-30 | 天津瑞能电气有限公司 | A kind of optical fiber cable tester |
| JP2017059881A (en)* | 2015-09-14 | 2017-03-23 | Necプラットフォームズ株式会社 | Communication control device, communication control method, and communication control program |
| CN105425095A (en)* | 2015-11-26 | 2016-03-23 | 华为技术有限公司 | Wiring testing method and apparatus |
| CN109753396A (en)* | 2019-01-16 | 2019-05-14 | 浪潮商用机器有限公司 | Cable self-checking method, system and server for storage system |
| CN111693819A (en)* | 2020-05-25 | 2020-09-22 | 北京旋极信息技术股份有限公司 | Detection method and device |
| CN112286747A (en)* | 2020-11-06 | 2021-01-29 | 苏州浪潮智能科技有限公司 | Method, system, device and medium for detecting server cable |
| CN112527582A (en)* | 2020-12-18 | 2021-03-19 | 浪潮电子信息产业股份有限公司 | Detection method, detection device, detection equipment and storage medium of server cable |
| CN112986865A (en)* | 2021-04-13 | 2021-06-18 | 深圳维普创新科技有限公司 | Cable function detection method, circuit and detector |
| CN114661546A (en)* | 2022-03-02 | 2022-06-24 | 南昌华勤电子科技有限公司 | Server cable detection system and communication method thereof |
| Publication | Publication Date | Title |
|---|---|---|
| CN111289922B (en) | Cable plugging detection method and related equipment | |
| US7490176B2 (en) | Serial attached SCSI backplane and detection system thereof | |
| US11748218B2 (en) | Methods, electronic devices, storage systems, and computer program products for error detection | |
| US20080034122A1 (en) | Apparatus and Method to Detect Miscabling in a Storage Area Network | |
| CN104794033A (en) | CPU low-frequency fault positioning method and device based on BMC | |
| CN115129559A (en) | Cable insertion detection method, device, device and storage medium | |
| CN117648239A (en) | Misplug detection method of external equipment and computing equipment | |
| CN114968629A (en) | Computer system and special crash dump device thereof and method for recording error data | |
| US10691562B2 (en) | Management node failover for high reliability systems | |
| CN113742182A (en) | Hard disk lighting method, device, storage medium and computer program product | |
| CN116662091A (en) | Method, device, equipment and storage medium for detecting high-speed cable of server | |
| CN118069562A (en) | Method, device, equipment and storage medium for managing hard disk backboard of double-node server | |
| CN115129560A (en) | A server and its wiring alarm system | |
| TW201734787A (en) | Electronic apparatus and detection method using the same | |
| CN115934446A (en) | A self-test method, server, device and storage medium | |
| CN102063341A (en) | high density server | |
| US20120054391A1 (en) | Apparatus and method for testing smnp cards | |
| CN110515787A (en) | A Connectivity Detection System for Cable and Connector | |
| CN113849234A (en) | Connection state identification method and electronic equipment | |
| CN109542198B (en) | Method and equipment for controlling power-on of PCIE card | |
| CN112596983A (en) | A monitoring method for a connector in a server | |
| CN115525488A (en) | Cable detection method and system | |
| CN116539992A (en) | Device, method, logic module and medium for in-position stable state detection of storage equipment | |
| CN116126522A (en) | Server power transmission optimization method, system, electronic device and storage medium | |
| CN115525517A (en) | Mixed-insertion hard disk lamp signal control system, method and device and readable storage medium |
| 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 |