A kind of general journal management method and system based on IPMI protocol
Technical field
The present invention relates to log management technical fields, and in particular to a kind of general journal management method based on IPMI protocol
And system.
Background technique
With the development of x86 server technology, demand of the user to server admin is also higher and higher, and server admin
System is then predominantly located at BMC (Baseboard Management Controller, Baseboard Management Controller), and function is more next
More complicated, module is increasing;
Wherein, it is frequently necessary to analyze the internal event of BMC system during the exploitation of BMC software and O&M,
Therefore it needs a Log Administration System to record the operating condition of each module, understands in BMC convenient for developer and operation maintenance personnel
Portion's state and positioning failure;
And traditional blog management method, usually define the event log of sensor in SEL data, but standard
There are protocol format complexity by SEL, parse cumbersome and hierarchical classification mode and parse event description information, slow disadvantage,
Therefore a kind of more convenient and fast blog management method is needed.
Summary of the invention
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of the general day based on IPMI protocol
The step of will management method and system, this process simplify addition logs, good expand is provided by event log information table
Malleability substantially increases developer's working efficiency.
To achieve the above objectives, the technical solution adopted by the present invention is that:
A kind of general journal management method based on IPMI protocol, the described method comprises the following steps:
In original OEM event type, a customized event type is increased newly;Event log information table is created, is used for
Event description information relevant to event id is recorded, information table index is event id;Structure is carried out to the idle bytes of SEL data
It makes, for storing event description information, includes at least OEM event type in the SEL data;
When being resolved to the SEL data with customized event type, the event log information table is traversed, according to SEL
Data find corresponding event description information, and event description information is written in SEL data.
In the embodiment of the present invention, in OEM event type, increases a new customized event type newly, be used for rear
Phase, which is directed to, to be needed to be marked using the SEL data of this management method processing;
Event log information table is established, mainly stores event description information using event log information table, and by each event
The corresponding event id of description information connects, when needed, can by its information table index to event description information into
Row retrieval, and information table index is event id;
The construction of SEL data is transformed, it is generally the case that there are some idle bytes for SEL data, of the invention real
It applies in example, is used for storage event description information;
After the completion of above-mentioned default step, then exactly starts the management operating procedure of management method, had when being resolved to
When the identical SEL data of customized event type, the event log information table is traversed, finds corresponding thing according to SEL data
Event description information is written in SEL data part description information;
This method simplifies the step of addition log, also provides good scalability by event log information table, greatly
Developer's working efficiency is improved greatly.
Based on the above technical solution, this method further includes the steps that reading SEL data: traversing the event log
Information table finds corresponding event description information according to SEL data, and according to the event description information of the event id and
SEL data obtain readable character string.
Based on the above technical solution, it during the idle bytes to SEL data construct, specifically includes:
Using the byte of the 14th, 15 and 16 of the SEL data as customized storage byte, the customized storage byte
For storing the event description information.
Based on the above technical solution, described that event description information is written in SEL data, detailed process are as follows: wound
Customized sensor is built, for increasing event description information newly;SEL data are written into event description information by customized sensor
In.
The customized event type is hexadecimal data, and value range is 0x70~0X7F.
Based on the above technical solution, SEL data of the customized event type suitable for OEM agreement, and
Its value is not repeated with event type original in later OEM agreement.
The general journal management system based on IPMI protocol that the present invention also provides a kind of, the system comprises:
Creating unit is used for: in original OEM event type, increasing a customized event type newly;Creation event day
Will information table, is used to record event description information relevant to event id, and information table index is event id;To SEL data
Idle bytes constructed, for storing event description information, OEM event type is included at least in the SEL data;
Logical processing unit is used for: when being resolved to the SEL data with customized event type, traversing the thing
Part log information table finds corresponding event description information according to SEL data, event description information is written in SEL data.
Based on the above technical solution, which further includes reading unit, is used for: traversing the event log letter
Table is ceased, finds corresponding event description information according to SEL data, and according to the event description information and SEL of the event id
Data obtain readable character string.
Based on the above technical solution, event description information is written in SEL data the Logical processing unit, tool
Body process are as follows: customized sensor is created, for increasing event description information newly;By customized sensor by event description information
It is written in SEL data.
Based on the above technical solution, the customized event type is hexadecimal data, value range
For 0x70~0X7F.
Based on the above technical solution, SEL data of the customized event type suitable for OEM agreement, and
Its value is not repeated with event type original in later OEM agreement.
Compared with the prior art, the advantages of the present invention are as follows:
(1) the step of simplifying addition log, also provides good scalability by event log information table, mentions significantly
High developer's working efficiency.
Detailed description of the invention
Fig. 1 is the step flow chart of the general journal management method based on IPMI protocol in the embodiment of the present invention 1;
Fig. 2 is the structural block diagram of the general journal management system based on IPMI protocol in the embodiment of the present invention 4;
Fig. 3 is the structural block diagram of the general journal management method based on IPMI protocol in the embodiment of the present invention 5;
In figure: 1, creating unit;2, Logical processing unit;3, reading unit.
Specific embodiment
The embodiment of the present invention is described in further detail below in conjunction with attached drawing.
Embodiment 1
As shown in Figure 1, the embodiment of the present invention 1 provides a kind of general journal management method based on IPMI protocol, this method
The following steps are included:
Step S1, in original OEM event type, a customized event type is increased newly;
Step S2, event log information table is created, is used to record event description information relevant to event id, information
Table index is event id;
Step S3, the idle bytes of SEL data are constructed, for storing event description information, in SEL data at least
Including OEM event type;
Step S4, when being resolved to the SEL data with customized event type, event log information table is traversed, according to
SEL data find corresponding event description information, and event description information is written in SEL data;
In the embodiment of the present invention, in OEM event type, increases a new customized event type ID newly, be used for
Later period, which is directed to, to be needed to be marked using the SEL data of this management method processing;
Event log information table is established, mainly stores event description information using event log information table, and by each event
The corresponding event id of description information connects, when needed, can by its information table index to event description information into
Row retrieval, and information table index is event id;
The construction of SEL data is transformed, it is generally the case that there are some idle bytes for SEL data, of the invention real
It applies in example, is used for storage event description information;
After the completion of above-mentioned default step, then exactly starts the management operating procedure of management method, had when being resolved to
When the identical SEL data of customized event type, event log information table is traversed, corresponding event is found according to SEL data and retouches
Information is stated, event description information is written in SEL data;
This method simplifies the step of addition log, also provides good scalability by event log information table, greatly
Developer's working efficiency is improved greatly.
It should be noted that BMC is Baseboard Management Controller, i.e. Baseboard Management Controller;
IPMI is Intelligent Platform Management Interface, i.e. Intelligent Platform Management Interface;
SEL is System event log, i.e. System Event Log;
OEM indicates can there is the customized part of manufacturer in IPMI standard, and OEM event type, then customized for manufacturer
Some events type, and the application is then on this basis, a newly-increased customized event type is for marking.
It should be noted that in the embodiment of the present invention, step S3, during the idle bytes to SEL data construct,
It specifically includes:
Using the byte of the 14th, 15 and 16 of the SEL data as customized storage byte, the customized storage byte
For storing the event description information;
It should be noted that the byte of the 14th, 15 and 16 of the SEL data can specifically be defined as Event-Data1,
Event-Data2 and Event-Data3, and since ipmi standard agreement defines the field format of response, so Event-
[7:6] and [5:4] inside Data1 is not available, and the embodiment of the present invention is respectively set to 11b, so we are real
[3:0] of Event-Data1 can be used in border and the total 20bit of Event-Data2, Event-Data3 saves event id, so
It needs the byte of the 14th, 15 and 16 together as customized storage byte.
Embodiment 2
The embodiment of the present invention 2 provides a kind of general journal management method based on IPMI protocol, and this method includes following step
It is rapid:
Step S1, in original OEM event type, a customized event type is increased newly;
Step S2, event log information table is created, is used to record event description information relevant to event id, information
Table index is event id;
Step S3, the idle bytes of SEL data are constructed, for storing event description information, in SEL data at least
Including OEM event type;
Step S4, when being resolved to the SEL data with customized event type, event log information table is traversed, according to
SEL data find corresponding event description information, and event description information is written in SEL data.
In the embodiment of the present invention, this method further includes the steps that reading SEL data: traversal event log information table, according to
SEL data find corresponding event description information, and according to the event description information of event id and SEL data, obtain readable
Character string;
In the embodiment of the present invention, this step be while being managed to general journal, the step of reading to it,
First by event id, is positioned in event log information table, search out event description information corresponding with event id;
Then event description information combination SEL data are generated readable further according to event description information and SEL data
Character string is read convenient for staff.
Embodiment 3
The embodiment of the present invention provides a kind of general journal management method based on IPMI protocol, and this method includes following step
It is rapid:
Step S1, in original OEM event type, a customized event type is increased newly;
Step S2, event log information table is created, is used to record event description information relevant to event id, information
Table index is event id;
Step S3, the idle bytes of SEL data are constructed, for storing event description information, in SEL data at least
Including OEM event type;
Step S4, when being resolved to the SEL data with customized event type, event log information table is traversed, according to
SEL data find corresponding event description information, and event description information is written in SEL data.
In the embodiment of the present invention, event description information is written in SEL data, detailed process are as follows: create customized sensing
Device, for increasing event description information newly;Event description information is written in SEL data by customized sensor;
And the mode of customized sensor is created, it is relevant to customized sensor to can be the increase in SDR information table
Definition;
The related data of customized sensor defines in SDR information table, and BMC collects each sensor data when working are put
Enter SEL storage;
The access to monitored information (such as temperature and voltage, fan-status) is provided by IPMI sensor model;
The direct access to monitoring hardware is not provided, and IPMI is by abstract sensor command (as " obtained sensor to read
Take " order) access is provided, it is realized by Management Controller;
The method keeps apart software and the change in platform management hardware realization, and customized sensor is mentioned according to them
The reading type of confession and/or the event type that they are generated are classified, and customized sensor can return to simulation or discrete reading
Number, and Sensor Events can be discrete or based on threshold value, different event type, sensor type and monitored reality
Body is indicated using digital code defined in IPMI specification, and IPMI can be avoided dependence character string and carry out management information.
It should be noted that SDR is that Sensor Data Record, SDR information table includes at least following information: owner
ID (OwerID), logical unit number (LUN), sensor number (SENSOR_NUM), entity ID (EntityID), entity serial number
(EntityInst), sensor type (SensorType) is simulated Value Types (Analog), event type (eventType), line
Property information (Linearization);
BMC is Baseboard Management Controller, i.e. Baseboard Management Controller;
IPMI is Intelligent Platform Management Interface, i.e. Intelligent Platform Management Interface;
SEL is System event log, i.e. System Event Log;
OEM indicates can there is the customized part of manufacturer in IPMI standard, and OEM event type, then customized for manufacturer
Some events type, and the application is then on this basis, a newly-increased customized event type is for marking.
In the embodiment of the present invention, customized event type is hexadecimal data, and value range is 0x70~0X7F.
In the embodiment of the present invention, SEL data of the customized event type suitable for OEM agreement, and its value not with
Original event type repeats in OEM agreement afterwards.
Embodiment 4
Shown in Figure 2, the embodiment of the present invention provides a kind of general journal management system based on IPMI protocol, system packet
It includes:
Creating unit 1, is used for: in original OEM event type, increasing a customized event type newly;Creation event
Log information table, is used to record event description information relevant to event id, and information table index is event id;To SEL number
According to idle bytes constructed, for storing event description information, OEM event type is included at least in SEL data;
Logical processing unit 2, is used for: when being resolved to the SEL data with customized event type, traversing event day
Will information table finds corresponding event description information according to SEL data, event description information is written in SEL data.
In the embodiment of the present invention, in OEM event type, increases a new customized event type ID newly, be used for
Later period, which is directed to, to be needed to be marked using the SEL data of this management method processing;
Event log information table is established, mainly stores event description information using event log information table, and by each event
The corresponding event id of description information connects, when needed, can by its information table index to event description information into
Row retrieval, and information table index is event id;
The construction of SEL data is transformed, it is generally the case that there are some idle bytes for SEL data, of the invention real
It applies in example, is used for storage event description information;
After the completion of above-mentioned default step, then exactly starts the management operating procedure of management method, had when being resolved to
When the identical SEL data of customized event type, event log information table is traversed, corresponding event is found according to SEL data and retouches
Information is stated, event description information is written in SEL data;
This method simplifies the step of addition log, also provides good scalability by event log information table, greatly
Developer's working efficiency is improved greatly.
It should be noted that BMC is Baseboard Management Controller, i.e. Baseboard Management Controller;
IPMI is Intelligent Platform Management Interface, i.e. Intelligent Platform Management Interface;
SEL is System event log, i.e. System Event Log;
OEM indicates can there is the customized part of manufacturer in IPMI standard, and OEM event type, then customized for manufacturer
Some events type, and the application is then on this basis, a newly-increased customized event type is for marking;
It should be noted that the byte of the 14th, 15 and 16 of the SEL data can specifically be defined as Event-Data1,
Event-Data2 and Event-Data3, and since ipmi standard agreement defines the field format of response, so Event-
[7:6] and [5:4] inside Data1 is not available, and the embodiment of the present invention is respectively set to 11b, so we are real
[3:0] of Event-Data1 can be used in border and the total 20bit of Event-Data2, Event-Data3 saves event id, so
It needs the byte of the 14th, 15 and 16 together as customized storage byte.
Embodiment 5
Shown in Figure 3, the embodiment of the present invention provides a kind of general journal management system based on IPMI protocol, system packet
It includes:
Creating unit 1, is used for: in original OEM event type, increasing a customized event type newly;Creation event
Log information table, is used to record event description information relevant to event id, and information table index is event id;To SEL number
According to idle bytes constructed, for storing event description information, OEM event type is included at least in SEL data;
Logical processing unit 2, is used for: when being resolved to the SEL data with customized event type, traversing event day
Will information table finds corresponding event description information according to SEL data, event description information is written in SEL data.
The system further includes reading unit 3, is used for: traversal event log information table is found corresponding according to SEL data
Event description information, and according to the event description information of event id and SEL data, obtain readable character string;
In the embodiment of the present invention, this step be while being managed to general journal, the step of reading to it,
First by event id, is positioned in event log information table, search out event description information corresponding with event id;
Then event description information combination SEL data are generated readable further according to event description information and SEL data
Character string is read convenient for staff.
Embodiment 6
The embodiment of the present invention provides a kind of general journal management system based on IPMI protocol, on the basis of embodiment 4,
System includes:
Creating unit 1, is used for: in original OEM event type, increasing a customized event type newly;Creation event
Log information table, is used to record event description information relevant to event id, and information table index is event id;To SEL number
According to idle bytes constructed, for storing event description information, OEM event type is included at least in SEL data;
Logical processing unit 2, is used for: when being resolved to the SEL data with customized event type, traversing event day
Will information table finds corresponding event description information according to SEL data, event description information is written in SEL data.
In the embodiment of the present invention, event description information is written in SEL data Logical processing unit 2, detailed process are as follows: wound
Customized sensor is built, for increasing event description information newly;SEL data are written into event description information by customized sensor
In;
And the mode of customized sensor is created, it is relevant to customized sensor to can be the increase in SDR information table
Definition;
The related data of customized sensor defines in SDR information table, and BMC collects each sensor data when working are put
Enter SEL storage;
The access to monitored information (such as temperature and voltage, fan-status) is provided by IPMI sensor model;
The direct access to monitoring hardware is not provided, and IPMI is by abstract sensor command (as " obtained sensor to read
Take " order) access is provided, it is realized by Management Controller;
The method keeps apart software and the change in platform management hardware realization, and customized sensor is mentioned according to them
The reading type of confession and/or the event type that they are generated are classified, and customized sensor can return to simulation or discrete reading
Number, and Sensor Events can be discrete or based on threshold value, different event type, sensor type and monitored reality
Body is indicated using digital code defined in IPMI specification, and IPMI can be avoided dependence character string and carry out management information.
It should be noted that SDR is that Sensor Data Record, SDR information table includes at least following information: owner
ID (OwerID), logical unit number (LUN), sensor number (SENSOR_NUM), entity ID (EntityID), entity serial number
(EntityInst), sensor type (SensorType) is simulated Value Types (Analog), event type (eventType), line
Property information (Linearization);
BMC is Baseboard Management Controller, i.e. Baseboard Management Controller;
IPMI is Intelligent Platform Management Interface, i.e. Intelligent Platform Management Interface;
SEL is System event log, i.e. System Event Log;
OEM indicates can there is the customized part of manufacturer in IPMI standard, and OEM event type, then customized for manufacturer
Some events type, and the application is then on this basis, a newly-increased customized event type is for marking.
In the embodiment of the present invention, customized event type is hexadecimal data, and value range is 0x70~0X7F.
In the embodiment of the present invention, SEL data of the customized event type suitable for OEM agreement, and its value not with
Original event type repeats in OEM agreement afterwards.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system, server or calculating
Machine program product.Therefore, the present invention can be used complete hardware embodiment, complete software embodiment or combine software and hardware side
The form of the embodiment in face.Moreover, it wherein includes computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in computer-usable storage medium (including but not limited to magnetic disk storage and optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, equipment (system), server and computer program product
Flowchart and/or the block diagram describe.It should be understood that can be realized by computer program instructions in flowchart and/or the block diagram
The combination of process and/or box in each flow and/or block and flowchart and/or the block diagram.It can provide these calculating
Processing of the machine program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
Device is to generate a machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute
For realizing the function of being specified in one or more flows of the flowchart and/or one or more blocks of the block diagram
Device.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.