Austin S. Hemmelgarn 36d5e40dca Revert "Override linker and include paths for static builds. (#9311)" (#9343) 4 лет назад
..
jobs 36d5e40dca Revert "Override linker and include paths for static builds. (#9311)" (#9343) 4 лет назад
README.md 9342704a41 Bulk add frontmatter to all documentation (#8354) 5 лет назад
build-x86_64-static.sh a20e8f163f Add CI for our Static Netdata builds (which kickstart-static64 uses) (#9130) 4 лет назад
build.sh 5087294d81 Add support for eBPF for Netdata static64 (kickstart-static64.sh) (#9104) 4 лет назад
functions.sh 5087294d81 Add support for eBPF for Netdata static64 (kickstart-static64.sh) (#9104) 4 лет назад
install-alpine-packages.sh 36d5e40dca Revert "Override linker and include paths for static builds. (#9311)" (#9343) 4 лет назад
install-or-update.sh 7707f9aa3a Fixed handling of OpenSSL on CentOS/RHEL by bundling a static copy and selecting a configuration directory at install time. (#9263) 4 лет назад
makeself-header.sh d49e6b50ba Added various fixes and improvements to the installers. (#8315) 5 лет назад
makeself-help-header.txt 38ad89fc2b Adds support for opting out of telemetry via the DO_NOT_TRACK envirnment variable (#7846) 5 лет назад
makeself-license.txt 4d77f2b325 move makeself (#4688) 6 лет назад
makeself.lsm 4d77f2b325 move makeself (#4688) 6 лет назад
makeself.sh 4d77f2b325 move makeself (#4688) 6 лет назад
openssl.version 7707f9aa3a Fixed handling of OpenSSL on CentOS/RHEL by bundling a static copy and selecting a configuration directory at install time. (#9263) 4 лет назад
post-installer.sh 4d77f2b325 move makeself (#4688) 6 лет назад
run-all-jobs.sh 5087294d81 Add support for eBPF for Netdata static64 (kickstart-static64.sh) (#9104) 4 лет назад

README.md

Netdata static binary build

To build the static binary 64-bit distribution package, run:

cd /path/to/netdata.git
./packaging/makeself/build-x86_64-static.sh

The program will:

  1. setup a new docker container with Alpine Linux
  2. install the required alpine packages (the build environment, needed libraries, etc)
  3. download and compile third party apps that are packaged with Netdata (bash, curl, etc)
  4. compile Netdata

Once finished, a file named netdata-vX.X.X-gGITHASH-x86_64-DATE-TIME.run will be created in the current directory. This is the Netdata binary package that can be run to install Netdata on any other computer.


building binaries with debug info

To build Netdata binaries with debugging / tracing information in them, use:

cd /path/to/netdata.git
./packaging/makeself/build-x86_64-static.sh debug

These binaries are not optimized (they are a bit slower), they have certain features disables (like log flood protection), other features enables (like debug flags) and are not stripped (the binary files are bigger, since they now include source code tracing information).

debugging Netdata binaries

Once you have installed a binary package with debugging info, you will need to install valgrind and run this command to start Netdata:

PATH="/opt/netdata/bin:${PATH}" valgrind --undef-value-errors=no /opt/netdata/bin/srv/netdata -D

The above command, will run Netdata under valgrind. While Netdata runs under valgrind it will be 10x slower and use a lot more memory.

If Netdata crashes, valgrind will print a stack trace of the issue. Open a github issue to let us know.

To stop Netdata while it runs under valgrind, press Control-C on the console.

If you omit the parameter --undef-value-errors=no to valgrind, you will get hundreds of errors about conditional jumps that depend on uninitialized values. This is normal. Valgrind has heuristics to prevent it from printing such errors for system libraries, but for the static Netdata binary, all the required libraries are built into Netdata. So, valgrind cannot appply its heuristics and prints them.

[analytics](<>)