1 #! /bin/sh 2 3 ############################################################################### 4 # # 5 # Copyright (c) 2010 FUJITSU LIMITED # 6 # # 7 # This program is free software; you can redistribute it and/or modify it # 8 # under the terms of the GNU General Public License as published by the Free # 9 # Software Foundation; either version 2 of the License, or (at your option) # 10 # any later version. # 11 # # 12 # Author: Li Zefan <lizf (at] cn.fujitsu.com> # 13 # # 14 ############################################################################### 15 16 LOOP=400 17 18 while true; do 19 i=0 20 while [ $i -lt $LOOP ]; do 21 cat "$TRACING_PATH"/stack_trace > /dev/null 22 i=$((i + 1)) 23 done 24 25 sleep 1 26 27 i=0 28 while [ $i -lt $LOOP ]; do 29 echo 0 > /proc/sys/kernel/stack_tracer_enabled 30 echo 1 > /proc/sys/kernel/stack_tracer_enabled 31 i=$((i + 1)) 32 done 33 34 sleep 1 35 done 36