summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSakib Sajal <sakib.sajal@windriver.com>2021-04-13 12:59:15 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-16 09:24:43 +0100
commitaeae9467af5609c3c7bf8d0379d5546d9797ead5 (patch)
treed85cff0a89e408c43e76855b07cd68a8e7196fcd
parentd58d5ce00a997646fc7b691e6fd23ebd7f84e3ab (diff)
downloadopenembedded-core-aeae9467af5609c3c7bf8d0379d5546d9797ead5.tar.gz
openembedded-core-aeae9467af5609c3c7bf8d0379d5546d9797ead5.tar.bz2
openembedded-core-aeae9467af5609c3c7bf8d0379d5546d9797ead5.zip
oe-time-dd-test.sh: provide more information from "top"
Improvements: - increase width to 512 - pass -c option to show full command-line Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/oe-time-dd-test.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/oe-time-dd-test.sh b/scripts/oe-time-dd-test.sh
index 970a86dff0..5b25e6bd97 100755
--- a/scripts/oe-time-dd-test.sh
+++ b/scripts/oe-time-dd-test.sh
@@ -13,11 +13,16 @@ usage() {
echo "Usage: $0 <count>"
}
+TIMEOUT=5
+
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
+timeout ${TIMEOUT} dd if=/dev/zero of=oe-time-dd-test.dat bs=1024 count=$1 conv=fsync
+if [ $? -ne 0 ]; then
+ echo "Timeout used: ${TIMEOUT}"
+ top -c -b -n1 -w 512
+fi