-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete libraries and user-side programs (#172)
- Loading branch information
Showing
165 changed files
with
78 additions
and
55,887 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CC=gcc | ||
|
||
KERNEL_DIR = kernel/ | ||
KERNEL_PROGRAM = $(KERNEL_DIR)process_kern.o | ||
|
||
KERNEL_VERSION="$(shell if [ -f /usr/src/linux/include/config/kernel.release ]; then cat /usr/src/linux/include/config/kernel.release; else cat /proc/sys/kernel/osrelease; fi)" | ||
FIRST_KERNEL_VERSION=$(shell sh tools/complement.sh "$(KERNEL_VERSION)") | ||
|
||
NETDATA_KERNEL_VERSION=$(shell echo $(KERNEL_VERSION) | tr -s "." "_") | ||
|
||
VER_MAJOR=$(shell echo $(KERNEL_VERSION) | cut -d. -f1) | ||
VER_MINOR=$(shell echo $(KERNEL_VERSION) | cut -d. -f2) | ||
VER_PATCH=$(shell echo $(KERNEL_VERSION) | cut -d. -f3) | ||
|
||
_LIBC ?= glibc | ||
|
||
EXTRA_CFLAGS += -fno-stack-protector | ||
|
||
all: $(KERNEL_PROGRAM) | ||
cp $(KERNEL_DIR)rprocess_kern.o rnetdata_ebpf_process.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o | ||
cp $(KERNEL_DIR)pprocess_kern.o pnetdata_ebpf_process.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o | ||
cp $(KERNEL_DIR)rnetwork_viewer_kern.o rnetdata_ebpf_socket.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o | ||
cp $(KERNEL_DIR)pnetwork_viewer_kern.o pnetdata_ebpf_socket.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o | ||
if [ -f pnetdata_ebpf_process.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o ]; then tar -cf artifacts/netdata_ebpf-$(FIRST_KERNEL_VERSION)_$(NETDATA_KERNEL_VERSION)-$(_LIBC).tar [pr]netdata_ebpf_*.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o; else echo "ERROR: Cannot find BPF programs"; exit 1; fi | ||
if [ "$${DEBUG:-0}" -eq 1 ]; then tar -uvf artifacts/netdata_ebpf-$(FIRST_KERNEL_VERSION)_$(NETDATA_KERNEL_VERSION)-$(_LIBC).tar tools/check-kernel-config.sh; fi | ||
xz artifacts/netdata_ebpf-$(FIRST_KERNEL_VERSION)_$(NETDATA_KERNEL_VERSION)-$(_LIBC).tar | ||
( cd artifacts; sha256sum netdata_ebpf-$(FIRST_KERNEL_VERSION)_$(NETDATA_KERNEL_VERSION)-$(_LIBC).tar.xz > netdata_ebpf-$(FIRST_KERNEL_VERSION)_$(NETDATA_KERNEL_VERSION)-$(_LIBC).tar.xz.sha256sum ) | ||
|
||
$(KERNEL_PROGRAM): | ||
cd $(KERNEL_DIR) && $(MAKE) all; | ||
|
||
clean: | ||
if [ -f pnetdata_ebpf_process.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o ] ; then rm *.o; fi | ||
cd $(KERNEL_DIR) && $(MAKE) clean; | ||
rm artifacts/* | ||
|
||
install: | ||
cp *netdata_ebpf_process.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).o /usr/libexec/netdata/plugins.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
# Compilation as normal user | ||
|
||
The `kernel-collector` repository can be compiled as normal user, but before to do this it is necessary | ||
some steps as `root`. | ||
The `kernel-collector` repository can be compiled as normal user, but before doing this it is necessary | ||
to do some steps as `root`. | ||
|
||
## Steps as root | ||
|
||
Before to compile this repository, it is necessary to install the nessary packages available on your | ||
Linux distribution. The complete list of packages can be found inside the Docker files on this repository. | ||
Before compiling this repository, you have to install necessary packages available on your | ||
Linux distribution. The complete list of packages can be found inside the Docker files in this repository. | ||
|
||
Case you are trying to compile on a kernel newer than `5.0`, it will be necessary to disable the | ||
`assembly inline`, this can be done editing the file `/usr/src/linux/include/generated/autoconf.h` | ||
In case you are trying to compile on a kernel newer than `5.0`, it will be necessary to disable the | ||
`assembly inline`, this can be done by editing the file `/usr/src/linux/include/generated/autoconf.h` | ||
and commenting the line `//#define CONFIG_CC_HAS_ASM_INLINE 1`. | ||
|
||
Finally case your distribution does not create the symbolic link `/usr/src/linux` to your kernel source, | ||
Finally, if your distribution does not create the symbolic link `/usr/src/linux` to your kernel source, | ||
you will need to do it manually. | ||
|
||
## Step as normal user | ||
|
||
After to do the necessary installation, you only need to run the next commands to compile the repository: | ||
After the necessary installation has been prepared, you need to run the next command to compile the repository: | ||
|
||
```bash | ||
$ cd user/ | ||
$ make | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Docs | ||
|
||
The following directory contains general documentation related to this repository. | ||
This directory contains general documentation related to this repository. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# Include files | ||
|
||
This directory has only one file that Netdata developed, the file `api.h`, all theother files were | ||
copied from kernel source repository. | ||
Copied from the kernel source repository. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.