CN112764995A - Server hardware resource monitoring method, device and medium - Google Patents

Server hardware resource monitoring method, device and medium Download PDF

Info

Publication number
CN112764995A
CN112764995A CN202110105763.2A CN202110105763A CN112764995A CN 112764995 A CN112764995 A CN 112764995A CN 202110105763 A CN202110105763 A CN 202110105763A CN 112764995 A CN112764995 A CN 112764995A
Authority
CN
China
Prior art keywords
plug
server hardware
monitoring
server
hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110105763.2A
Other languages
Chinese (zh)
Other versions
CN112764995B (en
Inventor
郑俊飞
吴睿振
崔健
任明刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202110105763.2A priority Critical patent/CN112764995B/en
Publication of CN112764995A publication Critical patent/CN112764995A/en
Application granted granted Critical
Publication of CN112764995B publication Critical patent/CN112764995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device and a medium for monitoring server hardware resources, wherein a plug-in is created according to all server hardware names to be monitored so as to obtain a plug-in list; and packaging the corresponding interface for each plug-in according to the set interface packaging rule. When a monitoring request carrying a name identifier is acquired, searching a target plug-in matched with the name identifier from a plug-in list; and calling the target plug-in to monitor the state of the target server hardware, and transmitting the monitoring result to the front-end equipment through the interface corresponding to the target plug-in. And abstracting each server hardware into a plug-in form based on an abstract factory mode, wherein the plug-ins are mutually independent, and a low-coupling and high-cohesion monitoring software architecture is realized. And a universal plug-in interface is set, the front-end equipment and the background monitoring software framework are distinguished, the monitoring software framework of the background is not influenced by the change of the hardware peripheral of the server, and the expansibility and the universality of the monitoring software are improved.

Description

Server hardware resource monitoring method, device and medium
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for monitoring server hardware resources, and a computer-readable storage medium.
Background
With the development of information technologies such as cloud computing and big data, the demand of an information processing system on the performance of a server is higher and higher. In addition to increasing the number of servers for improving the performance of the servers, more and more high-performance hardware peripherals need to be adapted, such as a Solid State Drive (SSD) storage redundancy array extended by a hard Disk (Serial ATA, SATA) interface, and various application acceleration cards such as multimedia codec, network transmission, compression and decompression processing extended by a PCIE interface extended by a high speed Serial computer extended bus standard (PCIE).
However, the increased number of hardware devices poses a challenge to the stability of the server system, since hardware peripherals from different manufacturers, including different models and protocol standards, usually have different device driver interfaces. And the device driving version is also continuously maintained and upgraded along with the time, the driving interface and even the hardware peripheral change condition may exist, and in order to monitor the running state of numerous hardware resources in real time, complex server monitoring software needs to be written to uniformly manage the numerous hardware resources.
At present, a common practice is to install different hardware peripherals on a server according to different service requirements, for example, to install different PCIE accelerator cards according to different acceleration requirements, and then to compile a set of monitoring software dedicated to the service scenario and adapt to an operating system of the server.
Different hardware respectively corresponds to different monitoring modules in monitoring software, the monitoring modules call the equipment driving interface to monitor the hardware state, and the monitoring software main frame executes each monitoring module in turn to monitor the running state of all the hardware. However, the error debugging probability in the early-stage software programming process is high, so that the software development period is long. The monitoring software has poor expandability, and when a hardware manufacturer upgrades a driver to repair a hardware fault, the monitoring module and the monitoring software main frame need to be modified, and the new modification may introduce other problems, such as causing other functional abnormalities of the monitoring module and even directly causing the abnormality of the monitoring software main frame. The monitoring software has poor universality, when the service scene changes greatly and the hardware architecture of the server needs to be modified, most monitoring modules cannot be used due to larger difference of hardware peripherals compared with the prior one, a set of monitoring software needs to be developed again, and all the coding work before is repeated at the moment, so that great repeated labor is caused.
Therefore, how to improve the expansibility and the universality of the monitoring software is a problem to be solved by the technical personnel in the field.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for monitoring server hardware resources and a computer readable storage medium, which can improve the expansibility and the universality of monitoring software.
In order to solve the above technical problem, an embodiment of the present invention provides a server hardware resource monitoring method, including:
creating plug-ins according to all server hardware names to be monitored to obtain a plug-in list;
packaging corresponding interfaces for each plug-in according to a set interface packaging rule;
when a monitoring request carrying a name identifier is acquired, searching a target plug-in matched with the name identifier from the plug-in list;
calling the target plug-in to monitor the state of the target server hardware, and transmitting the monitoring result to the front-end equipment through an interface corresponding to the target plug-in; and the target server hardware is the server hardware corresponding to the name identifier.
Optionally, the creating a plug-in according to all server hardware names to be monitored to obtain a plug-in list includes:
reading all server hardware names to be monitored from the global configuration file;
creating a factory module according to the server hardware name, and creating a product module by using the factory module;
each factory module and the corresponding product module are combined to be used as a plug-in unit; the factory module is used for executing initialization and packaging operations on the product module; the product module is used for monitoring the server hardware.
Optionally, the encapsulating, according to a set interface encapsulation rule, a corresponding interface for each plug-in includes:
setting a corresponding number of interfaces for each plug-in according to the operation type contained by each plug-in; the interface corresponding to each operation type comprises a product creation interface and a character string analysis interface.
Optionally, when the monitoring request carrying the name identifier is obtained, the searching for the target plug-in matching the name identifier from the plug-in list includes:
analyzing the key value pair contained in the monitoring request; wherein each key-value pair comprises a function name and a parameter;
searching a target plug-in corresponding to the function name from the plug-in list;
correspondingly, before the calling the target plug-in to monitor the state of the target server hardware, the method further includes:
and calling a kernel driver to execute the operation corresponding to the parameter on the target server hardware.
Optionally, after encapsulating, according to the set interface encapsulation rule, the corresponding interface for each plug-in, further includes:
according to the obtained server hardware architecture, a configuration file matched with the server hardware architecture is constructed so as to search a target plug-in matched with the configuration file from the plug-in list; wherein, the configuration file includes name identifiers of each server hardware in the server hardware architecture.
Optionally, after the constructing a configuration file matched with the server hardware architecture according to the obtained server hardware architecture, the method further includes:
and when the server hardware architecture is changed, modifying the name identifier of the server hardware recorded in the configuration file according to the changed server hardware.
The embodiment of the application also provides a server hardware resource monitoring device, which comprises a creating unit, an encapsulating unit, a searching unit, a calling unit and a transmission unit;
the creating unit is used for creating plug-ins according to all the names of the server hardware to be monitored so as to obtain a plug-in list;
the packaging unit is used for packaging corresponding interfaces for the plug-ins according to a set interface packaging rule;
the searching unit is used for searching a target plug-in matched with the name identifier from the plug-in list when a monitoring request carrying the name identifier is acquired;
the calling unit is used for calling the target plug-in to monitor the state of the target server hardware;
the transmission unit is used for transmitting the monitoring result to the front-end equipment through the interface corresponding to the target plug-in; and the target server hardware is the server hardware corresponding to the name identifier.
Optionally, the creating unit is configured to read all server hardware names to be monitored from the global configuration file; creating a factory module according to the server hardware name, and creating a product module by using the factory module; each factory module and the corresponding product module are combined to be used as a plug-in unit; the factory module is used for executing initialization and packaging operations on the product module; the product module is used for monitoring the server hardware.
Optionally, the packaging unit is configured to set a corresponding number of interfaces for each of the plug-ins according to an operation type included in each of the plug-ins; the interface corresponding to each operation type comprises a product creation interface and a character string analysis interface.
Optionally, the search unit includes a parsing subunit and a search subunit;
the analysis subunit is used for analyzing the key value pairs contained in the monitoring request; wherein each key-value pair comprises a function name and a parameter;
the searching subunit is configured to search the target plugin corresponding to the function name from the plugin list;
correspondingly, the calling unit is also included before the calling of the target plug-in monitors the state of the target server hardware;
and the calling unit is used for calling the kernel driver to execute the operation corresponding to the parameter on the target server hardware.
Optionally, the system further comprises a file construction unit;
the file construction unit is used for constructing a configuration file matched with the server hardware architecture according to the acquired server hardware architecture so as to search a target plug-in matched with the configuration file from the plug-in list; wherein, the configuration file includes name identifiers of each server hardware in the server hardware architecture.
Optionally, a modification unit is further included;
and the modifying unit is used for modifying the name identifier of the server hardware recorded in the configuration file according to the changed server hardware when the server hardware architecture is changed.
The embodiment of the invention also provides a server hardware resource monitoring device, which comprises:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the server hardware resource monitoring method as described in any one of the above.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the server hardware resource monitoring method are implemented as in any one of the above.
According to the technical scheme, the plug-ins are created according to the names of all the server hardware to be monitored so as to obtain a plug-in list; and packaging the corresponding interface for each plug-in according to the set interface packaging rule. By creating plug-ins, a unified management of all types of server hardware that are common can be achieved. And the corresponding interface is set for each plug-in unit, so as to ensure the normal calling of each plug-in unit. The plug-in can realize the state monitoring of the corresponding server hardware. When a monitoring request carrying a name identifier is acquired, a target plug-in matched with the name identifier can be searched from a plug-in list; calling a target plug-in to monitor the state of the target server hardware, and transmitting a monitoring result to the front-end equipment through an interface corresponding to the target plug-in; the target server hardware is the server hardware corresponding to the name identifier. In the technical scheme, the hardware of each server is abstracted into a plug-in form based on an abstract factory mode, and the plug-ins are mutually independent, so that a monitoring software architecture with low coupling and high cohesion is realized. And a universal plug-in interface is set, the front-end equipment and the background monitoring software framework are distinguished, the monitoring software framework of the background is not influenced by the change of the hardware peripheral of the server, and the expansibility and the universality of the monitoring software are improved.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for monitoring hardware resources of a server according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for monitoring hardware resources of a server based on a plug-in technology according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a server hardware resource monitoring apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a server hardware resource monitoring apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a method for monitoring hardware resources of a server according to an embodiment of the present invention is described in detail. Fig. 1 is a flowchart of a server hardware resource monitoring method according to an embodiment of the present invention, where the method includes:
s101: and creating plug-ins according to all the names of the server hardware to be monitored so as to obtain a plug-in list.
In the embodiment of the invention, in order to realize a low-coupling and high-cohesion monitoring software architecture, different server hardware is set into a plug-in form based on an abstract factory mode simulation plug-in technology.
In practical application, all server hardware names to be monitored can be read from the global configuration file; creating a factory module according to the name of the server hardware, and creating a product module by using the factory module; each factory module and the corresponding product module are combined to be used as a plug-in unit; the factory module is used for executing initialization and packaging operations on the product module; the product module is used for monitoring the server hardware.
The server hardware may include a Central Processing Unit (CPU) memory, a hard disk, other expansion hardware, and the like.
The same type of product modules are further packaged into a uniform interface form on the basis of the original equipment driving interface, and a plurality of product modules can be packaged for each server hardware to show various states of monitoring the same equipment.
The initialization processes of different product modules are packaged into different factory modules, so that the situation that the complex hardware initialization process needs to be directly called in a monitoring software main frame when the hardware initialization process to be monitored is complex is avoided.
S102: and packaging the corresponding interface for each plug-in according to the set interface packaging rule.
In the embodiment of the invention, the corresponding number of interfaces can be set for each plug-in according to the operation type contained in each plug-in; the interface corresponding to each operation type comprises a product creation interface and a character string analysis interface.
In the embodiment of the invention, the same type of factory modules can be defined into a uniform interface form, so that the reuse of factory class codes is facilitated.
S103: and when the monitoring request carrying the name identifier is acquired, searching a target plug-in matched with the name identifier from the plug-in list.
The function of each plug-in is realized by a function, and the name identifier can be a function name. In the embodiment of the present invention, the function name and the parameter involved in the monitoring request may be carried in the form of a key-value pair.
The background service process can analyze the key value pairs contained in the monitoring request; wherein each key-value pair comprises a function name and a parameter; searching a target plug-in corresponding to the function name from the plug-in list; and calling the kernel driver to execute the operation corresponding to the parameter on the target server hardware. The target server hardware is the server hardware monitored by the target plug-in. I.e. the target server hardware is the server hardware corresponding to the name identity.
S104: and calling the target plug-in to monitor the state of the target server hardware, and transmitting the monitoring result to the front-end equipment through the interface corresponding to the target plug-in.
In combination with the above description, the function name and the parameter involved in the monitoring request are carried in the form of a key-value pair, and accordingly, the function name and the operation result involved in the monitoring result may also be recorded in the form of a key-value pair.
In the embodiment of the present invention, a front-end device and a background monitoring software framework may be independently configured, and as shown in fig. 2, the monitoring software on a computing platform may include a foreground display process and a background service process. According to different functions to be realized, the foreground display process of the front-end equipment can be divided into two parts, namely monitoring data forwarding and a user interaction interface. The user interaction module in the foreground display process can be used for acquiring the monitoring request and displaying the monitoring state. According to different functions to be realized, the background service process can be divided into three parts of monitoring data forwarding, plug-in scheduling and plug-in registration. The background service process may maintain a plug-in list, where the plug-in list includes a plurality of plug-ins, each plug-in includes a factory module and a product module, and different plug-ins are distinguished by different numbers in fig. 2.
The monitoring data forwarding module in the background service process can be used for communicating with the foreground display process. And the plug-in registration module in the background service process is used for registering the product module and the factory module representing the plug-in the plug-in list through the global configuration file. And the plug-in scheduling module in the background service process is used for processing the monitoring request sent by the foreground display process. And hardware equipment which can be required to be monitored in the equipment list to be monitored. The kernel-state device driver list includes all device drivers of the hardware to be monitored, which are used for controlling the hardware and obtaining the hardware state, and has a one-to-many mapping relationship with the product module, that is, the device driver can provide a plurality of plug-in interfaces for setting/obtaining different device attributes.
According to the technical scheme, the plug-ins are created according to the names of all the server hardware to be monitored so as to obtain a plug-in list; and packaging the corresponding interface for each plug-in according to the set interface packaging rule. By creating plug-ins, a unified management of all types of server hardware that are common can be achieved. And the corresponding interface is set for each plug-in unit, so as to ensure the normal calling of each plug-in unit. The plug-in can realize the state monitoring of the corresponding server hardware. When a monitoring request carrying a name identifier is acquired, a target plug-in matched with the name identifier can be searched from a plug-in list; calling a target plug-in to monitor the state of the target server hardware, and transmitting a monitoring result to the front-end equipment through an interface corresponding to the target plug-in; the target server hardware is the server hardware corresponding to the name identifier. In the technical scheme, the hardware of each server is abstracted into a plug-in form based on an abstract factory mode, and the plug-ins are mutually independent, so that a monitoring software architecture with low coupling and high cohesion is realized. And a universal plug-in interface is set, the front-end equipment and the background monitoring software framework are distinguished, the monitoring software framework of the background is not influenced by the change of the hardware peripheral of the server, and the expansibility and the universality of the monitoring software are improved.
In practical application, a configuration file matched with the server hardware architecture can be constructed according to the acquired server hardware architecture, so that a target plug-in matched with the configuration file can be conveniently searched from a plug-in list; the configuration file comprises name identifiers of server hardware in the server hardware architecture.
When the server hardware architecture changes, a corresponding plug-in is called according to the server hardware contained in the server hardware architecture, so as to monitor each server hardware in the current server hardware architecture. In practical application, when the server hardware architecture is changed, the name identifier of the server hardware recorded in the configuration file can be modified according to the changed server hardware.
By modifying the configuration file, the requirements of different server hardware architectures can be met. When the hardware architecture of the server is changed due to the change of business requirements in the later stage of the project, only the configuration file needs to be modified, and the plug-in corresponding to the configuration file is called from the plug-in list, so that the monitoring software main frame does not need to be modified, and a set of monitoring software does not need to be recompiled, so that the later-stage upgrading and maintaining cost of the software is relatively low.
Fig. 3 is a schematic structural diagram of a server hardware resource monitoring apparatus according to an embodiment of the present invention, including a creating unit 31, an encapsulating unit 32, a searching unit 33, a calling unit 34, and a transmitting unit 35;
the creating unit 31 is configured to create a plug-in according to all server hardware names to be monitored, so as to obtain a plug-in list;
the packaging unit 32 is used for packaging corresponding interfaces for each plug-in according to a set interface packaging rule;
the searching unit 33 is configured to search, when the monitoring request carrying the name identifier is acquired, a target plug-in matching the name identifier from the plug-in list;
the calling unit 34 is used for calling the target plug-in to monitor the state of the target server hardware;
the transmission unit 35 is configured to transmit the monitoring result to the front-end device through the interface corresponding to the target plug-in; the target server hardware is the server hardware corresponding to the name identifier.
Optionally, the creating unit is configured to read all server hardware names to be monitored from the global configuration file; creating a factory module according to the name of the server hardware, and creating a product module by using the factory module; each factory module and the corresponding product module are combined to be used as a plug-in unit; the factory module is used for executing initialization and packaging operations on the product module; the product module is used for monitoring the server hardware.
Optionally, the packaging unit is configured to set a corresponding number of interfaces for each plug-in according to an operation type included in each plug-in; the interface corresponding to each operation type comprises a product creation interface and a character string analysis interface.
Optionally, the search unit includes a parsing subunit and a search subunit;
the analysis subunit is used for analyzing the key value pairs contained in the monitoring request; wherein each key-value pair comprises a function name and a parameter;
the searching subunit is used for searching the target plug-in corresponding to the function name from the plug-in list;
correspondingly, the system also comprises a calling unit before calling the target plug-in to monitor the state of the target server hardware;
and the calling unit is used for calling the kernel driver to execute the operation corresponding to the parameter on the target server hardware.
Optionally, the system further comprises a file construction unit;
the file construction unit is used for constructing a configuration file matched with the server hardware architecture according to the acquired server hardware architecture so as to search a target plug-in matched with the configuration file from the plug-in list; the configuration file comprises name identifiers of server hardware in the server hardware architecture.
Optionally, a modification unit is further included;
and the modifying unit is used for modifying the name identifier of the server hardware recorded in the configuration file according to the changed server hardware when the server hardware architecture is changed.
The description of the features in the embodiment corresponding to fig. 3 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the plug-ins are created according to the names of all the server hardware to be monitored so as to obtain a plug-in list; and packaging the corresponding interface for each plug-in according to the set interface packaging rule. By creating plug-ins, a unified management of all types of server hardware that are common can be achieved. And the corresponding interface is set for each plug-in unit, so as to ensure the normal calling of each plug-in unit. The plug-in can realize the state monitoring of the corresponding server hardware. When a monitoring request carrying a name identifier is acquired, a target plug-in matched with the name identifier can be searched from a plug-in list; calling a target plug-in to monitor the state of the target server hardware, and transmitting a monitoring result to the front-end equipment through an interface corresponding to the target plug-in; the target server hardware is the server hardware corresponding to the name identifier. In the technical scheme, the hardware of each server is abstracted into a plug-in form based on an abstract factory mode, and the plug-ins are mutually independent, so that a monitoring software architecture with low coupling and high cohesion is realized. And a universal plug-in interface is set, the front-end equipment and the background monitoring software framework are distinguished, the monitoring software framework of the background is not influenced by the change of the hardware peripheral of the server, and the expansibility and the universality of the monitoring software are improved.
Fig. 4 is a schematic diagram of a hardware structure of a server hardware resource monitoring apparatus 40 according to an embodiment of the present invention, including:
a memory 41 for storing a computer program;
a processor 42 for executing a computer program for implementing the steps of the server hardware resource monitoring method according to any of the embodiments described above.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the server hardware resource monitoring method according to any of the above embodiments are implemented.
The foregoing describes a method, an apparatus, and a computer-readable storage medium for monitoring a hardware resource of a server according to embodiments of the present invention in detail. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (10)

1. A server hardware resource monitoring method is characterized by comprising the following steps:
creating plug-ins according to all server hardware names to be monitored to obtain a plug-in list;
packaging corresponding interfaces for each plug-in according to a set interface packaging rule;
when a monitoring request carrying a name identifier is acquired, searching a target plug-in matched with the name identifier from the plug-in list;
calling the target plug-in to monitor the state of the target server hardware, and transmitting the monitoring result to the front-end equipment through an interface corresponding to the target plug-in; and the target server hardware is the server hardware corresponding to the name identifier.
2. The method for monitoring the hardware resources of the server according to claim 1, wherein the creating the plug-in according to the names of all the server hardware to be monitored to obtain the plug-in list comprises:
reading all server hardware names to be monitored from the global configuration file;
creating a factory module according to the server hardware name, and creating a product module by using the factory module;
each factory module and the corresponding product module are combined to be used as a plug-in unit; the factory module is used for executing initialization and packaging operations on the product module; the product module is used for monitoring the server hardware.
3. The method for monitoring the hardware resources of the server according to claim 1, wherein the encapsulating the corresponding interface for each plug-in according to the set interface encapsulation rule comprises:
setting a corresponding number of interfaces for each plug-in according to the operation type contained by each plug-in; the interface corresponding to each operation type comprises a product creation interface and a character string analysis interface.
4. The method for monitoring the hardware resource of the server according to claim 1, wherein the searching for the target plug-in matching the name identifier from the plug-in list when the monitoring request carrying the name identifier is obtained includes:
analyzing the key value pair contained in the monitoring request; wherein each key-value pair comprises a function name and a parameter;
searching a target plug-in corresponding to the function name from the plug-in list;
correspondingly, before the calling the target plug-in to monitor the state of the target server hardware, the method further includes:
and calling a kernel driver to execute the operation corresponding to the parameter on the target server hardware.
5. The method for monitoring the hardware resources of the server according to any one of claims 1 to 4, wherein after encapsulating the corresponding interface for each plug-in according to the set interface encapsulation rule, the method further comprises:
according to the obtained server hardware architecture, a configuration file matched with the server hardware architecture is constructed so as to search a target plug-in matched with the configuration file from the plug-in list; wherein, the configuration file includes name identifiers of each server hardware in the server hardware architecture.
6. The method for monitoring the hardware resources of the server according to claim 5, further comprising, after the constructing a configuration file matching the hardware architecture of the server according to the obtained hardware architecture of the server:
and when the server hardware architecture is changed, modifying the name identifier of the server hardware recorded in the configuration file according to the changed server hardware.
7. A server hardware resource monitoring device is characterized by comprising a creating unit, an encapsulating unit, a searching unit, a calling unit and a transmission unit;
the creating unit is used for creating plug-ins according to all the names of the server hardware to be monitored so as to obtain a plug-in list;
the packaging unit is used for packaging corresponding interfaces for the plug-ins according to a set interface packaging rule;
the searching unit is used for searching a target plug-in matched with the name identifier from the plug-in list when a monitoring request carrying the name identifier is acquired;
the calling unit is used for calling the target plug-in to monitor the state of the target server hardware;
the transmission unit is used for transmitting the monitoring result to the front-end equipment through the interface corresponding to the target plug-in; and the target server hardware is the server hardware corresponding to the name identifier.
8. The apparatus according to claim 7, wherein the creating unit is configured to read all names of the server hardware to be monitored from a global configuration file; creating a factory module according to the server hardware name, and creating a product module by using the factory module; each factory module and the corresponding product module are combined to be used as a plug-in unit; the factory module is used for executing initialization and packaging operations on the product module; the product module is used for monitoring the server hardware.
9. A server hardware resource monitoring apparatus, comprising:
a memory for storing a computer program;
a processor for executing said computer program to implement the steps of the server hardware resource monitoring method according to any one of claims 1 to 6.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the server hardware resource monitoring method according to any one of claims 1 to 6.
CN202110105763.2A 2021-01-26 2021-01-26 Server hardware resource monitoring method, device and medium Active CN112764995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110105763.2A CN112764995B (en) 2021-01-26 2021-01-26 Server hardware resource monitoring method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110105763.2A CN112764995B (en) 2021-01-26 2021-01-26 Server hardware resource monitoring method, device and medium

Publications (2)

Publication Number Publication Date
CN112764995A true CN112764995A (en) 2021-05-07
CN112764995B CN112764995B (en) 2023-04-07

Family

ID=75705823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110105763.2A Active CN112764995B (en) 2021-01-26 2021-01-26 Server hardware resource monitoring method, device and medium

Country Status (1)

Country Link
CN (1) CN112764995B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590215A (en) * 2021-07-15 2021-11-02 福建星云检测技术有限公司 Plug-in type upper computer communication method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105491337A (en) * 2015-12-10 2016-04-13 公安部交通管理科学研究所 Universal network video monitoring equipment access method and apparatus based on SDK abstract layer
CN105656947A (en) * 2016-03-30 2016-06-08 深圳市金证科技股份有限公司 Method, device and system for interaction between transaction middleware and third-party system
CN106850332A (en) * 2016-12-12 2017-06-13 中电科华云信息技术有限公司 Application dynamic monitoring and controlling method and system based on cloud
CN107168275A (en) * 2017-03-23 2017-09-15 许继集团有限公司 A kind of relay protection function module automatic identification collocation method and device
CN108829462A (en) * 2018-06-21 2018-11-16 安徽大中润科技有限公司 A kind of display methods of information, system and plug-in management platform
CN110308949A (en) * 2019-06-28 2019-10-08 深圳市酷开网络科技有限公司 Implementation method, device and the computer readable storage medium of plug-in unit frame
CN111143165A (en) * 2019-12-20 2020-05-12 深圳前海微众银行股份有限公司 Monitoring method and device
CN111596967A (en) * 2020-04-27 2020-08-28 中国银联股份有限公司 Application function configuration method, terminal device, server and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105491337A (en) * 2015-12-10 2016-04-13 公安部交通管理科学研究所 Universal network video monitoring equipment access method and apparatus based on SDK abstract layer
CN105656947A (en) * 2016-03-30 2016-06-08 深圳市金证科技股份有限公司 Method, device and system for interaction between transaction middleware and third-party system
CN106850332A (en) * 2016-12-12 2017-06-13 中电科华云信息技术有限公司 Application dynamic monitoring and controlling method and system based on cloud
CN107168275A (en) * 2017-03-23 2017-09-15 许继集团有限公司 A kind of relay protection function module automatic identification collocation method and device
CN108829462A (en) * 2018-06-21 2018-11-16 安徽大中润科技有限公司 A kind of display methods of information, system and plug-in management platform
CN110308949A (en) * 2019-06-28 2019-10-08 深圳市酷开网络科技有限公司 Implementation method, device and the computer readable storage medium of plug-in unit frame
CN111143165A (en) * 2019-12-20 2020-05-12 深圳前海微众银行股份有限公司 Monitoring method and device
CN111596967A (en) * 2020-04-27 2020-08-28 中国银联股份有限公司 Application function configuration method, terminal device, server and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590215A (en) * 2021-07-15 2021-11-02 福建星云检测技术有限公司 Plug-in type upper computer communication method and system
CN113590215B (en) * 2021-07-15 2023-05-12 福建星云检测技术有限公司 Plug-in type upper computer communication method and system

Also Published As

Publication number Publication date
CN112764995B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US20200183795A1 (en) Method and apparatus for processing information
US9348771B1 (en) Cloud-based instrument driver system
CN110750592B (en) Data synchronization method, device and terminal equipment
CN107025167B (en) Method and apparatus for data flow analysis using compiler type information in processor trace logs
CN111897548A (en) Front-end resource publishing method and device, electronic equipment and computer storage medium
CN112906054A (en) Multi-tenant database isolation method and device and electronic equipment
US10552280B2 (en) In-band monitor in system management mode context for improved cloud platform availability
CN115242894B (en) Data processing method, device, storage medium and computer equipment
CN104468811A (en) Upgrading method and device
CN112764995B (en) Server hardware resource monitoring method, device and medium
CN112527647B (en) NS-3-based Raft consensus algorithm test system
CN114064216A (en) Virtual machine initialization method, device, terminal equipment and storage medium
US11334461B2 (en) Distributed application resource determination based on performance metrics
CN114579250A (en) Method, device and storage medium for constructing virtual cluster
CN115098297B (en) Consistent snapshot generation method and system for cloud primary storage data volume
WO2023276039A1 (en) Server management device, server management method, and program
CN115145381A (en) Method, system, storage medium and equipment for remotely resetting BMC chip
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
CN113656378A (en) Server management method, device and medium
CN113703339A (en) Automatic driving simulation method, device, equipment and storage medium
CN113064797B (en) Front-end monitoring method and device, electronic equipment and storage medium
WO2023276038A1 (en) Server management device, server management method, and program
CN112448854B (en) Kubernetes complex network policy system and implementation method thereof
CN107256163B (en) Method and device for realizing node management
CN111026505B (en) Network equipment virtualization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant