diff options
author | Jiang, Yunhong <yunhong.jiang@intel.com> | 2017-03-21 17:17:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-03-21 17:17:35 +0000 |
commit | b1495d4fa3175a3ffea301dedb9b0a60ca9ada44 (patch) | |
tree | 2e6fd013755883ca3b88e6d7b5f8aac0aba4dd56 /ci/envs/disable_trace.sh | |
parent | 3933989f5caacc99da3ad0faa96b42a2861ead6b (diff) | |
parent | f835f6520f491d554fa9655efe9e52dd8153c352 (diff) |
Merge "This patch includes updated scripts to enable ftrace and collect logs for debugging high latency values."
Diffstat (limited to 'ci/envs/disable_trace.sh')
-rwxr-xr-x | ci/envs/disable_trace.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ci/envs/disable_trace.sh b/ci/envs/disable_trace.sh index 1b04e62bb..6e1ef15c6 100755 --- a/ci/envs/disable_trace.sh +++ b/ci/envs/disable_trace.sh @@ -2,16 +2,17 @@ set -o xtrace curpwd=`pwd` -TRACE_FILE=$1 -TRACEDIR=/sys/kernel/debug/tracing/ +TRACE_FILE=trace.txt +TRACEDIR=/sys/kernel/debug/tracing -sudo bash -c "echo 0 >$TRACEDIR/tracing_on" +bash -c "echo 0 > $TRACEDIR/tracing_on" sleep 1 -sudo bash -c "cat $TRACEDIR/trace > $TRACE_FILE" -sudo bash -c "echo > $TRACEDIR/set_event" -sudo bash -c "echo > $TRACEDIR/trace" -sudo sysctl kernel.ftrace_enabled=0 -sudo bash -c "echo nop > $TRACEDIR/current_tracer" +bash -c "cat $TRACEDIR/trace > /tmp/$TRACE_FILE" + +bash -c "echo > $TRACEDIR/set_event" +bash -c "echo > $TRACEDIR/trace" +sysctl kernel.ftrace_enabled=0 +bash -c "echo nop > $TRACEDIR/current_tracer" set +o xtrace cd $curpwd |