1 #!/bin/sh 1 #!/bin/sh 2 # description: Snapshot and tracing setting 2 # description: Snapshot and tracing setting 3 # requires: snapshot 3 # requires: snapshot 4 # flags: instance 4 # flags: instance 5 5 6 echo "Set tracing off" 6 echo "Set tracing off" 7 echo 0 > tracing_on 7 echo 0 > tracing_on 8 8 9 echo "Allocate and take a snapshot" 9 echo "Allocate and take a snapshot" 10 echo 1 > snapshot 10 echo 1 > snapshot 11 11 12 # Since trace buffer is empty, snapshot is als 12 # Since trace buffer is empty, snapshot is also empty, but allocated 13 grep -q "Snapshot is allocated" snapshot 13 grep -q "Snapshot is allocated" snapshot 14 14 15 echo "Ensure keep tracing off" 15 echo "Ensure keep tracing off" 16 test `cat tracing_on` -eq 0 16 test `cat tracing_on` -eq 0 17 17 18 echo "Set tracing on" 18 echo "Set tracing on" 19 echo 1 > tracing_on 19 echo 1 > tracing_on 20 20 21 echo "Take a snapshot again" 21 echo "Take a snapshot again" 22 echo 1 > snapshot 22 echo 1 > snapshot 23 23 24 echo "Ensure keep tracing on" 24 echo "Ensure keep tracing on" 25 test `cat tracing_on` -eq 1 25 test `cat tracing_on` -eq 1 26 26 27 exit 0 27 exit 0
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.