# How can I set the option for ls.cgroup.cpuacct.path.override and ls.cgroup.cpu.path.override in Docker?

**URL:** https://discuss.elastic.co/t/how-can-i-set-the-option-for-ls-cgroup-cpuacct-path-override-and-ls-cgroup-cpu-path-override-in-docker/158612
**Category:** Logstash
**Created:** [November 28, 2018, 3:39pm UTC](https://discuss.elastic.co/t/how-can-i-set-the-option-for-ls-cgroup-cpuacct-path-override-and-ls-cgroup-cpu-path-override-in-docker/158612 "2018-11-28T15:39:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bluecoffee](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@bluecoffee](https://discuss.elastic.co/u/bluecoffee)
#### Post date: [November 28, 2018, 3:39pm UTC](https://discuss.elastic.co/t/how-can-i-set-the-option-for-ls-cgroup-cpuacct-path-override-and-ls-cgroup-cpu-path-override-in-docker/158612/1 "2018-11-28T15:39:12Z")

</div>

Hi!  
I'm running Logstash as a docker container. In the debug logs, I get very frequent message like this;

> logstash\_1 | [2018-11-28T15:30:32,132][DEBUG][logstash.instrument.periodicpoller.cgroup.cpuacctresource] File /sys/fs/cgroup/cpuacct/docker//cpuacct.usage cannot be found, try providing an override 'ls.cgroup.cpuacct.path.override' in the Logstash JAVA\_OPTS environment variable  
> logstash\_1 | [2018-11-28T15:30:32,145][DEBUG][logstash.instrument.periodicpoller.cgroup.cpuresource] File /sys/fs/cgroup/cpu/docker//cpu.cfs\_period\_us cannot be found, try providing an override 'ls.cgroup.cpu.path.override' in the Logstash JAVA\_OPTS environment variable  
> logstash\_1 | [2018-11-28T15:30:32,157][DEBUG][logstash.instrument.periodicpoller.cgroup.cpuresource] File /sys/fs/cgroup/cpu/docker//cpu.cfs\_quota\_us cannot be found, try providing an override 'ls.cgroup.cpu.path.override' in the Logstash JAVA\_OPTS environment variable

My two questions are:

- To which value should I set these options?
- How can I set them, when I run a docker container (and do not want to replace the whole jvm.options config file - I use the default one and do not touch it).

For the former, I have the impression that I should set it simply to "/", but as I fail to actually set it, I cannot test that.

I've tried to pass an environment variable in my docker-compose file like this:

```auto
      # This does not seem to work:
      - LS_JAVA_OPTS="ls.cgroup.cpuacct.path.override=/ ls.cgroup.cpu.path.override=/"

```

but during startup I see no indication of the value being picked up. I use debug level, and config.debug=true, but I see nothing.

Any hint on this?

---

<div class="post-metadata">

### Author: ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)
#### Post date: [November 28, 2018, 4:20pm UTC](https://discuss.elastic.co/t/how-can-i-set-the-option-for-ls-cgroup-cpuacct-path-override-and-ls-cgroup-cpu-path-override-in-docker/158612/2 "2018-11-28T16:20:01Z")

</div>

This is the [change we made](https://github.com/elastic/logstash-docker/blob/master/build/logstash/bin/docker-entrypoint#L9) to the Elastic Logstash Docker image

---

<div class="post-metadata">

### Author: ![bluecoffee](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@bluecoffee](https://discuss.elastic.co/u/bluecoffee)
#### Post date: [November 29, 2018, 10:19am UTC](https://discuss.elastic.co/t/how-can-i-set-the-option-for-ls-cgroup-cpuacct-path-override-and-ls-cgroup-cpu-path-override-in-docker/158612/3 "2018-11-29T10:19:00Z")

</div>

Hi Guy!

Thanks a lot for the quick reply! I updated my docker image to 6.5 and it solved the problem!

Apparently, I should have put `-D` in front of the settings. Good to know for next time!

---

<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: [December 27, 2018, 10:19am UTC](https://discuss.elastic.co/t/how-can-i-set-the-option-for-ls-cgroup-cpuacct-path-override-and-ls-cgroup-cpu-path-override-in-docker/158612/4 "2018-12-27T10:19:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
