]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-time-dd-test.sh: provide more information from "top"
authorSakib Sajal <sakib.sajal@windriver.com>
Tue, 13 Apr 2021 16:59:15 +0000 (12:59 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Apr 2021 08:24:43 +0000 (09:24 +0100)
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>
scripts/oe-time-dd-test.sh

index 970a86dff089083c10211a2cb6d044b8948e067e..5b25e6bd97412b8d7eb9ae27ec8a58256f6f4a47 100755 (executable)
@@ -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