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 MAX_LOOP=1500 17 count=0 18 19 while true; do 20 count=$(( $count + 1 )) 21 i=0 22 while [ $i -lt $MAX_LOOP ]; do 23 echo 0 > "$TRACING_PATH"/tracing_enabled 24 echo 1 > "$TRACING_PATH"/tracing_enabled 25 i=$((i + 1)) 26 done 27 28 enable=$(( $count % 3 )) 29 30 if [ $enable -eq 0 ]; then 31 echo 0 > "$TRACING_PATH"/tracing_enabled 32 else 33 echo 1 > "$TRACING_PATH"/tracing_enabled 34 fi 35 36 sleep 1 37 done 38 39