Skip to content

Commit

Permalink
MB-7930: delete all but 10 last erl_crash.dump-s
Browse files Browse the repository at this point in the history
Change-Id: Iab52965c8a04a41f4d661529d434191aaa2cde8a
Reviewed-on: http://review.couchbase.org/27682
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
  • Loading branch information
Aliaksey Kandratsenka authored and aartamonau committed Jul 26, 2013
1 parent 6bf06d7 commit 99e43f9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion couchbase-server.sh.in
Expand Up @@ -34,7 +34,7 @@ couch_start_arguments=""
LD_LIBRARY_PATH="@PREFIX@/lib":"@PREFIX@/lib/memcached":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

ERL_CRASH_DUMP=erl_crash.dump.$(date +%m-%d-%Y-%H:%M:%S).$$
ERL_CRASH_DUMP=erl_crash.dump.$(date +%s).$$
export ERL_CRASH_DUMP

ERL_FULLSWEEP_AFTER=512
Expand Down Expand Up @@ -103,12 +103,20 @@ _load_config () {
fi
}

_drop_old_crashdumps () {
ls -1 erl_crash.dump.* | sort | head -n -10 | xargs -- rm -f
}


_start() {
_check_nofile
_prepare_datadir
_maybe_start_epmd
_load_config

# note: we depend on pwd being $datadir from _prepare_datadir
_drop_old_crashdumps

# Set an ENV variable to force C++ STL and string classes to not use its
# default memory pooling allocator.
# For GCC 3.2.2 and later
Expand Down

0 comments on commit 99e43f9

Please sign in to comment.