# Information regarding elasticsearch.in.sh file

**URL:** https://discuss.elastic.co/t/information-regarding-elasticsearch-in-sh-file/876
**Category:** Elasticsearch
**Created:** [May 19, 2015, 5:07am UTC](https://discuss.elastic.co/t/information-regarding-elasticsearch-in-sh-file/876 "2015-05-19T05:07:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Phani\_Nadiminti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phani_nadiminti/32/45381_2.png) [@Phani\_Nadiminti](https://discuss.elastic.co/u/Phani_Nadiminti)
#### Post date: [May 19, 2015, 5:07am UTC](https://discuss.elastic.co/t/information-regarding-elasticsearch-in-sh-file/876/1 "2015-05-19T05:07:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![tlrx](https://avatars.discourse-cdn.com/v4/letter/t/a87d85/32.png) [@tlrx](https://discuss.elastic.co/u/tlrx)
#### Post date: [May 19, 2015, 7:47am UTC](https://discuss.elastic.co/t/information-regarding-elasticsearch-in-sh-file/876/2 "2015-05-19T07:47:36Z")

</div>

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):

```auto
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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 12:13am UTC](https://discuss.elastic.co/t/information-regarding-elasticsearch-in-sh-file/876/3 "2017-07-06T00:13:23Z")

</div>


