WO2015007091A1 - 一种数据记录生成方法及装置 - Google Patents

一种数据记录生成方法及装置 Download PDF

Info

Publication number
WO2015007091A1
WO2015007091A1 PCT/CN2014/072211 CN2014072211W WO2015007091A1 WO 2015007091 A1 WO2015007091 A1 WO 2015007091A1 CN 2014072211 W CN2014072211 W CN 2014072211W WO 2015007091 A1 WO2015007091 A1 WO 2015007091A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
data
output data
output
information
Prior art date
Application number
PCT/CN2014/072211
Other languages
English (en)
French (fr)
Inventor
张蔚
李娟�
张羽
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015007091A1 publication Critical patent/WO2015007091A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • G06F11/3075Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting the data filtering being achieved in order to maintain consistency among the monitored data, e.g. ensuring that the monitored data belong to the same timeframe, to the same system or component
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • 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
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/86Event-based monitoring

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data record generating method and apparatus. Background technique
  • server fault detection is receiving more and more attention.
  • the data output by the server interface helps locate the fault and obtain the cause of the fault during the server startup phase or when the server fails.
  • the output data of the server interface is usually obtained by using both on-site recording and remote recording, where:
  • a schematic diagram of obtaining the output data of the server interface by means of the live recording mode is to configure a terminal on the server side, and the terminal establishes a connection relationship with the I/O interface of the server through the hardware bus, and installs monitoring in the terminal. software. After the server is started, the output data of each interface of the server is obtained by running the monitoring software in the terminal.
  • the monitoring software needs to be installed at the terminal, and the connection between the terminal and the server is established, thereby increasing the cost of the maintenance terminal, and when the connection is disconnected, the monitoring software
  • the output data of the server interface cannot be obtained; for the serial port of the server, the output data is streaming data, and at each time point, an interface will have a large amount of information output, and the above monitoring software cannot record the time corresponding to the output data of each interface, thereby It cannot match the event log recorded in the BMC (Baseboard Management Controller) inside the server.
  • BMC Baseboard Management Controller
  • a terminal is configured at a remote end of the server, and the terminal establishes a connection with the server through the network, and the monitoring software is installed in the terminal.
  • the monitoring software in the above terminal is run and the output data of each interface of the server is obtained through the network.
  • the monitoring software needs to be installed on the terminal first, thereby increasing the cost of the maintenance terminal. Since the terminal and the server are connected through the network, bandwidth resources are occupied, and when When the network connection is disconnected, the monitoring software will not be able to obtain the output data of the server interface.
  • the output data is streaming data.
  • an interface will have a large amount of information output.
  • the above monitoring software cannot record each.
  • the time corresponding to the output data of the interface cannot match the event log recorded by the BMC inside the server. It is not convenient to locate the fault and detect the cause of the fault.
  • the method for obtaining output data of the server interface has high cost, the acquisition process is unreliable, and the lack of time information of the output data leads to fault location and inaccurate fault detection.
  • the embodiment of the invention provides a data record generation method and device, which are used to solve the problem that the method for obtaining output data of the server interface has high cost, the acquisition process is unreliable, and the output data lacks time information, resulting in fault location and inaccurate fault detection. problem.
  • a data record generating method including:
  • Output data of the any one of the interfaces, the interface information, and the acquisition time are converted into data records of a specified format, and the data records are stored.
  • the local bus controller is instructed to generate an interrupt signal according to output data of any one of the interfaces, and send the interrupt signal to a local processor;
  • the processor parses the interrupt signal, and obtains a keyword of the output data indicated by the interrupt signal, and generates interface information of any one of the interfaces according to the keyword, where the interface information includes an interface identifier. And its corresponding interface status information.
  • the output data of any one of the interfaces, the interface information And storing the acquisition time into a storage instruction in a structured query language SQL format; storing the data record carried in the storage instruction in the SQL format into a local database.
  • the input query instruction is received by the specified interface; the query instruction is converted into a corresponding SQL format query instruction; Extracting, by the database, a data record corresponding to the SQL format query instruction, and outputting the data record as a query result corresponding to the query instruction.
  • the obtaining time sequence of the output data corresponding to the interface identifier is All the data records corresponding to the interface identifier are sorted, and the sorted data record is output; when the query instruction includes at least two interface identifiers, respectively, the data records corresponding to each interface identifier are respectively obtained, and The interface identification sequence in the query instruction sequentially outputs the data records corresponding to the identifiers of the interfaces, wherein all the data records corresponding to any one of the interface identifiers are sorted according to the order of obtaining the output data corresponding to the any one of the interface identifiers; When the command includes the start time and the end time, the data records corresponding to each interface identifier are obtained between the start time and the end time, and the corresponding interface identifiers are sequentially output according to the preset interface identifier priority order.
  • Data record of which, any one All the data records corresponding to the interface identifier are sorted according to the acquisition time sequence of the output data corresponding to the any interface identifier.
  • the query command includes the interface state information
  • the corresponding data records are extracted from the corresponding data records of each interface identifier.
  • the data record of the interface status information is output, and the data records corresponding to the interface status information corresponding to the interface identifiers are sequentially output according to the preset interface identifier priority order, wherein any data record corresponding to any one of the interface identifiers is according to any one of the data records.
  • the acquisition time of the output data corresponding to the interface identifier is sequentially sorted.
  • a data record generating apparatus including:
  • a first obtaining unit configured to acquire, by using a local hardware interface, any one of the interfaces in the server And outputting the output data to the second obtaining unit and the generating unit;
  • the second obtaining unit is configured to receive the output data sent by the first acquiring unit, and obtain the output data according to the output data Corresponding interface information, and an acquisition time of the output data, and sending the interface information and the acquisition time to a generating unit;
  • a generating unit configured to receive output data, interface information, and acquisition time of any one of the interfaces sent by the first acquiring unit and the second acquiring unit, output data of any one of the interfaces, the interface information, and the The acquisition time is converted into a data record of a specified format, and the data record is stored.
  • the second acquiring unit is specifically configured to: instruct the local bus controller to generate an interrupt signal according to output data of any one of the interfaces, and Sending an interrupt signal to the local processor; instructing the processor to parse the interrupt signal, and acquiring a keyword of the output data indicated by the interrupt signal, and generating interface information of the any one interface according to the keyword
  • the interface information includes an interface identifier and corresponding interface state information.
  • the second acquiring unit is specifically configured to: when receiving output data of any one of the interfaces, read time information in a local real-time clock RTC, The time information is taken as the acquisition time of the output data.
  • the generating unit is specifically configured to use any one of the interfaces
  • the output data, the interface information, and the storage time are converted into a storage instruction in a structured query language SQL format; and the data record carried in the storage instruction in the SQL format is stored in a local database.
  • the method further includes: an output unit, configured to receive an input query instruction by using a specified interface; and converting the query instruction into a corresponding SQL format Querying a command; extracting, from the local database, a data record corresponding to the SQL format query instruction, and using the data record as a query corresponding to the query instruction The result is output.
  • the output unit is specifically configured to: when the query instruction includes an interface identifier, according to the interface identifier The data acquisition time sequence sequentially sorts all data records corresponding to the interface identifier, and outputs the sorted data record; when the query instruction includes at least two interface identifiers, each interface identifier is separately obtained.
  • Corresponding data records and sequentially outputting data records corresponding to the identifiers of the interfaces according to the interface identification order in the query instruction, wherein the data acquisition time of all the data records corresponding to any one of the interface identifiers according to the output of the any one of the interface identifiers Sorting sequentially; when the query instruction includes a start time and an end time, respectively acquiring data records between the start time and the end time corresponding to each interface identifier, and prioritizing according to preset interfaces
  • the level order sequentially outputs the corresponding corresponding to each interface identifier.
  • all the data records corresponding to any one of the interface identifiers are sorted according to the order of obtaining the output data corresponding to the any one of the interface identifiers.
  • the data record is extracted from the data record that meets the status information of the interface, and the data records corresponding to the interface status information corresponding to each interface identifier are sequentially output according to the preset interface identifier priority order, where any one interface identifier corresponds to all The data record is sorted according to the acquisition time sequence of the output data corresponding to any one of the interface identifiers.
  • the BMC of the server monitors the output data of all the interfaces in the server, records the acquisition time corresponding to the output data, and the interface information corresponding to any one of the interfaces, and the output data of any one of the interfaces, and The acquisition time corresponding to the output data of any one interface is organized into a data record.
  • the data record is generated from the hardware driver layer through the BMC inside the server, without using the network and the separate terminal device and the monitoring software, thereby effectively reducing the cost and improving the reliability of the data record acquisition;
  • the data record generated in the above includes the acquisition time corresponding to the output data of the interface, thereby ensuring that the data record matches the BMC event log, improving the fault location and the detection of the fault cause. Authenticity.
  • FIG. 1 is a schematic diagram of obtaining the output data of the server interface in the field recording mode in the prior art
  • FIG. 2 is a schematic diagram of obtaining the output data of the server interface in a remote manner in the prior art
  • FIG. 3 is a structural diagram of the system in the embodiment of the present invention
  • FIG. 5 is a detailed flowchart of a user querying a data record according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of data record generation in a specific application scenario according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram 1 of a data record generating apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram 2 of a data record generating apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a BMC device according to an embodiment of the present invention. detailed description
  • the BMC of the server monitors the output data of all the interfaces in the server, and records the acquisition time corresponding to the output data, the output data of any one of the interfaces, and the interface information corresponding to any one interface, and The acquisition time corresponding to the output data of any one interface is organized into a data record.
  • data record generation is realized from the hardware driver layer through the BMC inside the server, and the network and the separate terminal device and the monitoring software are not needed, thereby effectively reducing the cost and improving the reliability of data record acquisition;
  • the data record generated in the above includes the acquisition time corresponding to the output data of the interface, thereby ensuring that the data record matches the BMC event log, and improving the accuracy of fault location and fault cause detection.
  • 3 is a system architecture diagram of an embodiment of the present invention, where a BMC is located in a server, and a connection is established with a server through a hardware interface, and a bus controller and a processor generate a data record according to states of each interface in the server, and
  • the database in the BMC is used to store the above data records.
  • Step 400 Obtain output data of any interface in the server through a hardware interface of the BMC.
  • the BMC monitors the status of all the interfaces in the server.
  • the hardware between the BMC hardware interface and each interface of the server passes.
  • the bus establishes a connection relationship, and obtains output data of any one of the foregoing servers through the hardware interface.
  • the interface of the above server may be a system serial port or other system interfaces (such as 80port, etc.).
  • Step 410 Obtain interface information corresponding to the output data according to the output data, and an acquisition time of the output data.
  • the local bus controller after the BMC receives the output data of any interface of the server, the local bus controller generates an interrupt signal according to the output data of any one of the servers, and sends the interrupt signal to the processor of the BMC.
  • the interrupt signal is parsed by the processor to obtain a keyword in the terminal signal, and interface information corresponding to any one of the interfaces is generated according to the keyword, and the interface information includes an interface identifier and corresponding interface state information.
  • the interface identifier includes an interface type (such as 80port) and an interface label (such as serial port 1); the interface status information corresponding to the interface identifier includes an output data category and a data attribute, such as an error message indicating that the server has an error, or a general log. Information, the obtaining of the interface state information is convenient for subsequent classification and storage of the generated data records.
  • the BMC obtains the interface identifier of any interface in the server and the corresponding interface state information.
  • the BMC reads the local RTC (Real Time Clock). Time information, and the time information The acquisition time of the output data for any of the above interfaces.
  • the RTC is generally internal to the BMC and can synchronize the time of the RTC with the time of the server through an Ethernet-based NTP (Network Time Protocol) protocol.
  • the acquisition time of the output data is obtained in real time through the local RTC of the BMC, because the output data of any one of the interfaces, and the acquisition time of the output data. All are acquired by the BMC, and the above acquisition time is not required to be obtained by other components in the server, thereby avoiding the problem that the actual acquisition time and the acquisition time of the input information are delayed; and, because the BMC monitors the output of each interface in the server at the hardware driver level.
  • the BMC can accurately obtain the output data and the acquisition time of the output data, thereby improving the accuracy of obtaining the information.
  • Step 420 Convert the output data of any one of the interfaces, and the interface information of the arbitrary interface, and the acquisition time into a data record of a specified format, and store the data record.
  • the processor of the BMC parses the interrupt signal generated by the bus controller according to the output data of any one interface, and obtains the output data of any one of the interfaces, and the interface information (including the interface identifier and its corresponding interface state). Information), the output data of any one of the interfaces, the interface identifier of the arbitrary interface and the corresponding interface state information, and the corresponding acquisition time are converted into a storage instruction in a SQL (Structure Query Language) format; And storing the data record carried in the SQL format storage instruction into the local database.
  • SQL Structure Query Language
  • the data record includes the acquisition time, the interface status information, the interface identifier, the output data, and the like, wherein the acquisition time, the interface identifier, and the interface status information can be used as the identification information, and the identifier information can be used as the identification information.
  • the query instruction is used to facilitate the user to query the data records corresponding to each interface in the above server.
  • the BMC can repeat the above process, generate another data record, and so on.
  • the above database may include data records corresponding to multiple interfaces, and each interface may correspond to multiple data records.
  • multiple data records corresponding to any one of the foregoing interfaces may be sorted according to the order of obtaining time, so as to facilitate later user viewing and management of the data record.
  • the BMC since the BMC is configured with an independent operating system and working power, the BMC can continuously monitor the output data of each interface in the server without being affected by the state of the server, thereby ensuring reliable data record generation.
  • the BMC local database stores multiple data records.
  • the user can query the data records by inputting corresponding identification information on the BMC user interface according to their own needs. Specifically: receiving, by using a specified interface, a query instruction input by the user; wherein the designated interface is a CLI (Command Line Interface) interface, a WEB interface, or an SNMP (Simple Network Management Protocol) interface;
  • the designated interface is a CLI (Command Line Interface) interface, a WEB interface, or an SNMP (Simple Network Management Protocol) interface
  • the database cannot identify the above query instruction, therefore, the BMC converts the above query instruction into a corresponding SQL format query instruction; and according to the SQL format query instruction, extracts the query result corresponding to the SQL format query instruction from the BMC local database;
  • the query result corresponding to the above query instruction is presented to the user interface of the BMC.
  • the query instruction input by the user includes corresponding identification information, such as an interface identifier, an acquisition time, and the like.
  • identification information such as an interface identifier, an acquisition time, and the like.
  • the number of the interface identifiers may be one or multiple.
  • all the data records corresponding to the interface identifier are sorted according to the order of obtaining the output data corresponding to the interface identifier, and the sorted data record is output as a query result.
  • the interface identifier corresponds to three data records, that is, data record 1, data record 2, and data record 3, and the corresponding output data acquisition times are t1, t2, and t3, respectively, where tl is earlier than t3. If t3 is earlier than t2, the query result output according to the query instruction is data record 1, data record 3, and data record 2 in sequence; when the query instruction includes at least two interface identifiers, respectively acquire data records corresponding to each interface identifier.
  • the sequence of the data records corresponding to each interface identifier is sequentially output, wherein all the data records corresponding to any one of the interface identifiers are sorted according to the order of obtaining the output data corresponding to the arbitrary interface identifier, for example, when the query instruction includes
  • the interface identifiers are interface identifier 1 and interface identifier 2, respectively.
  • Interface identifier 1 corresponds to data record 10 and data record 11, and the corresponding output data acquisition times are tlO and tl 1 respectively, tl 1 is earlier than tlO, and interface identifier 2
  • the query result output according to the query instruction is "interface identifier 1: data record 11, data record”. 10; interface identification 2: data record 20, data record 21".
  • the query instruction may further include an acquisition time, which is usually two times (starting time and ending time), that is, a time period.
  • an acquisition time which is usually two times (starting time and ending time), that is, a time period.
  • start time and ending time respectively acquire data records corresponding to each interface identifier between the start time and the end time, and sequentially follow the preset interface identifier priority order.
  • the data records corresponding to the identifiers of the interfaces are outputted, and all the data records corresponding to any one of the interface identifiers are sorted according to the order of obtaining the output data corresponding to the any one of the interface identifiers.
  • the start time and the end time may be the same time (that is, a certain time).
  • the BMC outputs the data record corresponding to each interface identifier at a certain moment, where all the data corresponding to any one interface Records can be output according to preset output order rules, such as random output, or output according to the data category carried in the data record, or output according to the data attributes carried in the data record.
  • preset output order rules such as random output, or output according to the data category carried in the data record, or output according to the data attributes carried in the data record.
  • the query instruction input by the user may further include interface state information, and respectively extract data records that meet the interface state information from the data records corresponding to each interface identifier, and sequentially output according to the preset interface identifier priority order.
  • a data record corresponding to the interface status information corresponding to each interface identifier where all data records corresponding to any one of the interface identifiers are sorted according to the acquisition time sequence of the output data corresponding to the any one of the interface identifiers.
  • the query refers to The status information of the interface included in the command is an error message.
  • the BMC obtains the data record that meets the error information in the data record corresponding to all the interface identifiers stored in the local database, and sequentially outputs the data according to the preset interface identifier priority order.
  • the data record corresponding to the interface identifier where all the data records corresponding to any one of the interface identifiers are sorted according to the order of obtaining the output data corresponding to the any one of the interface identifiers.
  • the query instruction input by the user may include multiple identifier information, that is, the interface identifier, and the acquisition time (for example, a time).
  • the BMC obtains the foregoing interface identifier stored in the local database. All data records corresponding to the time, and all the data records are sequentially output according to a preset output order rule.
  • Step 500 The BMC receives the query instruction input by the user through the designated interface.
  • Step 510 The BMC obtains the identifier information carried in the query instruction, and converts the identifier information into an SQL format query instruction.
  • Step 520 The BMC sends the above SQL format query instruction to the local database.
  • Step 530 The foregoing database extracts a corresponding query result according to the SQL format query instruction, and sends the query result to a user interface for presentation.
  • the foregoing query result is all data records corresponding to different interfaces in the query instruction.
  • Step 600 Start the BMC to monitor each interface in the server.
  • Step 610 The BMC determines whether the output data of any interface in the server is received. If not, step 620 is performed; otherwise, step 630 is performed.
  • Step 620 The BMC continues to monitor the status of all interfaces in the server.
  • Step 630 The bus controller of the BMC generates an interrupt signal according to the output data of any one of the above interfaces, and sends the interrupt signal to the processor of the BMC.
  • Step 640 After receiving the interrupt signal, the processor of the BMC acquires the interface information carried in the interrupt signal, and obtains the acquisition time of the output data from the RTC.
  • Step 650 The BMC converts the interface information of any one of the interfaces obtained above, the output data of the arbitrary interface, and the acquisition time of the output data into a storage instruction in the SQL format.
  • Step 660 Store the data record carried in the generated storage instruction into a local database.
  • the generated data record includes multiple types of identification information, and the user can obtain corresponding data records through various identification information, such as obtaining output data corresponding to a certain moment or an interface identifier, thereby facilitating fault location and failure.
  • Identification information such as obtaining output data corresponding to a certain moment or an interface identifier, thereby facilitating fault location and failure.
  • an embodiment of the present invention provides a data record generating apparatus, including a first obtaining unit 70, a second obtaining unit 71, and a generating unit 72, wherein:
  • the first obtaining unit 70 is configured to obtain output data of any one of the interfaces through the local hardware interface, and send the output data to the second obtaining unit 71 and the generating unit 72.
  • the second obtaining unit 71 is configured to receive Output data sent by the first obtaining unit 70, and acquiring interface information corresponding to the output data, and acquiring time of the output data according to the output data, and sending the interface information and the acquiring time To generating unit 72;
  • the generating unit 72 is configured to receive output data, interface information, and acquisition time of any one of the interfaces sent by the first acquiring unit 70 and the second acquiring unit 71, and output data of the any interface, the interface information, And converting the acquisition time to a data record of a specified format and storing the data record.
  • the data record generating unit further includes an output unit 73, configured to receive the input query instruction through the specified interface, convert the query instruction into a corresponding SQL format query instruction, and extract the SQL format query from the local database.
  • the data record corresponding to the instruction is output, and the data record is output as a query result corresponding to the query instruction.
  • the hardware interface 80 is configured to acquire output data of each interface in the server, and send the output data to the monitoring module 82;
  • the real-time clock 81 is configured to store the time information, and send the time information to the monitoring module 82.
  • the monitoring module 82 is configured to obtain the output data of any one of the interfaces through the local hardware interface 80, and obtain the corresponding output data.
  • the interface information, and the acquisition time of the output data sent by the real-time clock 81, and the output data, interface information and acquisition time of the arbitrary interface are sent to the data identification module 83;
  • the data identification module 83 is configured to receive output data, interface information, and acquisition time of any one of the interfaces sent by the monitoring module 82, and convert the output data of the any interface, the interface information, and the acquisition time into a specified a formatted data record, and the data record is sent to the database 84 through the database access interface;
  • the database 84 is used to store the above data record.
  • the present invention also provides a BMC, including a hardware interface 90, a bus controller 91, a processor 92, and a database 93:
  • the hardware interface 90 is configured to acquire output data of each interface in the server, and send the output data to the bus controller 91;
  • the bus controller 91 is configured to receive output data of any one of the interfaces through the hardware interface 90, and generate a corresponding interrupt signal according to the output data, and send the interrupt signal to the processor 92;
  • the processor 92 is configured to receive an interrupt signal sent by the bus controller 91, obtain interface information corresponding to the output data according to the interrupt signal, and acquire time of the output data, and output data of any one of the interfaces.
  • the interface information, and the acquisition time is converted into a data record of a specified format, and the data record is sent to the database 93.
  • the database 93 is used to store the above data record.
  • the BMC obtains the output data of any one of the interfaces through the local hardware interface, and obtains the interface information corresponding to the output data, and the foregoing Output data acquisition time;
  • the output data, interface information, and acquisition time of any of the above interfaces are converted into data records of a specified format and stored.
  • the data record is generated from the hardware driver layer by the BMC inside the server, and the network and the separate terminal device and the monitoring software are not needed, thereby effectively reducing the cost and improving the reliability of data record acquisition;
  • the data record generated in the above includes the acquisition time corresponding to the output data of the interface, thereby ensuring that the data record matches the BMC event log, and improving the accuracy of fault location and fault cause detection.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种数据记录生成方法及装置,方法为:通过服务器内部的BMC监控服务器中所有接口的输出数据,并记录该输出数据对应的获取时间,以及将任意一个接口对应的接口信息,上述该任意一个接口的输出数据,以及该输出数据对应的获取时间整理为数据记录。采用本发明技术方案,通过服务器内部的BMC从硬件驱动层实现数据记录的生成,无须借助网络以及单独的终端设备和监控软件,从而有效降低了成本,提高了数据记录获取的可靠性;并且,在上述生成的数据记录中包含接口的输出数据对应的获取时间,从而保证了数据记录与BMC事件日志相匹配,提高了故障定位以及故障原因检测的准确性。

Description

一种数据记录生成方法及装置 技术领域
本发明涉及通信技术领域, 尤其涉及一种数据记录生成方法及装置。 背景技术
目前, 随着服务器在通信领域的广泛应用, 服务器的故障检测受到越来 越多的关注。
在服务器启动阶段或者服务器发生故障时,服务器接口输出的数据有助 于故障定位以及获取故障原因。 目前, 通常采用现场记录以及远程记录两种 方式获取服务器接口的输出数据, 其中:
参阅图 1所示为现场记录方式获取服务器接口输出数据的示意图, 该方 式为在服务器侧配置一个终端, 该终端通过硬件总线与服务器的 I/O接口建 立连接关系, 且在该终端中安装监控软件。 当服务器启动后, 通过运行上述 终端中的监控软件实现获取该服务器各个接口的输出数据。 当采用上述现场 记录方式获取服务器接口的输出数据时, 首先需要在终端安装监控软件, 并 建立终端与服务器之间的连接, 从而增加了维护终端的成本, 且当该连接断 开时, 监控软件将无法获取服务器接口的输出数据; 对于服务器的串口, 其 输出的数据为流式数据, 在每一个时间点一个接口将存在大量信息输出, 上 述监控软件无法记录各个接口输出数据对应的时间,从而无法与服务器内部 的 BMC(Baseboard Management Controller,基板管理控制器)中记录的事件日 志相匹配。
参阅图 2所示为远程方式获取服务器接口输出数据的示意图, 该方式在 服务器的远端配置一个终端, 该终端通过网络与服务器建立连接, 且在该终 端中安装监控软件。 当服务器启动后, 运行上述终端中的监控软件并通过网 络实现获取该服务器各个接口的输出数据。 当采用上述远程记录方式获取服 务器接口的输出数据时, 首先需要在终端安装监控软件, 从而增加了维护终 端的成本, 由于终端与服务器之间通过网络连接, 占用了带宽资源, 且当该 网络连接断开时, 监控软件将无法获取服务器接口的输出数据; 对于服务器 的串口, 其输出的数据为流式数据, 在每一个时间点一个接口将存在大量信 息输出, 上述监控软件无法记录各个接口输出数据对应的时间, 从而无法与 服务器内部的 BMC记录的事件日志相匹配, 从而不便于对故障的定位以及 故障原因的检测。
综上所述,现有技术中,对服务器接口输出数据的获取方法存在成本高, 获取过程不可靠, 以及输出数据缺少时间信息导致故障定位以及故障原因检 测不准确的问题。 发明内容
本发明实施例提供一种数据记录生成方法及装置, 用以解决对服务器接 口输出数据的获取方法存在成本高, 获取过程不可靠, 以及输出数据缺少时 间信息导致故障定位以及故障原因检测不准确的问题。
第一方面, 提供一种数据记录生成方法, 包括:
通过本地的硬件接口获取服务器中任意一个接口的输出数据;
根据所述输出数据, 获取所述输出数据对应的接口信息, 以及所述输出 数据的获取时间;
将所述任意一个接口的输出数据, 所述接口信息, 以及所述获取时间转 换为指定格式的数据记录, 并存储所述数据记录。
结合第一方面, 在第一种可能的实现方式中, 指示本地的总线控制器根 据所述服务器中任意一个接口的输出数据产生中断信号, 并将所述中断信号 发送至本地的处理器; 指示所述处理器对所述中断信号进行解析, 并获取所 述中断信号指示的输出数据的关键字,根据所述关键字生成所述任意一个接 口的接口信息,其中,所述接口信息包含接口标识及其对应的接口状态信息。
结合第一方面, 在第二种可能的实现方式中, 在接收到所述任意一个接 口的输出数据时, 读取本地的实时时钟 RTC 中的时间信息, 将所述时间信 息作为所述输出数据的获取时间。 结合第一方面的第一种可能的实现方式,或者第一方面的第二种可能的 实现方式, 在第三种可能的实现方式中, 将所述任意一个接口的输出数据, 所述接口信息, 以及所述获取时间转换为结构化查询语言 SQL格式的存储 指令; 将所述 SQL格式的存储指令中携带的数据记录存储至本地数据库中。
结合第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 通过指定接口接收输入的查询指令; 将所述查询指令转换为对应的 SQL格 式查询指令; 从所述本地数据库中提取所述 SQL格式查询指令对应的数据 记录, 并将所述数据记录作为所述查询指令对应的查询结果输出。
结合第一方面的第四种可能的实现方式, 在第五种可能的实现方式中, 当所述查询指令中包含一个接口标识时,按照所述接口标识对应的输出数据 的获取时间先后顺序对所述接口标识对应的所有数据记录进行排序, 并输出 所述排序后的数据记录; 当所述查询指令中包含至少两个接口标识时, 分别 获取每一个接口标识对应的数据记录, 并按照所述查询指令中的接口标识顺 序依次输出各个接口标识对应的数据记录, 其中, 任意一个接口标识对应的 所有数据记录按照该任意一个接口标识对应的输出数据的获取时间先后顺 序排序; 当所述查询指令中包含起始时间和结束时间时, 分别获取每一个接 口标识对应的在所述起始时间和结束时间之间的数据记录, 并按照预设的接 口标识优先级顺序依次输出各个接口标识对应的数据记录, 其中, 任意一个 接口标识对应的所有数据记录按照该任意一个接口标识对应的输出数据的 获取时间先后顺序排序; 当所述查询指令中包含接口状态信息时, 分别从每 一个接口标识对应的数据记录中提取符合所述接口状态信息的数据记录, 并 按照预设的接口标识优先级顺序依次输出各个接口标识对应的满足所述接 口状态信息的数据记录, 其中, 任意一个接口标识对应的所有数据记录按照 该任意一个接口标识对应的输出数据的获取时间先后顺序排序。
第二方面, 提供一种数据记录生成装置, 包括:
第一获取单元, 用于通过本地的硬件接口获取服务器中任意一个接口的 输出数据, 并将所述输出数据发送至第二获取单元以及生成单元; 第二获取单元, 用于接收所述第一获取单元发送的输出数据, 并根据所 述输出数据, 获取所述输出数据对应的接口信息, 以及所述输出数据的获取 时间, 并将所述接口信息以及所述获取时间发送至生成单元;
生成单元, 用于接收所述第一获取单元以及第二获取单元发送的任意一 个接口的输出数据, 接口信息以及获取时间, 将所述任意一个接口的输出数 据, 所述接口信息, 以及所述获取时间转换为指定格式的数据记录, 并存储 所述数据记录。
结合第二方面, 在第一种可能的实现方式中, 所述第二获取单元, 具体 用于指示本地的总线控制器根据所述服务器中任意一个接口的输出数据产 生中断信号, 并将所述中断信号发送至本地的处理器; 指示所述处理器对所 述中断信号进行解析, 并获取所述中断信号指示的输出数据的关键字, 根据 所述关键字生成所述任意一个接口的接口信息, 其中, 所述接口信息包含接 口标识及其对应的接口状态信息。
结合第二方面, 在第二种可能的实现方式中, 所述第二获取单元, 具体 用于在接收到所述任意一个接口的输出数据时, 读取本地的实时时钟 RTC 中的时间信息, 将所述时间信息作为所述输出数据的获取时间。
结合第 方面的第一种可能的实现方式, 或者第二方面的第二种可能的 实现方式, 在第三种可能的实现方式中, 所述生成单元, 具体用于将所述任 意一个接口的输出数据, 所述接口信息, 以及所述获取时间转换为结构化查 询语言 SQL格式的存储指令; 将所述 SQL格式的存储指令中携带的数据记 录存储至本地数据库中。
结合第二方面的第三种可能的实现方式, 在第四种可能的实现方式中, 还包括输出单元, 用于通过指定接口接收输入的查询指令; 将所述查询指令 转换为对应的 SQL格式查询指令; 从所述本地数据库中提取所述 SQL格式 查询指令对应的数据记录, 并将所述数据记录作为所述查询指令对应的查询 结果输出。
结合第二方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述输出单元, 具体用于当所述查询指令中包含一个接口标识时, 按照所述 接口标识对应的输出数据的获取时间先后顺序对所述接口标识对应的所有 数据记录进行排序, 并输出所述排序后的数据记录; 当所述查询指令中包含 至少两个接口标识时, 分别获取每一个接口标识对应的数据记录, 并按照所 述查询指令中的接口标识顺序依次输出各个接口标识对应的数据记录, 其 中,任意一个接口标识对应的所有数据记录按照该任意一个接口标识对应的 输出数据的获取时间先后顺序排序; 当所述查询指令中包含起始时间和结束 时间时, 分别获取每一个接口标识对应的在所述起始时间和结束时间之间的 数据记录, 并按照预设的接口标识优先级顺序依次输出各个接口标识对应的 数据记录, 其中, 任意一个接口标识对应的所有数据记录按照该任意一个接 口标识对应的输出数据的获取时间先后顺序排序当所述查询指令中包含接 口状态信息时, 分别从每一个接口标识对应的数据记录中提取符合所述接口 状态信息的数据记录, 并按照预设的接口标识优先级顺序依次输出各个接口 标识对应的满足所述接口状态信息的数据记录, 其中, 任意一个接口标识对 应的所有数据记录按照该任意一个接口标识对应的输出数据的获取时间先 后顺序排序。
本发明实施例中, 通过服务器内部的 BMC监控服务器中所有接口的输 出数据, 并记录该输出数据对应的获取时间, 以及将任意一个接口对应的接 口信息, 上述该任意一个接口的输出数据, 以及该任意一个接口的输出数据 对应的获取时间整理为数据记录。 采用本发明技术方案, 通过服务器内部的 BMC从硬件驱动层实现数据记录的生成, 无须借助网络以及单独的终端设 备和监控软件,从而有效降低了成本,提高了数据记录获取的可靠性; 并且, 在上述生成的数据记录中包含接口的输出数据对应的获取时间,从而保证了 数据记录与 BMC事件日志相匹配, 提高了故障定位以及故障原因检测的准 确性。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对现有技术或实施 例中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动的前提下, 还可以根据这些附图获得其他的附图。
图 1为现有技术中现场记录方式获取服务器接口输出数据的示意图; 图 2为现有技术中远程方式获取服务器接口输出数据的示意图; 图 3为本发明实施例中系统结构图;
图 4为本发明实施例中数据记录生成流程图;
图 5为本发明实施例中用户查询数据记录的详细流程图;
图 6为本发明实施例中具体应用场景下数据记录生成流程图;
图 7为本发明实施例中数据记录生成装置结构示意图一;
图 8为本发明实施例中数据记录生成装置结构示意图二;
图 9为本发明实施例中 BMC设备示意图。 具体实施方式
为了解决现有技术中对服务器接口输出数据的获取方法存在成本高, 获 取过程不可靠, 以及输出数据缺少时间信息导致故障定位以及故障原因检测 不准确的问题。 本发明实施例中, 通过服务器内部的 BMC监控服务器中所 有接口的输出数据, 并记录该输出数据对应的获取时间, 上述该任意一个接 口的输出数据, 以及将任意一个接口对应的接口信息, 以及该任意一个接口 的输出数据对应的获取时间整理为数据记录。 采用本发明技术方案, 通过服 务器内部的 BMC从硬件驱动层实现数据记录的生成, 无须借助网络以及单 独的终端设备和监控软件, 从而有效降低了成本, 提高了数据记录获取的可 靠性;并且,在上述生成的数据记录中包含接口的输出数据对应的获取时间, 从而保证了数据记录与 BMC事件日志相匹配, 提高了故障定位以及故障原 因检测的准确性。 参阅图 3所示为本发明实施例中系统架构图, 其中, BMC位于服务器 中, 通过硬件接口与服务器建立连接, 并由总线控制器以及处理器根据服务 器中各个接口的状态生成数据记录, 而 BMC中的数据库用于存储上述数据 记录。 下面结合附图对本发明优选的实施方式进行详细说明。
参阅图 4所示, 本发明实施例中, 生成数据记录的详细流程为: 步骤 400: 通过 BMC本地的硬件接口获取服务器中任意一个接口的输 出数据。
本发明实施例中, 由于服务器包含多个接口, BMC监控该服务器中的 所有接口的状态, 当上述服务器中有任意一个接口输出数据时, BMC 的硬 件接口与服务器的各个接口之间通过的硬件总线建立连接关系, 并通过该硬 件接口获取上述服务器中任意一个接口的输出数据。 其中, 上述服务器的接 口可以为系统串口, 也可以为其他系统接口 (如 80port等) 。
步骤 410: 根据上述输出数据, 获取该输出数据对应的接口信息, 以及 该输出数据的获取时间。
本发明实施例中, 当 BMC接收到服务器任意一个接口的输出数据后, 本地的总线控制器根据上述服务器中任意一个接口的输出数据产生中断信 号, 并将该中断信号发送至 BMC的处理器, 由该处理器对该中断信号进行 解析, 获得该终端信号中的关键字, 并根据该关键字生成对应于上述任意一 个接口的接口信息, 该接口信息包含接口标识及其对应的接口状态信息。 其 中, 上述接口标识包含接口类型 (如 80port )和接口标号 (如串口 1 ) ; 上 述接口标识对应的接口状态信息包含输出数据类别和数据属性,如指示服务 器出现错误的错误信息, 或者一般的日志信息, 上述接口状态信息的获取便 于后续对生成的数据记录的分类存储。
由上述过程, BMC 获取服务器中任意一个接口的接口标识及其对应的 接口状态信息, 在获取上述任意一个接口的输出数据的同时, BMC读取本 地的 RTC ( Real Time Clock; 实时时钟) 中的时间信息, 并将该时间信息作 为上述任意一个接口的输出数据的获取时间。其中,上述 RTC—般位于 BMC 的内部可选的, 可以通过基于以太网的 NTP ( Network Time Protocol; 网络 时间协议)协议使 RTC的时间与服务器的时间保持同步。
采用上述技术方案, 当 BMC接收到服务器中任意一个接口的输出数据 时, 即通过 BMC本地的 RTC实时获取上述输出数据的获取时间, 由于上述 任意一个接口的输出数据, 以及该输出数据的获取时间均由 BMC获取, 无 须通过服务器中的其他部件得到上述获取时间, 因此避免了由输入信息的实 际获得时间与获取时间存在延迟的问题; 并且, 由于 BMC在硬件驱动层面 监测服务器中各个接口的输出数据, 当上述任意一个接口有输出数据时, BMC 能够精确获取该输出数据以及该输出数据的获取时间等信息, 从而提 高了获取信息准确性。
步骤 420: 将上述任意一个接口的输出数据, 以及该任意一个接口的接 口信息, 以及获取时间转换为指定格式的数据记录, 并存储该数据记录。
本发明实施例中, BMC 的处理器对总线控制器根据任意一个接口的输 出数据生成的中断信号进行解析后, 获取上述任意一个接口的输出数据, 接 口信息(包含接口标识及其对应的接口状态信息), 将上述任意一个接口的 输出数据, 该任意一个接口的接口标识及其对应的接口状态信息, 以及相应 的获取时间转换为 SQL ( Structure Query Language; 结构化查询语言 )格式 的存储指令; 并将该 SQL格式的存储指令中携带的数据记录存储至本地数 据库中。 由上述过程可见, 一条数据记录包含获取时间, 接口状态信息, 以 及接口标识, 输出数据等多种信息, 其中, 获取时间, 接口标识以及接口状 态信息均可作为标识信息, 该标识信息均可作为查询指令以便于用户后期查 询上述服务器中各个接口对应的数据记录。
经过上述过程, 根据任意一个接口的接口标识及其对应的接口状态信 息, 该任意一个接口的输出数据, 以及该输出数据的获取时间生成该任意一 个接口对应的一条数据记录; 当该任意一个接口在下一个时刻仍有输出数据 时, BMC 即可重复上述过程, 生成另一条数据记录, 依次类推。 上述数据 库中可以包含多个接口对应的数据记录,且每一个接口可以对应多条数据记 录。 可选的, 可以按照获取时间的先后顺序对上述任意一个接口对应的多条 数据记录进行排序, 从而方便后期用户查看以及对该数据记录的管理。
采用上述技术方案, 由于 BMC配置有独立的操作系统和工作电源, 因 此, BMC 能够持续监测服务器中各个接口的输出数据, 不受服务器的状态 的影响, 从而保证了能够可靠生成数据记录。
经过上述过程后, BMC 本地的数据库中保存多条数据记录, 用户可以 根据自身的需求, 通过在 BMC的用户界面输入相应的标识信息, 查询上述 数据记录。 具体为: 通过指定接口接收用户输入的查询指令; 其中, 该指定 接口为 CLI ( Command Line Interface; 命令行界面)接口, WEB接口, 或 者 SNMP ( Simple Network Management Protocol; 简单网络管理协议)接口; 由于数据库无法识别上述查询指令, 因此, BMC将上述查询指令转换为对 应的 SQL格式查询指令; 并根据该 SQL格式查询指令, 从 BMC本地的数 据库中提取上述 SQL格式查询指令对应的查询结果; 以及将上述查询指令 对应的查询结果呈现至上述 BMC的用户界面。
在上述用户查询数据记录的过程中, 用户输入的查询指令中包含相应的 标识信息, 如接口标识, 获取时间等。 当上述查询指令中包含接口标识时, 该接口标识的数目可以为一个, 也可以为多个。 具体为: 当上述查询指令中 包含一个接口标识时,按照该接口标识对应的输出数据的获取时间先后顺序 对该接口标识对应的所有数据记录进行排序, 并将排序后的数据记录作为查 询结果输出, 例如, 当该接口标识对应于三条数据记录, 即数据记录 1 , 数 据记录 2和数据记录 3 ,且其对应的输出数据的获取时间分别为 tl , t2和 t3 , 其中, tl早于 t3 , t3早于 t2, 则根据查询指令输出的查询结果依次为数据记 录 1 ,数据记录 3 ,数据记录 2; 当上述查询指令中包含至少两个接口标识时, 分别获取每一个接口标识对应的数据记录, 并按照上述查询指令中接口标识 的顺序依次输出各个接口标识对应的数据记录, 其中, 令任意一个接口标识 对应的所有数据记录,按照该任意一个接口标识对应的输出数据的获取时间 先后顺序进行排序, 例如, 当查询指令中包含的接口标识依次为接口标识 1 和接口标识 2, 接口标识 1对应于数据记录 10和数据记录 11 , 其对应的输 出数据的获取时间分别为 tlO和 tl 1 , tl 1早于 tlO, 接口标识 2对应于数据 记录 20和数据记录 21 ,其对应的输出数据的获取时间分别为 t20和 t21 , t20 早于 t21 , 则根据查询指令输出的查询结果依次为 "接口标识 1 : 数据记录 11 , 数据记录 10; 接口标识 2: 数据记录 20, 数据记录 21" 。
除上述查询指令中包含接口标识外, 该查询指令中还可以包含获取时 间, 该获取时间通常为两个时间 (起始时间和结束时间) , 即一个时间段。 具体为: 当上述查询指令中包含起始时间和结束时间时, 分别获取每一个接 口标识对应的在上述起始时间和结束时间之间的数据记录, 并按照预设的接 口标识优先级顺序依次输出各个接口标识对应的数据记录, 其中, 令任意一 个接口标识对应的所有数据记录按照该任意一个接口标识对应的输出数据 的获取时间先后顺序排序。 特殊的, 上述起始时间和结束时间可以为同一个 时间 (即某个时刻) , 此时, BMC 将输出上述某个时刻的各个接口标识对 应的数据记录, 其中, 任意一个接口对应的所有数据记录可以按照预设的输 出顺序规则输出, 如随机输出, 或者按照数据记录中携带的数据类别输出, 或者按照数据记录中携带的数据属性输出。 采用上述技术方案, 支持按照输 出数据的获取时间向用户呈现相关数据记录, 方便用户查询特定时间点的各 个接口标识对应的接口状态信息。
特殊的, 上述用户输入的查询指令中还可以包含接口状态信息, 分别从 每一个接口标识对应的数据记录中提取符合上述接口状态信息的数据记录, 并按照预设的接口标识优先级顺序依次输出各个接口标识对应的满足接口 状态信息的数据记录, 其中, 任意一个接口标识对应的所有数据记录按照该 任意一个接口标识对应的输出数据的获取时间先后顺序排序。 例如, 查询指 令中包含的接口状态信息为错误信息, 此时, BMC将获取本地数据库中存 储的所有接口标识对应的数据记录中满足错误信息的数据记录, 并按照预设 的接口标识优先级顺序依次输出各个接口标识对应的数据记录, 其中, 令任 意一个接口标识对应的所有数据记录,按照该任意一个接口标识对应的输出 数据的获取时间先后顺序进行排序。
可选的, 用户输入的查询指令中可以包含多个标识信息, 如即包含接口 标识, 又包含获取时间 (如为一个时刻) , 此时, BMC将获取本地数据库 中存储的上述接口标识在上述时刻对应的所有数据记录, 并将该所有数据记 录按照预设的输出顺序规则依次输出。
参阅图 5所示, 本发明实施例中用户查询数据记录的详细流程为: 步骤 500: BMC通过指定接口接收用户输入的查询指令。
步骤 510: BMC获取该查询指令中携带的标识信息, 并将该标识信息转 换为 SQL格式查询指令。
步骤 520: BMC将上述 SQL格式查询指令发送至本地的数据库。
步骤 530:上述数据库根据上述 SQL格式查询指令提取相应的查询结果, 并将该查询结果发送至用户界面进行呈现。
本发明实施例中, 上述查询结果即为查询指令中不同接口对应的所有数 据记录。
基于上述技术方案, 参阅图 6所示, 下面结合具体的应用场景详细介绍 数据记录生成的流程:
步骤 600: 启动 BMC对服务器中各个接口的监测。
步骤 610: BMC判断是否接收到服务器中任意一个接口的输出数据,若 无, 执行步骤 620; 否则, 执行步骤 630。
步骤 620: BMC继续监测该服务器中所有接口的状态。
步骤 630: BMC的总线控制器根据上述任意一个接口的输出数据生成中 断信号, 并将该中断信号发送至 BMC的处理器。 步骤 640: BMC的处理器接收到上述中断信号后,获取该中断信号中携 带的接口信息, 并从 RTC中获取上述输出数据的获取时间。
步骤 650: BMC将上述获取的任意一个接口的接口信息,该任意一个接 口的输出数据, 以及该输出数据的获取时间转换为 SQL格式的存储指令。
步骤 660: 将上述生成的存储指令中携带的数据记录存储至本地的数据 库中。
采用上述技术方案, 生成的数据记录中包含多种标识信息, 用户可以通 过各种标识信息获取相应的数据记录,如获取某个时刻或者某个接口标识对 应的输出数据, 从而便于故障定位以及故障原因检测。
基于上述技术方案, 参阅图 7所示, 本发明实施例中提供一种数据记录 生成装置, 包括第一获取单元 70, 第二获取单元 71 , 以及生成单元 72, 其 中:
第一获取单元 70,用于通过本地的硬件接口获取服务器中任意一个接口 的输出数据, 并将所述输出数据发送至第二获取单元 71以及生成单元 72; 第二获取单元 71 , 用于接收所述第一获取单元 70发送的输出数据, 并 根据所述输出数据, 获取所述输出数据对应的接口信息, 以及所述输出数据 的获取时间, 并将所述接口信息以及所述获取时间发送至生成单元 72;
生成单元 72,用于接收所述第一获取单元 70以及第二获取单元 71发送 的任意一个接口的输出数据, 接口信息以及获取时间, 将所述任意一个接口 的输出数据,所述接口信息,以及所述获取时间转换为指定格式的数据记录, 并存储所述数据记录。
其中,上述数据记录生成单元还包括输出单元 73 ,用于通过指定接口接 收输入的查询指令; 将所述查询指令转换为对应的 SQL格式查询指令; 从 所述本地数据库中提取所述 SQL格式查询指令对应的数据记录, 并将所述 数据记录作为所述查询指令对应的查询结果输出。
参阅图 8所示为数据生成装置另一种实现形式, 其中: 硬件接口 80,用于获取服务器中的各个接口的输出数据,并将该输出数 据发送至监听模块 82;
实时时钟 81 , 用于存储时间信息, 并将该时间信息发送至监听模块 82; 监听模块 82, 用于通过本地的硬件接口 80获取服务器中任意一个接口 的输出数据, 并获取所述输出数据对应的接口信息, 以及所述实时时钟 81 发送的输出数据的获取时间, 并将该任意一个接口的输出数据, 接口信息以 及获取时间发送至数据标识模块 83 ;
数据标识模块 83 , 用于接收监听模块 82发送的任意一个接口的输出数 据, 接口信息以及获取时间, 并将所述任意一个接口的输出数据, 所述接口 信息, 以及所述获取时间转换为指定格式的数据记录, 并将该数据记录通过 数据库访问接口发送至数据库 84;
数据库 84, 用于存储上述数据记录。
参阅图 9所示, 本发明还提供一种 BMC, 包括硬件接口 90, 总线控制 器 91 , 处理器 92, 数据库 93:
硬件接口 90,用于获取服务器中的各个接口的输出数据, 并将该输出数 据发送至总线控制器 91 ;
总线控制器 91 , 用于通过硬件接口 90接收服务器中任意一个接口的输 出数据, 并根据上述输出数据生成相应的中断信号, 并将该中断信号发送至 处理器 92;
处理器 92, 用于接收总线控制器 91发送的中断信号, 根据该中断信号 获取所述输出数据对应的接口信息, 以及所述输出数据的获取时间, 将所述 任意一个接口的输出数据, 所述接口信息, 以及所述获取时间转换为指定格 式的数据记录, 并将该数据记录发送至数据库 93。
数据库 93 , 用于存储上述数据记录。
综上所述, 本发明实施例中, BMC通过本地的硬件接口获取服务器中 任意一个接口的输出数据, 并获取所述输出数据对应的接口信息, 以及上述 输出数据的获取时间; 将上述任意一个接口的输出数据, 接口信息, 以及获 取时间转换为指定格式的数据记录后进行存储。 采用本发明技术方案, 通过 服务器内部的 BMC从硬件驱动层实现数据记录的生成, 无须借助网络以及 单独的终端设备和监控软件, 从而有效降低了成本, 提高了数据记录获取的 可靠性; 并且, 在上述生成的数据记录中包含接口的输出数据对应的获取时 间, 从而保证了数据记录与 BMC事件日志相匹配, 提高了故障定位以及故 障原因检测的准确性。
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或 计算机程序产品。 因此, 本发明可采用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实施例的形式。 而且, 本发明可采用在一个或多个 其中包含有计算机可用程序代码的计算机可用存储介质 (包括但不限于磁盘 存储器、 CD-ROM、 光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、 设备(系统) 、 和计算机程序 产品的流程图和 /或方框图来描述的。应理解可由计算机程序指令实现流程 图和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中的流 程和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专用计算 机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器, 使 得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实 现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定 的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理 设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储 器中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个流程 或多个流程和 /或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现 的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程 图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的 步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了 基本创造性概念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权 利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。 脱离本发明实施例的精神和范围。 这样, 倘若本发明实施例的这些修改和变 型属于本发明权利要求及其等同技术的范围之内, 则本发明也意图包含这些 改动和变型在内。

Claims

权利 要求
1、 一种数据记录生成方法, 其特征在于, 包括:
通过本地的硬件接口获取服务器中任意一个接口的输出数据; 根据所述输出数据, 获取所述输出数据对应的接口信息, 以及所述输出 数据的获取时间;
将所述任意一个接口的输出数据, 所述接口信息, 以及所述获取时间转 换为指定格式的数据记录, 并存储所述数据记录。
2、 如权利要求 1 所述的方法, 其特征在于, 获取所述输出数据对应的 接口信息, 具体包括:
指示本地的总线控制器根据所述服务器中任意一个接口的输出数据产 生中断信号, 并将所述中断信号发送至本地的处理器;
指示所述处理器对所述中断信号进行解析, 并获取所述中断信号指示的 输出数据的关键字, 根据所述关键字生成所述任意一个接口的接口信息, 其 中, 所述接口信息包含接口标识及其对应的接口状态信息。
3、 如权利要求 1 所述的方法, 其特征在于, 获取所述输出数据的获取 时间, 具体包括:
在接收到所述任意一个接口的输出数据时, 读取本地的实时时钟 RTC 中的时间信息, 将所述时间信息作为所述输出数据的获取时间。
4、 如权利要求 1、 2或 3所述的方法, 其特征在于, 将所述任意一个接 口的输出数据, 所述接口信息, 以及所述获取时间转换为指定格式的数据记 录, 并存储所述数据记录, 具体包括:
将所述任意一个接口的输出数据, 所述接口信息, 以及所述获取时间转 换为结构化查询语言 SQL格式的存储指令;
将所述 SQL格式的存储指令中携带的数据记录存储至本地数据库中。
5、 如权利要求 4所述的方法, 其特征在于, 存储所述数据记录之后, 进一步包括: 通过指定接口接收输入的查询指令;
将所述查询指令转换为对应的 SQL格式查询指令;
从所述本地数据库中提取所述 SQL格式查询指令对应的数据记录, 并 将所述数据记录作为所述查询指令对应的查询结果输出。
6、 如权利要求 5所述的方法, 其特征在于, 输出所述查询指令对应的 查询结果, 具体包括:
当所述查询指令中包含一个接口标识时,按照所述接口标识对应的输出 数据的获取时间先后顺序对所述接口标识对应的所有数据记录进行排序, 并 输出所述排序后的数据记录;
当所述查询指令中包含至少两个接口标识时, 分别获取每一个接口标识 对应的数据记录, 并按照所述查询指令中的接口标识顺序依次输出各个接口 标识对应的数据记录, 其中, 任意一个接口标识对应的所有数据记录按照该 任意一个接口标识对应的输出数据的获取时间先后顺序排序;
当所述查询指令中包含起始时间和结束时间时, 分别获取每一个接口标 识对应的在所述起始时间和结束时间之间的数据记录, 并按照预设的接口标 识优先级顺序依次输出各个接口标识对应的数据记录, 其中, 任意一个接口 标识对应的所有数据记录按照该任意一个接口标识对应的输出数据的获取 时间先后顺序排序;
当所述查询指令中包含接口状态信息时,分别从每一个接口标识对应的 数据记录中提取符合所述接口状态信息的数据记录, 并按照预设的接口标识 优先级顺序依次输出各个接口标识对应的满足所述接口状态信息的数据记 录, 其中, 任意一个接口标识对应的所有数据记录按照该任意一个接口标识 对应的输出数据的获取时间先后顺序排序。
7、 一种数据记录生成装置, 其特征在于, 包括:
第一获取单元, 用于通过本地的硬件接口获取服务器中任意一个接口的 输出数据, 并将所述输出数据发送至第二获取单元以及生成单元; 第二获取单元, 用于接收所述第一获取单元发送的输出数据, 并根据所 述输出数据, 获取所述输出数据对应的接口信息, 以及所述输出数据的获取 时间, 并将所述接口信息以及所述获取时间发送至生成单元;
生成单元, 用于接收所述第一获取单元以及第二获取单元发送的任意一 个接口的输出数据, 接口信息以及获取时间, 将所述任意一个接口的输出数 据, 所述接口信息, 以及所述获取时间转换为指定格式的数据记录, 并存储 所述数据记录。
8、 如权利要求 7所述的装置, 其特征在于, 所述第二获取单元, 具体 用于:
指示本地的总线控制器根据所述服务器中任意一个接口的输出数据产 生中断信号, 并将所述中断信号发送至本地的处理器; 指示所述处理器对所 述中断信号进行解析, 并获取所述中断信号指示的输出数据的关键字, 根据 所述关键字生成所述任意一个接口的接口信息, 其中, 所述接口信息包含接 口标识及其对应的接口状态信息。
9、 如权利要求 7所述的装置, 其特征在于, 所述第二获取单元, 具体 用于:
在接收到所述任意一个接口的输出数据时, 读取本地的实时时钟 RTC 中的时间信息, 将所述时间信息作为所述输出数据的获取时间。
10、 如权利要求 7、 8或 9所述的装置, 其特征在于, 所述生成单元, 具体用于:
将所述任意一个接口的输出数据, 所述接口信息, 以及所述获取时间转 换为结构化查询语言 SQL格式的存储指令; 将所述 SQL格式的存储指令中 携带的数据记录存储至本地数据库中。
11、 如权利要求 10所述的装置, 其特征在于, 还包括输出单元, 用于: 通过指定接口接收输入的查询指令;将所述查询指令转换为对应的 SQL 格式查询指令; 从所述本地数据库中提取所述 SQL格式查询指令对应的数 据记录, 并将所述数据记录作为所述查询指令对应的查询结果输出。
12、 如权利要求 11 所述的装置, 其特征在于, 所述输出单元, 具体用 于:
当所述查询指令中包含一个接口标识时,按照所述接口标识对应的输出 数据的获取时间先后顺序对所述接口标识对应的所有数据记录进行排序, 并 输出所述排序后的数据记录; 当所述查询指令中包含至少两个接口标识时, 分别获取每一个接口标识对应的数据记录, 并按照所述查询指令中的接口标 识顺序依次输出各个接口标识对应的数据记录, 其中, 任意一个接口标识对 应的所有数据记录按照该任意一个接口标识对应的输出数据的获取时间先 后顺序排序; 当所述查询指令中包含起始时间和结束时间时, 分别获取每一 个接口标识对应的在所述起始时间和结束时间之间的数据记录, 并按照预设 的接口标识优先级顺序依次输出各个接口标识对应的数据记录, 其中, 任意 一个接口标识对应的所有数据记录按照该任意一个接口标识对应的输出数 据的获取时间先后顺序排序; 当所述查询指令中包含接口状态信息时, 分别 从每一个接口标识对应的数据记录中提取符合所述接口状态信息的数据记 录, 并按照预设的接口标识优先级顺序依次输出各个接口标识对应的满足所 述接口状态信息的数据记录, 其中, 任意一个接口标识对应的所有数据记录 按照该任意一个接口标识对应的输出数据的获取时间先后顺序排序。
PCT/CN2014/072211 2013-07-16 2014-02-19 一种数据记录生成方法及装置 WO2015007091A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310302291.5A CN103441861B (zh) 2013-07-16 2013-07-16 一种数据记录生成方法及装置
CN201310302291.5 2013-07-16

Publications (1)

Publication Number Publication Date
WO2015007091A1 true WO2015007091A1 (zh) 2015-01-22

Family

ID=49695530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/072211 WO2015007091A1 (zh) 2013-07-16 2014-02-19 一种数据记录生成方法及装置

Country Status (2)

Country Link
CN (1) CN103441861B (zh)
WO (1) WO2015007091A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI679579B (zh) * 2018-08-17 2019-12-11 英業達股份有限公司 遠端登錄伺服器子系統方法與遠端登錄系統

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441861B (zh) * 2013-07-16 2017-03-08 杭州华为数字技术有限公司 一种数据记录生成方法及装置
CN105574010B (zh) * 2014-10-13 2020-06-02 阿里巴巴集团控股有限公司 数据查询方法及装置
CN104754035A (zh) * 2015-03-06 2015-07-01 浪潮集团有限公司 一种ntp和rtc芯片配合确保管理主板时间的方法
TWI632453B (zh) 2015-10-02 2018-08-11 緯穎科技服務股份有限公司 監測伺服器的方法、監測裝置及監測系統
JP2017173971A (ja) * 2016-03-22 2017-09-28 ブラザー工業株式会社 情報収集システム、情報収集方法、及び、端末装置
CN111221763A (zh) * 2018-11-26 2020-06-02 英业达科技有限公司 信息撷取系统
CN109947690B (zh) * 2019-03-18 2023-05-23 联想(北京)有限公司 控制方法、装置和电子设备
CN111061338B (zh) * 2019-11-30 2021-06-01 苏州浪潮智能科技有限公司 一种基板管理控制器时序的更新方法、系统及设备
CN111554367B (zh) * 2020-04-26 2023-05-30 贵州精准健康数据有限公司 一种数据处理方法、装置及计算机可读介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1445669A (zh) * 2002-03-15 2003-10-01 联想(北京)有限公司 多途径获取和输出服务器监控信息的方法
US20080103729A1 (en) * 2006-10-31 2008-05-01 Microsoft Corporation Distributed detection with diagnosis
CN102073578A (zh) * 2009-11-23 2011-05-25 英业达股份有限公司 系统事件日志记录方法
CN102478897A (zh) * 2010-11-30 2012-05-30 英业达股份有限公司 计算机系统
CN103441861A (zh) * 2013-07-16 2013-12-11 杭州华为数字技术有限公司 一种数据记录生成方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100554985C (zh) * 2007-05-25 2009-10-28 中兴通讯股份有限公司 一种北向接口数据完整性的检验方法
CN101540694A (zh) * 2008-03-17 2009-09-23 联想(北京)有限公司 一种服务器的监控方法和服务器
CN101247275B (zh) * 2008-03-18 2011-02-09 杭州华三通信技术有限公司 一种中断上报方法和网络设备
KR100959614B1 (ko) * 2008-05-28 2010-05-27 한미아이티 주식회사 복수의 단말 장치의 원격 관리 시스템과 방법, 복수의 단말장치 및 복수의 관리 장치와 접속하는 인터페이스 장치와방법, 및, 그 방법들을 실행시키기 위한 프로그램이 기록된컴퓨터로 판독 가능한 기록 매체
CN101355531A (zh) * 2008-09-24 2009-01-28 华为技术有限公司 一种消息发送、接收的方法、装置和设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1445669A (zh) * 2002-03-15 2003-10-01 联想(北京)有限公司 多途径获取和输出服务器监控信息的方法
US20080103729A1 (en) * 2006-10-31 2008-05-01 Microsoft Corporation Distributed detection with diagnosis
CN102073578A (zh) * 2009-11-23 2011-05-25 英业达股份有限公司 系统事件日志记录方法
CN102478897A (zh) * 2010-11-30 2012-05-30 英业达股份有限公司 计算机系统
CN103441861A (zh) * 2013-07-16 2013-12-11 杭州华为数字技术有限公司 一种数据记录生成方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI679579B (zh) * 2018-08-17 2019-12-11 英業達股份有限公司 遠端登錄伺服器子系統方法與遠端登錄系統

Also Published As

Publication number Publication date
CN103441861A (zh) 2013-12-11
CN103441861B (zh) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2015007091A1 (zh) 一种数据记录生成方法及装置
WO2022088804A1 (zh) 消息推送方法、装置、电子设备及存储介质
WO2019085073A1 (zh) 接口测试方法、装置、计算机设备和存储介质
US20160239540A1 (en) Data Query Method and Apparatus, Server, and System
CN110554930B (zh) 一种数据存储方法及相关设备
CN108563550A (zh) 一种分布式系统的监控方法、装置、服务器和存储介质
WO2014049804A1 (ja) 分散システムにおけるシステム動作トレース方法
US8189458B2 (en) Monitoring system, monitoring device, monitored device, and monitoring method
WO2016183967A1 (zh) 一种关键组件的故障告警方法、装置及大数据管理系统
CN102385582A (zh) 生产测试数据处理方法、服务器及系统
WO2014206099A1 (zh) 一种多节点服务器系统的故障现场信息的收集方法及装置
JP6434021B2 (ja) データフィードの管理
CN111339118A (zh) 基于Kubernetes的资源变更历史记录方法及装置
US11930292B2 (en) Device state monitoring method and apparatus
CN112565232B (zh) 一种基于模板和流量状态的日志解析方法及系统
CN117389968A (zh) 车辆日志存储、传输方法、装置、车辆、电子设备及介质
CN100421381C (zh) 一种获取网络设备运行和故障状态信息的方法及装置
TW201519598A (zh) 用以建構網路結構部署圖之處理系統及其方法與內儲網路結構部署分析程式之電腦程式產品
CN113946448B (zh) 一种服务器集群的时序管理方法、装置及电子设备
CN110765089A (zh) 一种分布式设备及其日志记录方法、装置和存储介质
CN112667586B (zh) 一种基于流处理的数据同步的方法、系统、设备及介质
CN108805741B (zh) 一种电能质量数据的融合方法、装置及系统
US8930369B2 (en) Information processing apparatus, message classifying method and non-transitory medium for associating series of transactions
US10902027B2 (en) Generation of category information for measurement value
CN110597681A (zh) 服务器硬件监控系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14826853

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14826853

Country of ref document: EP

Kind code of ref document: A1