summaryrefslogtreecommitdiffstats
path: root/recipes-core/numad/numad-0.6/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/numad/numad-0.6/run-ptest')
-rwxr-xr-xrecipes-core/numad/numad-0.6/run-ptest20
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-core/numad/numad-0.6/run-ptest b/recipes-core/numad/numad-0.6/run-ptest
new file mode 100755
index 0000000..5c49181
--- /dev/null
+++ b/recipes-core/numad/numad-0.6/run-ptest
@@ -0,0 +1,20 @@
1#!/bin/sh
2
3CPUSET_PATH="/tmp/numad-cpuset"
4
5/etc/init.d/numad.init status
6STATUS=$?
7/etc/init.d/numad.init stop
8mkdir $CPUSET_PATH; mount -t cgroup -ocpuset cpuset $CPUSET_PATH
9./test 2>&1&
10TEST_PID=$!
11sleep 2
12numad -d -S 0 -u 50 -i 5:5 -p $TEST_PID -D $CPUSET_PATH
13wait
14numad -i 0
15sleep 1
16umount $CPUSET_PATH ; rmdir $CPUSET_PATH
17if [ "$STATUS" = "0" ]; then
18 /etc/init.d/numad.init start
19fi
20