diff options
Diffstat (limited to 'scripts/oe-time-dd-test.sh')
| -rw-r--r-- | scripts/oe-time-dd-test.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/oe-time-dd-test.sh b/scripts/oe-time-dd-test.sh new file mode 100644 index 0000000000..970a86dff0 --- /dev/null +++ b/scripts/oe-time-dd-test.sh | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # oe-time-dd-test records how much time it takes to | ||
| 4 | # write <count> number of kilobytes to the filesystem. | ||
| 5 | # It also records the number of processes that are in | ||
| 6 | # running (R), uninterruptible sleep (D) and interruptible | ||
| 7 | # sleep (S) state from the output of "top" command. | ||
| 8 | # The purporse of this script is to find which part of | ||
| 9 | # the build system puts stress on the filesystem io and | ||
| 10 | # log all the processes. | ||
| 11 | |||
| 12 | usage() { | ||
| 13 | echo "Usage: $0 <count>" | ||
| 14 | } | ||
| 15 | |||
| 16 | if [ $# -ne 1 ]; then | ||
| 17 | usage | ||
| 18 | exit 1 | ||
| 19 | fi | ||
| 20 | |||
| 21 | uptime | ||
| 22 | /usr/bin/time -f "%e" dd if=/dev/zero of=foo bs=1024 count=$1 conv=fsync | ||
| 23 | top -b -n 1 | grep -v "0 0 0" | grep -E ' [RSD] ' | cut -c 46-47 | sort | uniq -c | ||
