CN107196827A - A kind of method and device of monitoring device node - Google Patents
A kind of method and device of monitoring device node Download PDFInfo
- Publication number
- CN107196827A CN107196827A CN201710632464.8A CN201710632464A CN107196827A CN 107196827 A CN107196827 A CN 107196827A CN 201710632464 A CN201710632464 A CN 201710632464A CN 107196827 A CN107196827 A CN 107196827A
- Authority
- CN
- China
- Prior art keywords
- module
- device node
- instruction
- node information
- nodes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000012806 monitoring device Methods 0.000 title claims abstract description 17
- 238000012544 monitoring process Methods 0.000 claims abstract description 33
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0213—Standardised network management protocols, e.g. simple network management protocol [SNMP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种监控设备节点的方法及装置。所述方法包括:接收指令,所述指令为获取模块的设备节点信息的指令;获取所述模块的设备节点数量和设备节点信息;根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;根据所述指令反馈所述表格中模块的设备节点信息。如此便有效实现了动态监控集群型服务器中的多维设备节点,对于多维设备节点的从属关系也能清楚知晓,使得服务器的监控管理更加灵活,节约了成本。相应地,本发明提供的一种监控设备节点的装置,也同样具有上述技术效果。
The invention discloses a method and a device for monitoring equipment nodes. The method includes: receiving an instruction, the instruction is an instruction for acquiring device node information of a module; acquiring the number of device nodes and device node information of the module; according to the number of device nodes and the relationship between the module and different device node information The multi-dimensional affiliation relationship among them, correspondingly write the device node information into the pre-registered table; feed back the device node information of the modules in the table according to the instruction. In this way, the dynamic monitoring of the multi-dimensional device nodes in the cluster server is effectively realized, and the affiliation relationship of the multi-dimensional device nodes can also be clearly known, which makes the monitoring and management of the server more flexible and saves costs. Correspondingly, an apparatus for monitoring device nodes provided by the present invention also has the above-mentioned technical effects.
Description
技术领域technical field
本发明涉及服务器技术领域,更具体地说,涉及一种监控设备节点的方法及装置。The present invention relates to the technical field of servers, and more specifically, to a method and device for monitoring device nodes.
背景技术Background technique
随着移动互联网和计算机技术的迅速发展崛起,集群型服务器承担了更多的业务,也拥有更为强大的存储和计算能力。随着行业的不断发展,集群型服务器中服务器和硬件设备的数量多而繁杂,给集群型服务器的管理带来了难度。With the rapid development and rise of mobile Internet and computer technology, cluster servers undertake more business and have more powerful storage and computing capabilities. With the continuous development of the industry, the number of servers and hardware devices in the cluster server is large and complicated, which brings difficulties to the management of the cluster server.
目前,在服务器应用中,集群型服务器发展为主流。用户在使用集群服务器时,可以将整个集群的服务器虚拟为一台服务器使用。而对于集群型服务器的监控管理,大都采用SNMP服务,需要提前配置好需要被监控的设备节点,所以忽略了具体硬件设备的监控管理。同时,因为集群型服务器硬件设备众多,对于其中的模块数量和设备节点的监控也不清楚。并且各个服务器的下层硬件设备和模块的从属关系层层包裹,形成了多维设备节点,导致更深层的设备节点的从属关系难以体现。Currently, in server applications, cluster servers have become the mainstream. When using a cluster server, the user can virtualize the servers of the entire cluster as a single server. For the monitoring and management of cluster servers, SNMP services are mostly used, and the device nodes to be monitored need to be configured in advance, so the monitoring and management of specific hardware devices is ignored. At the same time, because there are many cluster server hardware devices, the monitoring of the number of modules and device nodes is not clear. Moreover, the affiliation relationship of the lower-level hardware devices and modules of each server is wrapped layer by layer, forming a multi-dimensional device node, which makes it difficult to reflect the affiliation relationship of deeper device nodes.
因此,如何动态监控管理集群型服务器中的多维设备节点,是本领域技术人员需要解决的问题。Therefore, how to dynamically monitor and manage the multi-dimensional device nodes in the cluster server is a problem to be solved by those skilled in the art.
发明内容Contents of the invention
本发明的目的在于提供一种监控设备节点的方法及装置,以实现动态监控集群服务器集群中的多维设备节点。The object of the present invention is to provide a method and device for monitoring equipment nodes, so as to realize dynamic monitoring of multi-dimensional equipment nodes in cluster server clusters.
为实现上述目的,本发明实施例提供了如下技术方案:In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
一种监控设备节点的方法,包括:A method for monitoring a device node, comprising:
接收指令,所述指令为获取模块的设备节点信息的指令;receiving an instruction, where the instruction is an instruction for obtaining device node information of the module;
获取所述模块的设备节点数量和设备节点信息;Obtain the number of device nodes and device node information of the module;
根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;According to the number of device nodes and the multi-dimensional affiliation between the module and different device node information, correspondingly write the device node information into a pre-registered table;
根据所述指令反馈所述表格中模块的设备节点信息。The device node information of the modules in the table is fed back according to the instruction.
其中,所述获取所述模块的设备节点数量和设备节点信息,包括:Wherein, the acquisition of the number of device nodes and device node information of the module includes:
遍历所述模块的设备节点,获取所述模块的设备节点数量,以及获取所述模块的设备节点信息。The device nodes of the modules are traversed to obtain the number of device nodes of the modules and the information of the device nodes of the modules.
其中,所述接收指令之前,还包括:Wherein, before receiving the instruction, it also includes:
在服务器的操作系统上部署SNMP服务;Deploy SNMP service on the server's operating system;
通过SNMP服务将需要监控的模块注册为具有多维从属关系的表格。Register the modules that need to be monitored as a table with multi-dimensional affiliation through the SNMP service.
其中,所述根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格,包括:Wherein, according to the number of the device nodes and the multi-dimensional affiliation relationship between the module and different device node information, correspondingly writing the device node information into a pre-registered table includes:
根据所述设备节点数量以及不同设备节点信息,确定不同设备节点的多维索引值;determining multidimensional index values of different device nodes according to the number of device nodes and information of different device nodes;
根据每个设备节点的多维索引值,将每个设备节点信息写入具有多维从属关系的表格。According to the multi-dimensional index value of each device node, the information of each device node is written into a table with multi-dimensional affiliation.
其中,所述根据所述指令反馈所述表格中模块的设备节点信息包括:Wherein, the feeding back the device node information of the modules in the table according to the instruction includes:
若所述指令为获取整个模块的设备节点信息的指令,则根据所述指令反馈所述表格中整个模块的设备节点信息;If the instruction is an instruction to obtain the device node information of the entire module, then feed back the device node information of the entire module in the table according to the instruction;
若所述指令为单独获取模块中目标设备节点信息的指令,则根据所述指令反馈所述表格中所述目标设备节点信息。If the instruction is an instruction to separately acquire the target device node information in the module, the target device node information in the table is fed back according to the instruction.
一种监控设备节点的装置,包括:A device for monitoring device nodes, comprising:
接收模块,用于接收指令,所述指令为获取模块的设备节点信息的指令;A receiving module, configured to receive an instruction, the instruction is an instruction for obtaining device node information of the module;
获取模块,用于获取所述模块的设备节点数量和设备节点信息;An acquisition module, configured to acquire the number of device nodes and device node information of the module;
写入模块,用于根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;A writing module, configured to correspondingly write the device node information into a pre-registered table according to the number of the device nodes and the multidimensional affiliation between the module and different device node information;
反馈模块,用于根据所述指令反馈所述表格中模块的设备节点信息。A feedback module, configured to feed back the device node information of the modules in the table according to the instruction.
其中,所述获取模块包括:Wherein, the acquisition module includes:
遍历单元,用于遍历所述模块的设备节点;A traversal unit for traversing the device nodes of the module;
数量获取单元,用于获取所述模块的设备节点数量;A quantity acquisition unit, configured to acquire the number of device nodes of the module;
信息获取单元,用于获取所述模块的设备节点信息。An information obtaining unit, configured to obtain device node information of the module.
其中,还包括:Among them, also include:
部署模块,用于在服务器的操作系统上部署SNMP服务;Deployment module, for deploying SNMP service on the operating system of server;
注册模块,用于通过SNMP服务将需要监控的模块注册为具有多维从属关系的表格。The registration module is used to register the modules to be monitored as a table with multi-dimensional affiliation through the SNMP service.
其中,所述写入模块包括:Wherein, the writing module includes:
多维索引值确定单元,用于根据所述设备节点数量以及不同设备节点信息,确定不同设备节点的多维索引值;A multidimensional index value determination unit, configured to determine multidimensional index values of different device nodes according to the number of device nodes and information of different device nodes;
写入单元,用于根据每个设备节点的多维索引值,将每个设备节点信息写入具有多维从属关系的表格。The writing unit is configured to write the information of each device node into a table with multi-dimensional affiliation according to the multi-dimensional index value of each device node.
其中,所述反馈模块包括:Wherein, the feedback module includes:
第一反馈单元,用于当接收到获取整个模块的设备节点信息的指令时,根据所述指令反馈所述表格中整个模块的设备节点信息;The first feedback unit is configured to feed back the device node information of the entire module in the table according to the instruction when receiving an instruction to obtain the device node information of the entire module;
第二反馈单元,用于当接收到单独获取模块中目标设备节点信息的指令时,根据所述指令反馈所述表格中所述目标设备节点信息。The second feedback unit is configured to feed back the target device node information in the table according to the instruction when receiving the instruction for separately acquiring the target device node information in the module.
通过以上方案可知,本发明实施例提供了一种监控设备节点的方法,所述方法包括:接收指令,所述指令为获取模块的设备节点信息的指令;获取所述模块的设备节点数量和设备节点信息;根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;根据所述指令反馈所述表格中模块的设备节点信息。当服务器接收到来自客户端的获取指令后,获取模块的设备节点数量和设备节点信息,并根据设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系将设备节点信息写入预先注册的表格中,而后将这些设备节点信息根据所获取指令反馈给客户端,这样就完成了客户端与服务器的交互,客户端能够及时知晓服务器中的设备节点信息。It can be seen from the above solutions that the embodiment of the present invention provides a method for monitoring device nodes, the method includes: receiving an instruction, the instruction is an instruction to obtain the device node information of the module; obtaining the number of device nodes and the device node information of the module Node information; according to the number of device nodes and the multi-dimensional affiliation between the modules and different device node information, correspondingly write the device node information into a pre-registered table; feed back the information of the modules in the table according to the instructions Device node information. When the server receives the acquisition instruction from the client, it acquires the number of device nodes and device node information of the module, and writes the device node information into the pre-registration according to the number of device nodes and the multidimensional affiliation between the module and different device node information table, and then feed back the device node information to the client according to the obtained instructions, thus completing the interaction between the client and the server, and the client can know the device node information in the server in time.
可见,当客户端想要获取某个设备节点信息时,无需预先配置被监控的设备节点,只需发送获取请求给服务器,服务器根据获取请求动态获取设备节点信息并写入具有多维从属关系的表格,进而发送给客户端。如此便有效实现了动态监控集群型服务器中的多维设备节点,对于多维设备节点的从属关系也能清楚知晓,使得服务器的监控管理更加灵活,节约了成本。It can be seen that when the client wants to obtain the information of a certain device node, there is no need to pre-configure the monitored device node, just send the request to the server, and the server dynamically obtains the device node information according to the request and writes it into a table with multi-dimensional affiliation , and then sent to the client. In this way, the dynamic monitoring of the multi-dimensional device nodes in the cluster server is effectively realized, and the affiliation relationship of the multi-dimensional device nodes can also be clearly known, which makes the monitoring and management of the server more flexible and saves costs.
相应地,本发明实施例提供的一种监控设备节点的装置,也同样具有上述技术效果。Correspondingly, an apparatus for monitoring a device node provided by an embodiment of the present invention also has the above-mentioned technical effect.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例公开的一种监控设备节点的方法流程图;FIG. 1 is a flowchart of a method for monitoring a device node disclosed in an embodiment of the present invention;
图2为本发明实施例公开的另一种监控设备节点的方法流程图;FIG. 2 is a flow chart of another method for monitoring device nodes disclosed in an embodiment of the present invention;
图3为本发明实施例公开的一种监控设备节点的装置示意图;FIG. 3 is a schematic diagram of an apparatus for monitoring a device node disclosed in an embodiment of the present invention;
图4为本发明实施例公开的另一种监控设备节点的装置示意图。FIG. 4 is a schematic diagram of another device node monitoring device disclosed in an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明实施例公开了一种监控设备节点的方法及装置,以实现动态监控集群服务器集群中的多维设备节点。The embodiment of the invention discloses a method and device for monitoring equipment nodes, so as to realize dynamic monitoring of multi-dimensional equipment nodes in cluster server clusters.
参见图1,本发明实施例提供的一种监控设备节点的方法,包括:Referring to FIG. 1, a method for monitoring a device node provided by an embodiment of the present invention includes:
S101、接收指令;S101. Receive an instruction;
具体的,本实施例中服务器接收的指令是客户端发送给服务器的指令,指令内容为请求获取服务器中模块的设备节点信息,所以在服务器接收该指令之前,客户端首先发送该指令。在本实施例中,服务器接收的指令为获取整个模块的设备节点信息的指令。Specifically, the instruction received by the server in this embodiment is an instruction sent by the client to the server, and the instruction content is to request to obtain the device node information of the module in the server, so before the server receives the instruction, the client first sends the instruction. In this embodiment, the instruction received by the server is an instruction to acquire device node information of the entire module.
S102、获取所述模块的设备节点数量和设备节点信息;S102. Obtain the number of device nodes and device node information of the module;
具体的,在本实施例中是通过程序代码动态获取模块的设备节点数量和设备节点信息,首先获取模块的节点数量,再获取每个设备节点信息。服务器在收到来自客户端的获取请求之后,需要遍历要监控的模块的设备节点,获取该模块的设备节点数量和设备节点信息。Specifically, in this embodiment, the number of device nodes and device node information of the module is dynamically obtained through program codes, firstly the number of nodes of the module is obtained, and then the information of each device node is obtained. After receiving the obtaining request from the client, the server needs to traverse the device nodes of the module to be monitored to obtain the number of device nodes and device node information of the module.
S103、根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;S103. Correspondingly write the device node information into a pre-registered table according to the number of device nodes and the multi-dimensional affiliation between the module and different device node information;
具体的,在本实施例中,当服务器获得模块的设备节点数量和设备节点信息后,需要根据模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格。在本实施例中,预先将需要监控的模块注册成表格,表格的表头以模块或者子模块的名字来命名,具体数据待接收到获取指令后,服务器会通过代码动态写入。所以预先注册而成的表格只是含有表头的一个空表格,而表头体现了服务器中的硬件设备的从属关系。Specifically, in this embodiment, after the server obtains the number of device nodes and device node information of the module, it needs to write the device node information into the pre-registered sheet. In this embodiment, the modules to be monitored are pre-registered as a table, and the header of the table is named after the name of the module or sub-module, and the specific data will be dynamically written by the server through the code after receiving the acquisition instruction. Therefore, the pre-registered table is just an empty table containing a table header, and the table header reflects the affiliation of the hardware devices in the server.
所述多维从属关系即服务器与模块,模块与设备节点之间的从属关系。例如:服务器下层有多个模块,每个模块下层有多个设备节点,那么服务器与模块的从属关系即为二维从属关系,服务器与设备节点的从属关系即为三维从属关系。如果服务器上层有路由器,那么路由器与设备节点即为四维从属关系,当然,设备节点下层可能还有众多端口,这些端口与路由器即为五维从属关系,与服务器即为四维从属关系以此类推,端口与上述各个硬件设备的从属关系在此不再赘述。The multi-dimensional affiliation relationship is the affiliation relationship between the server and the module, and between the module and the device node. For example, if there are multiple modules in the lower layer of the server, and there are multiple device nodes in the lower layer of each module, then the affiliation relationship between the server and the module is a two-dimensional affiliation, and the affiliation between the server and device nodes is a three-dimensional affiliation. If there is a router on the upper layer of the server, then the router and the device node are in a four-dimensional affiliation relationship. Of course, there may be many ports in the lower layer of the device node. These ports have a five-dimensional affiliation relationship with the router, and a four-dimensional affiliation relationship with the server, and so on. The affiliation relationship between the port and the above hardware devices will not be repeated here.
需要说明的是,本实施例中每个设备节点信息的数据都是通过代码动态实现的,服务器在接到每一次获取请求后,都会重新获取设备节点数量和设备节点信息并写入预先注册的表格,并创建完整的表格。这样当服务器的下层设备被修整或更换后,服务器会及时更新表格中的数据行,以达到动态监控集群型服务器中多维设备节点的目的。It should be noted that the data of each device node information in this embodiment is dynamically realized through code, and the server will reacquire the number of device nodes and device node information and write them into the pre-registered form, and create a complete form. In this way, when the lower-level equipment of the server is repaired or replaced, the server will update the data rows in the table in time, so as to achieve the purpose of dynamically monitoring the multi-dimensional device nodes in the cluster server.
S104、根据所述指令反馈所述表格中模块的设备节点信息。S104. Feed back the device node information of the modules in the table according to the instruction.
具体的,在本实施例中,当服务器接收到获取整个模块设备节点信息的指令时,便根据该指令反馈给客户端整个模块的设备节点信息。Specifically, in this embodiment, when the server receives an instruction to obtain the device node information of the entire module, it feeds back the device node information of the entire module to the client according to the instruction.
可见,本实施例提供了一种监控设备节点的方法,所述方法通过代码动态获取设备节点数量和设备节点信息,实现了集群型服务器中设备节点的动态监控;同时,将设备节点信息写入具有多维从属关系的表格,更清楚地体现了设备节点与上层硬件设备之间的从属关系,方便了客户端用户的查看。如此便有效实现了动态监控集群型服务器中的多维设备节点,对于多维设备节点的从属关系也能清楚知晓,使得服务器的监控管理更加灵活,节约了成本。It can be seen that this embodiment provides a method for monitoring device nodes. The method dynamically obtains the number of device nodes and device node information through codes, and realizes dynamic monitoring of device nodes in a cluster server; at the same time, writes the device node information into The table with multi-dimensional affiliation relationship more clearly reflects the affiliation relationship between the device node and the upper-layer hardware device, which is convenient for the client user to view. In this way, the dynamic monitoring of the multi-dimensional device nodes in the cluster server is effectively realized, and the affiliation relationship of the multi-dimensional device nodes can also be clearly known, which makes the monitoring and management of the server more flexible and saves costs.
参见图2,本发明实施例提供的另一种监控设备节点的方法,包括:Referring to FIG. 2, another method for monitoring a device node provided by an embodiment of the present invention includes:
S201、在服务器的操作系统上部署SNMP服务;S201. Deploy the SNMP service on the operating system of the server;
S202、通过SNMP服务将需要监控的模块注册为具有多维从属关系的表格。S202. Register the modules to be monitored as a table with multi-dimensional affiliation through the SNMP service.
具体的,在集群型服务器中,大都在服务器的操作系统上部署SNMP服务,以便更好的管理服务器。在本实施例中,通过SNMP服务中的SNMP表将需要监控的模块注册成表格,表格的表头以模块或者子模块的名字来命名,具体数据待接收到获取指令后,服务器会通过代码动态写入。所以首先注册而成的表格只是含有表头的一个空表格,而表头体现了服务器中的硬件设备的从属关系。Specifically, in cluster servers, SNMP services are mostly deployed on the operating systems of the servers for better management of the servers. In this embodiment, the module to be monitored is registered as a table through the SNMP table in the SNMP service. The header of the table is named after the name of the module or sub-module. write. Therefore, the table registered first is just an empty table containing a table header, and the table header reflects the affiliation of the hardware devices in the server.
S203、接收指令;S203, receiving an instruction;
具体的,在本实施例中,服务器接收的指令为获取模块中设备节点1、设备节点3和设备节点6的设备节点信息的指令。Specifically, in this embodiment, the instruction received by the server is an instruction to obtain device node information of device node 1, device node 3, and device node 6 in the module.
S204、获取所述模块的设备节点数量和设备节点信息;S204. Obtain the number of device nodes and device node information of the module;
具体的,在本实施例中,模块的设备节点信息数量和设备节点信息的获取与上述实施例类似,在此不再赘述。Specifically, in this embodiment, the number of device node information of a module and the acquisition of device node information are similar to those in the above embodiment, and will not be repeated here.
S205、根据所述设备节点数量以及不同设备节点信息,确定不同设备节点的多维索引值;S205. Determine multidimensional index values of different device nodes according to the number of device nodes and information of different device nodes;
具体的,在本实施例中,预先注册的表格含有多维从属关系,而多维从属关系需要由多维索引值来确定,所以首先需要根据所述设备节点数量以及不同设备节点信息,确定不同设备节点的多维索引值。通常使用数字作为索引值,而对于多维从属的硬件系统而言,单一数字就无法准确的表示其从属关系,例如:某个服务器下层具有多个节点,通常使用服务器ID作为索引值,就会出现多行同ID的情况,而此种情况在SNMP服务中是不允许出现的。所以就需要建立多维索引值来表示服务器与其节点的从属关系,例如:如果服务器下层有三个模块,每个模块有三个端口,那么第一个模块的端口就可以分别表示为:1.1.1,1.1.2,1.1.3;相应的,第二个模块的端口可以表示为:1.2.1,1.2.2,1.2.3;第三个模块的端口以此类推,这样就建立了三维索引值。Specifically, in this embodiment, the pre-registered table contains multi-dimensional affiliation, and the multi-dimensional affiliation needs to be determined by the multi-dimensional index value, so it is first necessary to determine the Multidimensional index value. Numbers are usually used as index values, but for multi-dimensional dependent hardware systems, a single number cannot accurately represent its affiliation. For example, if a server has multiple nodes in the lower layer, the server ID is usually used as the index value, and a Multiple rows with the same ID, which is not allowed in SNMP services. Therefore, it is necessary to establish a multi-dimensional index value to represent the affiliation between the server and its nodes. For example, if there are three modules in the lower layer of the server, and each module has three ports, then the ports of the first module can be expressed as: 1.1.1, 1.1 .2, 1.1.3; Correspondingly, the port of the second module can be expressed as: 1.2.1, 1.2.2, 1.2.3; the port of the third module can be deduced by analogy, thus the three-dimensional index value is established.
S206、根据每个设备节点的多维索引值,将每个设备节点信息写入具有多维从属关系的表格;S206. According to the multi-dimensional index value of each device node, write the information of each device node into a table with multi-dimensional affiliation;
具体的,在本实施例中,服务器会根据每个设备节点的多维索引值,将每个设备节点信息写入具有多维从属关系的表格。多维索引值确定后,硬件设备的多维从属关系也就因此而确定,多维索引值能够准确的表示出了各个端口、模块以及服务器的从属关系,通过这样的方法也可以表示更深层次的从属关系。本实施例中的多维从属关系与上述实施例类似,故在此不再赘述。Specifically, in this embodiment, the server writes the information of each device node into a table with multi-dimensional affiliation according to the multi-dimensional index value of each device node. After the multi-dimensional index value is determined, the multi-dimensional affiliation relationship of the hardware device is also determined. The multi-dimensional index value can accurately represent the affiliation relationship of each port, module, and server. This method can also express deeper affiliation relationships. The multi-dimensional affiliation relationship in this embodiment is similar to the above embodiment, so it will not be repeated here.
S207、根据所述指令反馈所述表格中模块的设备节点信息。S207. Feed back the device node information of the modules in the table according to the instruction.
具体的,在本实施例中,所述表格与上述实施例类似,故在此不再赘述。当服务器获取到模块的设备节点数量和设备节点信息后,便通过程序代码自动将上述信息写入预先注册的表格中,创建完整的表格。Specifically, in this embodiment, the table is similar to the above embodiment, so details are not repeated here. After the server obtains the number of device nodes and device node information of the module, it automatically writes the above information into the pre-registered form through the program code to create a complete form.
需要说明的是,本实施例中虽然获取的是某几个目标设备节点信息,但是服务器在接到该命令后会获取整个模块的设备节点信息,以达到模块的设备节点信息的及时更新。It should be noted that although some target device node information is obtained in this embodiment, the server will obtain the device node information of the entire module after receiving the command, so as to update the device node information of the module in time.
具体的,在本实施例中,服务器根据所接收到的获取模块中设备节点Specifically, in this embodiment, according to the received device node in the acquisition module, the server
1、设备节点3和设备节点6的设备节点信息的指令,反馈给客户端设备节点1、设备节点3和设备节点6的信息。1. Instructions on the device node information of device node 3 and device node 6 are fed back to the client device node 1, device node 3 and device node 6 information.
可见,本实施例提供的一种监控设备节点的方法,所述方法通过代码动态获取设备节点数量和设备节点信息,实现了集群型服务器中设备节点的动态监控;同时,将设备节点通过多维索引值进行表示,更清楚地体现了设备节点的从属关系,方便了客户端用户的查看。如此便有效实现了动态监控集群型服务器中的多维设备节点,对于多维设备节点的从属关系也能清楚知晓,使得服务器的监控管理更加灵活,节约了成本。It can be seen that this embodiment provides a method for monitoring device nodes, the method dynamically obtains the number of device nodes and device node information through codes, and realizes dynamic monitoring of device nodes in cluster servers; at the same time, the device nodes are The value is represented, which more clearly reflects the affiliation of the device node, which is convenient for the client user to view. In this way, the dynamic monitoring of the multi-dimensional device nodes in the cluster server is effectively realized, and the affiliation relationship of the multi-dimensional device nodes can also be clearly known, which makes the monitoring and management of the server more flexible and saves costs.
基于上述任意实施例,所述根据所述指令反馈所述表格中模块的设备节点信息包括:Based on any of the above embodiments, the feeding back the device node information of the modules in the table according to the instruction includes:
若所述指令为获取整个模块的设备节点信息的指令,则根据所述指令反馈所述表格中整个模块的设备节点信息;If the instruction is an instruction to obtain the device node information of the entire module, then feed back the device node information of the entire module in the table according to the instruction;
若所述指令为单独获取模块中目标设备节点信息的指令,则根据所述指令反馈所述表格中所述目标设备节点信息。If the instruction is an instruction to separately acquire the target device node information in the module, the target device node information in the table is fed back according to the instruction.
具体的,服务器会根据接收到的不同指令来反馈信息。服务器将获取到的信息写入预先注册的表格,并创建完整的表格后,在给客户端回复时,会根据客户端的具体指令内容来反馈信息。例如:当客户端要求获取某一服务器下所有模块的设备节点信息,服务器则根据此指令将该服务下所有设备节点的相关信息发送给客户端;当客户端要求获取某一服务器下某一模块的某几个目标设备节点信息时,服务器则根据此指令将指定的这几个目标设备节点的信息反馈给客户端;同样的,当客户端要求获取某一具体设备节点信息时,服务器则根据此指令反馈该设备节点信息给客户端。无论客户端要求获取整个模块的设备节点信息还是某一目标设备节点信息,服务器都会通过代码重新获取设备节点数量和设备节点信息,并自动写入预先注册的表格,使表格完整。而后根据客户端的具体指令进行反馈。Specifically, the server will feed back information according to different instructions received. After the server writes the obtained information into the pre-registered form and creates a complete form, when replying to the client, it will give feedback information according to the specific instruction content of the client. For example: when the client requests to obtain the device node information of all modules under a certain server, the server sends the relevant information of all device nodes under the service to the client according to this instruction; when the client requests to obtain a certain module under a certain server When the information of certain target device nodes is specified, the server will feed back the information of the specified target device nodes to the client according to this instruction; similarly, when the client requests to obtain information about a specific device node, the server will This command feeds back the device node information to the client. Regardless of whether the client requests to obtain the device node information of the entire module or a certain target device node information, the server will re-obtain the number of device nodes and device node information through the code, and automatically write the pre-registered form to make the form complete. Then give feedback according to the specific instructions of the client.
下面对本发明实施例提供的一种监控设备节点的装置进行介绍,下文描述的种监控设备节点的装置与上文描述的一种监控设备节点的方法可以相互参照。An apparatus for monitoring a device node provided in an embodiment of the present invention is introduced below. The apparatus for monitoring a device node described below and the method for monitoring a device node described above may refer to each other.
参见图3,本发明实施例提供的一种监控设备节点的装置,包括:Referring to FIG. 3, an apparatus for monitoring a device node provided by an embodiment of the present invention includes:
接收模块100,用于接收指令,所述指令为获取模块的设备节点信息的指令;The receiving module 100 is configured to receive an instruction, and the instruction is an instruction for obtaining device node information of the module;
获取模块200,用于获取所述模块的设备节点数量和设备节点信息;An acquisition module 200, configured to acquire the number of device nodes and device node information of the module;
写入模块300,用于根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;A writing module 300, configured to correspondingly write the device node information into a pre-registered table according to the number of the device nodes and the multidimensional affiliation between the module and different device node information;
反馈模块400,用于根据所述指令反馈所述表格中模块的设备节点信息。The feedback module 400 is configured to feed back the device node information of the modules in the table according to the instruction.
参见图4,基于上述实施例提供的一种监控设备节点的装置,本发明实施例还提供了另一种监控设备节点的装置,包括:Referring to Figure 4, based on the device for monitoring device nodes provided in the above embodiments, the embodiment of the present invention also provides another device for monitoring device nodes, including:
部署模块500,用于在服务器的操作系统上部署SNMP服务;Deployment module 500, for deploying SNMP service on the operating system of server;
注册模块600,用于通过SNMP服务将需要监控的模块注册为具有多维从属关系的表格;The registration module 600 is used to register the modules that need to be monitored as a table with multidimensional affiliation through SNMP service;
接收模块100,用于接收指令,所述指令为获取模块的设备节点信息的指令;The receiving module 100 is configured to receive an instruction, and the instruction is an instruction for obtaining device node information of the module;
获取模块200,用于获取所述模块的设备节点数量和设备节点信息;An acquisition module 200, configured to acquire the number of device nodes and device node information of the module;
写入模块300,用于根据所述设备节点数量以及所述模块与不同设备节点信息之间的多维从属关系,将所述设备节点信息对应写入预先注册的表格;A writing module 300, configured to correspondingly write the device node information into a pre-registered table according to the number of the device nodes and the multidimensional affiliation between the module and different device node information;
反馈模块400,用于根据所述指令反馈所述表格中模块的设备节点信息。The feedback module 400 is configured to feed back the device node information of the modules in the table according to the instruction.
其中,所述获取模块包括:Wherein, the acquisition module includes:
遍历单元,用于遍历所述模块的设备节点;A traversal unit for traversing the device nodes of the module;
数量获取单元,用于获取所述模块的设备节点数量;A quantity acquisition unit, configured to acquire the number of device nodes of the module;
信息获取单元,用于获取所述模块的设备节点信息。An information obtaining unit, configured to obtain device node information of the module.
其中,所述写入模块包括:Wherein, the writing module includes:
多维索引值确定单元,用于根据所述设备节点数量以及不同设备节点信息,确定不同设备节点的多维索引值;A multidimensional index value determination unit, configured to determine multidimensional index values of different device nodes according to the number of device nodes and information of different device nodes;
写入单元,用于根据每个设备节点的多维索引值,将每个设备节点信息写入具有多维从属关系的表格。The writing unit is configured to write the information of each device node into a table with multi-dimensional affiliation according to the multi-dimensional index value of each device node.
其中,所述反馈模块包括:Wherein, the feedback module includes:
第一反馈单元,用于当接收到获取整个模块的设备节点信息的指令时,根据所述指令反馈所述表格中整个模块的设备节点信息;The first feedback unit is configured to feed back the device node information of the entire module in the table according to the instruction when receiving an instruction to obtain the device node information of the entire module;
第二反馈单元,用于当接收到单独获取模块中目标设备节点信息的指令时,根据所述指令反馈所述表格中所述目标设备节点信息。The second feedback unit is configured to feed back the target device node information in the table according to the instruction when receiving the instruction for separately acquiring the target device node information in the module.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710632464.8A CN107196827A (en) | 2017-07-28 | 2017-07-28 | A kind of method and device of monitoring device node |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710632464.8A CN107196827A (en) | 2017-07-28 | 2017-07-28 | A kind of method and device of monitoring device node |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107196827A true CN107196827A (en) | 2017-09-22 |
Family
ID=59885023
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710632464.8A Pending CN107196827A (en) | 2017-07-28 | 2017-07-28 | A kind of method and device of monitoring device node |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107196827A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113032018A (en) * | 2019-12-25 | 2021-06-25 | 上海博泰悦臻电子设备制造有限公司 | Improved method for reading command and related device |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101242302A (en) * | 2008-03-12 | 2008-08-13 | 华为技术有限公司 | A data synchronization method, device and system |
| CN101540700A (en) * | 2009-04-10 | 2009-09-23 | 成都市华为赛门铁克科技有限公司 | Configuration linkage method, system, terminal and network equipment management server |
| CN101815012A (en) * | 2009-02-20 | 2010-08-25 | 中兴通讯股份有限公司 | Method and device for acquiring performance data |
| US20140012975A1 (en) * | 2012-07-09 | 2014-01-09 | National Applied Research Laboratories | Computer cluster, management method and management system for the same |
| CN106888126A (en) * | 2017-03-30 | 2017-06-23 | 凌云天博光电科技股份有限公司 | A kind of network management data modeling method |
-
2017
- 2017-07-28 CN CN201710632464.8A patent/CN107196827A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101242302A (en) * | 2008-03-12 | 2008-08-13 | 华为技术有限公司 | A data synchronization method, device and system |
| CN101815012A (en) * | 2009-02-20 | 2010-08-25 | 中兴通讯股份有限公司 | Method and device for acquiring performance data |
| CN101540700A (en) * | 2009-04-10 | 2009-09-23 | 成都市华为赛门铁克科技有限公司 | Configuration linkage method, system, terminal and network equipment management server |
| US20140012975A1 (en) * | 2012-07-09 | 2014-01-09 | National Applied Research Laboratories | Computer cluster, management method and management system for the same |
| CN106888126A (en) * | 2017-03-30 | 2017-06-23 | 凌云天博光电科技股份有限公司 | A kind of network management data modeling method |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113032018A (en) * | 2019-12-25 | 2021-06-25 | 上海博泰悦臻电子设备制造有限公司 | Improved method for reading command and related device |
| CN113032018B (en) * | 2019-12-25 | 2024-03-01 | 博泰车联网科技(上海)股份有限公司 | Improved method for read command and related device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7092736B2 (en) | Dynamic routing using container orchestration services | |
| WO2020238751A1 (en) | Resource access method under serverless architecture, device, system, and storage medium | |
| CN108513657B (en) | Data conversion method and backup server | |
| CN107666525A (en) | The method and apparatus of cluster container IP distribution | |
| CN107077497A (en) | Compound partition functions | |
| CN106716968A (en) | Account management method, device and account management system | |
| CN104468207B (en) | The method, apparatus and system of terminal management | |
| CN107026876A (en) | A kind of file data accesses system and method | |
| CN106383764A (en) | Data acquisition method and device | |
| CN109873839A (en) | Method, server and the distributed system of data access | |
| CN104537045A (en) | Service distribution method and device based on distributive system | |
| CN112398892B (en) | Service distribution method, device and equipment | |
| CN111124589A (en) | A service discovery system, method, apparatus and device | |
| CN104021088A (en) | Log storage method and device | |
| CN110008006A (en) | Container-based big data tool deployment method and system | |
| CN114329369B (en) | Rights management method and device, electronic equipment and computer readable medium | |
| CN107566505A (en) | Data storage resource management method, host node, system, device and storage medium | |
| CN107196827A (en) | A kind of method and device of monitoring device node | |
| CN103916428A (en) | Private cloud inside data transmission method, private cloud platform and private cloud system | |
| CN108111496A (en) | The method, apparatus and system of http services are exposed for dubbo Distributed Applications | |
| KR101728873B1 (en) | Graph query language distribution process system and query language distribution process method thereof | |
| CN106301906B (en) | Object configuration method and device based on distributed system | |
| CN107659643A (en) | Cloud platform construction method and device | |
| CN103761617A (en) | Method and system for approval process management in cloud data center | |
| CN107832242A (en) | A kind of data transmission method, system, device and computer-readable recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170922 |