From ecd3fcca846bf1357c297170bd2f24c772e85a82 Mon Sep 17 00:00:00 2001 From: jixinyi Date: Tue, 22 Jan 2019 17:47:22 +0800 Subject: 调用maat新接口 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mctrl/bin/mctrl_r3 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mctrl/bin/mctrl_r3 (limited to 'mctrl/bin/mctrl_r3') 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 +~ -- cgit v1.2.3