@cryptotaxi247 / netdata-1 / commits / 70246b796

Move daemon/ under src/ (#16933)

vkalintiris committed Feb 6, 2024 at 15:32 UTC 70246b796560ed76b5af99a2e63e88289185d9dd
54 files changed +70 -70
CMakeLists.txt
+47 -47
@@ -801,40 +801,40 @@ set(LIBH2O_FILES
801 )
802
803 set(DAEMON_FILES
804 - daemon/buildinfo.c
805 - daemon/buildinfo.h
806 - daemon/common.c
807 - daemon/common.h
808 - daemon/daemon.c
809 - daemon/daemon.h
810 - daemon/event_loop.c
811 - daemon/event_loop.h
812 - daemon/global_statistics.c
813 - daemon/global_statistics.h
814 - daemon/analytics.c
815 - daemon/analytics.h
816 - daemon/main.c
817 - daemon/main.h
818 - daemon/signals.c
819 - daemon/signals.h
820 - daemon/service.c
821 - daemon/static_threads.c
822 - daemon/static_threads.h
823 - daemon/commands.c
824 - daemon/commands.h
825 - daemon/pipename.c
826 - daemon/pipename.h
827 - daemon/unit_test.c
828 - daemon/unit_test.h
829 - daemon/config/dyncfg.c
830 - daemon/config/dyncfg.h
831 - daemon/config/dyncfg-files.c
832 - daemon/config/dyncfg-unittest.c
833 - daemon/config/dyncfg-inline.c
834 - daemon/config/dyncfg-echo.c
835 - daemon/config/dyncfg-internals.h
836 - daemon/config/dyncfg-intercept.c
837 - daemon/config/dyncfg-tree.c
804 + src/daemon/buildinfo.c
805 + src/daemon/buildinfo.h
806 + src/daemon/common.c
807 + src/daemon/common.h
808 + src/daemon/daemon.c
809 + src/daemon/daemon.h
810 + src/daemon/event_loop.c
811 + src/daemon/event_loop.h
812 + src/daemon/global_statistics.c
813 + src/daemon/global_statistics.h
814 + src/daemon/analytics.c
815 + src/daemon/analytics.h
816 + src/daemon/main.c
817 + src/daemon/main.h
818 + src/daemon/signals.c
819 + src/daemon/signals.h
820 + src/daemon/service.c
821 + src/daemon/static_threads.c
822 + src/daemon/static_threads.h
823 + src/daemon/commands.c
824 + src/daemon/commands.h
825 + src/daemon/pipename.c
826 + src/daemon/pipename.h
827 + src/daemon/unit_test.c
828 + src/daemon/unit_test.h
829 + src/daemon/config/dyncfg.c
830 + src/daemon/config/dyncfg.h
831 + src/daemon/config/dyncfg-files.c
832 + src/daemon/config/dyncfg-unittest.c
833 + src/daemon/config/dyncfg-inline.c
834 + src/daemon/config/dyncfg-echo.c
835 + src/daemon/config/dyncfg-internals.h
836 + src/daemon/config/dyncfg-intercept.c
837 + src/daemon/config/dyncfg-tree.c
838 )
839
840 set(H2O_FILES
@@ -1331,7 +1331,7 @@ set(NETDATA_FILES
1331
1332 if(LINUX)
1333 list(APPEND NETDATA_FILES
1334 - daemon/static_threads_linux.c
1334 + src/daemon/static_threads_linux.c
1335 ${CGROUPS_PLUGIN_FILES}
1336 ${DISKSPACE_PLUGIN_FILES}
1337 ${PROC_PLUGIN_FILES}
@@ -1340,17 +1340,17 @@ if(LINUX)
1340
1341 if(ENABLE_SENTRY)
1342 list(APPEND NETDATA_FILES
1343 - daemon/sentry-native/sentry-native.c
1344 - daemon/sentry-native/sentry-native.h)
1343 + src/daemon/sentry-native/sentry-native.c
1344 + src/daemon/sentry-native/sentry-native.h)
1345 endif()
1346 elseif(MACOS)
1347 list(APPEND NETDATA_FILES
1348 - daemon/static_threads_macos.c
1348 + src/daemon/static_threads_macos.c
1349 ${MACOS_PLUGIN_FILES}
1350 )
1351 elseif(FREEBSD)
1352 list(APPEND NETDATA_FILES
1353 - daemon/static_threads_freebsd.c
1353 + src/daemon/static_threads_freebsd.c
1354 ${FREEBSD_PLUGIN_FILES}
1355 )
1356 endif()
@@ -2179,9 +2179,9 @@ endif()
2179 #
2180
2181 set(NETDATACLI_FILES
2182 - daemon/commands.h
2183 - daemon/pipename.c
2184 - daemon/pipename.h
2182 + src/daemon/commands.h
2183 + src/daemon/pipename.c
2184 + src/daemon/pipename.h
2185 src/cli/cli.c
2186 )
2187
@@ -2432,18 +2432,18 @@ install(PROGRAMS
2432 #
2433 # TODO: check the following files for correct substitutions
2434 #
2435 -configure_file(daemon/anonymous-statistics.sh.in daemon/anonymous-statistics.sh @ONLY)
2435 +configure_file(src/daemon/anonymous-statistics.sh.in src/daemon/anonymous-statistics.sh @ONLY)
2436 install(PROGRAMS
2437 - ${CMAKE_BINARY_DIR}/daemon/anonymous-statistics.sh
2437 + ${CMAKE_BINARY_DIR}/src/daemon/anonymous-statistics.sh
2438 DESTINATION usr/libexec/netdata/plugins.d)
2439
2440 -configure_file(daemon/get-kubernetes-labels.sh.in daemon/get-kubernetes-labels.sh @ONLY)
2440 +configure_file(src/daemon/get-kubernetes-labels.sh.in src/daemon/get-kubernetes-labels.sh @ONLY)
2441 install(PROGRAMS
2442 - ${CMAKE_BINARY_DIR}/daemon/get-kubernetes-labels.sh
2442 + ${CMAKE_BINARY_DIR}/src/daemon/get-kubernetes-labels.sh
2443 DESTINATION usr/libexec/netdata/plugins.d)
2444
2445 install(PROGRAMS
2446 - daemon/system-info.sh
2446 + src/daemon/system-info.sh
2447 DESTINATION usr/libexec/netdata/plugins.d)
2448
2449 #
docs/cloud/cheatsheet.md
+1 -1
@@ -39,7 +39,7 @@ You are expected to use this method in all following configuration changes.
39 ## Metrics collection & retention
40
41 You can tweak your settings in the netdata.conf file.
42 -📄 [Find your netdata.conf file](https://github.com/netdata/netdata/blob/master/daemon/config/README.md)
42 +📄 [Find your netdata.conf file](https://github.com/netdata/netdata/blob/master/src/daemon/config/README.md)
43
44 Open a new terminal and navigate to the netdata.conf file. Use the edit-config script to make changes: `sudo ./edit-config netdata.conf`
45
docs/configure/common-changes.md
+3 -3
@@ -38,7 +38,7 @@ to help you determine the exact settings for your desired retention period.
38 ### Reduce the data collection frequency
39
40 Change `update every` in
41 -the [`[global]` section](https://github.com/netdata/netdata/blob/master/daemon/config/README.md#global-section-options)
41 +the [`[global]` section](https://github.com/netdata/netdata/blob/master/src/daemon/config/README.md#global-section-options)
42 of `netdata.conf` so
43 that it is greater than `1`. An `update every` of `5` means the Netdata Agent enforces a _minimum_ collection frequency
44 of 5 seconds.
@@ -57,7 +57,7 @@ doc for details.
57 ### Disable a collector or plugin
58
59 Turn off entire plugins in
60 -the [`[plugins]` section](https://github.com/netdata/netdata/blob/master/daemon/config/README.md#plugins-section-options)
60 +the [`[plugins]` section](https://github.com/netdata/netdata/blob/master/src/daemon/config/README.md#plugins-section-options)
61 of
62 `netdata.conf`.
63
@@ -116,7 +116,7 @@ template: disk_fill_rate
116 ### Turn of all alerts and notifications
117
118 Set `enabled` to `no` in
119 -the [`[health]`](https://github.com/netdata/netdata/blob/master/daemon/config/README.md#health-section-options)
119 +the [`[health]`](https://github.com/netdata/netdata/blob/master/src/daemon/config/README.md#health-section-options)
120 section of `netdata.conf`.
121
122 ### Enable alert notifications
docs/configure/nodes.md
+1 -1
@@ -31,7 +31,7 @@ these files in your own Netdata config directory, as the next section describes
31 exist.
32
33 - `netdata.conf` is the main configuration file. This is where you'll find most configuration options. Read descriptions
34 - for each in the [daemon config](https://github.com/netdata/netdata/blob/master/daemon/config/README.md) doc.
34 + for each in the [daemon config](https://github.com/netdata/netdata/blob/master/src/daemon/config/README.md) doc.
35 - `edit-config` is a shell script used for [editing configuration files](#use-edit-config-to-edit-configuration-files).
36 - Various configuration files ending in `.conf` for [configuring plugins or
37 collectors](https://github.com/netdata/netdata/blob/master/collectors/REFERENCE.md) behave. Examples: `go.d.conf`,
docs/configure/start-stop-restart.md
+1 -1
@@ -1,6 +1,6 @@
1 # Start, stop, or restart the Netdata Agent
2
3 -When you install the Netdata Agent, the [daemon](https://github.com/netdata/netdata/blob/master/daemon/README.md) is
3 +When you install the Netdata Agent, the [daemon](https://github.com/netdata/netdata/blob/master/src/daemon/README.md) is
4 configured to start at boot and stop and restart/shutdown.
5
6 You will most often need to _restart_ the Agent to load new or editing configuration files.
docs/guides/configure/performance.md
+1 -1
@@ -50,7 +50,7 @@ including all its components, should be below 5 - 15% of a single core. For exam
50 0.6% - 1.8% of a total CPU capacity, depending on the CPU characteristics.
51
52 The Netdata Agent runs with the lowest
53 -possible [process scheduling policy](https://github.com/netdata/netdata/blob/master/daemon/README.md#netdata-process-scheduling-policy),
53 +possible [process scheduling policy](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#netdata-process-scheduling-policy),
54 which is `nice 19`, and uses the `idle` process scheduler. Together, these settings ensure that the Agent only gets CPU
55 resources when the node has CPU resources to space. If the node reaches 100% CPU utilization, the Agent is stopped first
56 to ensure your applications get any available resources.
health/REFERENCE.md
+2 -2
@@ -19,7 +19,7 @@ You can configure the Agent's health watchdog service by editing files in two lo
19
20 - The `[health]` section in `netdata.conf`. By editing the daemon's behavior, you can disable health monitoring
21 altogether, run health checks more or less often, and more. See
22 - [daemon configuration](https://github.com/netdata/netdata/blob/master/daemon/config/README.md#health-section-options) for a table of
22 + [daemon configuration](https://github.com/netdata/netdata/blob/master/src/daemon/config/README.md#health-section-options) for a table of
23 all the available settings, their default values, and what they control.
24
25 - The individual `.conf` files in `health.d/`. These health entity files are organized by the type of metric they are
@@ -1368,7 +1368,7 @@ health configuration files!
1368
1369 ## Troubleshooting
1370
1371 -You can compile Netdata with [debugging](https://github.com/netdata/netdata/blob/master/daemon/README.md#debugging) and then set in `netdata.conf`:
1371 +You can compile Netdata with [debugging](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#debugging) and then set in `netdata.conf`:
1372
1373 ```yaml
1374 [global]
src/cli/README.md
+1 -1
@@ -33,6 +33,6 @@ dumpconfig
33 Returns the current netdata.conf on stdout.
34 ```
35
36 -See also the Netdata daemon [command line options](https://github.com/netdata/netdata/blob/master/daemon/README.md#command-line-options).
36 +See also the Netdata daemon [command line options](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#command-line-options).
37
38
src/daemon/README.md renamed
+1 -1
@@ -143,7 +143,7 @@ For most Netdata programs (including standard external plugins shipped by netdat
143 | `ERROR` | Something that might disable a part of netdata.<br/>The log line includes `errno` (if it is not zero). |
144 | `FATAL` | Something prevented a program from running.<br/>The log line includes `errno` (if it is not zero) and the program exited. |
145
146 -The `FATAL` and `ERROR` messages will always appear in the logs, and `INFO`can be filtered using [severity level](https://github.com/netdata/netdata/tree/master/daemon/config#logs-section-options) option.
146 +The `FATAL` and `ERROR` messages will always appear in the logs, and `INFO`can be filtered using [severity level](https://github.com/netdata/netdata/tree/master/src/daemon/config#logs-section-options) option.
147
148 So, when auto-detection of data collection fail, `ERROR` lines are logged and the relevant modules are disabled, but the
149 program continues to run.
src/daemon/analytics.c renamed
src/daemon/analytics.h renamed
src/daemon/anonymous-statistics.sh.in renamed
src/daemon/buildinfo.c renamed
src/daemon/buildinfo.h renamed
src/daemon/commands.c renamed
src/daemon/commands.h renamed
src/daemon/common.c renamed
src/daemon/common.h renamed
src/daemon/config/README.md renamed
+9 -9
@@ -1,7 +1,7 @@
1 <!--
2 title: "Daemon configuration"
3 description: "The Netdata Agent's daemon is installed preconfigured to collect thousands of metrics every second, but is highly configurable for real-world workloads."
4 -custom_edit_url: "https://github.com/netdata/netdata/edit/master/daemon/config/README.md"
4 +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/daemon/config/README.md"
5 sidebar_label: "Daemon"
6 learn_status: "Published"
7 learn_rel_path: "Configuration"
@@ -29,13 +29,13 @@ the [web server access lists](https://github.com/netdata/netdata/blob/master/web
29
30 `netdata.conf` has sections stated with `[section]`. You will see the following sections:
31
32 -1. `[global]` to [configure](#global-section-options) the [Netdata daemon](https://github.com/netdata/netdata/blob/master/daemon/README.md).
32 +1. `[global]` to [configure](#global-section-options) the [Netdata daemon](https://github.com/netdata/netdata/blob/master/src/daemon/README.md).
33 2. `[db]` to [configure](#db-section-options) the database of Netdata.
34 3. `[directories]` to [configure](#directories-section-options) the directories used by Netdata.
35 4. `[logs]` to [configure](#logs-section-options) the Netdata logging.
36 5. `[environment variables]` to [configure](#environment-variables-section-options) the environment variables used
37 Netdata.
38 -6. `[sqlite]` to [configure](#sqlite-section-options) the [Netdata daemon](https://github.com/netdata/netdata/blob/master/daemon/README.md) SQLite settings.
38 +6. `[sqlite]` to [configure](#sqlite-section-options) the [Netdata daemon](https://github.com/netdata/netdata/blob/master/src/daemon/README.md) SQLite settings.
39 7. `[ml]` to configure settings for [machine learning](https://github.com/netdata/netdata/blob/master/src/ml/README.md).
40 8. `[health]` to [configure](#health-section-options) general settings for [health monitoring](https://github.com/netdata/netdata/blob/master/health/README.md).
41 9. `[web]` to [configure the web server](https://github.com/netdata/netdata/blob/master/web/server/README.md).
@@ -74,10 +74,10 @@ Please note that your data history will be lost if you have modified `history` p
74
75 | setting | default | info |
76 |:----------------------------------:|:-------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
77 -| process scheduling policy | `keep` | See [Netdata process scheduling policy](https://github.com/netdata/netdata/blob/master/daemon/README.md#netdata-process-scheduling-policy) |
77 +| process scheduling policy | `keep` | See [Netdata process scheduling policy](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#netdata-process-scheduling-policy) |
78 | OOM score | `0` | |
79 -| glibc malloc arena max for plugins | `1` | See [Virtual memory](https://github.com/netdata/netdata/blob/master/daemon/README.md#virtual-memory). |
80 -| glibc malloc arena max for Netdata | `1` | See [Virtual memory](https://github.com/netdata/netdata/blob/master/daemon/README.md#virtual-memory). |
79 +| glibc malloc arena max for plugins | `1` | See [Virtual memory](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#virtual-memory). |
80 +| glibc malloc arena max for Netdata | `1` | See [Virtual memory](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#virtual-memory). |
81 | hostname | auto-detected | The hostname of the computer running Netdata. |
82 | host access prefix | empty | This is used in docker environments where /proc, /sys, etc have to be accessed via another path. You may also have to set SYS_PTRACE capability on the docker for this work. Check [issue 43](https://github.com/netdata/netdata/issues/43). |
83 | timezone | auto-detected | The timezone retrieved from the environment variable |
@@ -117,7 +117,7 @@ Please note that your data history will be lost if you have modified `history` p
117 |:-------------------:|:------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
118 | config | `/etc/netdata` | The directory configuration files are kept. |
119 | stock config | `/usr/lib/netdata/conf.d` | |
120 -| log | `/var/log/netdata` | The directory in which the [log files](https://github.com/netdata/netdata/blob/master/daemon/README.md#log-files) are kept. |
120 +| log | `/var/log/netdata` | The directory in which the [log files](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#log-files) are kept. |
121 | web | `/usr/share/netdata/web` | The directory the web static files are kept. |
122 | cache | `/var/cache/netdata` | The directory the memory database will be stored if and when Netdata exits. Netdata will re-read the database when it will start again, to continue from the same point. |
123 | lib | `/var/lib/netdata` | Contains the alert log and the Netdata instance GUID. |
@@ -132,8 +132,8 @@ Please note that your data history will be lost if you have modified `history` p
132
133 | setting | default | info |
134 |:----------------------------------:|:-----------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
135 -| debug flags | `0x0000000000000000` | Bitmap of debug options to enable. For more information check [Tracing Options](https://github.com/netdata/netdata/blob/master/daemon/README.md#debugging). |
136 -| debug | `/var/log/netdata/debug.log` | The filename to save debug information. This file will not be created if debugging is not enabled. You can also set it to `syslog` to send the debug messages to syslog, or `none` to disable this log. For more information check [Tracing Options](https://github.com/netdata/netdata/blob/master/daemon/README.md#debugging). |
135 +| debug flags | `0x0000000000000000` | Bitmap of debug options to enable. For more information check [Tracing Options](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#debugging). |
136 +| debug | `/var/log/netdata/debug.log` | The filename to save debug information. This file will not be created if debugging is not enabled. You can also set it to `syslog` to send the debug messages to syslog, or `none` to disable this log. For more information check [Tracing Options](https://github.com/netdata/netdata/blob/master/src/daemon/README.md#debugging). |
137 | error | `/var/log/netdata/error.log` | The filename to save error messages for Netdata daemon and all plugins (`stderr` is sent here for all Netdata programs, including the plugins). You can also set it to `syslog` to send the errors to syslog, or `none` to disable this log. |
138 | access | `/var/log/netdata/access.log` | The filename to save the log of web clients accessing Netdata charts. You can also set it to `syslog` to send the access log to syslog, or `none` to disable this log. |
139 | facility | `daemon` | A facility keyword is used to specify the type of system that is logging the message. |
src/daemon/config/dyncfg-echo.c renamed
src/daemon/config/dyncfg-files.c renamed
src/daemon/config/dyncfg-inline.c renamed
src/daemon/config/dyncfg-intercept.c renamed
src/daemon/config/dyncfg-internals.h renamed
src/daemon/config/dyncfg-tree.c renamed
src/daemon/config/dyncfg-unittest.c renamed
src/daemon/config/dyncfg.c renamed
src/daemon/config/dyncfg.h renamed
src/daemon/daemon.c renamed
src/daemon/daemon.h renamed
src/daemon/event_loop.c renamed
src/daemon/event_loop.h renamed
src/daemon/get-kubernetes-labels.sh.in renamed
src/daemon/global_statistics.c renamed
src/daemon/global_statistics.h renamed
src/daemon/main.c renamed
src/daemon/main.h renamed
src/daemon/metrics.csv renamed
src/daemon/pipename.c renamed
src/daemon/pipename.h renamed
src/daemon/sentry-native/sentry-native.c renamed
src/daemon/sentry-native/sentry-native.h renamed
src/daemon/service.c renamed
src/daemon/signals.c renamed
src/daemon/signals.h renamed
src/daemon/static_threads.c renamed
src/daemon/static_threads.h renamed
src/daemon/static_threads_freebsd.c renamed
src/daemon/static_threads_linux.c renamed
src/daemon/static_threads_macos.c renamed
src/daemon/system-info.sh renamed
src/daemon/unit_test.c renamed
src/daemon/unit_test.h renamed
web/gui/dashboard_info.js
+3 -3
@@ -2840,13 +2840,13 @@ netdataDashboard.context = {
2840
2841 'apps.vmem': {
2842 info: 'Virtual memory allocated by applications. '+
2843 - 'Check <a href="https://github.com/netdata/netdata/tree/master/daemon#virtual-memory" target="_blank">this article</a> for more information.'
2843 + 'Check <a href="https://github.com/netdata/netdata/tree/master/src/daemon#virtual-memory" target="_blank">this article</a> for more information.'
2844 },
2845 'groups.vmem': {
2846 - info: 'Virtual memory allocated per user group since the Netdata restart. Please check <a href="https://github.com/netdata/netdata/tree/master/daemon#virtual-memory" target="_blank">this article</a> for more information.'
2846 + info: 'Virtual memory allocated per user group since the Netdata restart. Please check <a href="https://github.com/netdata/netdata/tree/master/src/daemon#virtual-memory" target="_blank">this article</a> for more information.'
2847 },
2848 'users.vmem': {
2849 - info: 'Virtual memory allocated per user since the Netdata restart. Please check <a href="https://github.com/netdata/netdata/tree/master/daemon#virtual-memory" target="_blank">this article</a> for more information.'
2849 + info: 'Virtual memory allocated per user since the Netdata restart. Please check <a href="https://github.com/netdata/netdata/tree/master/src/daemon#virtual-memory" target="_blank">this article</a> for more information.'
2850 },
2851
2852 'apps.minor_faults': {