diff options
| author | lishu <[email protected]> | 2018-11-28 21:45:37 +0800 |
|---|---|---|
| committer | lishu <[email protected]> | 2018-11-28 21:45:37 +0800 |
| commit | cf2684a100afcfa3076d6afe7235c62394ff77eb (patch) | |
| tree | fa73ad467894bd435c3538cd97590f136707c844 /bin/dd_r3 | |
| parent | 00ab3d6d0a00d310e0964f9d2237c6a2d68b825e (diff) | |
增加安装使用手册
Diffstat (limited to 'bin/dd_r3')
| -rw-r--r-- | bin/dd_r3 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/dd_r3 b/bin/dd_r3 new file mode 100644 index 0000000..389d6e3 --- /dev/null +++ b/bin/dd_r3 @@ -0,0 +1,21 @@ +#!/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 + + dd_num=`ps -ef|grep dd$|wc -l` + if [ $dd_num -lt 1 ] + then + ./dd &>/dev/null & + echo program crashed, restart at `date +"%w %Y/%m/%d, %H:%M:%S"` >> RESTART.log + fi + sleep 10 +done |
