Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filebeat dynamically linked #960

Closed
cleesmith opened this issue Feb 11, 2016 · 6 comments
Closed

filebeat dynamically linked #960

cleesmith opened this issue Feb 11, 2016 · 6 comments
Labels

Comments

@cleesmith
Copy link

When I download Filebeat 1.1.0 LINUX 64-BIT and do file filebeat:

ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped

What are the shared libs it's depending on?
Is it possible to be statically linked?

@ruflin
Copy link
Contributor

ruflin commented Feb 11, 2016

This is related to elastic/beats-packer#23

@andrewkroh
Copy link
Member

@cleesmith, use the command line tool ldd to list the dependencies.

Yes, it possible. If you build it yourself it will be statically linked. See CONTRIBUTING for how to build.

@andrewkroh andrewkroh added the bug label Feb 11, 2016
@cleesmith
Copy link
Author

Thanks all. I was able to compile locally and it is static.
I was only doing this to compare filebeat circa Nov 2015 to filebeat as of now.
Someone using unifiedbeat complained about high cpu/thread usage even when it is just idle, so
I would like to update unifiedbeat with the latest filebeat changes ... I think filebeat has improved since then.

@ruflin
Copy link
Contributor

ruflin commented Feb 12, 2016

@cleesmith There were quite a few improvements on filebeat and libbeat side since then. Let us know if you get stuck updating and need some help. I'm now also watching your repo and this issue here: cleesmith/unifiedbeat#3

@cleesmith
Copy link
Author

@ruflin thank you. I really need to re-think how to best reuse filebeat. Both unifiedbeat and filebeat do almost the same thing but with different files/data. It would also be nice to have a way to only "tail" and read from the most recent file ... and not to continue watching/harvesting from files that will never have any new data added to them ... I think that is where the excessive cpu usage comes from, I think.

@ruflin
Copy link
Contributor

ruflin commented Feb 12, 2016

Have a look here at the close_older option which was introduced: #718

@monicasarbu monicasarbu added the Filebeat Filebeat label Apr 21, 2016
tsg pushed a commit to tsg/beats that referenced this issue May 19, 2016
This produces statically linked binaries for Filebeat and Winlogbeat (which
don't use CGo) by using simple cross compilation, without Cgo enabled.
The advantage of the statically linked binaries is that they tend to be
more portable.

Closes elastic#960.

Also get rid of the duplication between the build scripts between xgo-image and
xgo-image-deb6.
andrewkroh pushed a commit that referenced this issue May 19, 2016
This produces statically linked binaries for Filebeat and Winlogbeat (which
don't use CGo) by using simple cross compilation, without Cgo enabled.
The advantage of the statically linked binaries is that they tend to be
more portable.

Closes #960.

Also get rid of the duplication between the build scripts between xgo-image and
xgo-image-deb6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants