summaryrefslogtreecommitdiffstats
path: root/recipes-core/numad/numad-0.6/run-ptest
blob: 5c49181a27b26036b933cf2a5afb000d404a294f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

CPUSET_PATH="/tmp/numad-cpuset"

/etc/init.d/numad.init status
STATUS=$?
/etc/init.d/numad.init stop
mkdir $CPUSET_PATH; mount -t cgroup -ocpuset cpuset $CPUSET_PATH
./test 2>&1&
TEST_PID=$!
sleep 2
numad -d -S 0 -u 50 -i 5:5 -p $TEST_PID -D $CPUSET_PATH
wait
numad -i 0
sleep 1
umount $CPUSET_PATH ; rmdir $CPUSET_PATH
if [ "$STATUS" = "0" ]; then
    /etc/init.d/numad.init start
fi