CN108415817A - BMC obtains the method, apparatus of time, equipment and can storage medium - Google Patents

BMC obtains the method, apparatus of time, equipment and can storage medium Download PDF

Info

Publication number
CN108415817A
CN108415817A CN201810171636.0A CN201810171636A CN108415817A CN 108415817 A CN108415817 A CN 108415817A CN 201810171636 A CN201810171636 A CN 201810171636A CN 108415817 A CN108415817 A CN 108415817A
Authority
CN
China
Prior art keywords
time
bmc
obtains
preset memory
preset
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.)
Pending
Application number
CN201810171636.0A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810171636.0A priority Critical patent/CN108415817A/en
Publication of CN108415817A publication Critical patent/CN108415817A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring

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 discloses a kind of methods that BMC obtains the time,Device,Equipment and readable storage medium storing program for executing,The present invention just obtains the system time of a BMC at regular intervals,When the system time for occurring getting corresponding time point is before preset time threshold corresponding time point,Then illustrate not obtaining real-time time after BMC is restarted by ntp server by be restored to initial setting time,At this time,It reads in preset memory the pre-stored time and will read the pre-stored time in preset memory and be set as the system time of BMC,Due to the real-time time sent when the pre-stored time is BIOS initialization in preset memory,Therefore the present invention can obtain real-time time in the case where that can not obtain real-time time by ntp server in BMC by preset memory,It ensure that the accuracy of BMC times.

Description

BMC obtains the method, apparatus of time, equipment and can storage medium
Technical field
The present invention relates to server maintenance technology field, a kind of method for obtaining the time more particularly to BMC.The present invention is also It is related to a kind of device, equipment and the readable storage medium storing program for executing of BMC acquisition times.
Background technology
The time management system of server B MC (Baseboard Management Controller, baseboard management controller) System plays an important role in server system monitoring, and the health status of each component of BMC supervision servers ensures that server goes out It can be accurately located the time occurred extremely and its reason when now abnormal, therefore ensure that the accuracy of BMC timing is particularly significant.
Currently, the approach that the time of BMC obtains mainly passes through NTP (Network Time Protocol, network time Agreement) server obtains, ntp server be communicated by procotol and BMC foundation and in real time transmission real-time time to BMC, When BMC is restarted, if being in communication abnormality state between BMC and ntp server, BMC returns to initial setting Time, since initial setting time is the time before real-time time, BMC can not just obtain the correct time.
Therefore how to ensure in the case where by ntp server real-time time can not be obtained, BMC can be obtained after restarting The correct time is those skilled in the art's problem to be solved.
Invention content
The object of the present invention is to provide a kind of methods that BMC obtains the time, can ensure the accuracy of BMC times;This The another object of invention is to provide a kind of device, equipment and the readable storage medium storing program for executing of the BMC acquisition times including the above method, Also it can ensure the accuracy of BMC times.
In order to solve the above technical problems, the present invention provides a kind of methods that BMC obtains the time, including:
By current time real-time storage to preset memory;
The system time of baseboard management controller BMC is obtained every preset period of time;
When the system time corresponding time point is before preset time threshold corresponding time point, then read default Pre-stored time and when setting the pre-stored time in the preset memory to the system of the BMC in memory Between.
Preferably, it the pre-stored time and will in advance be deposited in the preset memory in the reading preset memory After the time of storage is set as the system time of the BMC, further include:
Generate the standby signal of the BMC exceptions.
Preferably, the standby signal is voice signal or optical signal.
Preferably, the preset memory is real-time clock register RTC.
In order to solve the above technical problems, the present invention also provides the devices that a kind of BMC obtains the time, including:
Storage unit is used for current time real-time storage to preset memory;
Acquiring unit, the system time for obtaining baseboard management controller BMC every preset period of time;
Setting unit, for when the system time corresponding time point is before preset time threshold corresponding time point When, then it reads the pre-stored time in preset memory and sets the pre-stored time in the preset memory to institute State the system time of BMC.
Preferably, further include:
Alarm Unit, the standby signal for generating the BMC exceptions.
Preferably, the standby signal is voice signal or optical signal.
Preferably, the preset memory is real-time clock register RTC.
In order to solve the above technical problems, the present invention also provides the equipment that a kind of BMC obtains the time, including:
Memory, for storing computer program;
Processor, realizing that BMC obtains time method as described in any of the above-described when for executing the computer program Step.
In order to solve the above technical problems, the present invention also provides a kind of readable storage medium storing program for executing, on the readable storage medium storing program for executing It is stored with computer program, realizes that BMC obtains the time as described in any of the above-described when the computer program is executed by processor The step of method.
The present invention provides method, apparatus, equipment and readable storage medium storing program for executing that a kind of BMC obtains the time, including:It will be current Time real-time storage is to preset memory;The system time of baseboard management controller BMC is obtained every preset period of time;When being When uniting time at corresponding time point before preset time threshold corresponding time point, then reads in preset memory and prestore Time and set the pre-stored time in preset memory to the system time of BMC.The present invention is at regular intervals The system time of a BMC is obtained, it is corresponding in preset time threshold when the system time for occurring getting corresponding time point Before time point, then illustrating can not be when ntp server obtains real-time time by has been restored to initial setting after BMC is restarted Between, at this point, reading the pre-stored time in preset memory and pre-stored time setting in preset memory will be read For the system time of BMC, due to the real-time time sent when the pre-stored time is BIOS initialization in preset memory, because This present invention can be obtained real in BMC in the case where that can not obtain real-time time by ntp server by preset memory When the time, ensure that the accuracy of BMC times.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to institute in the prior art and embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is the flow chart for the method that a kind of BMC provided by the invention obtains the time;
Fig. 2 is the structural schematic diagram for the device that a kind of BMC provided by the invention obtains the time.
Specific implementation mode
Core of the invention is to provide a kind of method that BMC obtains the time, can ensure the accuracy of BMC times;This Another core of invention is to provide a kind of device, equipment and the readable storage medium storing program for executing of the BMC acquisition times including the above method, Also it can ensure the accuracy of BMC times.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
The present invention provides a kind of methods that BMC obtains the time, and as shown in FIG. 1, FIG. 1 is a kind of BMC provided by the invention The flow chart of the method for time is obtained, this approach includes the following steps:
Step S1:By current time real-time storage to preset memory.
It should be noted that being obtained less than real-time time in order to the communication abnormality between BMC and NTP time servers When, it is therefore desirable to real-time time is prestored in preset memory, is communicated when between BMC and NTP time servers When abnormal, BMC in such a way that inside is read, sets the time in preset memory to system time again, specifically, presets Real-time time in memory can be the real-time time that BIOS is sent to BMC in power-up initializing, and BMC is receiving BIOS Just the real-time time is stored to preset memory after the real-time time of transmission, meeting after which stores to preset memory Timing in real time, so that the real-time time is consistent with current time point.
Step S2:The system time of baseboard management controller BMC is obtained every preset period of time.
It should be noted that in order to ensure that the system time of BMC always is real-time time, it is therefore desirable to obtain always System time current BMC, in order to judge whether the current system times of BMC are real-time time.Specifically, prison can be passed through Control program monitors BMC in real time, obtains the system time of a BMC every preset period of time, preset period of time can To be configured according to actual conditions, if you need to further ensure that the accuracy of BMC system times, preset period of time can be set Set shorter.By constantly obtaining the system time of BMC, it can allow administrator that can recognize the current systems of BMC always Time, in order to which administrator understands the operation conditions of current BMC by the system time of BMC.
Step S3:When system time corresponding time point is before preset time threshold corresponding time point, then read The pre-stored time and it sets the pre-stored time in preset memory to the system time of BMC in preset memory.
It should be noted that in order to judge the current system times of BMC either with or without being restored to initial setting time, therefore need System time current BMC is compared with preset time threshold, due to initial setting time be solidificated in BMC when Between point, this time point is usually a time point a long time ago, therefore preset time threshold could be provided as close to current Real-time time, such as:Initial setting time is on January 1st, 1970, at this point, preset time threshold could be provided as 2018 On January 1, in.If system time current BMC corresponding time point before preset time threshold corresponding time point, shows System time current BMC is real-time time, if system time current BMC corresponding time point corresponds in preset time threshold Time point before, then show that BMC has been restored to initial setting time at this time, at this point, read preset memory in prestore Time, and set the time to the system time of BMC.
Preferably, reading pre-stored time and will be pre-stored in preset memory in preset memory After time is set as the system time of BMC, further include:
Generate the standby signal of BMC exceptions.
It should be noted that if occurring setting the pre-stored time in preset memory to the system time of BMC The case where, then illustrating that abnormal restarting has occurred in BMC at this time, BMC restarts the communication abnormality between NTP time servers afterwards, this When can generate the standby signals of BMC exceptions, in order to notify administrator to check BMC in time, and make corresponding solution. Specifically, standby signal can be that BMC is generated, and is sent to the terminal where administrator.In this way, pipe is facilitated Management of the reason person to server, improves the efficiency of administrator's safeguard service device.
Preferably, standby signal is voice signal or optical signal.
It should be noted that standby signal can be voice signal or optical signal, such as:Believe for voice in standby signal Number when, if BMC is abnormal, BMC, which can be sent out, " to be occurred abnormal, please checks equipment in time!" voice, standby signal be light letter Number when, when BMC is abnormal, then the warning lamp on BMC can send out red light, to prompt administrator at the scene timely Check equipment.It is prompted by way of voice signal and optical signal, more intuitively reflects the current states of BMC, side Just administrator makes counter-measure in time, improves work efficiency.
Preferably, preset memory is real-time clock register RTC.
It should be noted that preset memory is that real-time clock register RTC (post by Real-Time Clock, real-time clock Storage), RTC is integrated circuit, commonly referred to as clock chip, and main function is to provide accurate real-time time.RTC is intelligent Degree is big, has permanent calendar function, output control is also versatile and flexible, while RTC can also carry out the correction of time error, further Improve the accuracy of the system time of BMC.
The present invention provides a kind of methods that BMC obtains the time, including:By current time real-time storage to default storage Device;The system time of baseboard management controller BMC is obtained every preset period of time;When system time corresponding time point is pre- If when before time threshold corresponding time point, then reading the pre-stored time in preset memory and will be in preset memory The pre-stored time is set as the system time of BMC.The present invention just obtains the system time of a BMC at regular intervals, When the system time for occurring getting corresponding time point is before preset time threshold corresponding time point, then illustrate BMC weights Real-time time can not be obtained after opening by ntp server by has been restored to initial setting time, at this point, reading in preset memory Pre-stored time and the system time for setting the pre-stored time in reading preset memory to BMC, due to default The real-time time sent when the pre-stored time is BIOS initialization in memory, therefore the present invention can not pass through in BMC Ntp server can obtain real-time time in the case of obtaining real-time time by preset memory, ensure that the standard of BMC times True property.
The present invention also provides the devices that a kind of BMC obtains the time, as shown in Fig. 2, Fig. 2 is one kind provided by the invention BMC obtains the structural schematic diagram of the device of time, which includes:
Storage unit 1 is used for current time real-time storage to preset memory;
Acquiring unit 2, the system time for obtaining baseboard management controller BMC every preset period of time;
Setting unit 3 is used for when system time corresponding time point is before preset time threshold corresponding time point, Then read pre-stored time in preset memory and by the pre-stored time is set as BMC in preset memory system Time.
Preferably, the device further includes:
Alarm Unit, the standby signal for generating BMC exceptions.
Preferably, standby signal is voice signal or optical signal.
Preferably, preset memory is real-time clock register RTC.
The present invention provides a kind of BMC to obtain time device, including:By current time real-time storage to preset memory; The system time of baseboard management controller BMC is obtained every preset period of time;When system time corresponding time point is default When before time threshold corresponding time point, then the pre-stored time is read in preset memory and will be pre- in preset memory The time first stored is set as the system time of BMC.The present invention just obtains the system time of a BMC at regular intervals, when The system time corresponding time point for occurring getting before preset time threshold corresponding time point, then illustrates that BMC is restarted After can not obtain real-time time by ntp server by be restored to initial setting time, at this point, reading pre- in preset memory Time for first storing and the system time that will read the pre-stored time in preset memory and be set as BMC, are deposited due to default The real-time time sent when the pre-stored time is BIOS initialization in reservoir, therefore the present invention can not pass through NTP in BMC Server can obtain real-time time in the case of obtaining real-time time by preset memory, ensure that the accurate of BMC times Property.
The present invention also provides the equipment that a kind of BMC obtains the time, including:
Memory, for storing computer program;
Processor realizes the step of obtaining time method such as any of the above-described BMC when for executing computer program.
The present invention also provides a kind of readable storage medium storing program for executing, computer program, computer are stored on readable storage medium storing program for executing The step of obtaining time method such as any of the above-described BMC is realized when program is executed by processor.
The introduction that time device and readable storage medium storing program for executing are obtained for a kind of BMC provided by the invention please refers to the above method Embodiment, the present invention are not repeating herein.
Time method, apparatus, equipment and readable storage medium storing program for executing is obtained to a kind of BMC provided by the present invention above to have carried out in detail It is thin to introduce.Principle and implementation of the present invention are described for specific case used herein, and above example is said The bright method and its core concept for being merely used to help understand the present invention.It should be pointed out that for the ordinary skill of the art , without departing from the principle of the present invention, can be with several improvements and modifications are made to the present invention for personnel, these improvement It is also fallen within the protection scope of the claims of the present invention with modification.

Claims (10)

1. a kind of method that BMC obtains the time, which is characterized in that including:
By current time real-time storage to preset memory;
The system time of baseboard management controller BMC is obtained every preset period of time;
When the system time corresponding time point is before preset time threshold corresponding time point, then default storage is read The pre-stored time and it sets the pre-stored time in the preset memory to the system time of the BMC in device.
2. the method that BMC according to claim 1 obtains the time, which is characterized in that in the reading preset memory Pre-stored time and after setting the pre-stored time in the preset memory to the system time of the BMC, also Including:
Generate the standby signal of the BMC exceptions.
3. the method that BMC according to claim 2 obtains the time, which is characterized in that the standby signal is voice signal Or optical signal.
4. the method that BMC according to claim 3 obtains the time, which is characterized in that when the preset memory is real-time Clock register RTC.
5. a kind of BMC obtains the device of time, which is characterized in that including:
Storage unit is used for current time real-time storage to preset memory;
Acquiring unit, the system time for obtaining baseboard management controller BMC every preset period of time;
Setting unit is used for when the system time corresponding time point is before preset time threshold corresponding time point, It then reads the pre-stored time in preset memory and the pre-stored time in the preset memory is set as described The system time of BMC.
6. BMC according to claim 5 obtains the device of time, which is characterized in that further include:
Alarm Unit, the standby signal for generating the BMC exceptions.
7. BMC according to claim 6 obtains the device of time, which is characterized in that the standby signal is voice signal Or optical signal.
8. BMC according to claim 7 obtains the device of time, which is characterized in that when the preset memory is real-time Clock register RTC.
9. the equipment that a kind of BMC obtains the time, which is characterized in that including:
Memory, for storing computer program;
Processor realizes that BMC obtains time side as described in any one of Claims 1-4 when for executing the computer program The step of method.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the meter on the readable storage medium storing program for executing The step of BMC obtains time method as described in any one of Claims 1-4 is realized when calculation machine program is executed by processor.
CN201810171636.0A 2018-03-01 2018-03-01 BMC obtains the method, apparatus of time, equipment and can storage medium Pending CN108415817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810171636.0A CN108415817A (en) 2018-03-01 2018-03-01 BMC obtains the method, apparatus of time, equipment and can storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810171636.0A CN108415817A (en) 2018-03-01 2018-03-01 BMC obtains the method, apparatus of time, equipment and can storage medium

Publications (1)

Publication Number Publication Date
CN108415817A true CN108415817A (en) 2018-08-17

Family

ID=63129755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810171636.0A Pending CN108415817A (en) 2018-03-01 2018-03-01 BMC obtains the method, apparatus of time, equipment and can storage medium

Country Status (1)

Country Link
CN (1) CN108415817A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375956A (en) * 2018-11-01 2019-02-22 郑州云海信息技术有限公司 A kind of method of reboot operation system, logical device and control equipment
CN111007916A (en) * 2019-11-29 2020-04-14 Tcl移动通信科技(宁波)有限公司 Terminal device time setting method and system, storage medium and terminal device
CN112148065A (en) * 2019-06-28 2020-12-29 华为技术有限公司 Time synchronization method and server
CN113835468A (en) * 2021-09-16 2021-12-24 苏州浪潮智能科技有限公司 Method and system for monitoring RTC time jump
CN113849336A (en) * 2021-11-25 2021-12-28 苏州浪潮智能科技有限公司 BMC time management method, system, device and computer medium
CN115495160A (en) * 2022-11-16 2022-12-20 苏州浪潮智能科技有限公司 ARM server, starting method and device thereof, and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923369A (en) * 2009-06-16 2010-12-22 鸿富锦精密工业(深圳)有限公司 System and method for managing time of substrate management controller
CN102298414A (en) * 2010-06-22 2011-12-28 鸿富锦精密工业(深圳)有限公司 Server time synchronizing system
CN104572317A (en) * 2013-10-14 2015-04-29 鸿富锦精密工业(深圳)有限公司 Mainboard and method for acquiring time information by utilizing baseboard management controller of mainboard

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923369A (en) * 2009-06-16 2010-12-22 鸿富锦精密工业(深圳)有限公司 System and method for managing time of substrate management controller
CN102298414A (en) * 2010-06-22 2011-12-28 鸿富锦精密工业(深圳)有限公司 Server time synchronizing system
CN104572317A (en) * 2013-10-14 2015-04-29 鸿富锦精密工业(深圳)有限公司 Mainboard and method for acquiring time information by utilizing baseboard management controller of mainboard

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网友: "linux rtc驱动", 《HTTP://BBS.CHINAUNIX.NET/FORUM.PHP?MOD=VIEWTHREAD&TID=3637782&PAGE=1&AUTHORID=22915173》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375956A (en) * 2018-11-01 2019-02-22 郑州云海信息技术有限公司 A kind of method of reboot operation system, logical device and control equipment
CN109375956B (en) * 2018-11-01 2021-10-15 郑州云海信息技术有限公司 Method for restarting operating system, logic device and control device
CN112148065A (en) * 2019-06-28 2020-12-29 华为技术有限公司 Time synchronization method and server
WO2020258958A1 (en) * 2019-06-28 2020-12-30 华为技术有限公司 Time synchronization method and server
CN111007916A (en) * 2019-11-29 2020-04-14 Tcl移动通信科技(宁波)有限公司 Terminal device time setting method and system, storage medium and terminal device
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
CN113849336A (en) * 2021-11-25 2021-12-28 苏州浪潮智能科技有限公司 BMC time management method, system, device and computer medium
WO2023092919A1 (en) * 2021-11-25 2023-06-01 苏州浪潮智能科技有限公司 Bmc time management method, system, and apparatus, and computer medium
CN115495160A (en) * 2022-11-16 2022-12-20 苏州浪潮智能科技有限公司 ARM server, starting method and device thereof, and readable storage medium
CN115495160B (en) * 2022-11-16 2023-02-28 苏州浪潮智能科技有限公司 ARM server, starting method and device thereof, and readable storage medium

Similar Documents

Publication Publication Date Title
CN108415817A (en) BMC obtains the method, apparatus of time, equipment and can storage medium
TWI618380B (en) Management methods, service controller devices and non-stransitory, computer-readable media
CN111796959B (en) Self-healing method, device and system for host container
CN107729213B (en) Background task monitoring method and device
CN109656767A (en) A kind of acquisition methods, system and the associated component of CPLD status information
CN102714607A (en) Connectivity fault management timeout period control
US10496128B2 (en) Method for obtaining timestamp and computer device using the same
WO2016150015A1 (en) Processing method and apparatus for power failure alarm, and terminal
US8521869B2 (en) Method and system for reporting defects within a network
CN113946448B (en) Time sequence management method and device for server cluster and electronic equipment
CN116560889A (en) Data link management method, device, computer equipment and storage medium
CN103905271B (en) A kind of alarm windstorm suppressing method
CN109245937B (en) PIM platform warning method and device
CN104954156A (en) Clock synchronous network element abnormity processing method, apparatus and system thereof
CN107272531A (en) A kind of plant maintenance system for prompting
CN105912414A (en) Method and system for server management
CN106411643B (en) BMC detection method and device
CN104618461A (en) Mobile code cloud mobile phone-based server monitoring method
CN115378841B (en) Method and device for detecting state of equipment accessing cloud platform, storage medium and terminal
CN116521459A (en) High-speed serial bus configuration detection method, device, equipment and storage medium
US8566634B2 (en) Method and system for masking defects within a network
JP6738896B2 (en) Detecting error conditions by monitoring resource flow within the facility
CN115934453A (en) Troubleshooting method, troubleshooting device and storage medium
CN105512554A (en) System monitoring method and device
US20200204403A1 (en) Electrical device that accesses a mobile telephony network in an alternative operating mode

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180817

RJ01 Rejection of invention patent application after publication