Skip to content

Commit

Permalink
Merge pull request #46 from Doodle3D/feature/stresstest-config-improv…
Browse files Browse the repository at this point in the history
…ements

Added oom killer score so print3d does not get killed
  • Loading branch information
peteruithoven committed May 25, 2016
2 parents 9175956 + bb10aa5 commit e8ca450
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/script/print3d-new-device.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ for DEV in $(ls /dev/ttyACM* /dev/ttyUSB*); do
if [ ! -S $SOCKET ]; then
$PRINT3D_RUNNER ${DEVBASE} &
#disown $!
# Make sure that print3d-runner and childs are never killed by the OOM-killer
# oom_adj can range from -16 to +15 with -17 being a special oom_disabled value.
# oom_score_adj is more modern and can range from -1000 to +1000. It does not have a oom killer disabled but with -1000 (added to the badness score) there is a very very slim change that the oom killer can kill it
# See http://zurlinux.com/?p=2147 The lowest possible value, -1000, is equivalent to disabling oom killing entirely for that task since it will always report a badness score of 0.
(echo -1000 > /proc/$!/oom_score_adj)
sleep 2
fi
done

0 comments on commit e8ca450

Please sign in to comment.