Skip to content

Commit

Permalink
Add Option to Use opal-elog-parse to eSEL.pl
Browse files Browse the repository at this point in the history
To make eSEL.pl more OpenPOWER-friendly, an option is
created to allow the user to not use the errl parser,
and instead use opal-elog-parse that can be built with
OpenPOWER package. This will allow OP partners to be
able to use eSEL.pl to parse error logs.

Change-Id: Ifc919283cadd00ee2b2388ac81d2fde688834344
Resolves: #142
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60433
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: GEORGE KEISHING <gkeishin@in.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60505
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
Ilya Smirnov authored and wghoffa committed Jun 26, 2018
1 parent e673739 commit a218c42
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/build/debug/eSEL.pl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
my $timestamp = "";
my $txt_file_name = "";
my $timestamp_found = 0;
my $useOpalParser = 0;

my %options_table = (
get_ami_data => 0,
Expand All @@ -86,6 +87,7 @@ sub printUsage
print " [-r] # filter out ACKed logs from HBEL\n";
print " [-k] # keep the temp files created by the script\n";
print " [--ecc <path>] # path to the ECC executable\n";
print " [--op] # use opal-elog-parse instead of errl\n";
print " [-p <option>]\n";
print " where <option> can be one of:\n";
print " get_ami_data (use IPMI to fetch eSEL data into binaries, no decode)\n";
Expand Down Expand Up @@ -122,6 +124,7 @@ sub printUsage
"ecc:s" => \$ecc_executable,
"v+" => \$debug,
"h" => \$usage,
"op:+" => \$useOpalParser,
) || printUsage();

if ($usage)
Expand Down Expand Up @@ -496,7 +499,7 @@ sub RemoveEccFromFile
sub DecodeBinarySelData
{
my $bin_file_name = "";
if (-e "$errl_path/errl")
if (-e "$errl_path/errl" or $useOpalParser)
{
if ($options_table{"decode_ami_data"} or
$options_table{"decode_hbel_data"})
Expand All @@ -521,7 +524,14 @@ sub DecodeBinarySelData
open TXT_FILE, ">", $txt_file_name or die "Unable to open TXT_FILE $txt_file_name\n";
print "Error log text file: $txt_file_name\n";

$cmd = "$cd_syms_dir $fspt_path $errl_path/errl --file=$bin_file_name $string_file -d 2>&1";
if(not $useOpalParser)
{
$cmd = "$cd_syms_dir $fspt_path $errl_path/errl --file=$bin_file_name $string_file -d 2>&1";
}
else
{
$cmd = "$cd_syms_dir $fspt_path $errl_path/opal-elog-parse -f $bin_file_name -a 2>&1";
}
$debug && print "$cmd\n";
my @txt = qx/$cmd/; # Execute the command
print TXT_FILE " @txt";
Expand Down

0 comments on commit a218c42

Please sign in to comment.