# How to stop Logstash running in background

**URL:** <https://discuss.elastic.co/t/how-to-stop-logstash-running-in-background/55018>\
**Category:** Logstash\
**Created:** [July 8, 2016, 6:19am UTC](https://discuss.elastic.co/t/how-to-stop-logstash-running-in-background/55018 "2016-07-08T06:19:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gayathri](https://discuss.elastic.co/u/gayathri)\
**Post date:** [July 8, 2016, 6:19am UTC](https://discuss.elastic.co/t/how-to-stop-logstash-running-in-background/55018/1 "2016-07-08T06:19:30Z")

</div>

Hi Team,

I tried "/opt/logstash/bin/logstash agent -f /opt/logstash/conf.d/logstash.conf & "  
command for starting the logstash in background...but i want to stop this now...  
Pid is creating again and again even after killing each.

Thanks,  
Gayathri

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 8, 2016, 6:23am UTC](https://discuss.elastic.co/t/how-to-stop-logstash-running-in-background/55018/2 "2016-07-08T06:23:17Z")

</div>

When you start Logstash like that there's no automatic restart mechanism so killing it shouldn't be an issue. I suspect the Logstash process you're killing is started by other means.

---

<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, 4:48am UTC](https://discuss.elastic.co/t/how-to-stop-logstash-running-in-background/55018/3 "2017-07-06T04:48:56Z")

</div>


