blob: 46b218b76abec21a5c2ae7c7a7880626d147394d [file] [log] [blame]
Andrew Geissler95ac1b82021-03-31 14:34:31 -05001#!/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
12usage() {
13 echo "Usage: $0 <count>"
14}
15
Andrew Geisslerc926e172021-05-07 16:11:35 -050016TIMEOUT=15
17
Andrew Geissler95ac1b82021-03-31 14:34:31 -050018if [ $# -ne 1 ]; then
19 usage
20 exit 1
21fi
22
23uptime
Andrew Geisslerc926e172021-05-07 16:11:35 -050024timeout ${TIMEOUT} dd if=/dev/zero of=oe-time-dd-test.dat bs=1024 count=$1 conv=fsync
25if [ $? -ne 0 ]; then
26 echo "Timeout used: ${TIMEOUT}"
27 top -c -b -n1 -w 512
28 tail -30 tmp*/log/cooker/*/console-latest.log
29fi