CN111211853B - BMC time synchronization checking method and equipment - Google Patents

BMC time synchronization checking method and equipment Download PDF

Info

Publication number
CN111211853B
CN111211853B CN201911329535.2A CN201911329535A CN111211853B CN 111211853 B CN111211853 B CN 111211853B CN 201911329535 A CN201911329535 A CN 201911329535A CN 111211853 B CN111211853 B CN 111211853B
Authority
CN
China
Prior art keywords
bmc
time
time synchronization
timestamp
synchronization period
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.)
Active
Application number
CN201911329535.2A
Other languages
Chinese (zh)
Other versions
CN111211853A (en
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 CN201911329535.2A priority Critical patent/CN111211853B/en
Publication of CN111211853A publication Critical patent/CN111211853A/en
Application granted granted Critical
Publication of CN111211853B publication Critical patent/CN111211853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The invention discloses a BMC time synchronization checking method, which comprises the following steps: reading a set first time synchronization period in a BMC configuration file, and connecting the BMC through ssh; the time of the BMC is modified to be different from that of the NTP server, and a first time stamp of the BMC and a second time stamp of the NTP server are continuously acquired and compared; in response to the first timestamp and the second timestamp being consistent, recording a current timestamp as a start of a second time synchronization period; the time of the BMC is modified to be different from that of the NTP server again, the current timestamp is recorded as the end point of a second time synchronization period in response to the fact that the first timestamp and the second timestamp are consistent again; and in response to the difference between the end point and the start point of the second time synchronization period being the same as the first time synchronization period, printing a verification success message and closing the ssh connection. The invention also discloses computer equipment. The invention can quickly and accurately verify the correctness and periodicity of the time synchronization function and improve the testing efficiency and accuracy.

Description

BMC time synchronization checking method and equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a device for BMC time synchronization verification.
Background
In the current era, servers are increasingly clustered, and if a uniform clock is not provided, time sequence dislocation inevitably exists in corresponding event record data, so that the event sequence and the development process are difficult to accurately describe, and an effective analysis basis cannot be provided for event analysis. Therefore, unifying the accurate time is an important measure for the safe operation of the server system and improving the operation level.
However, in the process of testing the time synchronization function of the server, because the time synchronization has periodicity and real-time performance, it is difficult to confirm which synchronization cycle the time synchronization is currently in a manual mode and how long it is to enter the next synchronization cycle, so it is difficult to check the accuracy of the time synchronization cycle and the synchronization result. Therefore, if the start point of each BMC time synchronization period is automatically determined by the script, the time synchronization result is obtained by an automatic comparison method, which is very necessary to improve the test efficiency and the test accuracy.
Disclosure of Invention
In view of this, embodiments of the present invention provide a BMC time synchronization checking method and apparatus, which can quickly and accurately determine a starting point of each time synchronization period, verify correctness and periodicity of a time synchronization function, avoid unnecessary operation and waiting of a tester, and improve testing efficiency and accuracy.
Based on the above purpose, one aspect of the present invention provides a BMC time synchronization checking method, which includes the following steps: reading a set first time synchronization period in a BMC configuration file, and connecting the BMC through ssh; modifying the time of the BMC to be different from the time of the NTP server, and continuously acquiring and comparing a first time stamp of the BMC and a second time stamp of the NTP server; in response to the first timestamp and the second timestamp being consistent, recording a current timestamp as a start of the second time synchronization period; the time of the BMC is modified to be different from the time of the NTP server again, the current timestamp is recorded as the end point of the second time synchronization period in response to the fact that the first timestamp and the second timestamp are consistent again; printing a verification success message and closing the ssh connection in response to a difference between the end point and the start point of the second time synchronization period being the same as the first time synchronization period.
In some embodiments of the BMC time synchronization checking method of the present invention, reading the set first time synchronization period in the BMC configuration file, and connecting the BMC through ssh further includes: and reading the IP, the user name and the password of the BMC in the BMC configuration file, initializing the ssh and connecting the BMC through the ssh.
In some embodiments of the BMC time synchronization checking method of the present invention, modifying the time of the BMC to be different from the time of the NTP server again, and in response to the first timestamp and the second timestamp being identical again, recording the current timestamp as the end point of the second time synchronization period further includes: and responding to the first time stamp and the second time stamp being consistent again, and printing time synchronization success information.
In some embodiments of the BMC time synchronization checking method of the present invention, the method further comprises: printing verification failure information and closing the ssh connection in response to the difference between the end point and the start point of the second time synchronization period being different from the first time synchronization period.
In some embodiments of the BMC time synchronization checking method of the present invention, the method further comprises: and displaying the result on a user interface in real time, and saving the result in a corresponding log file in a document form.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of: reading a set first time synchronization period in a BMC configuration file, and connecting the BMC through ssh; modifying the time of the BMC to be different from the time of the NTP server, and continuously acquiring and comparing a first time stamp of the BMC and a second time stamp of the NTP server; in response to the first timestamp and the second timestamp being consistent, recording a current timestamp as a start of the second time synchronization period; the time of the BMC is modified to be different from the time of the NTP server again, the current timestamp is recorded as the end point of the second time synchronization period in response to the fact that the first timestamp and the second timestamp are consistent again; printing a verification success message and closing the ssh connection in response to a difference between the end point and the start point of the second time synchronization period being the same as the first time synchronization period.
In some embodiments of the computer device of the present invention, reading the set first time synchronization period in a BMC configuration file, and connecting the BMC through ssh further comprises: and reading the IP, the user name and the password of the BMC in the BMC configuration file, initializing the ssh and connecting the BMC through the ssh.
In some embodiments of the computer device of the present invention, modifying the BMC time again to be different from the NTP server time, recording the current timestamp as the end of the second time synchronization period in response to the first timestamp and the second timestamp again coinciding further comprises: and responding to the first time stamp and the second time stamp being consistent again, and printing time synchronization success information.
In some embodiments of the computer apparatus of the present invention, the apparatus further performs the steps of: printing verification failure information and closing the ssh connection in response to the difference between the end point and the start point of the second time synchronization period being different from the first time synchronization period.
In some embodiments of the computer apparatus of the present invention, the apparatus further performs the steps of: and displaying the result on a user interface in real time, and saving the result in a corresponding log file in a document form.
The invention has at least the following beneficial technical effects: the invention can quickly and accurately determine the starting point of each time synchronization period when the server time synchronization function is tested, verify the correctness and periodicity of the time synchronization function, avoid meaningless operation and waiting of testers and improve the testing efficiency and accuracy.
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, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating an embodiment of a BMC time synchronization checking method in accordance with the invention;
fig. 2 shows a flowchart of an embodiment of a BMC time synchronization checking method according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Based on the above object, a first aspect of the embodiments of the present invention provides a BMC time synchronization checking method. Fig. 1 is a block diagram illustrating a BMC time synchronization checking method according to the present invention. In the embodiment shown in fig. 1, the method comprises at least the following steps:
s100, reading a set first time synchronization period in a BMC configuration file, and connecting to a BMC through ssh;
s200, modifying the time of the BMC to be different from the time of the NTP server, and continuously acquiring and comparing a first time stamp of the BMC and a second time stamp of the NTP server;
s300, responding to the consistency of the first time stamp and the second time stamp, and recording the current time stamp as the starting point of a second time synchronization period;
s400, the time of the BMC is changed to be different from that of the NTP server again, the first timestamp and the second timestamp are responded to be consistent again, and the current timestamp is recorded as the end point of a second time synchronization period;
and S500, printing verification success information and closing the ssh connection in response to the fact that the difference value between the end point and the start point of the second time synchronization period is the same as that of the first time synchronization period.
In some embodiments of the present invention, the program uses python3 as a main development language, uses Linux commands as an auxiliary, and according to the time synchronization function configuration (mainly NTP configuration) of the test machine, cyclically traverses the time of the BMC and the time of the NTP server and compares the two, first obtains the starting point of each time synchronization period, and then verifies the accuracy and periodicity of the time synchronization function. Fig. 2 shows a flowchart of an embodiment of a BMC time synchronization checking method according to the present invention. As shown in fig. 2, reading the set time synchronization cycle _ time in the configuration file, and connecting the BMC; the execution command sets the BMC time to be different from the NTP server time, then continuously acquires a BMC timestamp BMC _ timestamp and an NTP timestamp NTP _ timestamp and compares the BMC timestamp BMC _ timestamp and the NTP timestamp NTP _ timestamp, when the BMC timestamp BMC _ timestamp and the NTP timestamp NTP _ timestamp are consistent, the time synchronization is just completed at the moment and is at the starting point of the next time synchronization period, and the current timestamp cycle _ start time is recorded and used as the starting point of the current time synchronization period; then setting the BMC time to be different from the NTP server time through ssh, continuously acquiring a BMC timestamp BMC _ time and an NTP timestamp NTP _ time, comparing, when the BMC timestamp BMC _ time and the NTP timestamp NTP _ time are consistent, indicating that the end of the current time synchronization period is reached, finishing time synchronization by the BMC, taking the current time as the end cycle _ end of the current time synchronization period, comparing the difference of the cycle _ end minus the cycle _ start time with the set time cycle _ time read in the configuration file, and if the two are consistent, printing that the time synchronization period is verified successfully.
According to some embodiments of the BMC time synchronization checking method of the present invention, reading the set first time synchronization period in the BMC configuration file, and connecting the BMC through ssh further includes: and reading the IP, the user name and the password of the BMC in the BMC configuration file, initializing ssh and connecting the BMC through the ssh. In some embodiments of the present invention, the IP, username, password and set time synchronization cycle _ time of the BMC are read in the configuration file, the ssh object is initialized, and the BMC is connected;
according to some embodiments of the BMC time synchronization checking method of the present invention, modifying the time of the BMC to be different from the time of the NTP server again, and in response to the first timestamp and the second timestamp being identical again, recording the current timestamp as the end point of the second time synchronization period further includes: and responding to the first time stamp and the second time stamp being consistent again, and printing the time synchronization success information. In some embodiments of the present invention, when the BMC _ timestamp and the NTP timestamp are consistent, it indicates that the end of the time synchronization period has been reached, the BMC completes time synchronization, and the printing "time synchronization is completed, and the BMC time is consistent with the NTP time".
According to some embodiments of the BMC time synchronization checking method of the present invention, the method further comprises: and in response to the difference between the end point and the start point of the second time synchronization period being different from the first time synchronization period, printing verification failure information and closing the ssh connection. In some embodiments of the present invention, when a difference between an end point and a start point of the second time sync period is not identical to the first time sync period, the printing "time sync period check fails".
According to some embodiments of the BMC time synchronization checking method of the present invention, the method further comprises: and displaying the result on a user interface in real time, and saving the result in a corresponding log file in a document form. In some embodiments of the present invention, after the script is executed, the result is displayed on the interface in real time and saved in a corresponding log file in a TXT form, which facilitates viewing.
In some embodiments of the invention, the script that imports the relevant library is as follows:
import paramiko
import time
import logging
import os
import configparser as caparser
after the relevant library is imported, reading the configuration file, wherein the script of the step is as follows:
Figure BDA0002329229560000061
Figure BDA0002329229560000071
the log-type script is as follows:
Figure BDA0002329229560000072
Figure BDA0002329229560000081
Figure BDA0002329229560000091
the steps of ssh attachment are as follows:
Figure BDA0002329229560000092
Figure BDA0002329229560000101
the time checking steps are as follows:
Figure BDA0002329229560000102
Figure BDA0002329229560000111
the script is executed as follows:
Figure BDA0002329229560000112
Figure BDA0002329229560000121
it should be particularly noted that, the steps in the embodiments of the BMC time synchronization checking method described above may be intersected, replaced, added, or deleted, and therefore, these reasonable permutation and combination transformations should also belong to the scope of the present invention, and should not limit the scope of the present invention to the embodiments.
In view of the above object, a second aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of: s100, reading a set first time synchronization period in a BMC configuration file, and connecting to a BMC through ssh; s200, modifying the time of the BMC to be different from the time of the NTP server, and continuously acquiring and comparing a first time stamp of the BMC and a second time stamp of the NTP server; s300, responding to the consistency of the first time stamp and the second time stamp, and recording the current time stamp as the starting point of a second time synchronization period; s400, the time of the BMC is changed to be different from that of the NTP server again, the first timestamp and the second timestamp are responded to be consistent again, and the current timestamp is recorded as the end point of a second time synchronization period; and S500, printing verification success information and closing the ssh connection in response to the fact that the difference value between the end point and the start point of the second time synchronization period is the same as that of the first time synchronization period.
According to some embodiments of the computer device of the present invention, reading the set first time synchronization period in the BMC configuration file and connecting to the BMC through ssh further comprises: and reading the IP, the user name and the password of the BMC in the BMC configuration file, initializing ssh and connecting the BMC through the ssh.
According to some embodiments of the computer device of the present invention, again modifying the time of the BMC to be different from the time of the NTP server, in response to the first timestamp and the second timestamp again coinciding, recording the current timestamp as the end of the second time synchronization period further comprises: and responding to the first time stamp and the second time stamp being consistent again, and printing the time synchronization success information.
According to some embodiments of the computer apparatus of the present invention, the apparatus further performs the steps of: and in response to the difference between the end point and the start point of the second time synchronization period being different from the first time synchronization period, printing verification failure information and closing the ssh connection.
According to some embodiments of the computer apparatus of the present invention, the apparatus further performs the steps of: and displaying the result on a user interface in real time, and saving the result in a corresponding log file in a document form.
Likewise, it will be appreciated by those skilled in the art that all the embodiments, features and advantages set forth above with respect to the BMC time synchronization checking method according to the present invention apply equally well to the computer device according to the present invention. For the sake of brevity of the present disclosure, no repeated explanation is provided herein.
It should be particularly noted that, the steps in the embodiments of the BMC time synchronization checking method and apparatus may be intersected, replaced, added, or deleted, and therefore, these reasonable permutation and combination transformations of the BMC time synchronization checking method and apparatus should also belong to the scope of the present invention, and should not limit the scope of the present invention to the embodiments.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate, all or part of the processes of the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the program of the BMC time synchronization checking method may be stored in a computer readable storage medium, and when executed, may include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A BMC time synchronization checking method is characterized by comprising the following steps:
reading a set first time synchronization period in a BMC configuration file, and connecting the BMC through ssh;
modifying the time of the BMC to be different from the time of the NTP server, and continuously acquiring and comparing a first time stamp of the BMC and a second time stamp of the NTP server;
in response to the first timestamp and the second timestamp being consistent, recording a current timestamp as a start of a second time synchronization period;
the time of the BMC is modified to be different from the time of the NTP server again, the current timestamp is recorded as the end point of the second time synchronization period in response to the fact that the first timestamp and the second timestamp are consistent again;
printing a verification success message and closing the ssh connection in response to a difference between the end point and the start point of the second time synchronization period being the same as the first time synchronization period.
2. The BMC time synchronization checking method of claim 1, wherein reading the set first time synchronization period in the BMC configuration file and connecting to the BMC through ssh further comprises:
and reading the IP, the user name and the password of the BMC in the BMC configuration file, initializing the ssh and connecting the BMC through the ssh.
3. The BMC time synchronization verification method of claim 1, wherein said re-modifying the time of the BMC to be different from the time of the NTP server, in response to the first timestamp and the second timestamp again coinciding, recording a current timestamp as an end of the second time synchronization period further comprises:
and responding to the first time stamp and the second time stamp being consistent again, and printing time synchronization success information.
4. The BMC time synchronization checking method of claim 1, further comprising:
printing verification failure information and closing the ssh connection in response to the difference between the end point and the start point of the second time synchronization period being different from the first time synchronization period.
5. The BMC time synchronization checking method of claim 1, further comprising:
and displaying the result on a user interface in real time, and saving the result in a corresponding log file in a document form.
6. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of:
reading a set first time synchronization period in a BMC configuration file, and connecting the BMC through ssh;
modifying the time of the BMC to be different from the time of the NTP server, and continuously acquiring and comparing a first time stamp of the BMC and a second time stamp of the NTP server;
in response to the first timestamp and the second timestamp being consistent, recording a current timestamp as a start of a second time synchronization period;
the time of the BMC is modified to be different from the time of the NTP server again, the current timestamp is recorded as the end point of the second time synchronization period in response to the fact that the first timestamp and the second timestamp are consistent again;
printing a verification success message and closing the ssh connection in response to a difference between the end point and the start point of the second time synchronization period being the same as the first time synchronization period.
7. The computer device of claim 6, wherein reading the set first time synchronization period in the BMC configuration file and connecting to the BMC over ssh further comprises:
and reading the IP, the user name and the password of the BMC in the BMC configuration file, initializing the ssh and connecting the BMC through the ssh.
8. The computer device of claim 6, wherein said again modifying the time of the BMC to be different from the time of the NTP server, responsive to the first timestamp and the second timestamp again coinciding, recording a current timestamp as the end of the second time synchronization period further comprises:
and responding to the first time stamp and the second time stamp being consistent again, and printing time synchronization success information.
9. The computer device of claim 6, wherein the device further performs the steps of:
printing verification failure information and closing the ssh connection in response to the difference between the end point and the start point of the second time synchronization period being different from the first time synchronization period.
10. The computer device of claim 6, wherein the device further performs the steps of:
and displaying the result on a user interface in real time, and saving the result in a corresponding log file in a document form.
CN201911329535.2A 2019-12-20 2019-12-20 BMC time synchronization checking method and equipment Active CN111211853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911329535.2A CN111211853B (en) 2019-12-20 2019-12-20 BMC time synchronization checking method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911329535.2A CN111211853B (en) 2019-12-20 2019-12-20 BMC time synchronization checking method and equipment

Publications (2)

Publication Number Publication Date
CN111211853A CN111211853A (en) 2020-05-29
CN111211853B true CN111211853B (en) 2022-02-22

Family

ID=70788246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911329535.2A Active CN111211853B (en) 2019-12-20 2019-12-20 BMC time synchronization checking method and equipment

Country Status (1)

Country Link
CN (1) CN111211853B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341466A (en) * 2016-08-30 2017-01-18 北京六合智汇技术有限责任公司 Distributed data collection system and data collection method based on same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975652B1 (en) * 2000-10-18 2005-12-13 3Com Corporation Clock synchronization of HFC telephone equipment
US8493915B2 (en) * 2008-03-31 2013-07-23 Alcatel Lucent Method for synchronizing between a gateway and base stations and corresponding gateway and base stations
CN109283864B (en) * 2017-07-21 2020-05-05 北京智云芯科技有限公司 Time synchronization and calibration method and system for data sampling

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341466A (en) * 2016-08-30 2017-01-18 北京六合智汇技术有限责任公司 Distributed data collection system and data collection method based on same

Also Published As

Publication number Publication date
CN111211853A (en) 2020-05-29

Similar Documents

Publication Publication Date Title
CN110992992B (en) Hard disk test method, device and storage medium
TWI510915B (en) Computer automated test system and test methods, recording media and program products
CN109032611A (en) Script dispositions method, device, computer equipment and storage medium
CN110659167A (en) Server hardware testing method, equipment and storage medium
WO2019227641A1 (en) Application testing method, apparatus, terminal device and medium
WO2019019647A1 (en) Method and system for determining application program testing range, server and storage medium
CN110968477B (en) Method, device and medium for acquiring backup BMC version information
CN113608692B (en) Storage system data consistency verification method, system, equipment and medium
CN110442491B (en) Method, device and readable medium for testing server performance peak value based on SPECpower
CN111427777B (en) SOL test method, system, equipment and medium
CN111352784B (en) Production test method, device, equipment and readable medium
CN111211853B (en) BMC time synchronization checking method and equipment
CN111290902B (en) Switch port pressure testing method, device, equipment and medium
CN107357701B (en) SAS signal testing method and device under distributed scene
CN111045710A (en) Method, equipment and medium for upgrading SAS-Expander firmware based on IPMI command
CN112860585B (en) Test script assertion generation method and device
CN111124597B (en) Method, equipment and medium for positioning fault item in Vtermination test
CN114546749A (en) Chip random test case regression method, device, equipment and readable medium
WO2019056545A1 (en) Test machine automation management method and apparatus, device, and storage medium
CN113986759A (en) Business processing flow acquisition method, business architecture flow verification method and system
CN113886221A (en) Test script generation method and device, storage medium and electronic equipment
CN111124719A (en) High-availability test method, device and readable medium based on main and standby management nodes
CN111857744A (en) Installation method, system, equipment and medium of super-fusion system
CN112069009A (en) Method and device for pressure test in Recovery mode and terminal equipment
CN111857745A (en) Multi-disk burning method, system, equipment and medium

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
GR01 Patent grant
GR01 Patent grant