Information regarding elasticsearch.in.sh file


(Phani Nadiminti) #1

Hi All,

I used rpm installation for elasticsearch.Now i want to enable heap dump file in certain path.but please explain me what is the advantage of elasticsearch.in.sh file in bin folder.i am starting es using /etc/init.d/elasticsearch start.I checked the elasticsearch script but in that we are calling elasticsearch file in bin directory so please explain me what is the advantage of elasticsearch.in.sh file.do we need to define memory limits in this file eventhough it is defined in sysconfig file?

Thanks
phani


(Tanguy) #2

Hi Phani,

You should consider to uncomment and use the ES_JAVA_OPTS environment variable defined in /etc/sysconfig/elasticsearch file (/etc/default/elasticsearch for Debian based distributions):

ES_JAVA_OPTS="$ES_JAVA_OPTS -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof"

This env var can be used to define external Java options on top of the defaults set. The /etc/sysconfig/elasticsearch file is sourced by the init.d script.

The bin/elasticsearch.in.sh file is usually modified when elasticsearch in installed with a tar gz package.

-- Tanguy


(system) #3