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.

Signed-off-by: Sakib Sajal <sakib.sa...@windriver.com>
---
 scripts/oe-time-dd-test.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 scripts/oe-time-dd-test.sh

diff --git a/scripts/oe-time-dd-test.sh b/scripts/oe-time-dd-test.sh
new file mode 100644
index 0000000000..970a86dff0
--- /dev/null
+++ b/scripts/oe-time-dd-test.sh
@@ -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
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149770): 
https://lists.openembedded.org/g/openembedded-core/message/149770
Mute This Topic: https://lists.openembedded.org/mt/81519575/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to