Method, system and equipment for updating time sequence of baseboard management controller
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system and equipment for updating a time sequence of a baseboard management controller.
Background
The BMC can actively calibrate the time of the BMC each time, the calibration direction is two, the first direction is to acquire an RTC clock (namely OS time) through ME, if the RTC clock is successful, the RTC clock is started as a system clock, if the RTC clock is failed, the system compiling time is started as the system time, on the other hand, when the server is started each time, the BIOS initialization can synchronize the time to the BMC within a certain preset interval time, meanwhile, a client can also set an NTP server under the BMC, and therefore the second direction is to synchronize the time of clock equipment through NTP.
In the process, the BMC can realize synchronization with the NTP server every hour, so the time synchronization of the BMC can be realized based on two aspects of time of the NTP server and controller time of RTC hardware, the time management is not particularly convenient and uniform, the RTC cannot perform a self-correcting function, and the BMC depends on hardware such as a clock circuit chip to a great extent.
Therefore, more or less errors exist in the year and month, and great inconvenience is brought to the system for positioning through the time point.
Disclosure of Invention
In view of the foregoing problems, an object of the present invention is to provide a method, a system, and a device for updating a timing of a BMC, which can implement unified management of BMC time by using one management unit.
In order to achieve the purpose, the invention is realized by the following technical scheme: a method for updating the time sequence of a Baseboard Management Controller (BMC) comprises the following steps:
the time information is obtained through interaction between a second transmission connection module in a preset management unit and a network, the time information is automatically converted into a BMC (baseboard management controller) storable form, and time sequence is packaged into a transmission signal;
directly comparing the transmission signal with the time signal with the same format from the RTC, and directly sending the comparison result to the BMC after the comparison;
and the BMC executes synchronous time sequence operation according to the comparison result.
Further, the preset management unit includes:
the first transmission connection module, the second transmission connection module and the third transmission connection module;
the first transmission connection module directly interacts with the BIOS and reads time information obtained by the BIOS through the RTC, and the first transmission connection module comprises a clock interrupt register and is used for sending an execution instruction once every certain pre-stored time;
the second transmission connection module is interacted with the operating system and used for translating the information from the operating system and comparing the information with the time of the BMC;
after the management unit compares the time difference between the time collected by the NTP and the time collected by the RTC with a preset time difference fault tolerance range, the second transmission connection module feeds back result information to the user interface or records the result information in a log through the operating system terminal, and the third transmission connection module interacts with the BMC, outputs a time signal in the result information and determines whether a synchronous signal is obtained.
Further, the updating method specifically includes the following steps:
s1: after the system is started, the BIOS initializes and interactively updates the hardware time sequence with the RTC, and the BMC sends out a synchronizing signal within a preset interval time;
s2: the management module sends a preset instruction, acquires clock equipment information from the NTP through interaction with the operating system, and enables the BIOS to acquire RTC time information;
s3: the management module compares the time information in the BMC register information with the clock equipment information acquired from the NTP;
s4: judging whether the difference value between the time information in the BMC register information and the clock equipment information acquired from the NTP does not exceed a preset fault-tolerant range value or not;
s5: if yes, outputting clock equipment information acquired from the NTP; otherwise, setting the registered BMC time information as the time of the operating system and recording the information of the synchronization operation, and then repeating steps S3 and S4;
s6: the management unit reads RTC time information acquired by the BIOS and converts the RTC time information into a BMC (baseboard management controller) storable format;
s7: the RTC time information is packed, registered and output to a management unit to be compared with the clock equipment information acquired from the NTP;
s8: comparing the RTC time information with the clock equipment information by adopting the same method as the step S5, and judging whether the RTC time information is within the fault-tolerant range set by the user;
s9: if yes, setting RTC time as BMC time, and if not, setting NTP direction time as BMC time and outputting log information for user detection and adjustment;
s10: resending and executing the instruction of the BMC synchronization time at intervals of preset time, and returning to the step S1 if the instruction is detected; if not, the process returns to step S9.
Further, in step S1, the synchronization signal directly acts on the management unit to call up the instruction stored in the readable storage medium.
Further, the step S3 specifically includes:
setting time points of the same time zone, respectively subtracting the time information in the BMC register information and the time information acquired from the NTP server from the time points, and comparing the two difference values.
Further, the step S9 includes:
the user enters the Bios interface through BMC or makes modifications through Sonic instructions.
Correspondingly, the invention also discloses a system for updating the time sequence of the baseboard management controller, which comprises:
the acquisition device is used for carrying out interaction with a network through a second transmission connection module in a preset management unit to acquire time information, automatically converting the time information into a BMC (baseboard management controller) storable form and packaging time sequence into a transmission signal; the comparison device is used for directly comparing the transmission signal with the time signal with the same format from the RTC and directly sending a comparison result to the BMC after the comparison;
and the execution device is used for executing the synchronous time sequence operation by the BMC according to the comparison result.
Correspondingly, the invention also discloses a device for updating the time sequence of the baseboard management controller, which comprises:
a memory for storing a computer program;
a processor configured to implement the method steps for updating timing of a bmc as described in any of the above when executing the computer program.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a method, a system and equipment for updating a time sequence of a substrate management controller, which realize the unified setting of BMC time based on a method of combining software and hardware of a computer operating system in two BMC synchronization modes, wherein the time sequence is divided into two directions from a time sequence signal, one is the hardware time acquired by the BMC from an RTC, the BMC can enter a BIOS interface through a reboot under a serial port to set the time of the RTC, the other time sequence is acquired through an NTP server, a clock device which is determined by the NTP server can be set by a user, the time sequence is set as a first priority, time information is acquired through interaction between a second transmission connection module in a designed management unit and a network, the time information is automatically converted into a storable form and is packaged into a transmission signal, on one hand, the time sequence can be directly compared with the time signal with the same format from the RTC, on the other hand, the time sequence can be directly sent to the BMC after comparison, so that the BMC can acquire and execute the operation of synchronizing the time sequence.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of the structure of a management unit of the present invention.
FIG. 2 is a flow chart of the method of the present invention.
Fig. 3 is a system configuration diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings.
The embodiment provides an updating method of a baseboard management controller timing sequence, which comprises the following steps: the time information is obtained through interaction between a second transmission connection module in a preset management unit and a network, the time information is automatically converted into a BMC (baseboard management controller) storable form, and time sequence is packaged into a transmission signal;
directly comparing the transmission signal with the time signal with the same format from the RTC, and directly sending the comparison result to the BMC after the comparison;
and the BMC executes synchronous time sequence operation according to the comparison result.
As shown in fig. 1, there are 3 transmission connectors inside the management unit, the first one directly interacts with the BIOS, reads the time information obtained by the BIOS through the RTC, the connector1 contains a clock interrupt register for sending execution instructions every certain pre-stored time, the connector2 interacts with the OS, and information from the OS system needs to be translated and compared with the time of the BMC, which requires an OS storage execution mechanism to be provided in the management unit, the readable storage medium of the mechanism has stored therein instructions configured to implement the functions described above, and further, after the management module compares the time difference of the collected time at the two sides of the NTP and the RTC with the set time difference fault-tolerant range, the connector2 feeds back the result information to the user interface or records in a log through the system terminal, the connector3 interacts with the BMC to output the time signal of the result and determine whether to acquire the synchronization signal.
On the basis of the above, as shown in fig. 2, the method for updating the timing sequence of the bmc proposed in this embodiment specifically includes the following steps:
1: after the system is started, the BIOS initializes and interacts with the RTC to update the hardware time sequence, the BMC sends out a synchronous signal within a certain preset interval time, and the signal directly acts on the management unit module to call a set instruction stored in the readable storage medium.
2: the management module sends an instruction, on one hand, clock equipment information is acquired from the NTP through interaction with the OS, and on the other hand, the RTC time information is acquired by the BIOS.
3: the management module reads the time information in the BMC register information and compares the time information with the time acquired from the NTP server, and the method can be that the time point of the same time zone is set to be different, and the size of the two difference values is compared.
4: it is determined whether the difference between the two values does not exceed the fault tolerance range value size (eg.60s).
5: if so, outputting the time information, otherwise, outputting the information for setting the registered BMC time information as the time of the OS and recording the synchronous operation information, and then repeating the steps 3 and 4.
6: the management unit reads the RTC time information acquired by the BIOS and converts the RTC time information into a BMC (baseboard management controller) storable format, so that the information processing is facilitated.
7: the acquired time sequence packing is registered and output to a processor of the management unit to be compared with the time information of the other party.
8: and comparing the time information of the two by adopting a method similar to the fifth step, and judging whether the time information is within the fault tolerance range set by the user (eg.60s).
9: if the time is the BMC time, the time with the NTP direction being the BMC time is set, otherwise, the time with the NTP direction being the preferred facility is the BMC time, and a log message is output to be detected and adjusted by a user, and the user can manually enter a Bios interface through the BMC to be modified or a Sonic instruction to be modified.
10: and (3) retransmitting and executing the instruction of the BMC synchronization time at a certain interval, returning to the step 1 to circulate the flow if the instruction is detected, and returning to the previous step to retransmit the instruction if the instruction is not detected.
Correspondingly, as shown in fig. 3, the present invention also discloses a system for updating the timing sequence of a bmc, comprising:
the acquisition device is used for carrying out interaction with a network through a second transmission connection module in a preset management unit to acquire time information, automatically converting the time information into a BMC (baseboard management controller) storable form and packaging time sequence into a transmission signal; the comparison device is used for directly comparing the transmission signal with the time signal with the same format from the RTC and directly sending a comparison result to the BMC after the comparison;
and the execution device is used for executing the synchronous time sequence operation by the BMC according to the comparison result.
Correspondingly, the invention also discloses a device for updating the time sequence of the baseboard management controller, which comprises:
a memory for storing a computer program;
a processor configured to implement the method steps for updating timing of a bmc as described in any of the above when executing the computer program.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, 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, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention. The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or 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 through some interfaces, systems or units, 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.
The invention is further described with reference to the accompanying drawings and specific embodiments. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and these equivalents also fall within the scope of the present application.