CN103885865B - A kind of Method of Sensor Management and device - Google Patents
A kind of Method of Sensor Management and device Download PDFInfo
- Publication number
- CN103885865B CN103885865B CN201410099428.6A CN201410099428A CN103885865B CN 103885865 B CN103885865 B CN 103885865B CN 201410099428 A CN201410099428 A CN 201410099428A CN 103885865 B CN103885865 B CN 103885865B
- Authority
- CN
- China
- Prior art keywords
- sensor
- state
- sensor identifier
- identifier
- data record
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000007726 management method Methods 0.000 claims description 98
- 230000008859 change Effects 0.000 claims description 29
- 230000015654 memory Effects 0.000 description 20
- 238000010586 diagram Methods 0.000 description 17
- 230000008569 process Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000004075 alteration Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of Method of Sensor Management and device, method is, the sensor identification for storing the corresponding state that is stored with list of each state included in BMC, when user accesses the sensor identification stored in BMC, if it is activated state that institute's access sensors identify corresponding state, first-selected state will be switched to by activated state comprising institute's access sensors mark place page table.Using technical solution of the present invention, category division is carried out to sensor according to the corresponding state of sensor, in making the sensor identification of different conditions preserve to different storage lists, as in storage list, each page table can preserve no more than 255 sensor identifications, therefore, number of sensors that BMC need not be administered limit, the corresponding sensor of each component Configuration to be monitored can be directed to, the management granularity of sensor is ensure that, fault location precision is effectively increased.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a sensor management method and apparatus.
Background
Inside the server, the BMC (Baseboard Management Controller) is configured to generate a data record according to the status information of each component reported by the sensor, and manage the data record.
In the intelligent management architecture of the server, the sensor is the minimum unit for managing the state information of each component in the server by the BMC. With the increasing power of the server, the number of components in the server is increasing, so that the number of sensors that the BMC needs to manage is increasing. However, in the IPMI (Intelligent Platform management interface) 2.0 specification, the valid range of the sensor number that a user can access to one BMC is 0 to 254, so that the number of sensors that one BMC can control is limited to a threshold number (i.e., 255).
At present, when the number of sensors under the jurisdiction of a BMC exceeds a threshold number, a method of reducing the number of sensors is generally adopted to solve the problem that the number of sensors under the jurisdiction of the BMC has an upper limit value. For example, the number of sensors is reduced by deleting unnecessary sensors, and by adopting the technical scheme, the problem that component state information reported by a specific sensor cannot be acquired exists. In addition, the number of sensors can be reduced by combining a plurality of sensors into one sensor, for example, the sensors a to H respectively monitor the states of eight memories, that is, one sensor monitors the state of one memory, and when any memory fails, the sensor corresponding to the any memory sends a failure warning to the BMC; at this time, the eight sensors are combined into one sensor, the state of the eight memories is monitored by using the sensor a, and if any one of the eight memories fails, the sensor a sends a failure warning to the BMC. By adopting the technical scheme, one sensor manages a plurality of memories, and the sensor management granularity is large, so that the BMC cannot accurately position the failed memory according to the fault warning sent by the sensor.
Therefore, in the prior art, the sensor management granularity is large, and the BMC cannot accurately position the memory with faults according to the fault warning sent by the sensor.
Disclosure of Invention
The embodiment of the invention provides a sensor management method and a sensor management device, which are used for solving the problems that the granularity of sensor management is large, and a BMC (baseboard management controller) cannot accurately position a failed memory according to a fault warning sent by a sensor.
In a first aspect, a sensor management method is provided, which is applied to sensor management of a baseboard management controller BMC, where the BMC stores a preferred state table and an active state table, and a sensor identifier in a preferred state is recorded in the preferred state table, and the method includes:
receiving an access instruction, and searching a state corresponding to a sensor identifier from a locally stored storage list according to the sensor identifier carried in the access instruction;
when the state corresponding to the sensor identifier is an activated state, switching a page table containing the sensor identifier in the storage list to the preferred state; the number of the sensor identifications contained in any page table is not greater than the threshold number specified by the intelligent platform management interface specification;
outputting a page table containing the sensor identification.
With reference to the first aspect, in a first possible implementation manner, the BMC further includes data records respectively corresponding to each sensor identifier in the preferred state table and each sensor identifier in the activated state table; the method for generating the data record corresponding to any sensor identifier in the preferred state table or any sensor identifier in the activated state table comprises the following steps: acquiring any sensor identifier in an activated state or a preferred state and an event record corresponding to any sensor identifier in the activated state or the preferred state; and taking any sensor identifier with the state being an activated state or a preferred state and the corresponding event record as a data record, and storing the data record into a local database.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, after the data record is stored in a local database, and after a data record query instruction input by a user is received, an identifier of an event record carried in the data record query instruction is obtained, and according to the identifier of the event record, a data record corresponding to the identifier of the event record stored in the database is obtained; or acquiring a sensor identifier carried in the data record query instruction, and acquiring a data record corresponding to the sensor identifier stored in the database according to the sensor identifier.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, after the data record is stored in a local database, and after a sensor management instruction input by a user is received, a sensor identifier and data record management information carried in the data record management instruction are acquired; when the data record management information is data record deleting information, deleting the sensor identifier in a page table where the sensor identifier is located, and deleting the data record corresponding to the sensor identifier stored in the database; when the data record management information is data record adding information, acquiring a sensor identifier to be added, and adding the sensor identifier to be added into the preferred state table or the activated state table; when the data record management information is the state corresponding to the changed sensor identifier, acquiring the sensor identifier to be changed and the state change information thereof, storing the sensor identifier to be changed into a corresponding page table according to the state change information, and updating the data record corresponding to the sensor identifier to be changed in the storage list and the sensor identifier to be changed stored in the database.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, if the state change information is to change the state corresponding to the to-be-changed sensor identifier from the preferred state to the activated state, configuring the preferred state table where the to-be-changed sensor identifier is located as an activated state table; and if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the activated state to the preferred state, configuring the activated state table where the sensor identifier to be changed is located as the preferred state table.
In a second aspect, a sensor management device is provided, which is applied to sensor management of a baseboard management controller BMC, where the sensor management device stores a preferred state table and an active state table, and a sensor identifier in a preferred state is recorded in the preferred state table, and the sensor management device includes:
the receiving unit is used for receiving the access instruction and sending the access instruction to the searching unit;
the searching unit is used for receiving the access instruction sent by the receiving unit, searching a state corresponding to the sensor identifier from a locally stored storage list according to the sensor identifier carried in the access instruction, and sending the state corresponding to the sensor identifier to the switching unit;
the switching unit is used for receiving the state corresponding to the sensor identifier sent by the searching unit, switching the page table containing the sensor identifier in the storage list to the preferred state when the state corresponding to the sensor identifier is an activated state, and sending the page table containing the sensor identifier to the output unit; the number of the sensor identifications contained in any page table is not greater than the threshold number specified by the intelligent platform management interface specification;
and the output unit is used for outputting the page table containing the sensor identifier after receiving the page table containing the sensor identifier sent by the switching unit.
With reference to the second aspect, in a first possible implementation manner, the apparatus further includes a storage unit, configured to: acquiring any sensor identifier in an activated state or a preferred state and an event record corresponding to any sensor identifier in the activated state or the preferred state; and taking any sensor identifier with the state being an activated state or a preferred state and the corresponding event record as a data record, and storing the data record into a local database.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the apparatus further includes a data record obtaining unit, configured to: after the data records are stored in a local database, after a data record query instruction input by a user is received, acquiring an identifier of an event record carried in the data record query instruction, and acquiring the data record corresponding to the identifier of the event record stored in the database according to the identifier of the event record; or acquiring a sensor identifier carried in the data record query instruction, and acquiring a data record corresponding to the sensor identifier stored in the database according to the sensor identifier.
With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner, the apparatus further includes a processing unit configured to: after the data records are stored in a local database, acquiring sensor identifications and data record management information carried in the data record management instructions after receiving sensor management instructions input by a user; when the data record management information is data record deleting information, deleting the sensor identifier in a page table where the sensor identifier is located, and deleting the data record corresponding to the sensor identifier stored in the database; when the data record management information is data record adding information, acquiring a sensor identifier to be added, and adding the sensor identifier to be added into the preferred state table or the activated state table; when the data record management information is the state corresponding to the changed sensor identifier, acquiring the sensor identifier to be changed and the state change information thereof, storing the sensor identifier to be changed into a corresponding page table according to the state change information, and updating the data record corresponding to the sensor identifier to be changed in the storage list and the sensor identifier to be changed stored in the database.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner, the processing unit is specifically configured to: if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the preferred state to the activated state, configuring the preferred state table where the sensor identifier to be changed is located as an activated state table; and if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the activated state to the preferred state, configuring the activated state table where the sensor identifier to be changed is located as the preferred state table.
In a third aspect, a sensor management method is provided, which is applied to sensor management of a baseboard management controller BMC, where the BMC stores a preferred state table, an activated state table, and an initial state table, a sensor identifier in a preferred state is recorded in the preferred state table, and a sensor identifier in an activated state is recorded in the activated state table, and the method includes:
receiving a configuration instruction, and acquiring a sensor identifier which is carried in the configuration instruction and has an initial state and a configured state;
when the configured state is a preferred state, storing the sensor identifier into a page table of the preferred state table;
when the configured state is an activated state, storing the sensor identifier into a page table of the activated state table; and the number of the sensor identifications contained in any page table is not more than the threshold number specified by the intelligent platform management interface specification.
In the embodiment of the invention, the storage list of each state in the BMC stores the sensor identifier of the corresponding state, and when a user accesses the sensor identifier stored in the BMC, if the state corresponding to the accessed sensor identifier is an activated state, the page table containing the accessed sensor identifier is switched from the activated state to the preferred state. By adopting the technical scheme of the invention, the sensors are classified according to the corresponding states of the sensors, so that the sensor identifications in different states are stored in different storage lists, and each page table in the storage lists can store the number of the sensor identifications as a threshold value, so that the corresponding sensors can be configured for each component to be monitored, the number of the sensors governed by the BMC is not required to be limited, the management granularity of the sensors is ensured, and the fault positioning precision is effectively improved.
Drawings
FIG. 1 is a system block diagram according to an embodiment of the present invention;
FIG. 2 is a first flow chart of sensor management according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a storage list according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a state transition process of a sensor according to an embodiment of the present invention;
FIG. 5 is a signaling interaction diagram of a user accessing a sensor in an embodiment of the present invention;
FIG. 6 is a detailed flow chart of a user querying a data record in an embodiment of the present invention;
FIG. 7 is a flow chart of sensor management according to an embodiment of the present invention;
FIG. 8 is a first schematic structural diagram of a sensor management apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a BMC device in an embodiment of the invention;
fig. 10 is a schematic structural diagram of a sensor management device in an embodiment of the present invention.
Detailed Description
The problem of inaccurate fault location exists in the management process of each sensor in the server is solved. In the embodiment of the invention, the storage list of each state in the BMC stores the sensor identifier of the corresponding state, and when a user accesses the sensor identifier stored in the BMC, if the state corresponding to the accessed sensor identifier is an activated state, the page table containing the accessed sensor identifier is switched from the activated state to the preferred state. By adopting the technical scheme of the invention, the sensors are classified according to the corresponding states of the sensors, so that the sensor identifications in different states are stored in different storage lists, and each page table in the storage lists can store the number of the sensor identifications as a threshold value, so that the corresponding sensors can be configured for each component to be monitored, the number of the sensors governed by the BMC is not required to be limited, the management granularity of the sensors is ensured, and the fault positioning precision is effectively improved.
Fig. 1 is a system architecture diagram in an embodiment of the present invention, where a BMC is located in a server, and establishes a connection with the server through a hardware interface, and generates a data record according to a state of a component to be monitored, which is reported by each sensor in the server, and a database in the BMC is used to store the data record. Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, in the embodiment of the present invention, a detailed process for managing sensors includes:
step 200: and receiving an access instruction, and searching a state corresponding to the sensor identifier from a locally stored storage list according to the sensor identifier carried in the access instruction.
In the embodiment of the invention, after the BMC is powered on and started, a corresponding state is configured for each sensor under local jurisdiction, namely, the state corresponding to the sensor is configured to be an initial state (Inactive), or the state corresponding to the sensor is configured to be an Active state (Active), or the state corresponding to the sensor is configured to be a Selected state (Selected). When the BMC is started, the states corresponding to all sensors locally administered by the BMC are initial states, and when the states corresponding to the sensors are initial states, the BMC does not scan the sensors, the initial sensors do not generate event records, and a user cannot access the sensor values corresponding to the initial sensors; when the BMC configures the state corresponding to the locally administered sensor into the activated state, the BMC continuously scans the activated state sensor to acquire an event record generated by the activated state sensor, but a user cannot access the sensor value corresponding to the activated state sensor; when the state corresponding to the sensor under the local jurisdiction is configured to be the preferred state, the BMC continuously scans the sensor in the preferred state to acquire an event record generated by the sensor in the preferred state, and a user can access the sensor value corresponding to the sensor in the preferred state. In the process, the event record corresponding to the sensor is the state information corresponding to the monitored component, such as fault warning information, hot plug event information and the like; the sensor value corresponding to the sensor is a reading recorded by the sensor, such as a temperature value recorded by the temperature sensor.
Optionally, the method for the BMC to configure the corresponding state for each locally administered sensor respectively includes: respectively configuring corresponding states for each sensor under local administration according to a preset configuration strategy stored locally; or receiving a configuration instruction input by a user, acquiring configuration information carried in the configuration instruction, and configuring corresponding states for each sensor in local administration according to the configuration information, wherein the user can send the configuration instruction to the server through the configuration instruction input by the terminal, and the user can input the configuration instruction through an operation interface corresponding to the server.
By adopting the technical scheme, the corresponding state of the sensor is configured and adjusted according to the local preset configuration strategy of the BMC or the instruction input by the user, so that the flexibility of managing the server through the BMC is improved; and according to the user requirements, unnecessary sensors are not scanned, unnecessary expenses of the system are reduced, and the working efficiency of the system is improved.
Optionally, three storage lists, namely an initial state table, an activated state table, and a preferred state table, are stored in the BMC, and the sensor identifiers of the corresponding states are stored in different storage lists. When the state corresponding to the sensor is an initial state, storing the sensor identification into an initial state table stored locally; when the state corresponding to the sensor is the activated state, storing the sensor identification into an activated state table stored locally; and when the state corresponding to the sensor is the initial state, storing the sensor identification into an activated state table stored locally.
Step 210: and when the state corresponding to the sensor identifier is an activated state, switching the page table containing the sensor identifier in the storage list to a preferred state.
In the embodiment of the invention, when the state corresponding to the sensor identifier accessed by the user is not the preferred state but the activated state, the page table of the sensor identifier accessed by the user is switched from the activated state to the preferred state. The number of the sensor identifications contained in any page table in the storage list is not more than the threshold number specified by the intelligent platform management interface specification, namely, the number of the sensor identifications contained in any page table is not more than 255.
Optionally, referring to fig. 3, which is a schematic diagram of a storage list in an embodiment of the present invention, in the storage list, an initial state table includes a plurality of page tables, each page table may store less than or equal to 255 sensor identifiers, an upper limit value of the sensor identifiers that can be stored in the initial state table is n × 255, where n is the number of page tables included in the initial state table; the activated state table includes a plurality of page tables, each page table can store less than or equal to 255 sensor identifiers, and the upper limit value of the sensor identifiers which can be stored in the activated state table in the activated state is n × 255, where n is the number of page tables included in the activated state table; specifically, the preferred state table includes a page table, and the page table can store less than or equal to 255 sensor identifiers, and the upper limit value of the sensor identifier that can be stored in the preferred state table is 255, so that the upper limit value of the number of user-accessible sensors in a BMC-governed sensor that meets the IPMI2.0 specification is 255. Each page table in the storage list corresponds to a page table number; the sensor identifier stored in each page table may be a related sensor identifier, for example, the sensor function corresponding to the sensor identifier stored in the same page table is the same; the sensor id stored in each page table may also be an unrelated sensor id.
By adopting the technical scheme, the sensor identifications in different states are stored in different storage lists, namely the sensor identifications in different states are managed through different storage lists, each storage list can manage at least 255 sensors, and the number of the sensors which can be managed by the three storage lists is far greater than the threshold number of the sensors which can be managed by one BMC and is regulated by IPMI2.0 specification, so that the bottleneck problem that the BMC can manage the number of the sensors is avoided; and the sensor identifications in different states are stored in different storage lists, so that the management work of the sensor is more convenient. The technical scheme of the invention can be applied to RAS (Reliability, Availability and Serviceability) application scenes and large-scale server application scenes.
Step 220: outputting a page table containing the sensor identification.
In the embodiment of the present invention, the BMC outputs the obtained page table including the sensor identifier to a terminal, or outputs the obtained page table including the sensor identifier to an operation interface of a server.
Further, because the BMC scans only the sensor whose attribute is in the activated state or the preferred state, the BMC obtains the event record corresponding to the sensor identifier in the activated state or the preferred state, and the sensor identifier; and binding the sensor identifier and the event record corresponding to the sensor identifier, and storing the bound sensor identifier and the event record corresponding to the sensor identifier as a data record in a local database.
In the embodiment of the invention, the number of the sensors managed by one BMC is far more than 255, and the storage lists stored by the sensor identifiers in different states are different. Therefore, if the sensor serial number is only used as the sensor identifier for storage in the prior art, the sensor serial numbers in different storage lists may be the same, which may cause a problem of repeated sensor identifiers. Therefore, optionally, after the sensor identifier is stored in the corresponding storage list, the sensor identifier is updated, that is, the storage list identifier corresponding to the sensor identifier and the sensor serial number are added to the sensor identifier; the storage list identification comprises a state corresponding to the storage list and a page table number where the sensor identification is located. For example, if the sensor number included in the sensor identifier is 36 and the stored list identifier is the page table 17 in the active state table, then the identifier indicating the sensor 36 is stored in the page table 17 in the active state table. Optionally, four bytes are used to store the sensor identifier.
Further, in the BMC, when a user needs to acquire a data record, the user can query the data record through an IPMI instruction on a UI interface of the BMC. Specifically, when the BMC receives a data record query instruction input by a user, acquiring an identifier of an event record carried in the data record query instruction, and acquiring a data record corresponding to the identifier of the event record stored in the BMC local database according to the identifier of the event record, where the identifier of the event record includes a time attribute corresponding to the event record and a type attribute of the event record (such as a fault alarm event, a hot plug event, a sensor output value exceeding a threshold event, and the like); or acquiring a sensor identifier carried in the data record query instruction, and acquiring a data record corresponding to the sensor identifier stored in the BMC local database according to the sensor identifier, wherein the sensor identifier is a sensor serial number and a storage list identifier corresponding to the sensor identifier. Optionally, when a user queries a data record through an IPMI instruction, the IPMI instruction is a data record Query instruction in an SQL (structured Query Language), and the BMC analyzes the data record Query instruction in the SQL format to obtain an identifier of an event record or a sensor identifier carried in the data record Query instruction in the SQL format.
By adopting the technical scheme, the sensor identification and the event record in the storage list are bound, and the generated data record is stored in the database of the BMC, so that the problem of data record confusion caused by asynchronism between the storage list and the event record is avoided, the synchronism of the sensor identification and the event record in the storage list in the BMC is ensured, and the accuracy of the data record generated based on the storage list and the event record is improved.
Based on the BMC, when a user needs to manage the data records in the storage list, an IPMI instruction is sent to the BMC to manage the data records in the storage list. Specifically, when a data record management instruction input by a user is received, a sensor identifier carried in the data record management instruction is acquired by the BMC; and adjusting the data record corresponding to the sensor identifier according to the data record management information carried in the data record management command.
Optionally, the BMC adjusts the data record corresponding to the sensor identifier, including deleting the data record corresponding to the sensor identifier, adding the data record, and changing the state corresponding to the sensor identifier and the data record corresponding thereto.
The process of adjusting the data record corresponding to the sensor identifier by the BMC specifically includes: when the data record management information is data record deleting information, deleting data records corresponding to sensor identifications stored in a database, and deleting the sensor identifications in a storage list, namely releasing storage space occupied by the data records consisting of the sensor identifications and event records; when the data record management information is data record adding information, acquiring a sensor identifier to be added, adding the sensor identifier to be added into a preferred state table or an activated state table, namely creating a storage space in the preferred state table or the activated state table, and updating the sensor identifier according to the storage space identifier (namely a storage list identifier) after adding the sensor identifier to be added into the created storage space; and when the data record management information is the state corresponding to the changed sensor identifier, acquiring the sensor identifier to be changed and the state change information, storing the sensor identifier to be changed into a corresponding storage list according to the state change information, and updating the data record corresponding to the sensor identifier to be changed.
Optionally, changing the state corresponding to the sensor identifier is to change the state corresponding to the sensor identifier from the preferred state to the activated state; or changing the state corresponding to the sensor identifier from the activated state to the preferred state.
Referring to fig. 4, the process of recording the sensor identifier to be changed and the corresponding data thereof according to the state change information specifically includes:
in the first case: and if the state change information is that the state corresponding to the sensor identifier is changed from the preferred state to the activated state, switching the storage list corresponding to the sensor identifier from the preferred state to the activated state, and updating the sensor identifier and the data record corresponding to the sensor stored in the database.
In the second case: and if the state change information is that the state corresponding to the sensor identifier is changed from the activated state to the preferred state, switching the storage list corresponding to the sensor identifier from the activated state to the preferred state, updating the sensor identifier and the data record corresponding to the sensor identifier stored in the database.
By adopting the technical scheme, the sensor identifications in different states are stored in different storage lists, so that a user can adjust the state corresponding to the sensor identification in the storage list through an IPMI instruction and adjust the data record in the database, thereby effectively improving the flexibility of data record management.
Based on the above technical solution, referring to fig. 5, in the embodiment of the present invention, a process of accessing a sensor identifier by a user through an IPMI instruction is as follows:
step 500: the BMC receives a first IPMI instruction input by a user and acquires a storage list identifier carried in the IPMI instruction.
In the embodiment of the present invention, the IPMI command may be an OEM (Original Equipment Manufacturer) command, that is, an IPMI command with a custom format. For example, if it is required to access page table 0 of the active state table, the BMC receives a first IPMI instruction (set sensor page id = 0) input by the user.
Step 510: and the BMC configures the page table corresponding to the storage list identifier into a preferred state and sends a configuration success instruction to the terminal.
In the embodiment of the present invention, the BMC configures the page table corresponding to the storage list identifier as a preferred state, that is, switches to the page table interface corresponding to the storage list identifier. For example, after receiving a first IPMI command (setsensor page id = 0) input by the user through the terminal, the BMC switches to the page table 0 and sends a configuration success command (set sensor page id =0 ok) to the terminal.
Step 520: and the BMC receives a second IPMI command sent by the user and acquires the sensor serial number carried in the second IPMI command.
In this embodiment of the present invention, if it is required to access the sensor 20 in the page table 0 in the active state storage list, the BMC receives a second IPMI instruction (get sdr sensornum = 0) sent by the user through the terminal.
Step 530: and the BMC calls the sensor serial number from the preferred state table and sends the sensor serial number to a calling success instruction by the terminal.
In the embodiment of the present invention, if it is necessary to access the sensor 20 in the page table 0 of the active state table, the BMC invokes the sensor 20 in the page table 0 of the active state table, and sends an invocation success instruction (sdr sensum = 0) to the terminal. The user can change the state corresponding to the sensor identifier through the sensor identifier presented by the terminal.
In the embodiment of the present invention, the user may send the first IPMI instruction and the second IPMI instruction to the BMC to access the sensor identifier, and optionally, the user may also send only one IPMI instruction to the BMC, where the IPMI instruction includes the storage list identifier and the sensor serial number.
Based on the above technical solution, referring to fig. 6, in the embodiment of the present invention, a process of a user obtaining a data record through an IPMI instruction is as follows:
step 600: the BMC receives a data record query instruction input by a user through a terminal, and acquires an event record identifier carried in the data record query instruction.
In an embodiment of the present invention, the data record query command is an IPMI command. For example, the data record query instruction may be in the form of: get sel info (sel id = XX), where sel represents the time record and sel id identifies the identity of the event record.
Step 610: and the BMC calls the data record corresponding to the identifier of the event record from the database through the identifier of the event record.
Step 620: and the BMC sends the data record to a terminal.
In the embodiment of the present invention, after acquiring the data record corresponding to the identifier of the event record, the BMC may send the data record to the terminal in the following form: return get sel info.
Further, referring to fig. 7, in the embodiment of the present invention, a process of configuring, by the BMC, the sensor in the initial state according to a configuration instruction input by a user is as follows:
step 700: and receiving a configuration instruction, and acquiring the sensor identifier with the initial state and the configured state carried in the configuration instruction.
In the embodiment of the invention, the configured states comprise an activated state and a preferred state.
Step 710: when the configured state is a preferred state, storing the sensor identifier into a page table of a preferred state table; and when the configured state is a preferred state, storing the sensor identification into a page table of the activated state table.
In the embodiment of the present invention, referring to fig. 4, when the state corresponding to the sensor identifier is configured as the active state according to the configuration instruction, a storage space is created in the active state table, and the sensor identifier is stored in the storage space, and correspondingly, if the sensor identifier needs to be configured as the initial state from the active state, the sensor identifier is deleted from the active state table; when the state corresponding to the sensor identifier is configured as the preferred state according to the configuration instruction, a storage space is created in the preferred state table, the sensor identifier is stored in the storage space, and correspondingly, if the sensor identifier needs to be configured as the initial state from the preferred state, the sensor identifier is deleted from the preferred state table. The storage space is a storage location in a page table of the storage list, and the number of the sensor identifiers contained in any page table is not greater than a threshold number specified by the specification of the intelligent platform management interface, that is, the number of the sensor identifiers that can be stored in each page table is not greater than 255.
Based on the above technical solution, referring to fig. 8, an embodiment of the present invention provides a sensor management device applied to sensor management of a BMC, including a receiving unit 80, a searching unit 81, a switching unit 82, and an output unit 83, where:
a receiving unit 80, configured to receive an access instruction, and send the access instruction to a searching unit 81;
the searching unit 81 is configured to receive the access instruction sent by the receiving unit 80, search a locally stored storage list for a state corresponding to the sensor identifier according to the sensor identifier carried in the access instruction, and send the state corresponding to the sensor identifier to the switching unit 82;
the switching unit 82 is configured to receive the state corresponding to the sensor identifier sent by the searching unit 81, switch the page table containing the sensor identifier in the storage list to the preferred state when the state corresponding to the sensor identifier is the activated state, and send the page table containing the sensor identifier to the output unit 83; the number of the sensor identifications contained in any page table is not greater than the threshold number specified by the intelligent platform management interface specification;
the output unit 83 is configured to output the page table including the sensor identifier after receiving the page table including the sensor identifier sent by the switching unit 82.
Referring to fig. 8, the present invention further provides a sensor management device, which is applied to sensor management of a BMC, and includes a hardware interface 90, a memory 91, a processor 92:
a hardware interface 90 for receiving an access instruction and sending the access instruction to a processor 92;
a memory 91 for storing a storage list and sending the storage list to the processor 92;
the processor 92 is configured to receive an access instruction sent by the hardware interface 90, search a storage list sent by the memory 91 for a state corresponding to the sensor identifier according to the sensor identifier carried in the access instruction, switch a page table containing the sensor identifier in the storage list to the preferred state when the state corresponding to the sensor identifier is an activated state, and send the page table containing the sensor identifier to the hardware interface 90;
the hardware interface 90 is further configured to receive the page table containing the sensor identifier sent by the processor 92, and output the page table containing the sensor identifier.
Optionally, the processor 92 is further configured to obtain any sensor identifier in an activated state or a preferred state, and an event record corresponding to any sensor identifier in the activated state or the preferred state; sending any sensor identifier in the activated state or the preferred state and an event record corresponding to any sensor identifier in the activated state or the preferred state to the memory 91 as a data record;
optionally, the memory 91 is further configured to receive and store the data record sent by the processor 92.
Further, the hardware interface 90 is further configured to receive a data record query instruction input by a user, and send the data record query instruction to the processor 92;
further, the processor 92 is further configured to receive the data record query instruction sent by the hardware interface 90, obtain an identifier of an event record carried in the data record query instruction, and obtain, according to the identifier of the event record, a data record corresponding to the identifier of the event record stored in the database; or, acquiring a sensor identifier carried in the data record query instruction, and acquiring a data record corresponding to the sensor identifier stored in the memory 91 according to the sensor identifier.
Further, the hardware interface 90 is further configured to receive a sensor management instruction input by a user, and send the sensor management instruction to the processor 92;
further, the processor 92 is further configured to receive a sensor management instruction sent by the hardware interface 90, and acquire a sensor identifier and data record management information carried in the data record management instruction; when the data record management information is data record deleting information, deleting the sensor identifier in a page table where the sensor identifier is located, and deleting a data record corresponding to the sensor identifier stored in the memory 91; when the data record management information is data record adding information, acquiring a sensor identifier to be added, and adding the sensor identifier to be added into the preferred state table or the activated state table; when the data record management information is the state corresponding to the changed sensor identifier, acquiring the sensor identifier to be changed and the state change information thereof, storing the sensor identifier to be changed into the corresponding page table according to the state change information, and updating the data record corresponding to the sensor identifier to be changed in the storage list and the sensor identifier to be changed stored in the memory 91.
Further, the processor 92 is further configured to configure the preferred state table where the sensor identifier to be changed is located as an activated state table if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the preferred state to the activated state; and if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the activated state to the preferred state, configuring the activated state table corresponding to the sensor identifier to be changed into the preferred state table.
Based on the above technical solution, referring to fig. 10, the present invention provides a sensor management apparatus, including a receiving unit 100, an obtaining unit 101, and a storage unit 102, wherein:
a receiving unit 100, configured to receive a configuration instruction and send the configuration instruction to an obtaining unit 101;
an obtaining unit 101, configured to receive a configuration instruction sent by the receiving unit 100, obtain a sensor identifier whose state is an initial state and a configured state carried in the configuration instruction, and send the sensor identifier whose state is the initial state and the configured state to a storage unit 102;
a storage unit 102, configured to receive a sensor identifier sent by the obtaining unit 101 and having an initial state and a configured state, and store the sensor identifier into a page table of the preferred state table when the configured state is a preferred state; when the configured state is an activated state, storing the sensor identifier into a page table of the activated state table; and the number of the sensor identifications contained in any page table is not more than the threshold number specified by the intelligent platform management interface specification.
In summary, in the embodiment of the present invention, an access instruction is received, and according to a sensor identifier carried in the access instruction, a state corresponding to the sensor identifier is searched from a locally stored storage list; when the state corresponding to the sensor identifier is an activated state, switching a page table containing the sensor identifier in a storage list to a preferred state; outputting a page table containing the sensor identification. By adopting the technical scheme of the invention, the sensors are classified according to the corresponding states of the sensors, so that the sensor identifications in different states are stored in different storage lists, and each page table in the storage lists can store the number of the sensor identifications as a threshold value, so that the corresponding sensor can be configured for each component to be monitored, the number of the sensors administered by the BMC is not limited, the management granularity of the sensors is ensured, the fault positioning precision is effectively improved, and the complexity of data record management is reduced.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.
Claims (11)
1. A sensor management method is applied to sensor management of a Baseboard Management Controller (BMC), and is characterized in that the BMC stores a preferred state table and an activated state table, a sensor identifier with a preferred state is recorded in the preferred state table, and a sensor identifier with an activated state is recorded in the activated state table, and the method comprises the following steps:
receiving an access instruction, and searching a state corresponding to a sensor identifier from a locally stored storage list according to the sensor identifier carried in the access instruction;
when the state corresponding to the sensor identifier is an activated state, switching a page table containing the sensor identifier in the storage list to the preferred state; the number of the sensor identifications contained in any page table is not greater than the threshold number specified by the intelligent platform management interface specification;
outputting a page table containing the sensor identification.
2. The method of claim 1, wherein the BMC further comprises data records corresponding to the respective sensor identifications in the preferred state table and the respective sensor identifications in the active state table;
the method for generating the data record corresponding to any sensor identifier in the preferred state table or any sensor identifier in the activated state table comprises the following steps:
acquiring any sensor identifier in an activated state or a preferred state and an event record corresponding to any sensor identifier in the activated state or the preferred state;
and taking any sensor identifier with the state being an activated state or a preferred state and the corresponding event record as a data record, and storing the data record into a local database.
3. The method of claim 2, wherein after storing the data record in the local database, and after receiving a data record query command input by a user, further comprising:
acquiring an identifier of an event record carried in the data record query instruction, and acquiring a data record corresponding to the identifier of the event record stored in the database according to the identifier of the event record; or,
and acquiring a sensor identifier carried in the data record query instruction, and acquiring a data record corresponding to the sensor identifier stored in the database according to the sensor identifier.
4. The method of claim 2, wherein after storing the data record in the local database, and after receiving a data record management command input by a user, further comprising:
acquiring a sensor identifier and data record management information carried in the data record management instruction;
when the data record management information is data record deleting information, deleting the sensor identifier in a page table where the sensor identifier is located, and deleting the data record corresponding to the sensor identifier stored in the database;
when the data record management information is data record adding information, acquiring a sensor identifier to be added, and adding the sensor identifier to be added into the preferred state table or the activated state table;
when the data record management information is the state corresponding to the changed sensor identifier, acquiring the sensor identifier to be changed and the state change information thereof, storing the sensor identifier to be changed into a corresponding page table according to the state change information, and updating the data record corresponding to the sensor identifier to be changed in the storage list and the sensor identifier to be changed stored in the database.
5. The method of claim 4, wherein storing the to-be-changed sensor identifier in a corresponding page table according to the state change information specifically includes:
if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the preferred state to the activated state, configuring the preferred state table where the sensor identifier to be changed is located as an activated state table;
and if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the activated state to the preferred state, configuring the activated state table where the sensor identifier to be changed is located as the preferred state table.
6. A sensor management device is applied to the sensor management of a Baseboard Management Controller (BMC), and is characterized in that a preferred state table and an activated state table are stored in the sensor management device, a sensor identifier with a preferred state is recorded in the preferred state table, and a sensor identifier with an activated state is recorded in the activated state table, and the sensor management device comprises:
the receiving unit is used for receiving the access instruction and sending the access instruction to the searching unit;
the searching unit is used for receiving the access instruction sent by the receiving unit, searching a state corresponding to the sensor identifier from a locally stored storage list according to the sensor identifier carried in the access instruction, and sending the state corresponding to the sensor identifier to the switching unit;
the switching unit is used for receiving the state corresponding to the sensor identifier sent by the searching unit, switching the page table containing the sensor identifier in the storage list to the preferred state when the state corresponding to the sensor identifier is an activated state, and sending the page table containing the sensor identifier to the output unit; the number of the sensor identifications contained in any page table is not greater than the threshold number specified by the intelligent platform management interface specification;
and the output unit is used for outputting the page table containing the sensor identifier after receiving the page table containing the sensor identifier sent by the switching unit.
7. The apparatus of claim 6, further comprising a storage unit to:
acquiring any sensor identifier in an activated state or a preferred state and an event record corresponding to any sensor identifier in the activated state or the preferred state; and taking any sensor identifier with the state being an activated state or a preferred state and the corresponding event record as a data record, and storing the data record into a local database.
8. The apparatus of claim 7, further comprising a data record acquisition unit to:
after the data records are stored in a local database, after a data record query instruction input by a user is received, acquiring an identifier of an event record carried in the data record query instruction, and acquiring the data record corresponding to the identifier of the event record stored in the database according to the identifier of the event record; or acquiring a sensor identifier carried in the data record query instruction, and acquiring a data record corresponding to the sensor identifier stored in the database according to the sensor identifier.
9. The apparatus of claim 7, further comprising a processing unit to:
after the data records are stored in a local database, acquiring sensor identifications and data record management information carried in the data record management instructions after receiving sensor management instructions input by a user; when the data record management information is data record deleting information, deleting the sensor identifier in a page table where the sensor identifier is located, and deleting the data record corresponding to the sensor identifier stored in the database; when the data record management information is data record adding information, acquiring a sensor identifier to be added, and adding the sensor identifier to be added into the preferred state table or the activated state table; when the data record management information is the state corresponding to the changed sensor identifier, acquiring the sensor identifier to be changed and the state change information thereof, storing the sensor identifier to be changed into a corresponding page table according to the state change information, and updating the data record corresponding to the sensor identifier to be changed in the storage list and the sensor identifier to be changed stored in the database.
10. The apparatus as claimed in claim 9, wherein said processing unit is specifically configured to:
if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the preferred state to the activated state, configuring the preferred state table where the sensor identifier to be changed is located as an activated state table; and if the state change information is that the state corresponding to the sensor identifier to be changed is changed from the activated state to the preferred state, configuring the activated state table where the sensor identifier to be changed is located as the preferred state table.
11. A sensor management method is applied to sensor management of a Baseboard Management Controller (BMC), and is characterized in that the BMC stores a preferred state table, an activated state table and an initial state table, a sensor identifier with a preferred state is recorded in the preferred state table, and a sensor identifier with an activated state is recorded in the activated state table, and the method comprises the following steps:
receiving a configuration instruction, and acquiring a sensor identifier which is carried in the configuration instruction and has an initial state and a configured state;
when the configured state is a preferred state, storing the sensor identifier into a page table of the preferred state table;
when the configured state is an activated state, storing the sensor identifier into a page table of the activated state table; and the number of the sensor identifications contained in any page table is not more than the threshold number specified by the intelligent platform management interface specification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410099428.6A CN103885865B (en) | 2014-03-17 | 2014-03-17 | A kind of Method of Sensor Management and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410099428.6A CN103885865B (en) | 2014-03-17 | 2014-03-17 | A kind of Method of Sensor Management and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103885865A CN103885865A (en) | 2014-06-25 |
CN103885865B true CN103885865B (en) | 2017-03-15 |
Family
ID=50954773
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410099428.6A Active CN103885865B (en) | 2014-03-17 | 2014-03-17 | A kind of Method of Sensor Management and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103885865B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9916270B2 (en) * | 2015-03-27 | 2018-03-13 | Intel Corporation | Virtual intelligent platform management interface (IPMI) satellite controller and method |
US10659479B2 (en) * | 2015-03-27 | 2020-05-19 | Mcafee, Llc | Determination of sensor usage |
CN108228426A (en) * | 2018-01-19 | 2018-06-29 | 郑州云海信息技术有限公司 | A kind of method and apparatus for recording SDR information |
CN108182278A (en) * | 2018-01-26 | 2018-06-19 | 郑州云海信息技术有限公司 | A kind of FRU information maintenance methods and relevant apparatus |
US11443036B2 (en) * | 2019-07-30 | 2022-09-13 | Hewlett Packard Enterprise Development Lp | Facial recognition based security by a management controller |
CN111006704B (en) * | 2019-11-29 | 2021-11-23 | 江苏智冷物联技术有限公司 | Sensor data processing method, management platform and sensor header |
CN112988859A (en) * | 2019-12-17 | 2021-06-18 | 中国移动通信集团浙江有限公司 | Data processing method and device, computing equipment and computer storage medium |
CN112486578B (en) * | 2020-11-13 | 2022-07-08 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for dynamically loading BMC (baseboard management controller) with sensor |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6226760B1 (en) * | 1997-09-26 | 2001-05-01 | Daimlerchrysler Ag | Method and apparatus for detecting faults |
CN101149688A (en) * | 2006-09-19 | 2008-03-26 | 株式会社理光 | Virtualization system, internal memory managing method and controlling program |
CN101339515A (en) * | 2007-07-06 | 2009-01-07 | 宏正自动科技股份有限公司 | Sensor process management methods and systems |
CN101576842A (en) * | 2008-05-07 | 2009-11-11 | 英业达股份有限公司 | System and method for monitoring baseboard management controller |
CN102073574A (en) * | 2009-11-23 | 2011-05-25 | 英业达股份有限公司 | Server management system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6516399B2 (en) * | 2001-03-30 | 2003-02-04 | Koninklijke Philips Electronics N.V. | Dynamically configurable page table |
-
2014
- 2014-03-17 CN CN201410099428.6A patent/CN103885865B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6226760B1 (en) * | 1997-09-26 | 2001-05-01 | Daimlerchrysler Ag | Method and apparatus for detecting faults |
CN101149688A (en) * | 2006-09-19 | 2008-03-26 | 株式会社理光 | Virtualization system, internal memory managing method and controlling program |
CN101339515A (en) * | 2007-07-06 | 2009-01-07 | 宏正自动科技股份有限公司 | Sensor process management methods and systems |
CN101576842A (en) * | 2008-05-07 | 2009-11-11 | 英业达股份有限公司 | System and method for monitoring baseboard management controller |
CN102073574A (en) * | 2009-11-23 | 2011-05-25 | 英业达股份有限公司 | Server management system |
Also Published As
Publication number | Publication date |
---|---|
CN103885865A (en) | 2014-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103885865B (en) | A kind of Method of Sensor Management and device | |
CN102202087B (en) | Method for identifying storage equipment and system thereof | |
US11283689B2 (en) | Method for managing multiple servers and device employing method | |
AU2015316450A1 (en) | Method for updating data table of KeyValue database and apparatus for updating table data | |
CN105591778A (en) | Method and system for updating configuration file in distributed system | |
CN105356989A (en) | MTP mode-based data synchronization method, system and device | |
CN110278101B (en) | Resource management method and equipment | |
CN110704536A (en) | Distributed data processing method, device and system and electronic equipment | |
CN104517067A (en) | Method, device and system for data access | |
US10693731B2 (en) | Flow entry management method and device | |
CN114050990B (en) | Method and device for testing network isolation equipment, storage medium and electronic equipment | |
CN112579877A (en) | Information source system control method, device, storage medium and equipment | |
CN108156201B (en) | Method and device for uniformly managing configuration data of application system | |
CN102946403B (en) | A kind of method of the solution file conflict for cloud storage system and device | |
CN112000671B (en) | Database table processing method, device and system based on block chain | |
CN106294721B (en) | Cluster data counting and exporting methods and devices | |
US11714687B2 (en) | Dynamic preparation of a new network environment, and subsequent monitoring thereof | |
CN104717258A (en) | Data transmitting method and system | |
CN114157662A (en) | Cloud platform parameter adaptation method and device, terminal equipment and storage medium | |
CN114553859A (en) | BMC configuration management method and device, electronic equipment and storage medium | |
CN103856535A (en) | Method and device for obtaining user data | |
CN114189457A (en) | Cloud resource display and processing method, equipment and storage medium | |
CN105279233A (en) | Resource retrieving method and device | |
US10649793B2 (en) | Application synchronization method and device | |
CN105808318B (en) | Information processing method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211222 Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province Patentee after: xFusion Digital Technologies Co., Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
TR01 | Transfer of patent right |