openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts/oe-timeout-dd-test.sh: add script
@ 2021-03-07 20:58 Sakib Sajal
  2021-03-08 14:50 ` [OE-core] " Randy MacLeod
  0 siblings, 1 reply; 6+ messages in thread
From: Sakib Sajal @ 2021-03-07 20:58 UTC (permalink / raw)
  To: openembedded-core

oe-timeout-dd-test tries to write <count> number of
kilobytes to the filesystem within a specified
<timeout>. 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.

To use and monitor a build, add to local.conf:
BB_HEARTBEAT_EVENT = "<interval to log data>"
BB_LOG_HOST_STAT_ON_INTERVAL = "1"
BB_LOG_HOST_STAT_CMDS = "oe-timeout-dd-test.sh <timeout> <count>"

Log can be found at:
$TMPDIR/buildstats/<build_number>/host_stats file.

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

diff --git a/scripts/oe-timeout-dd-test.sh b/scripts/oe-timeout-dd-test.sh
new file mode 100644
index 0000000000..40b3948c32
--- /dev/null
+++ b/scripts/oe-timeout-dd-test.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# oe-timeout-dd-test tries to write <count> number of
+# kilobytes to the filesystem within a specified time
+# constraint. 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 <timeout> <count>"
+}
+
+if [ $# -ne 2 ]; then
+        usage
+        exit 1
+fi
+
+timeout $1 dd if=/dev/zero of=/tmp/foo bs=1024 count=$2 >/dev/null 2>&1
+
+if [ $? -ne 0 ]
+then
+        top -b -n 1
+else
+        echo "success"
+fi
+
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-11 20:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-07 20:58 [PATCH] scripts/oe-timeout-dd-test.sh: add script Sakib Sajal
2021-03-08 14:50 ` [OE-core] " Randy MacLeod
2021-03-08 17:33   ` Richard Purdie
2021-03-08 20:46     ` Sakib Sajal
2021-03-08 22:10       ` Richard Purdie
2021-03-11 20:53         ` Yi Fan Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).