# Exist 43 child process of filebeat, is it normal?

**URL:** <https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 9, 2016, 8:18am UTC](https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450 "2016-11-09T08:18:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WangXiangUSTC](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@WangXiangUSTC](https://discuss.elastic.co/u/WangXiangUSTC)\
**Post date:** [November 9, 2016, 8:18am UTC](https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450/1 "2016-11-09T08:18:53Z")

</div>

their is only one log file to ship (and this log file will logrotate by day) and send to kafka with 10 partitions , but have so many child process. Is it normal? why filebeat create so many child process?

> pstree -p |grep filebeat  
> |-filebeat(46029)-+-{filebeat}(46033)  
> | |-{filebeat}(46034)  
> | |-{filebeat}(46035)  
> | |-{filebeat}(46036)  
> | |-{filebeat}(46037)  
> | |-{filebeat}(46038)  
> | |-{filebeat}(46039)  
> | |-{filebeat}(46040)  
> | |-{filebeat}(46041)  
> | |-{filebeat}(46042)  
> | |-{filebeat}(46043)  
> | |-{filebeat}(46044)  
> | |-{filebeat}(46045)  
> | |-{filebeat}(46046)  
> | |-{filebeat}(46047)  
> | |-{filebeat}(46048)  
> | |-{filebeat}(46049)  
> | |-{filebeat}(46050)  
> | |-{filebeat}(46051)  
> | |-{filebeat}(46052)  
> | |-{filebeat}(46053)  
> | |-{filebeat}(46054)  
> | |-{filebeat}(46055)  
> | |-{filebeat}(46056)  
> | |-{filebeat}(46057)

> pstree -p |grep -c filebeat  
> 43

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [November 10, 2016, 9:03am UTC](https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450/2 "2016-11-10T09:03:08Z")

</div>

What is `ps aux | grep filebeat` showing? Could it be that pstree also shows goroutines?

---

<div class="post-metadata">

**Author:** ![WangXiangUSTC](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@WangXiangUSTC](https://discuss.elastic.co/u/WangXiangUSTC)\
**Post date:** [November 17, 2016, 9:50am UTC](https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450/3 "2016-11-17T09:50:03Z")

</div>

use ps aux | grep filebeat can only show one line .

It seems that their are too many child process, what about your filebeat?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 17, 2016, 1:25pm UTC](https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450/4 "2016-11-17T13:25:47Z")

</div>

filebeat is not creating any child processes. The go runtime creates a number of OS-threads, but no child processes. By using `grep filebeat` we can not tell the actual parent process though. You sure these are actual processes or are these threads? Can you try with `ps` only? Running `ps -m` should give you all threads, not just processes.

By default the go runtime requires GOMAXPROCS (environment variable) active OS-threads. If GOMAXPROCS is not set, the runtime will requires as many OS-threads as CPU cores are available (multiply by 2 if hyperthreading is enabled). The crux is in "active OS-Threads". If a blocking system call (like read from file) is executed within an OS-thread, it might be blocked. If the runtime is scheduling another go-routine it might start another OS-thread.

---

<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 15, 2016, 1:25pm UTC](https://discuss.elastic.co/t/exist-43-child-process-of-filebeat-is-it-normal/65450/5 "2016-12-15T13:25:52Z")

</div>

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