summaryrefslogtreecommitdiffstats
path: root/src/build/debug/eSEL.pl
diff options
context:
space:
mode:
authorIlya Smirnov <ismirno@us.ibm.com>2018-06-11 15:35:59 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-06-26 09:57:40 -0400
commitc8a30bc070a24d18516ed6d1332e66bceb36f8e7 (patch)
treed09502afb3eead4c3884d59464931b222f5d7d1e /src/build/debug/eSEL.pl
parentbe4d594926a5da4b5b8042498bb9be9287561339 (diff)
downloadtalos-hostboot-c8a30bc070a24d18516ed6d1332e66bceb36f8e7.tar.gz
talos-hostboot-c8a30bc070a24d18516ed6d1332e66bceb36f8e7.zip
Add Option to Use opal-elog-parse to eSEL.pl
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/60504 Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/build/debug/eSEL.pl')
-rwxr-xr-xsrc/build/debug/eSEL.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/build/debug/eSEL.pl b/src/build/debug/eSEL.pl
index 518f9dffe..f087fc483 100755
--- a/src/build/debug/eSEL.pl
+++ b/src/build/debug/eSEL.pl
@@ -64,6 +64,7 @@ my @esel_timestamps = ();
my $timestamp = "";
my $txt_file_name = "";
my $timestamp_found = 0;
+my $useOpalParser = 0;
my %options_table = (
get_ami_data => 0,
@@ -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";
@@ -122,6 +124,7 @@ GetOptions(
"ecc:s" => \$ecc_executable,
"v+" => \$debug,
"h" => \$usage,
+ "op:+" => \$useOpalParser,
) || printUsage();
if ($usage)
@@ -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"})
@@ -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";
OpenPOWER on IntegriCloud