mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
scripts: add oe-time-dd-test.sh
oe-time-dd-test records how much time it takes to write <count> number of kilobytes to the filesystem. It also records the number of processes that are in running (R), uninterruptible sleep (D) and interruptible sleep (S) state from the output of "top" command. The purporse of this script is to find which part of the build system puts stress on the filesystem io and log all the processes. (From OE-Core rev: 26d82f92e5ed2ebdde158d66b86eaf248f56892a) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ab6fb347a6
commit
4b5a93d190
23
scripts/oe-time-dd-test.sh
Normal file
23
scripts/oe-time-dd-test.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# oe-time-dd-test records how much time it takes to
|
||||
# write <count> number of kilobytes to the filesystem.
|
||||
# It also records the number of processes that are in
|
||||
# running (R), uninterruptible sleep (D) and interruptible
|
||||
# sleep (S) state from the output of "top" command.
|
||||
# The purporse of this script is to find which part of
|
||||
# the build system puts stress on the filesystem io and
|
||||
# log all the processes.
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <count>"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uptime
|
||||
/usr/bin/time -f "%e" dd if=/dev/zero of=foo bs=1024 count=$1 conv=fsync
|
||||
top -b -n 1 | grep -v "0 0 0" | grep -E ' [RSD] ' | cut -c 46-47 | sort | uniq -c
|
Loading…
Reference in New Issue
Block a user