WO2020019724A1 - Method for acquiring sensor data in server, acquisition system, and related apparatus - Google Patents

Method for acquiring sensor data in server, acquisition system, and related apparatus Download PDF

Info

Publication number
WO2020019724A1
WO2020019724A1 PCT/CN2019/077428 CN2019077428W WO2020019724A1 WO 2020019724 A1 WO2020019724 A1 WO 2020019724A1 CN 2019077428 W CN2019077428 W CN 2019077428W WO 2020019724 A1 WO2020019724 A1 WO 2020019724A1
Authority
WO
WIPO (PCT)
Prior art keywords
sensor
ipmi
server
protocol
acquiring
Prior art date
Application number
PCT/CN2019/077428
Other languages
French (fr)
Chinese (zh)
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 WO2020019724A1 publication Critical patent/WO2020019724A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Definitions

  • the present application relates to the field of servers, and in particular, to a method and system for acquiring sensor data in a server, a computer-readable storage medium, and a server.
  • the server's monitoring and management system namely BMC (Baseboard Management Controller)
  • BMC Baseboard Management Controller
  • IPMI Intelligent Platform Management Interface
  • Users can monitor the server through IPMI commands.
  • Sensor monitoring in IPMI is one of the core monitoring contents of server monitoring and management. By monitoring the Server Sensor, you can obtain information such as CPU temperature, voltage, and fans in time to provide reliable information for cooling and ensuring the normal operation of the server.
  • the access address for obtaining sensors includes:
  • the parameter information of the sensor is provided in the form of a YAML file, and the basic information of the sensor is obtained by using the parameter information.
  • the basic information is combined according to the IPMI sensor protocol, so that when the user can directly access the sensor through the IPMI protocol, the BMC can access the sensor information.
  • the sensor data can be obtained from the server, which is convenient for monitoring, maintenance and debugging of the sensor.
  • the present application also provides a system for acquiring sensors in a server, a computer-readable storage medium, and a server, which have the above-mentioned beneficial effects, and will not be repeated here.
  • FIG. 1 is a flowchart of a method for acquiring sensor data in a server according to an embodiment of the present application
  • FIG. 1 is a flowchart of a method for acquiring sensor data in a server according to an embodiment of the present application.
  • the acquisition method includes:
  • the purpose of this step is to explain the need to obtain sensor information to monitor the normal operation of the server.
  • the subject that sends the acquisition request here is not only for people, but also the monitoring equipment of the server.
  • the YAML file includes the parameter information of the sensor. It should be noted that there is a step of generating a YAML file by default in this step.
  • YAML is a recursive abbreviation of "YAML Ain't Markup Language” (YAML is not a markup language), YAML actually means: "Yet Another Markup Language” (still a markup language).
  • the specific content of the parameter information is not limited here. It can be understood that the content should include the information required by the monitoring user, for example, it can include the sensor type, the sensor name, the alarm threshold of the sensor, the unit, and the sensor. Number and DBUS information.
  • each sensor has a corresponding YAML file.
  • the parameter information of the sensor has been obtained in S102.
  • This step aims to obtain the corresponding basic information of the sensor, that is, the real-time information of the sensor, according to the parameter information.
  • This hardware monitoring module is not a hardware module, but a software module. It can provide a DBUS service interface to the BMC.
  • DBUS is a low-latency, low-overhead, high-availability inter-process communication mechanism.
  • the DBUS service interface does not mean a hardware interface, but a function interface.
  • S104 retrieve the IPMI Sensor protocol, and compose the basic information according to the IPMI Sensor protocol to form sensor data in a sensor protocol format.
  • the focus of this step is to convert the parameter information into sensor data in the sensor protocol format according to the IPMI and Sensor protocol combinations.
  • the IPMI sensor protocol needs to be called first, and the DMI service interface can usually be used to call the IPMI sensor protocol from the BMC's IPMI stack module.
  • the basic information of the sensor can be combined according to the IPMI Sensor protocol to obtain the sensor data in the sensor protocol format.
  • the user can use IPMI to get the data of the sensor in the server.
  • the parameter information of the sensor is provided in the form of a YAML file, and the basic information of the sensor is obtained by using the parameter information.
  • the basic information is combined according to the IPMI sensor protocol, so that when the user can directly access the sensor through the IPMI protocol, the BMC can access the sensor information.
  • the sensor data can be obtained from the server, which is convenient for monitoring, maintenance and debugging of the sensor.
  • the YAML file is updated.
  • the following describes an acquisition system for sensors in a server provided in an embodiment of the present application.
  • the acquisition system described below and the acquisition method described above may refer to each other.
  • FIG. 2 is a schematic structural diagram of a sensor acquisition system in a server according to an embodiment of the present application.
  • the acquisition system includes:
  • This application further provides a server, which may include a memory and a processor.
  • the memory stores a computer program.
  • the processor calls the computer program in the memory, the steps provided in the foregoing embodiments may be implemented.
  • the server may also include various network interfaces, power supplies, and other components.

Abstract

A method for acquiring sensor data in a server, an acquisition system, a computer readable storage medium, and a server, the acquisition method comprising: acquiring an access address of a sensor; when receiving an acquisition request, reading a YAML file on the basis of the access address, the YAML file comprising parameter information of the sensor; retrieving an IPMI sensor protocol and, according to the IPMI sensor protocol, forming the parameter information into sensor data of the sensor protocol format. The present application provides parameter information of a sensor in a YAML file format, so that a BMC can access the sensor information when the user accesses the sensor by means of an IPMI protocol; monitoring of a sensor in a server can thus be implemented on the BMC, facilitating sensor maintenance and debugging.

Description

服务器中传感器数据的获取方法、获取系统和相关装置Method, system and related device for acquiring sensor data in server
本申请要求于2018年7月27日提交中国专利局、申请号为201810844871.X、发明名称为“服务器中传感器数据的获取方法、获取系统和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on July 27, 2018 with the Chinese Patent Office, application number 201810844871.X, and the invention name "Acquisition Method, Acquisition System, and Related Device for Sensor Data in the Server" The contents are incorporated herein by reference.
技术领域Technical field
本申请涉及服务器领域,特别涉及一种服务器中传感器数据的获取方法、获取系统,一种计算机可读存储介质和一种服务器。The present application relates to the field of servers, and in particular, to a method and system for acquiring sensor data in a server, a computer-readable storage medium, and a server.
背景技术Background technique
随着信息技术的飞速发展,服务器在云计算、大数据以及传统行业得到了广泛深入的应用,而服务器的监控管理系统,即BMC(Baseboard Management Controller,基板管理控制器)在服务器的管理、运维、对上层应用提供管理接口方面起到了关键的作用。BMC的核心接口之一是IPMI(Intelligent Platform Management Interface,智能型平台管理接口),用户通过IPMI命令对服务器实现监控。IPMI中传感器的监控是服务器监控管理的核心监控内容之一,通过监控服务器Sensor,可以及时获取CPU温度、电压、风扇等信息,为散热和保证服务器正常运行提供可靠的信息。With the rapid development of information technology, servers have been widely used in cloud computing, big data, and traditional industries. The server's monitoring and management system, namely BMC (Baseboard Management Controller), is used for server management and operation. It plays a key role in providing management interfaces for upper-layer applications. One of BMC's core interfaces is IPMI (Intelligent Platform Management Interface). Users can monitor the server through IPMI commands. Sensor monitoring in IPMI is one of the core monitoring contents of server monitoring and management. By monitoring the Server Sensor, you can obtain information such as CPU temperature, voltage, and fans in time to provide reliable information for cooling and ensuring the normal operation of the server.
然而当下配置监控服务器Sensor时需要经过生成代码、编译、重启IPMI服务等复杂的过程,给监控乃至后期的调试和维护带来很大的困难。However, the current configuration of the monitoring server Sensor requires complicated processes such as generating code, compiling, and restarting the IPMI service, which brings great difficulties to monitoring and subsequent debugging and maintenance.
因此如何简化实现监控服务器Sensor的配置是本领域技术人员亟需解决的问题。Therefore, how to simplify the configuration of the monitoring server Sensor is a problem urgently needed by those skilled in the art.
发明内容Summary of the Invention
本申请的目的是提供一种服务器中传感器数据的获取方法、获取系统,一种计算机可读存储介质和一种服务器,解决现有的服务器Sensor配置过程复杂、繁琐的问题The purpose of this application is to provide a method and system for acquiring sensor data in a server, a computer-readable storage medium, and a server, which solves the complicated and tedious problem of the existing server Sensor configuration process.
为解决上述技术问题,本申请提供一种服务器中传感器数据的获取方 法,具体技术方案如下:To solve the above technical problems, this application provides a method for acquiring sensor data in a server. The specific technical solution is as follows:
获取所述传感器的访问地址;Obtaining an access address of the sensor;
当接收到获取请求时根据所述访问地址读取YAML文件;其中所述YAML文件包括所述传感器的参数信息;Read a YAML file according to the access address when an acquisition request is received; wherein the YAML file includes parameter information of the sensor;
调取IPMI Sensor协议,将所述参数信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据。The IPMI sensor protocol is called, and the parameter information is used to form sensor data in a sensor protocol format according to the IPMI sensor protocol.
其中,所述参数信息包括所述传感器类型、所述传感器名称、所述传感器的报警阈值、单位、所述传感器的编号和DBUS信息。The parameter information includes the sensor type, the sensor name, an alarm threshold value of the sensor, a unit, a number of the sensor, and DBUS information.
其中,获取传感器的访问地址包括:Among them, the access address for obtaining sensors includes:
通过物理链路连接传感器并获取所述传感器的访问地址。Connect the sensor through a physical link and obtain the access address of the sensor.
其中,调取IPMI Sensor协议包括:Among them, calling the IPMI Sensor protocol includes:
利用DBUS服务接口从BMC的IPMI Stack模块调取IPMI Sensor协议。Use the DBUS service interface to retrieve the IPMI and Sensor protocols from the BMC's IPMI Stack module.
其中,还包括:Among them are:
当所述传感器被删除或者新传感器接入时,更新所述YAML文件。When the sensor is deleted or a new sensor is accessed, the YAML file is updated.
本申请还提供一种服务器中传感器的获取系统,包括:This application also provides a system for acquiring sensors in a server, including:
地址获取模块,用于获取所述传感器的访问地址;An address acquisition module, configured to acquire an access address of the sensor;
参数读取模块,用于当接收到获取请求时根据所述访问地址读取YAML文件;其中所述YAML文件包括所述传感器的参数信息;A parameter reading module, configured to read a YAML file according to the access address when an acquisition request is received; wherein the YAML file includes parameter information of the sensor;
信息获取模块,用于根据所述参数信息调用获取所述传感器的基本信息;An information acquisition module, configured to call and acquire basic information of the sensor according to the parameter information;
数据合成模块,调取IPMI Sensor协议,将所述基本信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据。The data synthesis module calls the IPMI Sensor protocol, and uses the basic information to compose sensor data in a sensor protocol format according to the IPMI Sensor protocol.
其中,所述地址获取模块具体为通过物理链路连接传感器并获取所述传感器的访问地址的地址获取模块。The address acquisition module is specifically an address acquisition module that connects a sensor through a physical link and acquires an access address of the sensor.
其中,还包括:Among them are:
更新模块,用于当所述传感器被删除或者新传感器接入时,更新所述YAML文件。An update module is configured to update the YAML file when the sensor is deleted or a new sensor is connected.
本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的获取方法的步骤。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the obtaining method as described above are implemented.
本申请还提供一种服务器,包括存储器和处理器,所述存储器中存有计算机程序,所述处理器调用所述存储器中的计算机程序时实现如上所述的获取方法的步骤。The present application also provides a server including a memory and a processor, where the computer program is stored in the memory, and the processor implements the steps of the obtaining method as described above when the computer program in the memory is called.
本申请所提供的一种服务器中传感器数据的获取方法,包括:获取所述传感器的访问地址;当接收到获取请求时根据所述访问地址读取YAML文件;其中所述YAML文件包括所述传感器的参数信息;调取IPMI Sensor协议,将所述参数信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据。A method for acquiring sensor data in a server provided in this application includes: acquiring an access address of the sensor; reading a YAML file according to the access address when an acquisition request is received; wherein the YAML file includes the sensor The parameter information is retrieved; the IPMI sensor protocol is called, and the parameter information is used to form sensor data in a sensor protocol format according to the IPMI sensor protocol.
本申请通过以YAML文件形式提供传感器的参数信息,利用参数信息获取传感器的基本信息,最后按IPMI Sensor协议组合基本信息,使得用户可以直接通过IPMI协议访问传感器时BMC可以访问传感器信息,从而在BMC上即可实现服务器中传感器数据的获取,便于进行传感器的监控、维护和调试。本申请还提供一种服务器中传感器的获取系统、一种计算机可读存储介质和一种服务器,具有上述有益效果,此处不再赘述。In this application, the parameter information of the sensor is provided in the form of a YAML file, and the basic information of the sensor is obtained by using the parameter information. Finally, the basic information is combined according to the IPMI sensor protocol, so that when the user can directly access the sensor through the IPMI protocol, the BMC can access the sensor information. The sensor data can be obtained from the server, which is convenient for monitoring, maintenance and debugging of the sensor. The present application also provides a system for acquiring sensors in a server, a computer-readable storage medium, and a server, which have the above-mentioned beneficial effects, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without paying creative labor.
图1为本申请实施例所提供的一种服务器中传感器数据的获取方法的流程图;FIG. 1 is a flowchart of a method for acquiring sensor data in a server according to an embodiment of the present application; FIG.
图2为本申请实施例所提供的一种服务器中传感器的获取系统结构示意图。FIG. 2 is a schematic structural diagram of a sensor acquisition system in a server according to an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描 述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments These are part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
请参考图1,图1为本申请实施例所提供的一种服务器中传感器数据的获取方法的流程图,该获取方法包括:Please refer to FIG. 1. FIG. 1 is a flowchart of a method for acquiring sensor data in a server according to an embodiment of the present application. The acquisition method includes:
S101:获取所述传感器的访问地址;S101: Obtain an access address of the sensor;
本步骤旨在确定传感器的访问地址。通常是由BMC通过与传感器相连的物理链路确定。这些传感器反应了CPU的温度、服务器中的电压数据、风扇数据,与服务器的正常工作息息相关,一旦发生异常,相关数据将会发生明显变化。本申请中,BMC通过硬件电路与传感器相连时即可确定传感器的访问地址。The purpose of this step is to determine the access address of the sensor. It is usually determined by the BMC through the physical link connected to the sensor. These sensors reflect the temperature of the CPU, voltage data in the server, and fan data, which are closely related to the normal operation of the server. Once an abnormality occurs, the relevant data will change significantly. In this application, when the BMC is connected to the sensor through a hardware circuit, the access address of the sensor can be determined.
S102:当接收到获取请求时根据所述访问地址读取YAML文件;S102: When receiving an acquisition request, read a YAML file according to the access address;
本步骤旨在说明需要获取传感器信息,以监控服务器的正常运行。当然,这里发送获取请求的主体并非仅仅针对人,还可以是服务器的监控设备。The purpose of this step is to explain the need to obtain sensor information to monitor the normal operation of the server. Of course, the subject that sends the acquisition request here is not only for people, but also the monitoring equipment of the server.
YAML文件包括所述传感器的参数信息,需要说明的是,本步骤默认之前存在生成YAML文件的步骤。YAML是"YAML Ain't a Markup Language"(YAML不是一种置标语言)的递归缩写,YAML的意思其实是:"Yet Another Markup Language"(仍是一种置标语言)。在此对于参数信息中具体内容不作限定,可以理解的是,其内容应该包括监控用户所需要的信息,例如可以包括传感器类型、所述传感器名称、所述传感器的报警阈值、单位、所述传感器的编号和DBUS信息等。The YAML file includes the parameter information of the sensor. It should be noted that there is a step of generating a YAML file by default in this step. YAML is a recursive abbreviation of "YAML Ain't Markup Language" (YAML is not a markup language), YAML actually means: "Yet Another Markup Language" (still a markup language). The specific content of the parameter information is not limited here. It can be understood that the content should include the information required by the monitoring user, for example, it can include the sensor type, the sensor name, the alarm threshold of the sensor, the unit, and the sensor. Number and DBUS information.
需要说明的是,因服务器中通常存在多个传感器,因此可以存在于传感器数量相同的YAML文件,即每个传感器都存在对应的YAML文件。也可以仅存在一个YAML文件,包括所有的传感器参数信息。It should be noted that because there are usually multiple sensors in the server, they can exist in YAML files with the same number of sensors, that is, each sensor has a corresponding YAML file. There can also be only one YAML file, including all sensor parameter information.
S103:根据所述参数信息调用获取所述传感器的基本信息;S103: calling and acquiring basic information of the sensor according to the parameter information;
S102中已经获取到传感器的参数信息,本步骤旨在根据参数信息获取对应的传感器基本信息,也就是传感器的实时信息。The parameter information of the sensor has been obtained in S102. This step aims to obtain the corresponding basic information of the sensor, that is, the real-time information of the sensor, according to the parameter information.
需要说明的是,在读取传感器基本信息时,通常并非由BMC直接读 取,而是利用硬件监控模块进行读取。这个硬件监控模块并非硬件模块,而是一个软件模块,其对BMC可以提供DBUS服务接口,DBUS是一种低延迟、低开销、高可用性的进程间通信机制。DBUS服务接口也并非指的是硬件接口,而是函数接口。当接收到获取请求时,即可实现由硬件监控模块读取传感器。It should be noted that when reading the basic information of the sensor, it is usually not directly read by the BMC, but by a hardware monitoring module. This hardware monitoring module is not a hardware module, but a software module. It can provide a DBUS service interface to the BMC. DBUS is a low-latency, low-overhead, high-availability inter-process communication mechanism. The DBUS service interface does not mean a hardware interface, but a function interface. When the acquisition request is received, the sensor can be read by the hardware monitoring module.
S104:调取IPMI Sensor协议,将所述基本信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据。S104: Retrieve the IPMI Sensor protocol, and compose the basic information according to the IPMI Sensor protocol to form sensor data in a sensor protocol format.
本步骤的重点是将参数信息按IPMI Sensor协议组合符成合传感器协议格式的传感器数据。具体的,需要先调取IPMI Sensor协议,通常可以利用DBUS服务接口从BMC的IPMI Stack模块调取IPMI Sensor协议。The focus of this step is to convert the parameter information into sensor data in the sensor protocol format according to the IPMI and Sensor protocol combinations. Specifically, the IPMI sensor protocol needs to be called first, and the DMI service interface can usually be used to call the IPMI sensor protocol from the BMC's IPMI stack module.
当调取得到IPMI Sensor协议后,即可将传感器的基本信息按IPMI Sensor协议组合,得到传感器协议格式的传感器数据。此时用户即可利用IPMI得到服务器中传感器的数据。After obtaining the IPMI Sensor protocol, the basic information of the sensor can be combined according to the IPMI Sensor protocol to obtain the sensor data in the sensor protocol format. At this point, the user can use IPMI to get the data of the sensor in the server.
本申请通过以YAML文件形式提供传感器的参数信息,利用参数信息获取传感器的基本信息,最后按IPMI Sensor协议组合基本信息,使得用户可以直接通过IPMI协议访问传感器时BMC可以访问传感器信息,从而在BMC上即可实现服务器中传感器数据的获取,便于进行传感器的监控、维护和调试。In this application, the parameter information of the sensor is provided in the form of a YAML file, and the basic information of the sensor is obtained by using the parameter information. Finally, the basic information is combined according to the IPMI sensor protocol, so that when the user can directly access the sensor through the IPMI protocol, the BMC can access the sensor information. The sensor data can be obtained from the server, which is convenient for monitoring, maintenance and debugging of the sensor.
以下以温度传感器为例,左侧为传感器的参数信息,右侧为传感器的基本信息,而用户最终即可得到如下所示的数据。The following takes temperature sensor as an example. The left side is the parameter information of the sensor, and the right side is the basic information of the sensor. The user can finally get the data shown below.
Figure PCTCN2019077428-appb-000001
Figure PCTCN2019077428-appb-000001
Figure PCTCN2019077428-appb-000002
Figure PCTCN2019077428-appb-000002
基于上述实施例,作为优选的实施例,该获取方法还可以包括:Based on the foregoing embodiment, as a preferred embodiment, the acquiring method may further include:
当所述传感器被删除或者新传感器接入时,更新所述YAML文件。When the sensor is deleted or a new sensor is accessed, the YAML file is updated.
本实施例旨在说明一旦存在传感器从服务器被删除或服务器接入新的传感器时,更新YAML文件。同时,对应的上一实施例S102中则相应的需要再次读取YAML(只要之前存在获取请求即可,无论此时有没有获取请求),并重复S103和S104,最终将更新后的传感器数据发送至获取请求的主体。本实施例表明可以动态读取YAML文件,并动态更新传感器数据。避免了每次添加和删除传感器时的代码生成、编写、编译以及重启IPMI服务等复杂的过程,简单高效且不易出错,极大提高了IPMI传感器的开发调试效率。This embodiment is intended to illustrate updating a YAML file once a sensor is deleted from the server or a new sensor is accessed by the server. At the same time, in the corresponding previous embodiment S102, it is necessary to read YAML again (as long as there is an acquisition request before, regardless of whether there is an acquisition request at this time), and repeat S103 and S104, and finally send the updated sensor data To get the body of the request. This embodiment shows that the YAML file can be read dynamically and the sensor data can be dynamically updated. It avoids complex processes such as code generation, writing, compiling, and restarting the IPMI service each time a sensor is added and deleted, it is simple, efficient, and error-free, which greatly improves the development and debugging efficiency of IPMI sensors.
下面对本申请实施例提供的一种服务器中传感器的获取系统进行介绍,下文描述的获取系统与上文描述的获取方法可相互对应参照。The following describes an acquisition system for sensors in a server provided in an embodiment of the present application. The acquisition system described below and the acquisition method described above may refer to each other.
参见图2,图2为本申请实施例所提供的一种服务器中传感器的获取系统结构示意图,该获取系统包括:Referring to FIG. 2, FIG. 2 is a schematic structural diagram of a sensor acquisition system in a server according to an embodiment of the present application. The acquisition system includes:
地址获取模块100,用于获取所述传感器的访问地址;An address acquisition module 100, configured to acquire an access address of the sensor;
参数读取模块200,用于当接收到获取请求时根据所述访问地址读取 YAML文件;其中所述YAML文件包括所述传感器的参数信息;A parameter reading module 200, configured to read a YAML file according to the access address when an acquisition request is received; wherein the YAML file includes parameter information of the sensor;
信息获取模块300,用于根据所述参数信息调用获取所述传感器的基本信息;An information acquisition module 300, configured to call and acquire basic information of the sensor according to the parameter information;
数据合成模块400,调取IPMI Sensor协议,将所述基本信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据,以便根据所述传感器数据对所述传感器进行监控。The data synthesis module 400 calls the IPMI Sensor protocol, and uses the basic information to compose sensor data in a sensor protocol format according to the IPMI Sensor protocol, so as to monitor the sensor according to the sensor data.
基于上述实施例,作为优选的实施例,所述地址获取模块100具体为通过物理链路连接传感器并获取所述传感器的访问地址的地址获取模块100。Based on the foregoing embodiment, as a preferred embodiment, the address obtaining module 100 is specifically an address obtaining module 100 that connects a sensor through a physical link and obtains an access address of the sensor.
基于上述实施例,作为优选的实施例,所述数据合成模块400可以包括:Based on the above embodiment, as a preferred embodiment, the data synthesis module 400 may include:
调取单元,用于利用DBUS服务接口从BMC的IPMI Stack模块调取IPMI Sensor协议。A calling unit is used to call the IPMI Sensor protocol from the BMC's IPMI Stack module by using the DBUS service interface.
基于上述实施例,作为优选的实施例,该获取系统还可以包括:Based on the above embodiment, as a preferred embodiment, the acquisition system may further include:
更新模块,用于当所述传感器被删除或者新传感器接入时,更新所述YAML文件。An update module is configured to update the YAML file when the sensor is deleted or a new sensor is connected.
本申请还提供了一种计算机可读存储介质,其上存有计算机程序,该计算机程序被执行时可以实现上述实施例所提供的步骤。该存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the steps provided in the foregoing embodiments can be implemented. The storage medium may include various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disc.
本申请还提供了一种服务器,可以包括存储器和处理器,所述存储器中存有计算机程序,所述处理器调用所述存储器中的计算机程序时,可以实现上述实施例所提供的步骤。当然所述服务器还可以包括各种网络接口,电源等组件。This application further provides a server, which may include a memory and a processor. The memory stores a computer program. When the processor calls the computer program in the memory, the steps provided in the foregoing embodiments may be implemented. Of course, the server may also include various network interfaces, power supplies, and other components.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。 对于实施例提供的系统而言,由于其与实施例提供的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in the description is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts between the embodiments, refer to each other. For the system provided by the embodiment, since it corresponds to the method provided by the embodiment, the description is relatively simple, and the relevant part may refer to the description of the method section.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。Specific examples are used herein to explain the principle and implementation of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. It should be noted that for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and modifications can be made to the application, and these improvements and modifications also fall within the protection scope of the claims of the application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this description, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is any such actual relationship or order between operations. Moreover, the terms "including", "comprising", or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also those that are not explicitly listed Or other elements inherent to such a process, method, article, or device. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, article, or equipment including the elements.

Claims (10)

  1. 一种服务器中传感器数据的获取方法,其特征在于,包括:A method for acquiring sensor data in a server, which includes:
    获取所述传感器的访问地址;Obtaining an access address of the sensor;
    当接收到获取请求时根据所述访问地址读取YAML文件;其中所述YAML文件包括所述传感器的参数信息;Read a YAML file according to the access address when an acquisition request is received; wherein the YAML file includes parameter information of the sensor;
    根据所述参数信息调用获取所述传感器的基本信息;Calling and acquiring basic information of the sensor according to the parameter information;
    调取IPMI Sensor协议,将所述基本信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据。The IPMI sensor protocol is called, and the basic information is used to form sensor data in a sensor protocol format according to the IPMI sensor protocol.
  2. 根据权利要求1所述的获取方法,其特征在于,所述参数信息包括所述传感器类型、所述传感器名称、所述传感器的报警阈值、单位、所述传感器的编号和DBUS信息。The acquiring method according to claim 1, wherein the parameter information includes the sensor type, the sensor name, an alarm threshold value of the sensor, a unit, a number of the sensor, and DBUS information.
  3. 根据权利要求1所述的获取方法,其特征在于,获取所述传感器的访问地址包括:The acquiring method according to claim 1, wherein acquiring the access address of the sensor comprises:
    通过物理链路连接所述传感器并获取所述传感器的访问地址。The sensor is connected through a physical link and an access address of the sensor is obtained.
  4. 根据权利要求1所述的获取方法,其特征在于,调取IPMI Sensor协议包括:The acquisition method according to claim 1, wherein the calling the IPMI Sensor protocol comprises:
    利用DBUS服务接口从BMC的IPMI Stack模块调取IPMI Sensor协议。Use the DBUS service interface to retrieve the IPMI and Sensor protocols from the BMC's IPMI Stack module.
  5. 根据权利要求1-4任一项所述的获取方法,其特征在于,还包括:The obtaining method according to any one of claims 1-4, further comprising:
    当所述传感器被删除或者新传感器接入时,更新所述YAML文件。When the sensor is deleted or a new sensor is accessed, the YAML file is updated.
  6. 一种服务器中传感器数据的获取系统,其特征在于,包括:A system for acquiring sensor data in a server is characterized in that it includes:
    地址获取模块,用于获取所述传感器的访问地址;An address acquisition module, configured to acquire an access address of the sensor;
    参数读取模块,用于当接收到获取请求时根据所述访问地址读取YAML文件;其中所述YAML文件包括所述传感器的参数信息;A parameter reading module, configured to read a YAML file according to the access address when an acquisition request is received; wherein the YAML file includes parameter information of the sensor;
    信息获取模块,用于根据所述参数信息调用获取所述传感器的基本信息;An information acquisition module, configured to call and acquire basic information of the sensor according to the parameter information;
    数据合成模块,调取IPMI Sensor协议,将所述基本信息按所述IPMI Sensor协议组成传感器协议格式的传感器数据。The data synthesis module calls the IPMI Sensor protocol, and uses the basic information to compose sensor data in a sensor protocol format according to the IPMI Sensor protocol.
  7. 根据权利要求6所述的获取系统,其特征在于,所述地址获取模块具体为通过物理链路连接传感器并获取所述传感器的访问地址的地址获取 模块。The acquisition system according to claim 6, wherein the address acquisition module is an address acquisition module that connects a sensor through a physical link and acquires an access address of the sensor.
  8. 根据权利要求6或7所述的获取系统,其特征在于,还包括:The acquisition system according to claim 6 or 7, further comprising:
    更新模块,用于当所述传感器被删除或者新传感器接入时,更新所述YAML文件。An update module is configured to update the YAML file when the sensor is deleted or a new sensor is connected.
  9. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-5任一项所述的获取方法的步骤。A computer-readable storage medium having stored thereon a computer program, characterized in that when the computer program is executed by a processor, the steps of the obtaining method according to any one of claims 1-5 are implemented.
  10. 一种服务器,其特征在于,包括存储器和处理器,所述存储器中存有计算机程序,所述处理器调用所述存储器中的计算机程序时实现如权利要求1-5任一项所述的获取方法的步骤。A server, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the obtaining according to any one of claims 1-5 is implemented Method steps.
PCT/CN2019/077428 2018-07-27 2019-03-08 Method for acquiring sensor data in server, acquisition system, and related apparatus WO2020019724A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810844871.X 2018-07-27
CN201810844871.XA CN109005226A (en) 2018-07-27 2018-07-27 The acquisition methods of sensing data, acquisition system and relevant apparatus in server

Publications (1)

Publication Number Publication Date
WO2020019724A1 true WO2020019724A1 (en) 2020-01-30

Family

ID=64598257

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077428 WO2020019724A1 (en) 2018-07-27 2019-03-08 Method for acquiring sensor data in server, acquisition system, and related apparatus

Country Status (2)

Country Link
CN (1) CN109005226A (en)
WO (1) WO2020019724A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111431744A (en) * 2020-03-18 2020-07-17 深圳成谷智能科技有限公司 Method, device and system for remotely realizing operation and maintenance of roadside sensor
US20210334086A1 (en) * 2020-04-27 2021-10-28 Mitac Computing Technology Corporation Method of adding a sensor monitoring feature of a newly-added sensor to a system monitoring feature provided by a baseboard management controller
CN113703552A (en) * 2021-07-30 2021-11-26 浪潮电子信息产业股份有限公司 Server heat dissipation regulation and control method, equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005226A (en) * 2018-07-27 2018-12-14 郑州云海信息技术有限公司 The acquisition methods of sensing data, acquisition system and relevant apparatus in server
CN110008088A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 A kind of transmission system of sensor information, method, equipment and storage medium
CN111538629A (en) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 Round-robin method and system of server sensor and related device
CN111966617B (en) * 2020-07-19 2023-01-06 苏州浪潮智能科技有限公司 Sensing information communication method, central processing unit and substrate management controller

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719089A (en) * 2009-10-30 2010-06-02 曙光信息产业(北京)有限公司 Remote management method and system of distributed type assembly
CN102323905A (en) * 2011-07-21 2012-01-18 曙光信息产业股份有限公司 Remote monitoring system for Godson main board
EP2472402A1 (en) * 2010-12-29 2012-07-04 Acer Incorporated Remote management systems and methods for mapping operating system and management controller located in a server
CN103236949A (en) * 2013-04-27 2013-08-07 北京搜狐新媒体信息技术有限公司 Monitoring method, device and system for server cluster
CN103542879A (en) * 2012-07-10 2014-01-29 慈溪市水产技术推广中心 Real-time environmental data acquisition device
CN107168853A (en) * 2017-05-19 2017-09-15 郑州云海信息技术有限公司 A kind of server performance information acquisition method, system and substrate control manager
CN107741860A (en) * 2017-09-29 2018-02-27 郑州云海信息技术有限公司 Hardware management system, method, apparatus and storage medium based on IPMI
CN109005226A (en) * 2018-07-27 2018-12-14 郑州云海信息技术有限公司 The acquisition methods of sensing data, acquisition system and relevant apparatus in server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104543B (en) * 2014-07-17 2017-05-10 浪潮集团有限公司 Server managing system and method based on SNMP and IPMI protocol
US9916270B2 (en) * 2015-03-27 2018-03-13 Intel Corporation Virtual intelligent platform management interface (IPMI) satellite controller and method
CN106776340A (en) * 2016-12-30 2017-05-31 广东浪潮大数据研究有限公司 A kind of general server S ensor automatic test approach

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719089A (en) * 2009-10-30 2010-06-02 曙光信息产业(北京)有限公司 Remote management method and system of distributed type assembly
EP2472402A1 (en) * 2010-12-29 2012-07-04 Acer Incorporated Remote management systems and methods for mapping operating system and management controller located in a server
CN102323905A (en) * 2011-07-21 2012-01-18 曙光信息产业股份有限公司 Remote monitoring system for Godson main board
CN103542879A (en) * 2012-07-10 2014-01-29 慈溪市水产技术推广中心 Real-time environmental data acquisition device
CN103236949A (en) * 2013-04-27 2013-08-07 北京搜狐新媒体信息技术有限公司 Monitoring method, device and system for server cluster
CN107168853A (en) * 2017-05-19 2017-09-15 郑州云海信息技术有限公司 A kind of server performance information acquisition method, system and substrate control manager
CN107741860A (en) * 2017-09-29 2018-02-27 郑州云海信息技术有限公司 Hardware management system, method, apparatus and storage medium based on IPMI
CN109005226A (en) * 2018-07-27 2018-12-14 郑州云海信息技术有限公司 The acquisition methods of sensing data, acquisition system and relevant apparatus in server

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111431744A (en) * 2020-03-18 2020-07-17 深圳成谷智能科技有限公司 Method, device and system for remotely realizing operation and maintenance of roadside sensor
US20210334086A1 (en) * 2020-04-27 2021-10-28 Mitac Computing Technology Corporation Method of adding a sensor monitoring feature of a newly-added sensor to a system monitoring feature provided by a baseboard management controller
US11714630B2 (en) * 2020-04-27 2023-08-01 Mitac Computing Technology Corporation Method of adding a sensor monitoring feature of a newly-added sensor to a system monitoring feature provided by a baseboard management controller
CN113703552A (en) * 2021-07-30 2021-11-26 浪潮电子信息产业股份有限公司 Server heat dissipation regulation and control method, equipment and storage medium
CN113703552B (en) * 2021-07-30 2024-02-09 浪潮电子信息产业股份有限公司 Method, device and storage medium for regulating and controlling heat dissipation of server

Also Published As

Publication number Publication date
CN109005226A (en) 2018-12-14

Similar Documents

Publication Publication Date Title
WO2020019724A1 (en) Method for acquiring sensor data in server, acquisition system, and related apparatus
CN109617646B (en) Message conversion method and device, computer equipment and computer readable storage medium
WO2022063284A1 (en) Data synchronization method and apparatus, device, and computer-readable medium
CN109617647B (en) Message conversion method and device, computer equipment and computer readable storage medium
EP2947582A1 (en) Computing device and method for executing database operation command
JP5652480B2 (en) Database update notification method
WO2019223136A1 (en) Data acquisition method and apparatus, and computer device and storage medium
WO2020056850A1 (en) Data request method based on http protocol, and server
CN111818117A (en) Data updating method and device, storage medium and electronic equipment
CN104298675A (en) Method and device for cache management
KR102481162B1 (en) Subscription data push method and device in the Internet of Things, the device and storage medium
US20200045139A1 (en) Remote procedure call using quorum state store
CN111367761B (en) Information management method, system and related components of universal server
WO2021232651A1 (en) Method and apparatus for upgrading multi-level management system, and device and medium
KR102567900B1 (en) Method and Apparatus for Ensuring Continuous Device Operational Stability in Cloud Degraded Mode
WO2019109922A1 (en) Resource processing method and system, storage medium and electronic device
CN110930253A (en) Intelligent contract internal main key generation method and device, computer equipment and storage medium
CN107632893A (en) Message queue processing method and processing device
CN113986835A (en) Management method, device, equipment and storage medium for FastDFS distributed files
CN113792008A (en) Method and device for acquiring network topology structure, electronic equipment and storage medium
US11663058B1 (en) Preemptive filtering of events of an event bus with a deterministic filter
CN112036828B (en) Bare metal management method, device, equipment and medium
AU2018390863A1 (en) Computer system and method for extracting dynamic content from websites
US20240089339A1 (en) Caching across multiple cloud environments
WO2024055741A1 (en) Method and apparatus for establishing network connection, electronic device and storage medium

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: 19841293

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: 19841293

Country of ref document: EP

Kind code of ref document: A1