summaryrefslogtreecommitdiff
path: root/mctrl/bin/mctrl_r3
diff options
context:
space:
mode:
author崔一鸣 <[email protected]>2019-01-24 19:39:58 +0800
committer崔一鸣 <[email protected]>2019-01-24 19:39:58 +0800
commitc11bbf2e2e2701de5c0f753fb36e3a15b0597c80 (patch)
treed5f6b682fd72abbc11111cd10cf083ff848bb070 /mctrl/bin/mctrl_r3
parent6533454d55c6684ea8b1310122a2ed6e3938bb92 (diff)
parentf468ccaf66f25f2cc846104593b41dd1d2b6a9ce (diff)
Merge branch 'master' of git.mesalab.cn:IPReuse/Deploy_Env
Diffstat (limited to 'mctrl/bin/mctrl_r3')
-rw-r--r--mctrl/bin/mctrl_r318
1 files changed, 18 insertions, 0 deletions
diff --git a/mctrl/bin/mctrl_r3 b/mctrl/bin/mctrl_r3
new file mode 100644
index 0000000..2373dd4
--- /dev/null
+++ b/mctrl/bin/mctrl_r3
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+while [ 1 ]; do
+ count=`ls -l core.* |wc -l`
+ echo $count
+ if [ $count -lt 5 ]
+ then
+ echo "set unlimited"
+ ulimit -c unlimited
+ else
+ ulimit -c 0
+ fi
+
+ ./mctrl > /dev/null
+ echo program crashed, restart at `date +"%w %Y/%m/%d, %H:%M:%S"` >> RESTART.log
+ sleep 10
+done
+~