CN115757275A - Asset information management method and device, electronic equipment and storage medium - Google Patents

Asset information management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115757275A
CN115757275A CN202211466566.4A CN202211466566A CN115757275A CN 115757275 A CN115757275 A CN 115757275A CN 202211466566 A CN202211466566 A CN 202211466566A CN 115757275 A CN115757275 A CN 115757275A
Authority
CN
China
Prior art keywords
asset information
file
managed
storing
asset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211466566.4A
Other languages
Chinese (zh)
Inventor
赵浩彬
黄洪
张昊
胡远明
秦晓宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nettrix Information Industry Beijing Co Ltd
Original Assignee
Nettrix Information Industry Beijing 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 Nettrix Information Industry Beijing Co Ltd filed Critical Nettrix Information Industry Beijing Co Ltd
Priority to CN202211466566.4A priority Critical patent/CN115757275A/en
Publication of CN115757275A publication Critical patent/CN115757275A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses an asset information management method, an asset information management device, electronic equipment and a storage medium. The asset information management method is applied to a substrate management controller and specifically comprises the following steps: acquiring asset information to be managed, and verifying and analyzing the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed; storing the analyzed asset information into an inter-process communication system, and determining an asset information file according to the analyzed asset information; and storing the asset information file into a file system so as to manage the asset information to be managed. The technical scheme of the embodiment of the invention can quickly and accurately acquire the asset information and is convenient for the expansion of the asset information management function.

Description

Asset information management method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an asset information management method and device, electronic equipment and a storage medium.
Background
The asset information of the server is managed, so that a server administrator can know the overall configuration and the operation state of the server. The asset information Management function of the server is an important function of a BMC (Baseboard Management Controller), and can help a server administrator to remotely obtain the asset information of the server.
However, in the existing asset information Management method, a BIOS (Basic Input Output System) sends asset information to a BMC according to an Intelligent Platform Management Interface (IPMI) command and an agreed data format and transmission specification, and the BMC receives data, analyzes the data, and stores the data in a memory or a nonvolatile device, and simultaneously provides a corresponding IPMI command to view the asset information.
However, if it is desired to expand the asset information management function, for example, asset information is displayed on a BMC Web (World Wide Web) page through a redfish (a management standard based on http services) interface, or other processes need to acquire asset information data, all asset information data in a memory or a nonvolatile device have to be acquired, and the asset information data needs to be analyzed secondarily.
Disclosure of Invention
Embodiments of the present invention provide an asset information management method and apparatus, an electronic device, and a storage medium, which can quickly and accurately acquire asset information and facilitate extension of an asset information management function.
According to an aspect of the present invention, there is provided an asset information management method applied to a baseboard management controller, including:
acquiring asset information to be managed, and verifying and analyzing the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed;
storing the analyzed asset information into an inter-process communication system, and determining an asset information file according to the analyzed asset information;
and storing the asset information file into a file system so as to manage the asset information to be managed.
In addition, the asset information management method according to the above embodiment of the present invention may further have the following additional technical features:
optionally, the parsed asset information includes a server device identifier and split asset information corresponding to the server device identifier; correspondingly, the step of storing the parsed asset information into the interprocess communication system comprises the following steps:
determining a target storage path interface in the interprocess communication system corresponding to the asset information to be managed according to the server equipment identifier;
and determining a target asset information storage space according to the target storage path interface, and storing the split asset information into the target asset information storage space.
One embodiment of the above invention has the following advantages or benefits: the specific content of the analyzed asset information is provided, so that the storage space of the split asset information in the interprocess communication system is determined according to the server equipment identifier obtained by analysis, and the required asset information can be acquired more quickly and accurately.
Optionally, storing the split asset information into a target asset information storage space includes:
determining an asset information parameter variable name and an asset information parameter variable value corresponding to split asset information according to the split asset information;
and storing the asset information parameter variable name and the asset information parameter variable value into a target asset information storage space.
One embodiment of the above invention has the following advantages or benefits: the asset information parameter variable name and the asset information parameter variable value corresponding to the split asset information are determined, so that the asset information parameter variable name and the asset information parameter variable value are stored in the target asset information storage space, the split asset information can be stored in a parameter variable mode, and the accuracy of acquiring the asset information is improved.
Optionally, before storing the parsed asset information in the interprocess communication system, the method further includes:
determining historical asset information stored in the interprocess communication system and historical asset information files stored in the file system;
and deleting the historical asset information and the historical asset information file.
One embodiment of the above invention has the following advantages or benefits: by deleting the asset information left over in the interprocess communication system and the file system before storing and analyzing the asset information, the reliability of the asset information can be guaranteed.
Optionally, after storing the asset information file in the file system, the method further includes:
under the condition of restarting a baseboard management controller, acquiring a first storage asset information file stored in a file system;
and determining storage management asset information according to the first storage asset information file, and storing the storage management asset information into the interprocess communication system.
One embodiment of the above invention has the following advantages or benefits: an application scenario for restarting the baseboard management controller is provided to store the asset information stored in the file system to the inter-process communication system after the baseboard management controller is restarted, so that the acquisition rate of the asset information after the baseboard management controller is restarted is further improved.
Optionally, after storing the asset information file in the file system, the method further includes:
determining an asset information file to be deleted in a file system under the condition of updating the baseboard management controller;
determining a reserved asset information file in a file system according to the asset information file to be deleted;
under the condition that the reserved asset information file is determined to be empty, returning to execute the operation of acquiring the asset information to be managed;
and under the condition that the reserved asset information file is determined not to be empty, determining reserved management asset information according to the reserved asset information file, and storing the reserved management asset information into the interprocess communication system.
One embodiment of the above invention has the following advantages or benefits: an application scenario of updating the baseboard management controller is provided, so that the reserved asset information file in the file system is determined after the baseboard management controller is updated, the reserved asset information file is stored in the interprocess communication system when the reserved asset information file is not empty, and the acquisition rate of asset information after the baseboard management controller is updated is further improved.
Optionally, determining the asset information file to be deleted in the file system includes:
acquiring a second storage asset information file stored in the file system, and determining whether to reserve the second storage asset information file;
if yes, determining an asset information file to be deleted in the second stored asset information file according to the asset information deleting instruction;
if not, all the second storage asset information files in the file system are determined as the asset information files to be deleted.
One embodiment of the above invention has the following advantages or benefits: the specific implementation mode for determining the asset information file to be deleted in the file system is provided, so that the asset information file to be deleted can be determined more accurately.
According to another aspect of the present invention, there is provided an asset information management device arranged in a baseboard management controller, comprising:
the asset information acquisition module is used for acquiring asset information to be managed and verifying and analyzing the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed;
the asset information storage module is used for storing the analyzed asset information into the interprocess communication system and determining an asset information file according to the analyzed asset information;
and the asset information management module is used for storing the asset information file into a file system so as to manage the asset information to be managed.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a method of asset information management according to any embodiment of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the asset information management method according to any one of the embodiments of the present invention when executed.
According to the technical scheme of the embodiment of the invention, the asset information to be managed is obtained, the asset information to be managed is checked and analyzed to obtain the analytic asset information corresponding to the asset information to be managed, the analytic asset information is stored in the interprocess communication system, the asset information file is determined according to the analytic asset information, and the asset information file is stored in the file system, so that the asset information to be managed is managed, the problem that the asset information cannot be timely and accurately obtained by the existing asset information management method is solved, the asset information can be quickly and accurately obtained, and the asset information management function can be conveniently expanded.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of an asset information management method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for managing asset information according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating an example of a method for managing asset information according to a third embodiment of the present invention;
FIG. 4 is a flowchart of another example of an asset information management method according to a third embodiment of the present invention;
FIG. 5 is a flowchart of another example of a method for asset information management according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of an asset information management apparatus according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device implementing an asset information management method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of an asset information management method according to an embodiment of the present invention, where the embodiment is applicable to a case where asset information is obtained quickly and accurately, and the method may be implemented by an asset information management apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally directly integrated in an electronic device that executes the method, for example, a baseboard management controller. Specifically, as shown in fig. 1, the asset information management method is applied to a Baseboard Management Controller (BMC), and may specifically include the following steps:
s110, acquiring asset information to be managed, and verifying and analyzing the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed.
The asset information to be managed may be any asset information related to the server that needs to be managed. For example, the asset information to be managed may be CPU information, memory information, PCIE information, or the like of the server, which is not limited in the embodiment of the present invention. The analyzed asset information may be asset information obtained by performing verification analysis on the asset information to be managed.
In the embodiment of the invention, the asset information to be managed is obtained to check and analyze the asset information to be managed, so that the analyzed asset information corresponding to the asset information to be managed is obtained.
Optionally, the asset information to be managed may be obtained from the IPMI command. Specifically, after the server is started, the BIOS may scan the server and collect asset information (i.e., asset information to be managed) of the server, and the BIOS generates an IPMI command according to the asset information of the server, so as to send the generated IPMI command to the BMC through the BIOS, thereby acquiring the asset information to be managed in the IPMI command through an IPMI command processing process in the BMC.
Optionally, the checking and analyzing of the asset information to be managed may be checking and analyzing of the asset information to be managed in the IPMI command through an IPMI command processing process in the BMC.
And S120, storing the analyzed asset information into an interprocess communication system, and determining an asset information file according to the analyzed asset information.
Wherein an interprocess communication system may be used for communication between two or more processes. In the process of communication through the interprocess communication system, one process can store the communication data in the interprocess communication system, and the other process can acquire the communication data in the interprocess communication system, thereby realizing the communication between the two processes. It is understood that any process may store communication data in the interprocess communication system, and any corresponding process may obtain communication data in the interprocess communication system. It is understood that the interprocess communication system in the baseboard management controllers of different architectures may also be different. For example, in the baseboard management controller of the OpenBMC architecture, the interprocess communication system may be a D-Bus (message Bus system). It is understood that D-Bus can be used for Inter-Process Communication or Communication between a Process and a kernel, and is accepted by more and more platforms as a lightweight IPC (Inter-Process Communication). The asset information file may be asset information in the form of a file generated from parsing the asset information.
In the embodiment of the invention, after the asset information to be managed is verified and analyzed to obtain the analyzed asset information corresponding to the asset information to be managed, the analyzed asset information can be further stored in the interprocess communication system, and meanwhile, an asset information file can be determined according to the analyzed asset information so as to store the asset information file in the file system. It will be appreciated that after storing the parsed asset information to the interprocess communication system, any process may directly interface with the interprocess communication system to obtain the parsed asset information.
Optionally, after the asset information to be managed in the IPMI command is verified and analyzed by the IPMI command processing process in the BMC to obtain the analyzed asset information, the inter-process communication system may be called to send the analyzed asset information to the asset information management process in the BMC, so that the analyzed asset information is stored in the inter-process communication system by the asset information management process, and the asset information file is determined according to the analyzed asset information.
S130, storing the asset information file into a file system so as to manage the asset information to be managed.
In the embodiment of the present invention, after determining the asset information file according to the parsed asset information, the asset information file may be further stored in a file system to manage the asset information to be managed. Optionally, the asset information file is stored in the file system, and the asset information file may be stored in a preset storage path in the file system. Illustratively, the asset information file may be stored under the/var/lib of the file system. Alternatively, the asset information file may be stored in a file system through an asset information management process.
According to the technical scheme, the asset information to be managed is acquired, the asset information to be managed is verified and analyzed to obtain the analyzed asset information corresponding to the asset information to be managed, the analyzed asset information is stored in the interprocess communication system, the asset information file is determined according to the analyzed asset information, and the asset information file is stored in the file system, so that the asset information to be managed is managed, the problem that the asset information cannot be timely and accurately acquired by an existing asset information management method is solved, the asset information can be rapidly and accurately acquired, and meanwhile, the asset information management function is conveniently expanded.
Example two
Fig. 2 is a flowchart of an asset information management method according to a second embodiment of the present invention, where this embodiment further details the above technical solutions, and provides multiple specific optional implementation manners in which the parsed asset information includes a server device identifier and split asset information corresponding to the server identifier. The solution in this embodiment may be combined with the individual alternatives in one or more of the embodiments described above. As shown in fig. 2, the method may include the steps of:
s210, asset information to be managed is obtained, and verification and analysis are carried out on the asset information to be managed, so that a server equipment identifier corresponding to the asset information to be managed and split asset information corresponding to the server identifier are obtained.
The server device identifier may be an identifier of a device in the server corresponding to the asset information to be managed, for example, a name corresponding to the server device, or a serial number corresponding to the server device, which is not limited in the embodiment of the present invention. It is understood that a server may include multiple devices, and the multiple devices in the server may be the same or different. For example, assuming that the server includes 2 CPU devices, the server device identifiers corresponding to the 2 CPU devices may be CPU-1 and CPU-2. Assuming that the server includes 1 memory device and 1 CPU device, the server device identifier corresponding to the memory device may be a memory, and the server device identifier corresponding to the CPU device may be a CPU.
The split asset information may be asset information corresponding to the server device obtained by splitting the asset information to be managed. It is understood that the asset information corresponding to different server devices may be different, and the asset information corresponding to the same server device may be the same or different.
In the embodiment of the invention, the asset information to be managed is obtained to check and analyze the asset information to be managed, so that the server equipment identifier corresponding to the asset information to be managed and the split asset information corresponding to the server equipment identifier are obtained. It is to be understood that the asset information to be managed may correspond to one or more server device identifications, and one server device identification may correspond to one or more split asset information.
S220, determining a target storage path interface in the interprocess communication system corresponding to the asset information to be managed according to the server equipment identification.
The target storage path interface may be an interface corresponding to a storage path in the interprocess communication system. It will be appreciated that the server device identification corresponds one-to-one to the target storage path interface. The target storage path interfaces corresponding to different server device identifiers are different. That is, the asset information corresponding to different server devices may be stored under different interface paths.
In the embodiment of the invention, after the asset information to be managed is checked and analyzed to obtain the server equipment identifier corresponding to the asset information to be managed and the split asset information corresponding to the server equipment identifier, a target storage path interface in the interprocess communication system corresponding to the asset information to be managed can be further determined according to the server equipment identifier.
Optionally, before determining, according to the server device identifier, a target storage path interface in the inter-process communication system corresponding to the asset information to be managed, the method may further include: determining historical asset information stored in an interprocess communication system and a historical asset information file stored in a file system; and deleting the historical asset information and the historical asset information file.
Wherein the historical asset information may be asset information already stored in the interprocess communication system before the parsed asset information is stored in the interprocess communication system. The historical asset information file may be an asset information file already stored in the file system prior to storing the asset information file to the file system.
Specifically, before determining a target storage path interface in the interprocess communication system corresponding to the asset information to be managed according to the server device identifier, historical asset information stored in the interprocess communication system and a historical asset information file stored in the file system may be determined to delete the historical asset information and the historical asset information file.
According to the technical scheme, the asset information left in the interprocess communication system and the file system is deleted before the asset information is stored and analyzed, so that the reliability of the asset information can be guaranteed.
And S230, determining a target asset information storage space according to the target storage path interface, and storing the split asset information to the target asset information storage space.
Wherein the target asset information storage space may be a storage space determined according to the target storage path interface. That is, the target asset information storage space may be a space in which asset information corresponding to the server device is stored. It will be appreciated that the target asset information storage space may be a storage space in an interprocess communication system.
In the embodiment of the present invention, after determining, according to the server device identifier, a target storage path interface in the inter-process communication system corresponding to the asset information to be managed, a target asset information storage space may be further determined according to the target storage path interface, so as to store the split asset information into the target asset information storage space.
According to the technical scheme, the specific content of the analyzed asset information is determined, the storage space of the split asset information in the interprocess communication system is determined according to the server equipment identifier obtained through analysis, and the required asset information can be acquired more quickly and accurately.
Optionally, when the split asset information is stored in the target asset information storage space, the split asset information may be stored in the target asset information storage space in the form of a parameter variable.
Optionally, storing the split asset information in the target asset information storage space may include: determining an asset information parameter variable name and an asset information parameter variable value corresponding to split asset information according to the split asset information; and storing the asset information parameter variable name and the asset information parameter variable value into a target asset information storage space.
The asset information parameter variable name may be a name of a parameter variable corresponding to the split asset information. The asset information parameter variable value may be a value of a parameter variable corresponding to the split asset information.
Specifically, after determining a target storage path interface in the inter-process communication system corresponding to the asset information to be managed according to the server device identifier, an asset information parameter variable name and an asset information parameter variable value corresponding to the split asset information may be further determined according to the split asset information, so as to store the asset information parameter variable name and the asset information parameter variable value into the target asset information storage space. It will be appreciated that different split asset information may correspond to different asset information parameter variable names.
For example, if the split asset information is information that the CPU device is in place, then the asset information parameter variable name may be determined to be abc and the asset information parameter variable value may be true. If the split asset information is information that the CPU device is not in place, the asset information parameter variable name can be determined to be abc, and the asset information parameter variable value can be false. That is, the value of the parameter variable abc may represent information on whether the CPU device is in place.
According to the technical scheme, the asset information parameter variable name and the asset information parameter variable value corresponding to the split asset information are determined, so that the asset information parameter variable name and the asset information parameter variable value are stored in the target asset information storage space, the split asset information can be stored in the form of the parameter variable, and the accuracy of acquiring the asset information is improved.
S240, determining an asset information file according to the server equipment identifier and the split asset information corresponding to the server equipment identifier, and storing the asset information file into a file system to manage the asset information to be managed.
In the embodiment of the invention, the asset information file is determined according to the server equipment identifier and the split asset information corresponding to the server equipment identifier, so that the asset information file is stored in a file system, and the asset information to be managed is managed. Optionally, one asset information file may correspond to a plurality of pieces of split asset information of one server device, that is, one asset information file is determined according to all pieces of split asset information corresponding to the server device identifier; the present invention may also be configured to determine an asset information file according to split asset information of a server device, that is, according to split asset information corresponding to a server device identifier.
Optionally, after storing the asset information file in the file system, the method may further include: under the condition of restarting a baseboard management controller, acquiring a first storage asset information file stored in a file system; and determining storage management asset information according to the first storage asset information file, and storing the storage management asset information into the interprocess communication system.
Wherein the first stored asset information file may be an asset information file previously stored in the file system prior to the baseboard management controller restarting. The storage management asset information may be asset information derived from the first storage asset information file.
Specifically, in an application scenario of restarting the baseboard management controller, a first storage asset information file stored in the file system may be acquired, so as to determine storage management asset information according to the first storage asset information file, thereby storing the storage management asset information in the interprocess communication system.
According to the technical scheme, an application scene of restarting the baseboard management controller is provided, so that the asset information stored in the file system is stored in the interprocess communication system after the baseboard management controller is restarted, and the acquisition rate of the asset information after the baseboard management controller is restarted is further improved.
Optionally, after storing the asset information file in the file system, the method may further include: under the condition of updating the baseboard management controller, determining an asset information file to be deleted in a file system; determining a reserved asset information file in a file system according to the asset information file to be deleted; under the condition that the reserved asset information file is determined to be empty, returning to execute the operation of acquiring the asset information to be managed; and under the condition that the reserved asset information file is determined not to be empty, determining reserved management asset information according to the reserved asset information file, and storing the reserved management asset information into the interprocess communication system.
The asset information file to be deleted may be an asset information file that needs to be deleted in the file system. The reserved asset information file may be an asset information file in the file system that needs to be reserved. It will be appreciated that the asset information file to be deleted and the reserved asset information file constitute all asset information files in the file system. The reservation management asset information may be asset information derived from a reservation asset information file.
Specifically, in an application scenario of updating the baseboard management controller, the asset information file to be deleted in the file system may be determined, so as to determine the reserved asset information file in the file system according to the asset information file to be deleted, thereby determining whether the reserved asset information file is empty. If the reserved asset information file is empty, which indicates that all asset information files in the file system are deleted, the operation of acquiring the asset information to be managed can be returned to be executed, so as to acquire the asset information to be managed again. If the reserved asset information file is not empty, indicating that a portion of the asset information file in the file system is deleted, the reserved management asset information may be determined from the reserved asset information file to store the reserved management asset information in the interprocess communication system.
According to the technical scheme, the application scene of the updated baseboard management controller is provided, so that the reserved asset information file in the file system is determined after the baseboard management controller is updated, the reserved asset information file is stored in the interprocess communication system when the reserved asset information file is not empty, and the acquisition rate of asset information after the baseboard management controller is updated is further improved.
Optionally, determining the asset information file to be deleted in the file system may include: acquiring a second storage asset information file stored in the file system, and determining whether to reserve the second storage asset information file; if yes, determining an asset information file to be deleted in the second stored asset information file according to the asset information deleting instruction; if not, all the second storage asset information files in the file system are determined as the asset information files to be deleted.
Wherein the second stored asset information file may be an asset information file previously stored in the file system by the baseboard management controller. The asset information deletion instruction may be an instruction to delete asset information in a file system.
Specifically, in an application scenario of updating the baseboard management controller, a second storage asset information file stored in the file system may be obtained, and it may be determined whether to reserve the second storage asset information file. If the second stored asset information file is reserved, the asset information file to be deleted in the second stored asset information file can be determined according to the asset information deletion instruction. If the second stored asset information file is not retained, all of the second stored asset information files in the file system may be determined to be the asset information files to be deleted.
According to the technical scheme, a specific implementation mode for determining the asset information file to be deleted in the file system is provided, so that the asset information file to be deleted can be determined more accurately.
According to the technical scheme of the embodiment, the asset information to be managed is acquired, the server equipment identification corresponding to the asset information to be managed and the split asset information corresponding to the server identification are obtained through checking and analyzing the asset information to be managed, the target storage path interface in the interprocess communication system corresponding to the asset information to be managed is determined according to the server equipment identification, the target asset information storage space is determined according to the target storage path interface, the split asset information is stored in the target asset information storage space, the asset information file is determined according to the server equipment identification and the split asset information corresponding to the server equipment identification, the asset information file is stored in the file system, the asset information to be managed is managed, the problem that the asset information cannot be timely and accurately acquired by an existing asset information management method is solved, the asset information can be rapidly and accurately acquired, and meanwhile, the asset information management function can be conveniently expanded.
EXAMPLE III
In order to make those skilled in the art better understand the asset information management method of the embodiment, an application scenario of the baseboard management controller of the OpenBMC architecture is specifically described as an example. OpenBMC is an open source project of BMC, and with the development of technology, openBMC is becoming mature and stable, and gradually becomes the development direction of future BMC. However, a general asset information management scheme for OpenBMC does not exist in the prior art, and if the existing asset information management scheme is directly used for OpenBMC, the framework advantage of OpenBMC cannot be fully utilized. Therefore, the asset information management method of the baseboard management controller based on the OpenBMC architecture has great significance.
Fig. 3 is an exemplary flowchart of an asset information management method according to a third embodiment of the present invention, and as shown in fig. 3, the method may specifically include:
(1) After the server is started, the server equipment can be scanned through the BIOS to collect asset information (namely asset information to be managed) of the server equipment, and an IPMI command is generated through the BIOS according to the collected asset information and is sent to the BMC.
(2) After the BMC receives the IPMI command, the asset information can be verified and analyzed through an IPMI command processing process in the BMC to obtain analyzed asset information.
(3) And calling a D-Bus to send the analyzed asset information to an asset information management process in the BMC.
(4) After the asset information management process receives the analyzed asset information, the asset information (namely historical asset information and historical asset information files) left on the D-Bus and in the file system is removed through the asset information management process.
(5) And adding the analytic asset information to the D-Bus through the asset information management process, and storing the analytic asset information in a file form under a file system/var/lib. Specifically, asset information of different server devices may be added to different path interfaces in the D-Bus, and different asset information corresponding to the same server device may be stored in the form of parameter variables in interface paths corresponding to the server devices. That is, different server devices can be distinguished through the names of the path interfaces on the D-Bus, and different asset information can be distinguished through the names of the parameter variables.
(6) And other processes can directly acquire the asset information on the D-Bus when the asset information needs to be acquired. Specifically, if other processes need to acquire asset information, for example, a BMC back-end process needs to acquire asset information and transmit the asset information to the front end through a redfish interface, and finally the asset information is displayed on a BMC web page, or a monitoring process of related equipment needs to acquire asset information of corresponding equipment to identify the equipment, etc., the D-Bus may be connected to acquire the asset information through a path interface corresponding to the server equipment.
According to the technical scheme, when other processes need to acquire the asset information, secondary analysis is not needed, and the required asset information can be quickly and accurately acquired through the path interface and the name of the parameter variable.
Fig. 4 is another exemplary flowchart of an asset information management method according to a third embodiment of the present invention, and as shown in fig. 4, in an application scenario where the BMC is restarted, the method may include the following steps:
(1) Asset information stored in the file system (i.e., the first stored asset information file) is obtained through an asset information management process.
(2) And adding the asset information stored in the file system to the D-Bus through an asset information management process.
According to the technical scheme, in the application scene of restarting the BMC, the asset information stored in the file system is obtained and stored to the D-Bus, so that other processes can directly obtain the asset information on the D-Bus when needing to obtain the asset information. It will be appreciated that asset information stored on the D-Bus may be lost after restarting the BMC.
Fig. 5 is another exemplary flowchart of an asset information management method according to a third embodiment of the present invention, and as shown in fig. 5, in an application scenario of updating a BMC, the method may include the following steps:
(1) It is determined whether to retain the asset information in the file system (i.e., the second stored asset information file).
(2) And if so, determining the asset information file to be deleted, and deleting the asset information file to be deleted. After the BMC is started, asset information (namely a reserved asset information file) is acquired in the file system through an asset information management process, and the reserved asset information file is added to the D-Bus through the asset information management process.
(3) If not, all the asset information in the file system is deleted. After the BMC is started, waiting for the BIOS to send an IPMI command to push asset information. It is understood that if the asset information in the file system is not retained, and there is no asset information in the file system after the BMC update, the asset information may be retrieved through the BIOS.
According to the technical scheme, the asset information in the file system is reserved, so that other processes can acquire the asset information through the D-Bus.
According to the technical scheme, a D-Bus in OpenBMC is fully utilized, so that interaction among different processes is faster and more convenient, the expansion of an asset information management function is facilitated, asset information can be displayed on a visual web interface, and data requirements of other processes are met; by storing the asset information in the file system, the asset information can be reserved after the BMC is restarted, and when the BMC is updated, the unreserved, full-reserved or partial asset information can be flexibly configured, so that the development or management work is more convenient.
Example four
Fig. 6 is a schematic diagram of an asset information management device according to a fourth embodiment of the present invention, and as shown in fig. 6, the asset information management device is configured on a baseboard management controller, and specifically includes: an asset information acquisition module 610, an asset information storage module 620, and an asset information management module 630, wherein:
an asset information obtaining module 610, configured to obtain asset information to be managed, and perform verification and analysis on the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed;
an asset information storage module 620, configured to store the parsed asset information in an inter-process communication system, and determine an asset information file according to the parsed asset information;
the asset information management module 630 is configured to store the asset information file in a file system, so as to manage the asset information to be managed.
According to the technical scheme, the asset information to be managed is acquired, the asset information to be managed is verified and analyzed to obtain the analyzed asset information corresponding to the asset information to be managed, the analyzed asset information is stored in the interprocess communication system, the asset information file is determined according to the analyzed asset information, and the asset information file is stored in the file system, so that the asset information to be managed is managed, the problem that the asset information cannot be timely and accurately acquired by an existing asset information management method is solved, the asset information can be rapidly and accurately acquired, and meanwhile, the asset information management function is conveniently expanded.
Optionally, the parsed asset information may include a server device identifier and split asset information corresponding to the server device identifier; accordingly, the asset information storage module 620 may be specifically configured to: determining a target storage path interface in the interprocess communication system corresponding to the asset information to be managed according to the server equipment identifier; and determining a target asset information storage space according to the target storage path interface, and storing the split asset information into the target asset information storage space.
Optionally, the asset information storage module 620 may be further configured to: determining an asset information parameter variable name and an asset information parameter variable value corresponding to split asset information according to the split asset information; and storing the asset information parameter variable name and the asset information parameter variable value into a target asset information storage space.
Optionally, the asset information storage module 620 may be further specifically configured to: determining historical asset information stored in the interprocess communication system and historical asset information files stored in the file system; and deleting the historical asset information and the historical asset information file.
Optionally, the asset information management module 630 may be specifically configured to: under the condition that the substrate management controller is restarted, a first storage asset information file stored in a file system is obtained; and determining storage management asset information according to the first storage asset information file, and storing the storage management asset information into the interprocess communication system.
Optionally, the asset information management module 630 may be further specifically configured to: determining an asset information file to be deleted in a file system under the condition of updating the baseboard management controller; determining a reserved asset information file in a file system according to the asset information file to be deleted; under the condition that the reserved asset information file is determined to be empty, returning to execute the operation of acquiring the asset information to be managed; and under the condition that the reserved asset information file is determined not to be empty, determining reserved management asset information according to the reserved asset information file, and storing the reserved management asset information into the interprocess communication system.
Optionally, the asset information management module 630 may be further configured to: acquiring a second storage asset information file stored in the file system, and determining whether to reserve the second storage asset information file; if yes, determining an asset information file to be deleted in the second stored asset information file according to the asset information deleting instruction; if not, all the second storage asset information files in the file system are determined as the asset information files to be deleted.
The asset information management device provided by the embodiment of the invention can execute the asset information management method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
FIG. 7 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the asset information management method.
In some embodiments, the asset information management method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the asset information management method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the asset information management method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An asset information management method is applied to a baseboard management controller and comprises the following steps:
acquiring asset information to be managed, and verifying and analyzing the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed;
storing the analyzed asset information into an inter-process communication system, and determining an asset information file according to the analyzed asset information;
and storing the asset information file into a file system so as to manage the asset information to be managed.
2. The method of claim 1, wherein the resolved asset information comprises a server device identification and split asset information corresponding to the server device identification;
the storing the parsed asset information into an interprocess communication system includes:
determining a target storage path interface in the interprocess communication system corresponding to the asset information to be managed according to the server equipment identifier;
and determining a target asset information storage space according to the target storage path interface, and storing the split asset information to the target asset information storage space.
3. The method of claim 2, wherein storing the split asset information to the target asset information storage space comprises:
according to the split asset information, determining an asset information parameter variable name and an asset information parameter variable value corresponding to the split asset information;
and storing the asset information parameter variable name and the asset information parameter variable value into the target asset information storage space.
4. The method of claim 1, further comprising, prior to the storing the parsed asset information in an inter-process communication system:
determining historical asset information stored in the interprocess communication system and historical asset information files stored in the file system;
and deleting the historical asset information and the historical asset information file.
5. The method of claim 1, further comprising, after said storing said asset information file in a file system:
under the condition that the baseboard management controller is restarted, acquiring a first storage asset information file stored in the file system;
and determining storage management asset information according to the first storage asset information file, and storing the storage management asset information into the interprocess communication system.
6. The method of claim 1, further comprising, after said storing said asset information file in a file system:
under the condition of updating the baseboard management controller, determining an asset information file to be deleted in the file system;
determining a reserved asset information file in the file system according to the asset information file to be deleted;
under the condition that the reserved asset information file is determined to be empty, returning to execute the operation of acquiring the asset information to be managed;
and under the condition that the reserved asset information file is determined not to be empty, determining reserved management asset information according to the reserved asset information file, and storing the reserved management asset information into the interprocess communication system.
7. The method of claim 6, wherein the determining the asset information file to be deleted in the file system comprises:
acquiring a second storage asset information file stored in the file system, and determining whether to reserve the second storage asset information file;
if yes, determining an asset information file to be deleted in the second stored asset information file according to an asset information deletion instruction;
if not, all the second stored asset information files in the file system are determined as the asset information files to be deleted.
8. An asset information management device disposed in a baseboard management controller, comprising:
the asset information acquisition module is used for acquiring asset information to be managed and verifying and analyzing the asset information to be managed to obtain analyzed asset information corresponding to the asset information to be managed;
the asset information storage module is used for storing the analyzed asset information into the interprocess communication system and determining an asset information file according to the analyzed asset information;
and the asset information management module is used for storing the asset information file into a file system so as to manage the asset information to be managed.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the asset information management method of any of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the asset information management method of any one of claims 1-7 when executed.
CN202211466566.4A 2022-11-22 2022-11-22 Asset information management method and device, electronic equipment and storage medium Pending CN115757275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211466566.4A CN115757275A (en) 2022-11-22 2022-11-22 Asset information management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211466566.4A CN115757275A (en) 2022-11-22 2022-11-22 Asset information management method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115757275A true CN115757275A (en) 2023-03-07

Family

ID=85335327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211466566.4A Pending CN115757275A (en) 2022-11-22 2022-11-22 Asset information management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115757275A (en)

Similar Documents

Publication Publication Date Title
CN115242731A (en) Message processing method, device, equipment and storage medium
CN113641544B (en) Method, apparatus, device, medium and product for detecting application state
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN116301997A (en) Upgrading method, device, equipment and medium of controller
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN116303013A (en) Source code analysis method, device, electronic equipment and storage medium
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN115599438A (en) Method, device, equipment and medium for constructing application program publishing package
CN115309558A (en) Resource scheduling management system, method, computer equipment and storage medium
CN115357493A (en) Test method, test device, electronic equipment and storage medium
CN115495151A (en) Rule engine migration method, device, equipment, storage medium and program product
CN115687406A (en) Sampling method, device and equipment of call chain data and storage medium
CN112799642B (en) Method, apparatus, device and storage medium for processing data
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN115757275A (en) Asset information management method and device, electronic equipment and storage medium
CN113961405B (en) State switching instruction verification method and device, electronic equipment and storage medium
CN118093048A (en) Multi-module starting management method, device, equipment and medium
CN116069764A (en) Data verification method, device, electronic equipment and storage medium
CN114117317A (en) Model processing method, device, equipment and storage medium
CN115269055A (en) Nginx request data acquisition method, device, equipment and storage medium
CN115237497A (en) Application component processing method, device, equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and 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