Disclosure of Invention
An object of the embodiments of the present application is to provide a method for monitoring a connector in a server, which solves the technical problem that in the prior art, the correctness of the connector communication cannot be confirmed, and the connection error of a specific connector cannot be determined.
The embodiment of the application provides a monitoring method of a connector in a server, which comprises the following steps:
selecting a pin of a mainboard end connector in a server as a detection pin, dividing the pin of the mainboard end connector in the server into the detection pin and a non-detection pin, wherein the server comprises the mainboard end connector and a device end connector;
the high-low level state of each detection pin of the mainboard end connector is a preset state;
connecting the mainboard end connector with the device end connector;
acquiring the real-time high and low level state of each detection pin through a substrate management controller;
comparing the high and low level state of each detection pin with the preset state to obtain a comparison result;
and obtaining the device end connector with the connection error according to the comparison result.
Optionally, the step of adjusting the high-low level state of each of the detection pins to be a preset state includes:
a resistor and a grounding circuit are arranged on each detection pin;
and adjusting the high and low level state of each detection pin to a preset state based on the resistor and the grounding circuit.
Optionally, the step of connecting the adjusted connector with a device in a server includes:
arranging a mainboard end connector in the server, wherein the high and low level state of the detection pin is a preset state, in the server;
connecting a server mainboard with the non-detection pin of the adjusted mainboard end connector;
connecting the adjusted detection pin of the mainboard end connector to an input/output pin of an input/output expansion chip;
connecting an integrated circuit bus pin of the input/output expansion chip to an input end of the serial transmission bus expansion chip;
and connecting the output end of the serial transmission bus expansion chip with the device end connector.
Optionally, before the step of obtaining the real-time high-low level state of each of the detection pins by the board management controller, the method further includes:
determining a target pin of the device end connector corresponding to the detection pin of the mainboard end connector;
and setting the address information of the target pin.
Optionally, the step of comparing the real-time high-low level state of each of the detection pins with the preset state to obtain a comparison result includes:
comparing the real-time high and low level state of each detection pin with the preset state;
if the real-time high and low level state of the detection pin is consistent with the preset state, a comparison result with correct connection is obtained;
and if the real-time high and low level state of the detection pin is inconsistent with the preset state, obtaining a comparison result of connection errors.
Optionally, before the step of obtaining the device-side connector with the connection error according to the comparison result, the method further includes:
and storing the comparison result of the correct connection and the comparison result of the wrong connection.
Optionally, the step of obtaining the device-side connector with the connection error according to the comparison result includes:
extracting a comparison result of the connection errors;
and determining the device end connector according to the comparison result of the connection errors.
Optionally, the monitoring method of the connector in the server further includes:
determining the target pin of the device end connector according to the comparison result of the connection errors;
acquiring address information of the target pin based on the target pin;
and storing the address information of the target pin and the corresponding mainboard end connector.
Optionally, the monitoring method of the connector in the server further includes:
and displaying the address information of the target pin and the corresponding mainboard end connector in a webpage through an analog interface.
Optionally, the baseboard management controller is configured to complete a monitoring process for all the connectors in the server when the server enters a shutdown state from a hibernation state.
According to the monitoring method for the connector in the server, at least three pins of a main board connector in the server are used as detection pins, wherein the pins of the main board connector in the server comprise detection pins and non-detection pins, and the connector in the server comprises the main board connector and a device connector; adjusting the high and low level state of each detection pin of the mainboard end connector to be a preset state; connecting the adjusted main board end connector with the adjusted device end connector; acquiring the real-time high and low level state of each detection pin through a substrate management controller; comparing the real-time high and low level state of each detection pin with the preset state to obtain a comparison result; and obtaining the device end connector with the connection error according to the comparison result. When the connection error of the connector is monitored, the BMC can timely record and alarm to avoid the risk brought to the server by the wrong connection of the connector, and simultaneously provides accurate positioning information of the connector connected in error, so that the maintenance workload of the server is reduced, the related connectors do not need to be checked one by one, the BMC is used for completing the monitoring process of all the connectors in the server in the process that the server enters a shutdown state from a sleep state, and the inconvenience brought by the concealment of the connection error of the connector and the discovery of the hysteresis is avoided.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
The terms "comprising" and "having," and any variations thereof, as referred to in the embodiments of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, a method for monitoring a connector in a server provided in an embodiment of the present application includes the following steps:
s101, selecting pins of a main board end connector in a server as detection pins, dividing the pins of the main board end connector in the server into the detection pins and non-detection pins, wherein a connector in the server comprises the main board end connector and a device end connector;
for example, the number of the detection pins is set according to the number of the device-in-server connectors, so that the application scenarios of the monitoring method for the connectors in the server according to the embodiment of the application are wider.
In a possible real-time manner, referring to fig. 2, taking the case that a PCIE X8 slim connector of a motherboard is connected to a Cable as an example, according to the number of Cable lines used, a Device board end connector sets 3 to 5 PIN PINs as detection PIN PINs, and connects to the motherboard end.
S102, setting the high and low level state of each detection pin of the mainboard end connector as a preset state;
in a possible implementation manner, the step of setting the high/low level state of each of the detection pins to be a preset state includes:
a resistor and a grounding circuit are arranged on each detection pin;
and adjusting the high and low level state of each detection pin to a preset state based on the resistor and the grounding circuit.
Illustratively, 3-5 detection PINs of the Device board-side connector are configured into different high and low level states by setting a pull-up resistor and a grounding circuit GND, and the high and low level state of each detection PIN is adjusted to be a preset state.
S103, connecting the mainboard end connector with the device end connector;
in one possible embodiment, the step of connecting the adjusted connector to the device in the server includes:
arranging a mainboard end connector in the server, wherein the high and low level state of the detection pin is a preset state, in the server;
connecting a server mainboard with the non-detection pin of the mainboard end connector;
connecting the adjusted detection pin of the mainboard end connector to an input/output pin of an input/output expansion chip;
connecting an integrated circuit bus pin of the input/output expansion chip to an input end of the serial transmission bus expansion chip;
connecting the output end of the serial transmission bus expansion chip with the device end connector;
for example, referring to fig. 2, taking the case that a PCIE X8 slim connector of a motherboard is connected to a Cable, according to the number of Cable lines used, a Device board end connector sets 3 to 5 PINs (PINs) as detection PINs (PINs) and connects to the motherboard end; connecting 3-5 detection PINs of the board end connector to IO PINs of the I/O expansion chip by using an I2C I/O expansion chip, and connecting an IIC signal end of the I2C I/O expansion chip to an I2C expansion chip; 3-5 detection PINs of the Device board end connector are configured into different high and low level states by setting pull-up resistors and connecting GND, after the high and low level states of each detection PIN are adjusted to be preset states, the board end connector is configured with address PINs with corresponding numbers according to PCIE port ports with different numbers and hard disks with different numbers, and a plurality of groups of detection PINs are formed, wherein 8 address bits can be configured for 3 groups of detection PINs, and 32 address bits can be configured for 5 groups of detection PINs.
S104, acquiring a real-time high and low level state of each detection pin through a substrate management controller;
by acquiring the high and low level states of each detection pin, the real-time monitoring of each detection pin is realized, so that the inconvenience brought by concealment of connection errors and hysteresis discovery of the connector is avoided.
S105, comparing the high-low level state of each detection pin with the preset state to obtain a comparison result;
and S106, obtaining the device end connector with the wrong connection according to the comparison result.
In a possible implementation manner, before the step of acquiring the real-time high-low level state of each of the detection pins by the board management controller, the method further includes:
determining a target pin of the device end connector corresponding to the detection pin of the mainboard end connector;
and setting the address information of the target pin.
Illustratively, the process of configuring the address for the connector of each Device terminal is realized by setting the address information of the target pin, so as to realize the operation of providing accurate positioning information of the incorrectly connected connector.
In a possible implementation manner, the step of comparing the high-low level state of each of the detection pins with the preset state to obtain a comparison result includes:
comparing the high and low level state of each detection pin with the preset state;
if the high-low level state of the detection pin is consistent with the preset state, a comparison result with correct connection is obtained;
if the high-low level state of the detection pin is inconsistent with the preset state, obtaining a comparison result of connection errors;
illustratively, the high-low level state of each detection pin is compared with the preset state, so that the monitoring of each detection pin is completed, and the process of confirming the communication correctness of the connector is realized.
In a possible embodiment, before the step of obtaining the device-side connector with the connection error according to the comparison result, the method further includes:
and storing the comparison result of the correct connection and the comparison result of the wrong connection.
And storing the comparison result with the correct connection and the comparison result with the wrong connection, so that the establishment of the maintenance history of the server is facilitated, and the use and maintenance information of the server can be conveniently mastered.
In a possible embodiment, the step of obtaining the device-side connector with the connection error according to the comparison result includes:
extracting a comparison result of the connection errors;
and determining the device end connector according to the comparison result of the connection errors.
Illustratively, the device end connectors are determined, so that accurate positioning information of the incorrectly connected connectors is provided for maintenance personnel, and the ineffective work of the maintenance personnel is reduced.
In a possible implementation manner, the method for monitoring a connector in a server further includes:
determining the target pin of the device end connector according to the comparison result of the connection errors;
acquiring address information of the target pin based on the target pin;
and storing the address information of the target pin and the corresponding mainboard end connector.
Optionally, the monitoring method of the connector in the server further includes:
and displaying the address information of the target pin and the corresponding mainboard end connector in a webpage through an analog interface.
Illustratively, the workload of server maintenance is reduced, and the related connectors do not need to be checked one by one.
In a possible embodiment, the baseboard management controller is configured to complete a monitoring process for all the connectors in the server during the process that the server enters the hibernation state from the shutdown state.
Illustratively, the baseboard management controller is configured to complete a monitoring process for all the connectors in the server when the server enters a power-off state from a sleep state, so as to avoid inconvenience caused by concealment of connection errors and discovery hysteresis of the connectors.
In a possible implementation manner, please refer to fig. 2 and fig. 3, the server is powered on and enters a sleep S5 state from a shutdown G3 state, at this time, the BMC, the IIC I/O expansion chip PCA9555 and the IIC expansion chip PCA9548 are started normally, that is, the BMC patrol gates the corresponding IIC channel to the IIC EXP with the address of 0x44, and patrol and read different IIC downlink ports of the IIC EXP; meanwhile, configuring the IO EXP into an input mode, collecting address data adr of different Device end connectors by the IO EXP with different addresses, and transmitting the address data adr to the IIC EXP through IIC signals; the BMC judges according to the read data that when the read data is consistent with the preset data, the Cable connection is proved to be correct; when the data read by the BMC is inconsistent with the preset data, the BMC displays the specific abnormal position on the Web interface through the VGA at the moment, records the alarm information, timely corrects the alarm information, and powers on the BMC again, wherein the PCA9555, the PCA9548 and the BMC use Standby power, and the server can work in a S5 state, wherein PIN 1-PIN 5 are the detection PINs, the IIC I/O expansion chip PCA9555 is I/O EXP, namely the input/output expansion chip, the IIC expansion chip PCA9548 is IIC EXP, namely the serial transmission bus expansion chip, and the address data adr is the address configured by the connector.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
For another example, the division of the above-mentioned units is only one logical function division, and there may be other division manners in actual implementation, and for another example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above functions, if implemented in the form of software functional units and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, which essentially or partly contribute to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above methods of the embodiments of the present application. And the aforementioned storage medium includes: 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.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above embodiments are merely specific implementations of the embodiments of the present application, which are used to illustrate the technical solutions of the embodiments of the present application and not to limit the embodiments, and the scope of the embodiments of the present application is not limited thereto, and although the embodiments of the present application are described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the embodiments of the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.