summaryrefslogtreecommitdiff
path: root/schulung_tools/scheduling_tests/busy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'schulung_tools/scheduling_tests/busy.sh')
-rwxr-xr-xschulung_tools/scheduling_tests/busy.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/schulung_tools/scheduling_tests/busy.sh b/schulung_tools/scheduling_tests/busy.sh
new file mode 100755
index 0000000..06630d0
--- /dev/null
+++ b/schulung_tools/scheduling_tests/busy.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# pin ourself to CPU1
+taskset -p 2 $$ > /dev/null
+
+echo "`date +%s`: begin $1"
+
+ct=1
+while [ $ct -lt 1000000 ]; do
+ ct=$(($ct + 1))
+done
+
+echo "`date +%s`: end $1"