update the getaddsensorevent for new sensor events

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13652 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
immarvin
2012-08-30 07:17:49 +00:00
parent 056f824b02
commit 5a10afcb2d

View File

@ -3584,6 +3584,8 @@ sub getaddsensorevent {
0x0 => "Vendor mismatch",
0x1 => "Revision mismatch",
0x2 => "Processor missing",
0x3 => "Power Supply rating mismatch",
0x4 => "Voltage rating mismatch",
);
if ($extra{$event_data_3}) {
$text = $extra{$event_data_3};
@ -3659,11 +3661,38 @@ sub getaddsensorevent {
$text .= sprintf ("type %02xh/offset %02xh",$event_data_2,$event_data_3&0x0F);
} elsif ($offset == 0x05) {
$text = "$event_data_3% full";
}elsif($offset==0x06){
if(defined $event_data_2){
if(defined($event_data_3) and ($event_data_3 & 0x80 == 0x80)){
$text="Vendor-specific processor number:";
}else{
$text="Entity Instance number:";
}
$text.=sprintf("%02xh",$event_data_2 & 0xff);
}else{
$text="for all Processor sensors";
}
}
}
if($sensor_type == 0x12) {
if($offset == 0x03) {
my %extra={
0x0 => "Log Entry Action: entry added",
0x1 => "Log Entry Action: entry added because event did not be map to standard IPMI event",
0x2 => "Log Entry Action: entry added along with one or more corresponding SEL entries",
0x3 => "Log Entry Action: log cleared",
0x4 => "Log Entry Action: log disabled",
0x5 => "Log Entry Action: log enabled",
};
$text="$text, ".$extra{($event_data_2>>4) & 0x0f};
%extra={
0x0 => "Log Type:MCA Log",
0x1 => "Log Type:OEM 1",
0x2 => "Log Type:OEM 2",
};
$text="$text, ".$extra{($event_data_2) & 0x0f};
$text =~ s/^, //;
}
if($offset == 0x04) {
if($event_data_2 & 0b00100000) {
@ -3686,6 +3715,19 @@ sub getaddsensorevent {
}
$text =~ s/^, //;
}
if($offset == 0x05){
if($event_data_2 & 0x80){
$text="$text, event is second of pair";
}elsif($event_data_2 & 0x80==0){
$text="$text, event is first of pair";
}
if($event_data_2 & 0x0F == 0x1){
$text="$text, SDR Timestamp Clock updated";
}elsif($event_data_2 & 0x0F == 0x0){
$text="$text, SEL Timestamp Clock updated";
}
$text =~ s/^, //;
}
}
if ($sensor_type == 0x1d && $offset == 0x07) {
my %causes = (