diff options
| author | Richard J. Knight <rjknight@us.ibm.com> | 2015-10-20 11:01:18 -0500 |
|---|---|---|
| committer | Richard J. Knight <rjknight@us.ibm.com> | 2015-10-20 11:40:14 -0500 |
| commit | 04f15f37e9ab6c09412a0abcffb87e9aefcc5368 (patch) | |
| tree | 56f608276a3bb269672053f32b6995cd522dde1c /scripts | |
| parent | 039b8b9d281863b98db454911d9cc3c2fe02d617 (diff) | |
| download | serverwiz-04f15f37e9ab6c09412a0abcffb87e9aefcc5368.tar.gz serverwiz-04f15f37e9ab6c09412a0abcffb87e9aefcc5368.zip | |
Add event reading type to .rpt file
-Updated processMrw.pl to include the sensor event reading
type when printing the report file.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/processMrw.pl | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/scripts/processMrw.pl b/scripts/processMrw.pl index a12a0c4..9276768 100755 --- a/scripts/processMrw.pl +++ b/scripts/processMrw.pl @@ -77,12 +77,18 @@ my $xmldir = dirname($serverwiz_file); $targetObj->loadXML($serverwiz_file); -my $str=sprintf(" %30s | %10s | %6s | %4s | %4s | %4s | %4s | %10s | %s\n", - "Sensor Name","FRU Name","Ent ID","Type","ID","Inst","FRU","HUID","Target"); +my $str=sprintf( + " %30s | %10s | %6s | %4s | %9s | %4s | %4s | %4s | %10s | %s\n", + "Sensor Name","FRU Name","Ent ID","Type","Evt Type","ID","Inst","FRU", + "HUID","Target"); + $targetObj->writeReport($str); -$str=sprintf(" %30s | %10s | %6s | %4s | %4s | %4s | %4s | %10s | %s\n", - "------------------------------","----------", - "------","----","----","----","----","----------","----------"); +my $str=sprintf( + " %30s | %10s | %6s | %4s | %9s | %4s | %4s | %4s | %10s | %s\n", + "------------------------------","----------", + "------","----","---------","----","----","----","----------", + "----------"); + $targetObj->writeReport($str); #-------------------------------------------------- ## loop through all targets and do stuff @@ -220,6 +226,9 @@ sub processIpmiSensors { getAttribute($child,"IPMI_SENSOR_NAME_SUFFIX"); my $sensor_id=$targetObj-> getAttribute($child,"IPMI_SENSOR_ID"); + my $sensor_evt=$targetObj-> + getAttribute($child,"IPMI_SENSOR_READING_TYPE"); + $name_suffix=~s/\n//g; $name_suffix=~s/\s+//g; @@ -239,9 +248,11 @@ sub processIpmiSensors { $sensor_id_str = sprintf("0x%02X",oct($sensor_id)); } my $str=sprintf( - " %30s | %10s | 0x%02X | 0x%02X | %4s | %4d | %4d | %10s | %s\n", - $sensor_name,$name,oct($entity_id),oct($sensor_type), - $sensor_id_str,$instance,$fru_id,$huid,$target); + " %30s | %10s | 0x%02X | 0x%02X | 0x%02x |" . + " %4s | %4d | %4d | %10s | %s\n", + $sensor_name,$name,oct($entity_id),oct($sensor_type), + oct($sensor_evt), $sensor_id_str,$instance,$fru_id, + $huid,$target); $targetObj->writeReport($str); } } @@ -277,6 +288,8 @@ sub processApss { getAttribute($child,"IPMI_SENSOR_NAME_SUFFIX"); my $sensor_id=$targetObj-> getAttribute($child,"IPMI_SENSOR_ID"); + my $sensor_evt=$targetObj-> + getAttribute($child,"IPMI_SENSOR_READING_TYPE"); my $channel = $targetObj-> getAttribute($child,"ADC_CHANNEL_ASSIGNMENT"); my $channel_id = $targetObj-> @@ -306,9 +319,12 @@ sub processApss { $channel_gains[$channel] = $channel_gain; } my $str=sprintf( - " %30s | %10s | 0x%02X | 0x%02X | %4s | %4d | %4d | %10s | %s\n", + " %30s | %10s | 0x%02X | 0x%02X | 0x%02x |" . + " %4s | %4d | %4d | %10s | %s\n", $name,"",oct($entity_id),oct($sensor_type), - $sensor_id_str,$channel,"","",$systemTarget); + oct($sensor_evt),$sensor_id_str,$channel,"","", + $systemTarget); + $targetObj->writeReport($str); } } @@ -422,7 +438,6 @@ sub processProcessor my $target = shift; ######################### - ## Copy PCIE attributes from socket ## In serverwiz, processor instances are not unique ## because plugged into socket ## so processor instance unique attributes are socket level. @@ -431,6 +446,12 @@ sub processProcessor $targetObj->getTargetParent($targetObj->getTargetParent($target)); $targetObj->copyAttribute($socket_target,$target,"LOCATION_CODE"); + ## Module attibutes are inherited into the proc target + my $module_target = + $targetObj->getTargetParent($target); + $targetObj->copyAttribute($module_target,$target,"LOCATION_CODE"); + + ## Copy PCIE attributes from socket foreach my $attr (sort (keys %{ $targetObj->getTarget($socket_target)->{TARGET}->{attribute} })) { @@ -439,6 +460,14 @@ sub processProcessor $targetObj->copyAttribute($socket_target,$target,$attr); } } + + ## Copy all attributes from module + foreach my $attr (sort (keys + %{ $targetObj->getTarget($module_target)->{TARGET}->{attribute} })) + { + $targetObj->copyAttribute($module_target,$target,$attr); + } + $targetObj->log($target, "Processing PROC"); foreach my $child (@{ $targetObj->getTargetChildren($target) }) { |

