diff options
author | Sakib Sajal <sakib.sajal@windriver.com> | 2021-04-13 12:59:15 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-16 09:24:48 +0100 |
commit | 1cb269448b7172bdb5b043054c57dbc77ecaa667 (patch) | |
tree | e0a52f62c936baf89b581cb5438cb88f281c4714 /scripts/oe-time-dd-test.sh | |
parent | 6e8f334c770862ae91d742c4bcfcfe53d0a38415 (diff) | |
download | poky-1cb269448b7172bdb5b043054c57dbc77ecaa667.tar.gz |
oe-time-dd-test.sh: provide more information from "top"
Improvements:
- increase width to 512
- pass -c option to show full command-line
(From OE-Core rev: aeae9467af5609c3c7bf8d0379d5546d9797ead5)
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>
Diffstat (limited to 'scripts/oe-time-dd-test.sh')
-rwxr-xr-x | scripts/oe-time-dd-test.sh | 9 |
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() { | |||
13 | echo "Usage: $0 <count>" | 13 | echo "Usage: $0 <count>" |
14 | } | 14 | } |
15 | 15 | ||
16 | TIMEOUT=5 | ||
17 | |||
16 | if [ $# -ne 1 ]; then | 18 | if [ $# -ne 1 ]; then |
17 | usage | 19 | usage |
18 | exit 1 | 20 | exit 1 |
19 | fi | 21 | fi |
20 | 22 | ||
21 | uptime | 23 | uptime |
22 | /usr/bin/time -f "%e" dd if=/dev/zero of=foo bs=1024 count=$1 conv=fsync | 24 | timeout ${TIMEOUT} dd if=/dev/zero of=oe-time-dd-test.dat 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 | 25 | if [ $? -ne 0 ]; then |
26 | echo "Timeout used: ${TIMEOUT}" | ||
27 | top -c -b -n1 -w 512 | ||
28 | fi | ||