From efc037a8e3e5d39ecfe90c5bb9ef9206f4363dab Mon Sep 17 00:00:00 2001 From: "baron@percona.com" <> Date: Sun, 4 Mar 2012 15:05:08 -0800 Subject: [PATCH] Test for stacktrace file existence before calling pt-pmp (fixes bug 945836) --- bin/pt-sift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/pt-sift b/bin/pt-sift index dee6e52b..9e5e3f30 100755 --- a/bin/pt-sift +++ b/bin/pt-sift @@ -361,7 +361,11 @@ main() { done echo "--stack traces--" - $PR_pmp -l 5 "${BASEDIR}/${PREFIX}-stacktrace" | head -n 5 + if [ -e "${BASEDIR}/${PREFIX}-stacktrace" ]; then + $PR_pmp -l 5 "${BASEDIR}/${PREFIX}-stacktrace" | head -n 5 + else + echo " No stack trace file exists" + fi echo "--oprofile--" if [ ! -e "${BASEDIR}/${PREFIX}-opreport" ]; then