2012-11-19 23:39:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# force load > 10
|
|
|
|
while uptime | grep -v age:.[1-9][0-9].[0-9][0-9] >/dev/null ; do (timeout 5 nice burnP6 2>/dev/null &) done
|
|
|
|
|
|
|
|
cat <<'EOF' | stdout parallel -j0 -L1
|
2013-11-22 17:24:09 +00:00
|
|
|
# The seq 10000000 should take > 1 cpu sec to run.
|
2012-11-19 23:39:25 +00:00
|
|
|
echo '### --soft -f and test if child is actually suspended and thus takes longer'
|
2013-11-22 17:24:09 +00:00
|
|
|
niceload --soft -f 0.5 'seq 20000000 | wc;echo This should finish last'
|
|
|
|
(sleep 1; seq 20000000 | wc;echo This should finish first)
|
2012-12-10 20:57:00 +00:00
|
|
|
echo '### niceload with no arguments should give no output'
|
|
|
|
niceload
|
2012-11-19 23:39:25 +00:00
|
|
|
EOF
|
|
|
|
|
2013-11-22 17:24:09 +00:00
|
|
|
# TODO test -f + -t
|
|
|
|
|