From 07924ea080b02faf8fe7d85b24475e4bb2498505 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Mon, 6 Jun 2016 17:55:42 +0300 Subject: [PATCH] LU-8239 utils: llanalyze drops useful logs llanalyze should not execute entering_rpc and leaving_rpc if no rpctrace option set, otherwise wrong pid is set and usefull logs are skipped. This patch executes entering_rpc and leaving_rpc only if rpctrace is set. Test-Parameters: trivial Signed-off-by: Artem Blagodarenko Change-Id: I4676b0ca80f8ed314716e9368558489b64825ffa Reviewed-on: http://review.whamcloud.com/20641 Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo --- lustre/utils/llanalyze | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/utils/llanalyze b/lustre/utils/llanalyze index 1a58b16..0b5eb88 100644 --- a/lustre/utils/llanalyze +++ b/lustre/utils/llanalyze @@ -289,6 +289,7 @@ print "pid: $pid, dlm_ns: $dlm_ns\n"; print "rpctrace: $rpctrace\n"; print "extract_start: $extract_start\n"; print "extract_end: $extract_end\n"; +print "width: $width\n"; while () { if ($extract_start && $extract_start ne "LLANAYZE_FOUND") { next if (index($_, $extract_start, 0) == -1); @@ -322,7 +323,7 @@ while () { } if ( !$pid || $linepid == $pid || $linehpid == $pid) { - next if (!$entering_rpc && $rpctrace && $linemask != $masks->{RPCTRACE}); + next if ($rpctrace && !$entering_rpc && $linemask != $masks->{RPCTRACE}); next if ($trace && $linemask != $masks->{TRACE}); next if ($nodlm && ( $linesubsys == $subsys->{LDLM})); @@ -336,8 +337,8 @@ while () { $linesubsys == $subsys->{NET} || $linesubsys == $subsys->{LNET} || $linesubsys == $subsys->{LND})); - if(!$entering_rpc) {entering_rpc($_);} - if(!$leaving_rpc) {leaving_rpc($_);} + if($rpctrace && !$entering_rpc) {entering_rpc($_);} + if($rpctrace && !$leaving_rpc) {leaving_rpc($_);} # printf "sub/mask: %s - %s\n", getsubsys($_), getmask($_); if (!$silent) { -- 1.8.3.1