summaryrefslogtreecommitdiff
path: root/bin/nr_r3
diff options
context:
space:
mode:
authoryulingjing <[email protected]>2019-07-31 16:03:48 +0800
committeryulingjing <[email protected]>2019-07-31 16:03:48 +0800
commitf69cf0b3c639b4744649d2f851ea1d3bf8c36128 (patch)
tree06c01b360f94cd3dd5036c9f85b48d0353104ac1 /bin/nr_r3
first commitHEADmaster
Diffstat (limited to 'bin/nr_r3')
-rw-r--r--bin/nr_r317
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/nr_r3 b/bin/nr_r3
new file mode 100644
index 0000000..d0b4c08
--- /dev/null
+++ b/bin/nr_r3
@@ -0,0 +1,17 @@
+#!/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
+
+ ./web_focus > log/screen.log 2>&1
+ echo program crashed, restart at `date +"%w %Y/%m/%d, %H:%M:%S"` >> RESTART.log
+ sleep 10
+done