CN111694699A - Method and device for testing server BMC (baseboard management controller) automatic synchronization RTC (real time clock) - Google Patents

Method and device for testing server BMC (baseboard management controller) automatic synchronization RTC (real time clock) Download PDF

Info

Publication number
CN111694699A
CN111694699A CN202010444916.1A CN202010444916A CN111694699A CN 111694699 A CN111694699 A CN 111694699A CN 202010444916 A CN202010444916 A CN 202010444916A CN 111694699 A CN111694699 A CN 111694699A
Authority
CN
China
Prior art keywords
bmc
time
log
test script
configuring
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.)
Granted
Application number
CN202010444916.1A
Other languages
Chinese (zh)
Other versions
CN111694699B (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 CN202010444916.1A priority Critical patent/CN111694699B/en
Publication of CN111694699A publication Critical patent/CN111694699A/en
Application granted granted Critical
Publication of CN111694699B publication Critical patent/CN111694699B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a test method and a system for automatically synchronizing RTC time by a server BMC (baseboard management controller), wherein the method comprises the following steps: s1, setting and starting a test script at a client; s2, configuring a test script to establish a session, clearing an original log, and acquiring an IP (Internet protocol), a user name and a password of the BMC, and a synchronization period parameter and a pressure test frequency parameter set by a user; s3, a testing script is configured to log in the BMC according to the IP, the user name and the password of the BMC, the BMC is set to close the automatic NTP service, then the RTC time is automatically acquired and synchronized according to the synchronization period parameter and the pressure testing time parameter set by the user, and when the RTC time synchronization fails, the NTP service is started to synchronize the BMC time; and S4, configuring a test script to obtain a log, judging a BMC time synchronization result according to the log, and deleting the session after the test is finished.

Description

Method and device for testing server BMC (baseboard management controller) automatic synchronization RTC (real time clock)
Technical Field
The invention belongs to the technical field of server clock synchronization, and particularly relates to a method and a device for automatically testing synchronous RTC (real time clock) time by a server BMC (baseboard management controller).
Background
BMC, a base management controller, and a control manager.
RTC, realtimecontroller, real time controller.
NTP, network time Protocol.
At present, methods for automatically synchronizing RTC time by a server BMC adopt manual testing, a tester is required to operate in a laboratory in the whole testing process, and the whole testing process is quite complicated and needs to verify whether system time is legal or not, restart, log in the server, harm logs and the like. The whole test process is long in test time consumption, large in occupied manpower, influenced by human factors, incapable of obtaining accurate time for testing, incapable of identifying errors, and incapable of achieving real accuracy by manually analyzing the test process and results.
Therefore, it is very necessary to provide a method and an apparatus for testing the server BMC to automatically synchronize the RTC time, in order to overcome the above-mentioned drawbacks in the prior art.
Disclosure of Invention
Aiming at the defect that the testing process in the prior art is long in time consumption and cannot be accurate, the invention provides a testing method and a testing device for automatically synchronizing RTC time by a server BMC (baseboard management controller), so as to solve the technical problem.
In a first aspect, the present invention provides a method for automatically testing an RTC time synchronized by a server BMC, which is characterized by comprising the following steps:
s1, setting and starting a test script at a client;
s2, configuring a test script to establish a session, clearing an original log, and acquiring an IP (Internet protocol), a user name and a password of the BMC, and a synchronization period parameter and a pressure test frequency parameter set by a user;
s3, a testing script is configured to log in the BMC according to the IP, the user name and the password of the BMC, the BMC is set to close the automatic NTP service, then the RTC time is automatically acquired and synchronized according to the synchronization period parameter and the pressure testing time parameter set by the user, and when the RTC time synchronization fails, the NTP service is started to synchronize the BMC time;
and S4, configuring a test script to obtain a log, judging a BMC time synchronization result according to the log, and deleting the session after the test is finished.
Further, in step S2, the number of the synchronization period parameters set by the user is the same as the pressure test frequency parameter, and the value range of the synchronization period parameters is the period of the self-correctable time of the BMC clock. Namely, the value range of the synchronization period parameter is within the correctable time range of the BMC clock, and when the value range exceeds the correctable time range, the BMC clock cannot synchronize the RTC time.
Further, in step S2, the test script is further configured to acquire a BMC synchronizable range of the RTC time, where a lower limit of the BMC synchronizable range of the RTC time is smaller than the current year, and an upper limit of the BMC synchronizable range of the RTC time is larger than the current year. The RTC time sets the upper and lower limits of the year, and the BMC can synchronize the RTC time within the upper and lower limits of the year.
Further, the step S3 specifically includes the following steps:
s31, configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC;
s32, configuring a test script to close the automatic NTP service and scanning a BMC time synchronization mode;
when the BMC time synchronization mode is RTC time synchronization, go to step S33;
when the BMC time synchronization mode is non-RTC time synchronization, step S35 is entered;
s33, configuring a test script to acquire a synchronization period parameter corresponding to the current pressure test frequency, judging whether the BMC time is consistent with the RTC time when the synchronization period parameter is reached, and setting the BMC to acquire the RTC time for synchronization when the BMC time is inconsistent with the RTC time;
s34, configuring a test script to judge whether the pressure test times are finished;
if not, positioning the next pressure test times, and returning to the step S33;
if yes, go to step S4; s35, configuring a test script to scan time information of the NTP server and locking a time node;
s36, configuring a test script to judge whether the NTP time is abnormal or not;
if not, the configuration test script sets the BMC synchronization NTP time, and the step S4 is entered. When the BMC time synchronization mode is RTC time synchronization, if the BMC time is inconsistent with the RTC time, performing RTC time synchronization; when the non-RTC time is synchronized, the original NTP service is closed, the NTP time synchronization is needed, but the NTP time is ensured to be fault-free.
Further, in step S36, if the NTP time is abnormal, the process proceeds to step S37;
s37, configuring a test script to set BMC to call a crystal oscillator to time, and entering step S4. When the BMC is in a non-RTC time synchronization mode and the NTP time fails, the BMC also has a crystal oscillator circuit of the BMC, so that the conventional recording and running of time can be realized.
Further, in step S33, before the configuration test script sets the BMC to acquire the RTC time for synchronization, it is determined whether the RTC clock fails;
if yes, configuring a test script to set BMC to call a crystal oscillator for timing, and entering step S4;
if not, setting the BMC to acquire the RTC time for synchronization. When the BMC is in an RTC time synchronization mode but the RTC time is in fault, the BMC can call a self crystal oscillator circuit to carry out conventional recording and running of time, so that the problem of power failure of a main board battery or fault of an RTC clock is solved.
Further, in step S2, the clearing of the original log includes clearing of an original system event log and an original audit log, and simultaneously, in step S2, a synchronization period parameter is recorded and set to the audit log;
in step S32, recording the closing of the automatic NTP service to an audit log;
in steps S33 and S36, the synchronized time jump and the synchronization result are recorded in the system event log.
Further, the step S4 specifically includes the following steps:
s41, configuring a test script to obtain a system event log and an audit log;
s42, configuring a test script to judge whether a system event log records synchronous time jump or not and whether a synchronous result log is recorded or not;
configuring a test script to judge whether log information for closing the automatic NTP service is recorded in an audit log list or not and whether log information for setting a time synchronization period is recorded or not;
and S43, after the test is finished, the session is deleted by the configuration test script. The system event log records the synchronous record of the BMC time and the record of the BMC time synchronization result; the audit log records a key log for closing the automatic NTP reset, acquires a synchronization period parameter set by a user, and sets a log of a time synchronization period.
In a second aspect, the present invention provides a device for automatically synchronizing RTC time by a server BMC, including:
the test script starting module is used for setting and starting a test script at the client;
the parameter acquisition module is used for configuring a test script to create a session, clearing an original log and acquiring an IP (Internet protocol), a user name and a password of the BMC (baseboard management controller), and a synchronization period parameter and a pressure test frequency parameter set by a user;
the time synchronization module is used for configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC, setting the BMC to close the automatic NTP service, automatically acquiring and synchronizing RTC time according to a synchronization period parameter and a pressure test time parameter set by a user, and starting the NTP service to synchronize the BMC time when the RTC time synchronization fails;
and the log judgment module is used for configuring the test script to obtain the log, judging the BMC time synchronization result according to the log and deleting the session after the test is finished.
Further, the time synchronization module includes:
the BMC login unit is used for configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC;
the time synchronization mode scanning unit is used for configuring a test script to close the automatic NTP service and scanning a BMC time synchronization mode;
the RTC time synchronization unit is used for configuring a test script to acquire a synchronization period parameter corresponding to the current pressure test times when the BMC time synchronization mode is RTC time synchronization, judging whether the BMC time is consistent with the RTC time when the synchronization period parameter is reached, and setting the BMC to acquire the RTC time for synchronization when the BMC time is inconsistent with the RTC time;
the NTP time node locking unit is used for configuring a test script to scan NTP server time information and locking a time node when the BMC time synchronization mode is non-RTC time synchronization;
an NTP time judging unit configured with a test script to judge whether the NTP time is abnormal;
the NTP time synchronization unit is used for a non-RTC time synchronization mode, and when NTP time is normal, a test script is configured to set BMC to synchronize NTP time;
and the test frequency completion judging unit is used for configuring the test script to judge whether the pressure test frequency is completed or not after the RTC time is synchronized by the BMC.
The BMC calls a crystal oscillator unit which is used for RTC time synchronization mode, RTC clock failure or non-RTC time synchronization mode, and when NTP time is abnormal, a test script is configured to set the BMC to call crystal oscillator timing;
the log judgment module comprises:
the log obtaining unit is used for configuring a test script to obtain a system event log and an audit log;
the log detection unit is used for configuring a test script to judge whether the system event log records synchronous time jump or not and whether the synchronous result log is recorded or not; the system is also used for configuring a test script to judge whether log information for closing the automatic NTP service is recorded in an audit log list or not and whether log information for setting a time synchronization period is recorded or not;
and the session deleting unit is used for deleting the session after the test of the configuration test script is finished.
The beneficial effect of the invention is that,
the method and the device for automatically testing the RTC time synchronized by the server BMC provided by the invention have the advantages that the automation of the RTC time synchronized by the server BMC is realized, the time synchronization verification is realized, the efficiency of manual testing and pressure testing is avoided, the operation standardization and the effective safety of the BMC testing are improved, and the reliability of the BMC time is improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
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 or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a first schematic flow chart of the method of the present invention;
FIG. 2 is a second schematic flow chart of the method of the present invention;
FIG. 3 is a schematic diagram of the system of the present invention;
in the figure, 1-test script start module; 2-a parameter acquisition module; 3-a time synchronization module; 3.1-BMC log-in unit; 3.2-time synchronous mode scanning unit; 3.3-RTC time synchronization unit; 3.4-NTP time node locking unit; 3.5-NTP time judging unit; 3.6-NTP time synchronization unit; 3.7-test times finishing judging unit; 3.8-BMC calls a crystal oscillator unit; 4-a log judgment module; 4.1-log obtaining unit; 4.2-log detection unit; 4.3-Session delete Unit.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in fig. 1, the present invention provides a method for automatically testing the synchronized RTC time by the server BMC, which includes the following steps:
s1, setting and starting a test script at a client;
s2, configuring a test script to establish a session, clearing an original log, and acquiring an IP (Internet protocol), a user name and a password of the BMC, and a synchronization period parameter and a pressure test frequency parameter set by a user;
s3, a testing script is configured to log in the BMC according to the IP, the user name and the password of the BMC, the BMC is set to close the automatic NTP service, then the RTC time is automatically acquired and synchronized according to the synchronization period parameter and the pressure testing time parameter set by the user, and when the RTC time synchronization fails, the NTP service is started to synchronize the BMC time;
and S4, configuring a test script to obtain a log, judging a BMC time synchronization result according to the log, and deleting the session after the test is finished. The invention realizes synchronous automation of the BMC time and the RTC time of the server, realizes the pressure test of the synchronization of the BMC time and the RTC time, improves the reliability test efficiency of the BMC clock and also improves the reliability of the BMC clock.
Example 2:
as shown in fig. 2, the present invention provides a method for automatically testing the synchronized RTC time by the server BMC, which includes the following steps:
s1, setting and starting a test script at a client;
s2, configuring a test script to establish a session, clearing an original log, acquiring an IP (Internet protocol), a user name and a password of the BMC, a synchronization period parameter and a pressure test frequency parameter set by a user, and recording and setting the synchronization period parameter to an audit log; clearing the original log comprises clearing the original system time log and the original system event log;
s3, configuring a test script to close the automatic NTP service, logging in the BMC according to the IP, the user name and the password of the BMC, setting the BMC to automatically acquire and synchronize RTC time according to a synchronization period parameter and a pressure test time parameter set by a user, and starting the NTP service to synchronize the BMC time when the RTC time synchronization fails; the method comprises the following specific steps:
s31, configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC;
s32, configuring a test script to close the automatic NTP service, scanning a BMC time synchronization mode, and closing the automatic NTP service to record an audit log;
when the BMC time synchronization mode is RTC time synchronization, go to step S33;
when the BMC time synchronization mode is non-RTC time synchronization, step S35 is entered;
s33, configuring a test script to acquire a synchronization period parameter corresponding to the current pressure test frequency, judging whether the BMC time is consistent with the RTC time when the synchronization period parameter is reached, and judging whether the RTC clock fails when the BMC time is inconsistent with the RTC time;
if yes, go to step S37;
if not, setting the BMC to acquire RTC time for synchronization; recording the synchronized time jump and the synchronization result to a system event log;
s34, configuring a test script to judge whether the pressure test times are finished;
if not, positioning the next pressure test times, and returning to the step S33;
if yes, go to step S4;
s35, configuring a test script to scan time information of the NTP server and locking a time node;
s36, configuring a test script to judge whether the NTP time is abnormal or not;
if yes, go to step S37;
if not, configuring a test script to set the BMC synchronization NTP time, recording the synchronization time jump and the synchronization result to a system event log, and entering the step S4;
s37, configuring a test script to set BMC to call a crystal oscillator for timing, and entering step S4;
s4, configuring a test script to obtain a log, judging a BMC time synchronization result according to the log, and deleting a session after the test is finished; the method comprises the following specific steps:
s41, configuring a test script to obtain a system event log and an audit log;
s42, configuring a test script to judge whether a system event log records synchronous time jump or not and whether a synchronous result log is recorded or not;
configuring a test script to judge whether log information for closing the automatic NTP service is recorded in an audit log list or not and whether log information for setting a time synchronization period is recorded or not;
and S43, after the test is finished, the session is deleted by the configuration test script.
In step S2 of the foregoing embodiment 2, the number of the synchronization period parameters set by the user is the same as the pressure test frequency parameter, and the value range of the synchronization period parameters is a period of the self-correctable time of the BMC clock; taking the pressure test time parameter as 1000 times as an example, the number of the synchronization period parameters set by a user is also 1000, the random value range of the 1000 synchronization period parameters is 5-1440 min, 5-1440 min is the period of self-correction of the BMC clock, if one synchronization period parameter takes 10min, the BMC can complete synchronization of RTC time within 10min, that is, within 10min, the time jump of the BMC is consistent with the RTC time;
in the step S2, a test script is further configured to acquire a BMC synchronizable range of the RTC time, where a lower limit of the BMC synchronizable range of the RTC time is smaller than the current year and an upper limit is larger than the current year; the RTC is set in a BMC synchronizable range through the hwclock instruction, and the BMC synchronizable range of the RTC time is used for taking values in 2010-2079 years for random access, for example, when the RTC time is set in 2009, even if the value range of the synchronization period parameter meets the requirement, synchronization cannot be carried out.
Example 3:
as shown in fig. 3, the present invention provides a testing apparatus for automatically synchronizing RTC time by a server BMC, comprising:
the test script starting module 1 is used for setting and starting a test script at a client;
the parameter acquisition module 2 is used for configuring a test script to create a session, clearing an original log, closing the automatic NTP service, and acquiring the IP, a user name and a password of the BMC, and a synchronization period parameter and a pressure test frequency parameter set by a user;
the time synchronization module 3 is used for configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC, setting the BMC to close the automatic NTP service, automatically acquiring and synchronizing RTC time according to a synchronization period parameter and a pressure test time parameter set by a user, and starting the NTP service to synchronize the BMC time when the RTC time synchronization fails; the time synchronization module 3 includes:
a BMC login unit 3.1 for configuring a test script to login the BMC according to the IP, the user name and the password of the BMC;
a time synchronization mode scanning unit 3.2, configured to configure a test script to close the automatic NTP service, and scan a BMC time synchronization mode;
the RTC time synchronization unit 3.3 is used for configuring a test script to acquire a synchronization period parameter corresponding to the current pressure test times when the BMC time synchronization mode is RTC time synchronization, judging whether the BMC time is consistent with the RTC time when the synchronization period parameter is reached, and setting the BMC to acquire the RTC time for synchronization when the RTC time is inconsistent;
an NTP time node locking unit 3.4, which is used for configuring a test script to scan NTP server time information and lock a time node when the BMC time synchronization mode is non-RTC time synchronization;
an NTP time judging unit 3.5 for configuring a test script to judge whether the NTP time is abnormal;
an NTP time synchronization unit 3.6 is used for a non-RTC time synchronization mode, and when the NTP time is normal, a test script is configured to set the BMC to synchronize the NTP time;
the test frequency completion judging unit 3.7 is used for configuring a test script to judge whether the pressure test frequency is completed or not after the RTC time is synchronized by the BMC;
the BMC calls a crystal oscillator unit 3.8 for an RTC time synchronization mode, an RTC clock fault or a non-RTC time synchronization mode, and when NTP time is abnormal, a test script is configured to set the BMC to call crystal oscillator timing;
the log judgment module 4 is used for configuring the test script to obtain a log, judging a BMC time synchronization result according to the log and deleting a session after the test is finished; the log judgment module 4 includes:
the log obtaining unit 4.1 is used for configuring a test script to obtain a system event log and an audit log;
the log detection unit 4.2 is used for configuring a test script to judge whether the system event log records synchronous time jump or not and whether the system event log records a synchronous result log or not; the system is also used for configuring a test script to judge whether log information for closing the automatic NTP service is recorded in an audit log list or not and whether log information for setting a time synchronization period is recorded or not;
and the session deleting unit 4.3 is used for configuring the test script and deleting the session after the test is finished.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A test method for automatically synchronizing RTC time by a server BMC is characterized by comprising the following steps:
s1, setting and starting a test script at a client;
s2, configuring a test script to establish a session, clearing an original log, and acquiring an IP (Internet protocol), a user name and a password of the BMC, and a synchronization period parameter and a pressure test frequency parameter set by a user;
s3, a testing script is configured to log in the BMC according to the IP, the user name and the password of the BMC, the BMC is set to close the automatic NTP service, then the RTC time is automatically acquired and synchronized according to the synchronization period parameter and the pressure testing time parameter set by the user, and when the RTC time synchronization fails, the NTP service is started to synchronize the BMC time;
and S4, configuring a test script to obtain a log, judging a BMC time synchronization result according to the log, and deleting the session after the test is finished.
2. The method as claimed in claim 1, wherein in step S2, the number of the synchronization period parameters set by the user is the same as the pressure test times parameter, and the range of the synchronization period parameters is the period of the self-correctable time of the BMC clock.
3. The method as claimed in claim 2, wherein in step S2, the test script is further configured to obtain a BMC synchronizable range of the RTC time, the lower limit of the BMC synchronizable range of the RTC time is smaller than the current year, and the upper limit of the BMC synchronizable range of the RTC time is larger than the current year.
4. The method as claimed in claim 2, wherein the step S3 includes the following steps:
s31, configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC;
s32, configuring a test script to close the automatic NTP service and scanning a BMC time synchronization mode;
when the BMC time synchronization mode is RTC time synchronization, go to step S33;
when the BMC time synchronization mode is non-RTC time synchronization, step S35 is entered;
s33, configuring a test script to acquire a synchronization period parameter corresponding to the current pressure test frequency, judging whether the BMC time is consistent with the RTC time when the synchronization period parameter is reached, and setting the BMC to acquire the RTC time for synchronization when the BMC time is inconsistent with the RTC time;
s34, configuring a test script to judge whether the pressure test times are finished;
if not, positioning the next pressure test times, and returning to the step S33;
if yes, go to step S4;
s35, configuring a test script to scan time information of the NTP server and locking a time node;
s36, configuring a test script to judge whether the NTP time is abnormal or not;
if not, the configuration test script sets the BMC synchronization NTP time, and the step S4 is entered.
5. The method as claimed in claim 4, wherein in step S36, if the NTP time is abnormal, the method proceeds to step S37;
s37, configuring a test script to set BMC to call a crystal oscillator to time, and entering step S4.
6. The method as claimed in claim 4, wherein in step S33, the configuration test script sets the BMC to determine whether the RTC clock fails before acquiring the RTC time for synchronization;
if yes, configuring a test script to set BMC to call a crystal oscillator for timing, and entering step S4;
if not, setting the BMC to acquire the RTC time for synchronization.
7. The method as claimed in claim 4, wherein in step S2, the step of emptying the original log includes emptying the original system event log and the original audit log, and simultaneously, in step S2, the step of setting the synchronization period parameter to the audit log is recorded;
in step S32, recording the closing of the automatic NTP service to an audit log;
in steps S33 and S36, the synchronized time jump and the synchronization result are recorded in the system event log.
8. The method as claimed in claim 7, wherein the step S4 includes the following steps:
s41, configuring a test script to obtain a system event log and an audit log;
s42, configuring a test script to judge whether a system event log records synchronous time jump or not and whether a synchronous result log is recorded or not;
configuring a test script to judge whether log information for closing the automatic NTP service is recorded in an audit log list or not and whether log information for setting a time synchronization period is recorded or not;
and S43, after the test is finished, the session is deleted by the configuration test script.
9. A test device for automatically synchronizing RTC time by a server BMC (baseboard management controller), which is characterized by comprising:
the test script starting module (1) is used for setting and starting a test script at a client;
the parameter acquisition module (2) is used for configuring a test script to create a session, clearing an original log, closing the automatic NTP service and acquiring the IP, a user name and a password of the BMC, and a synchronization period parameter and a pressure test frequency parameter set by a user;
the time synchronization module (3) is used for configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC, setting the BMC to close the automatic NTP service, automatically acquiring and synchronizing RTC time according to a synchronization period parameter and a pressure test time parameter set by a user, and starting the NTP service to synchronize the BMC time when the RTC time synchronization fails;
and the log judgment module (4) is used for configuring the test script to obtain the log, judging the BMC time synchronization result according to the log and deleting the session after the test is finished.
10. The server BMC automating a test of synchronizing RTC time according to claim 9, characterized in that the time synchronization module (3) comprises:
the BMC login unit (3.1) is used for configuring a test script to log in the BMC according to the IP, the user name and the password of the BMC;
a time synchronization mode scanning unit (3.2) for configuring a test script to close the automatic NTP service and scanning the BMC time synchronization mode;
the RTC time synchronization unit (3.3) is used for configuring a test script to acquire a synchronization period parameter corresponding to the current pressure test times when the BMC time synchronization mode is RTC time synchronization, judging whether the BMC time is consistent with the RTC time when the synchronization period parameter is reached, and setting the BMC to acquire the RTC time for synchronization when the BMC time is inconsistent with the RTC time;
an NTP time node locking unit (3.4) for configuring a test script to scan NTP server time information and locking a time node when the BMC time synchronization mode is non-RTC time synchronization;
an NTP time judging unit (3.5) for configuring a test script to judge whether the NTP time is abnormal;
an NTP time synchronization unit (3.6) which is used for a non-RTC time synchronization mode, and when the NTP time is normal, a test script is configured to set the BMC to synchronize the NTP time;
the test frequency completion judging unit (3.7) is used for configuring a test script to judge whether the pressure test frequency is completed or not after the RTC time is synchronized by the BMC;
the BMC calls a crystal oscillator unit (3.8) for an RTC time synchronization mode, an RTC clock fault or a non-RTC time synchronization mode, and when NTP time is abnormal, a test script is configured to set the BMC to call crystal oscillator timing;
the log judgment module (4) comprises:
the log obtaining unit (4.1) is used for configuring a test script to obtain a system event log and an audit log;
the log detection unit (4.2) is used for configuring a test script to judge whether the system event log records synchronous time jump or not and whether the synchronous result log is recorded or not; the system is also used for configuring a test script to judge whether log information for closing the automatic NTP service is recorded in an audit log list or not and whether log information for setting a time synchronization period is recorded or not;
and the session deleting unit (4.3) is used for configuring the test script and deleting the session after the test is finished.
CN202010444916.1A 2020-05-23 2020-05-23 Test method and device for automatically synchronizing RTC (real time clock) time by BMC (baseboard management controller) of server Active CN111694699B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010444916.1A CN111694699B (en) 2020-05-23 2020-05-23 Test method and device for automatically synchronizing RTC (real time clock) time by BMC (baseboard management controller) of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010444916.1A CN111694699B (en) 2020-05-23 2020-05-23 Test method and device for automatically synchronizing RTC (real time clock) time by BMC (baseboard management controller) of server

Publications (2)

Publication Number Publication Date
CN111694699A true CN111694699A (en) 2020-09-22
CN111694699B CN111694699B (en) 2022-07-19

Family

ID=72477572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010444916.1A Active CN111694699B (en) 2020-05-23 2020-05-23 Test method and device for automatically synchronizing RTC (real time clock) time by BMC (baseboard management controller) of server

Country Status (1)

Country Link
CN (1) CN111694699B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113126694A (en) * 2021-04-13 2021-07-16 山东英信计算机技术有限公司 Time synchronization method, system, equipment and storage medium of computer management subsystem
CN113835468A (en) * 2021-09-16 2021-12-24 苏州浪潮智能科技有限公司 Method and system for monitoring RTC time jump
CN113872718A (en) * 2021-09-26 2021-12-31 上海市共进通信技术有限公司 System, method, apparatus, processor and computer readable storage medium for implementing time synchronization function
CN114167829A (en) * 2021-12-03 2022-03-11 浙江中控技术股份有限公司 Clock synchronization test method and device
CN114167829B (en) * 2021-12-03 2024-05-14 浙江中控技术股份有限公司 Clock synchronization test method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189628A (en) * 2018-10-11 2019-01-11 郑州云海信息技术有限公司 A kind of BMC log processing method and system applied to server test
CN109408390A (en) * 2018-11-02 2019-03-01 郑州云海信息技术有限公司 A kind of BMC login user stability test method, apparatus, terminal and storage medium
CN109800117A (en) * 2019-01-25 2019-05-24 郑州云海信息技术有限公司 A kind of DC automated testing method and system based on IPMI
CN110008070A (en) * 2019-03-11 2019-07-12 苏州浪潮智能科技有限公司 A kind of AEP memory AC test method powered off at random based on power supervisor
CN110196614A (en) * 2019-05-21 2019-09-03 苏州浪潮智能科技有限公司 The method and device in the time zone WEB page UTC of automated setting BMC

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189628A (en) * 2018-10-11 2019-01-11 郑州云海信息技术有限公司 A kind of BMC log processing method and system applied to server test
CN109408390A (en) * 2018-11-02 2019-03-01 郑州云海信息技术有限公司 A kind of BMC login user stability test method, apparatus, terminal and storage medium
CN109800117A (en) * 2019-01-25 2019-05-24 郑州云海信息技术有限公司 A kind of DC automated testing method and system based on IPMI
CN110008070A (en) * 2019-03-11 2019-07-12 苏州浪潮智能科技有限公司 A kind of AEP memory AC test method powered off at random based on power supervisor
CN110196614A (en) * 2019-05-21 2019-09-03 苏州浪潮智能科技有限公司 The method and device in the time zone WEB page UTC of automated setting BMC

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113126694A (en) * 2021-04-13 2021-07-16 山东英信计算机技术有限公司 Time synchronization method, system, equipment and storage medium of computer management subsystem
CN113126694B (en) * 2021-04-13 2023-08-04 山东英信计算机技术有限公司 Time setting method, system, equipment and storage medium of computer management subsystem
CN113835468A (en) * 2021-09-16 2021-12-24 苏州浪潮智能科技有限公司 Method and system for monitoring RTC time jump
CN113835468B (en) * 2021-09-16 2023-07-14 苏州浪潮智能科技有限公司 Method and system for monitoring RTC time jump
CN113872718A (en) * 2021-09-26 2021-12-31 上海市共进通信技术有限公司 System, method, apparatus, processor and computer readable storage medium for implementing time synchronization function
CN113872718B (en) * 2021-09-26 2023-09-12 上海市共进通信技术有限公司 System, method, device, processor and medium for realizing time synchronization function
CN114167829A (en) * 2021-12-03 2022-03-11 浙江中控技术股份有限公司 Clock synchronization test method and device
CN114167829B (en) * 2021-12-03 2024-05-14 浙江中控技术股份有限公司 Clock synchronization test method and device

Also Published As

Publication number Publication date
CN111694699B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
CN111694699B (en) Test method and device for automatically synchronizing RTC (real time clock) time by BMC (baseboard management controller) of server
CN106844204B (en) Method and system for generating defect report by using mobile terminal
CN110427314B (en) Method and system for testing information safety reliability of metering automation terminal
CN109614283B (en) Monitoring system of distributed database cluster
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
CN112860569A (en) Automatic testing method and device, electronic equipment and storage medium
CN114077525A (en) Abnormal log processing method and device, terminal equipment, cloud server and system
CN102541739B (en) The method of testing of (SuSE) Linux OS and device
CN111555920A (en) Intelligent operation and maintenance method, system, equipment and user side
CN109657475A (en) Code vulnerabilities check method, apparatus, equipment and storage medium
CN111371590A (en) Method, system and storage medium for monitoring BMC log of switch
CN110928795A (en) Stability test method and device for upgrading storage system
CN108319240A (en) A kind of method and system of the application of job-oriented terminal at the scene acquisition O&M knowledge base
CN112003766B (en) Network card MAC repeated test exception handling method and device
CN110134558B (en) Method and device for detecting server
CN111737112B (en) Method and system for realizing server management by remote end integration
CN115827358A (en) Automatic test system, method and device for PFR function and storage medium
CN111190806B (en) Log processing method and device of voice interaction equipment
CN111343018B (en) Method and device for collecting alarm logs of data center switch
CN111367739B (en) USB port testing method and system based on server cluster
CN110826668B (en) Intelligent inspection recording system and method for concrete production equipment
CN107167675A (en) A kind of ageing testing method and device of CANBus terminals
CN111240990A (en) ISMCLI command line testing method, system, terminal and storage medium
CN101316429A (en) Mobile phone and automatic error report sending method
CN101179434B (en) Automatic time-counting method in network management system

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