summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2024-05-16 13:33:00 +0300
committerGitHub <noreply@github.com>2024-05-16 13:33:00 +0300
commitfe06e8495ff85a5938d2fa6544302723e14eab1f (patch)
tree8d9e81ada11d89276da51ec1d8892b296fd88d06 /src
parentc401ef6ac4c7dc03e577b42bbdb32d5d82bddf5e (diff)
Windows Support Phase 1 (#17497)
* abstraction layer for O/S * updates * updates * updates * temp fix for protobuf * emulated waitid() * fix * fix * compatibility layer * fix for idtype * fix for missing includes * fix for missing includes * added missing includes * added missing includes * added missing includes * added missing includes * added missing includes * added missing includes * UUID renamed to ND_UUID to avoid conflict with windows.h * include libnetdata.h always - no conflicts * simplify abstraction headers * fix missing functions * fix missing functions * fix missing functions * fix missing functions * rename MSYS to WINDOWS * moved byteorder.h * structure for an internal windows plugin * 1st windows plugin * working plugin * fix printf * Special case windows for protobuf * remove cygwin, compile both as windows * log windows libraries used * fix cmake * fix protobuf * compilation * updated compilation script * added system.ram * windows uptime * perflib * working perflibdump * minify dump * updates to windows plugins, enable ML * minor compatibility fixes for cygwin and msys * perflib-dump to its own file * perflib now indexes names * improvements to the library; disks module WIP * API for selectively traversing the metrics * first working perflib chart: disk.space * working chart on logical and physical disks * added windows protocols * fix datatypes for loops * tinysleep for native smallest sleep support * remove libuuid dependency on windows * fix uuid functions for macos compilation * fix uuid comparison function * do not overwrite uuid library functions, define them as aliases to our own * fixed uuid_unparse functions * fixed typo * added perflib processor charts * updates for compiling without posix emulation * gather common contexts together * fix includes on linux * perflib-memory * windows mem.available * Update variable names for protobuf * network traffic * add network adapters that have traffic as virtual interfaces * add -pipe to windows compilation * reset or overflow flag is now per dimension * dpc is now counted separately * verified all perflib fields are processed and no text fields are present in the data * more common contexts * fix crash * do not add system.net multiple times * install deps update and shortcut * all threads are now joinable behind the scenes * fix threads cleanup * prepare for abstracting threads API * netdata threads full abstraction from pthreads * more threads abstraction and cleanup * more compatibility changes * fix compiler warnings * add base-devel to packages * removed duplicate base-devel * check for strndup * check headers in quotes * fix linux compilation * fix attribute gnu_printf on macos * fix for threads on macos * mingw64 compatibility * enable compilation on windows clion * added instructions * enable cloud * compatibility fixes * compatibility fixes * compatibility fixes * clion works on windows * support both MSYSTEM=MSYS and MSYSTEM=MINGW64 for configure * cleanup and docs * rename uuid_t to nd_uuid_t to avoid conflict with windows uuid_t * leftovers uuid_t * do not include uuid.h on macos * threads signaled cancellations * do not install v0 dashboard on windows * script to install openssh server on windows * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * use cleanup variable instead of pthreads push and pop * replace all calls to netdata_thread_cleanup_push() and netdata_thread_cleanup_pop() with __attribute__((cleanup(...))) * remove left-over freez * make sure there are no locks acquired at thread exit * add missing parameter * stream receivers and senders are now voluntarily cancelled * plugins.d now voluntarily exits its threads * uuid_t may not be aligned to word boundaries - fix the uuid_t functions to work on unaligned objects too. * collectors evloop is now using the new threading cancellation; ml is now not using pthread_cancel; more fixes * eliminate threads cancellability from the code base * fix exit timings and logs; fix uv_threads tags * use SSL_has_pending() only when it is available * do not use SSL_has_pending() * dyncfg files on windows escape collon and pipe characters * fix compilation on older systems * fix compilation on older systems * Create windows installer. The installer will install everything under C:\netdata by default. It will: - Install msys2 at C:\netdata - Install netdata dependencies with pacman - Install the agent itself under C:\netdata\opt You can start the agent by running an MSYS shell with C:\netdata\msys2_shell.cmd and then start the agent normally with: /opt/netdata/usr/sbin/netdata -D There are a more couple things to work on: - Verify publisher. - Install all deps not just libuv & protobuf. - Figure out how we want to auto-start the agent as a service. - Check how to uninstall things. * fixed typo * code cleanup * Create uninstaller --------- Co-authored-by: vkalintiris <vasilis@netdata.cloud>
Diffstat (limited to 'src')
-rw-r--r--src/aclk/aclk.c18
-rw-r--r--src/aclk/aclk_query.c9
-rw-r--r--src/aclk/aclk_query.h2
-rw-r--r--src/aclk/aclk_rx_msgs.c2
-rw-r--r--src/aclk/aclk_stats.c3
-rw-r--r--src/aclk/aclk_stats.h2
-rw-r--r--src/aclk/aclk_tx_msgs.c2
-rw-r--r--src/claim/claim.c10
-rw-r--r--src/collectors/all.h3
-rw-r--r--src/collectors/apps.plugin/apps_plugin.c8
-rw-r--r--src/collectors/cgroups.plugin/cgroup-discovery.c3
-rw-r--r--src/collectors/cgroups.plugin/cgroup-network.c6
-rw-r--r--src/collectors/cgroups.plugin/sys_fs_cgroup.c21
-rw-r--r--src/collectors/common-contexts/common-contexts.h28
-rw-r--r--src/collectors/common-contexts/disk.io.h44
-rw-r--r--src/collectors/common-contexts/mem.available.h35
-rw-r--r--src/collectors/common-contexts/mem.pgfaults.h40
-rw-r--r--src/collectors/common-contexts/mem.swap.h35
-rw-r--r--src/collectors/common-contexts/system.io.h38
-rw-r--r--src/collectors/common-contexts/system.ram.h68
-rw-r--r--src/collectors/diskspace.plugin/plugin_diskspace.c46
-rw-r--r--src/collectors/ebpf.plugin/ebpf.c25
-rw-r--r--src/collectors/ebpf.plugin/ebpf.h5
-rw-r--r--src/collectors/ebpf.plugin/ebpf_cachestat.c35
-rw-r--r--src/collectors/ebpf.plugin/ebpf_cgroup.c19
-rw-r--r--src/collectors/ebpf.plugin/ebpf_dcstat.c31
-rw-r--r--src/collectors/ebpf.plugin/ebpf_disk.c16
-rw-r--r--src/collectors/ebpf.plugin/ebpf_fd.c31
-rw-r--r--src/collectors/ebpf.plugin/ebpf_filesystem.c15
-rw-r--r--src/collectors/ebpf.plugin/ebpf_functions.c12
-rw-r--r--src/collectors/ebpf.plugin/ebpf_hardirq.c16
-rw-r--r--src/collectors/ebpf.plugin/ebpf_mdflush.c15
-rw-r--r--src/collectors/ebpf.plugin/ebpf_mount.c14
-rw-r--r--src/collectors/ebpf.plugin/ebpf_oomkill.c16
-rw-r--r--src/collectors/ebpf.plugin/ebpf_process.c15
-rw-r--r--src/collectors/ebpf.plugin/ebpf_shm.c31
-rw-r--r--src/collectors/ebpf.plugin/ebpf_socket.c32
-rw-r--r--src/collectors/ebpf.plugin/ebpf_softirq.c16
-rw-r--r--src/collectors/ebpf.plugin/ebpf_swap.c27
-rw-r--r--src/collectors/ebpf.plugin/ebpf_sync.c14
-rw-r--r--src/collectors/ebpf.plugin/ebpf_vfs.c31
-rw-r--r--src/collectors/freebsd.plugin/plugin_freebsd.c12
-rw-r--r--src/collectors/freeipmi.plugin/freeipmi_plugin.c7
-rw-r--r--src/collectors/idlejitter.plugin/plugin_idlejitter.c12
-rw-r--r--src/collectors/log2journal/log2journal-yaml.c2
-rw-r--r--src/collectors/log2journal/log2journal.c2
-rw-r--r--src/collectors/log2journal/log2journal.h25
-rw-r--r--src/collectors/macos.plugin/plugin_macos.c12
-rw-r--r--src/collectors/network-viewer.plugin/network-viewer.c2
-rw-r--r--src/collectors/perf.plugin/perf_plugin.c2
-rw-r--r--src/collectors/plugins.d/ndsudo.c4
-rw-r--r--src/collectors/plugins.d/plugins_d.c135
-rw-r--r--src/collectors/plugins.d/plugins_d.h4
-rw-r--r--src/collectors/plugins.d/pluginsd_functions.h2
-rw-r--r--src/collectors/plugins.d/pluginsd_internals.h2
-rw-r--r--src/collectors/plugins.d/pluginsd_parser.c84
-rw-r--r--src/collectors/plugins.d/pluginsd_parser.h2
-rw-r--r--src/collectors/proc.plugin/plugin_proc.c93
-rw-r--r--src/collectors/proc.plugin/plugin_proc.h2
-rw-r--r--src/collectors/proc.plugin/proc_diskstats.c82
-rw-r--r--src/collectors/proc.plugin/proc_loadavg.c2
-rw-r--r--src/collectors/proc.plugin/proc_meminfo.c95
-rw-r--r--src/collectors/proc.plugin/proc_net_dev.c41
-rw-r--r--src/collectors/proc.plugin/proc_net_netstat.c94
-rw-r--r--src/collectors/proc.plugin/proc_stat.c6
-rw-r--r--src/collectors/proc.plugin/proc_vmstat.c33
-rw-r--r--src/collectors/profile.plugin/plugin_profile.cc16
-rw-r--r--src/collectors/statsd.plugin/statsd.c36
-rw-r--r--src/collectors/systemd-journal.plugin/systemd-main.c6
-rw-r--r--src/collectors/tc.plugin/plugin_tc.c14
-rw-r--r--src/collectors/timex.plugin/plugin_timex.c15
-rw-r--r--src/collectors/windows.plugin/GetSystemCPU.c51
-rw-r--r--src/collectors/windows.plugin/GetSystemRAM.c34
-rw-r--r--src/collectors/windows.plugin/GetSystemUptime.c34
-rw-r--r--src/collectors/windows.plugin/perflib-dump.c529
-rw-r--r--src/collectors/windows.plugin/perflib-memory.c65
-rw-r--r--src/collectors/windows.plugin/perflib-names.c242
-rw-r--r--src/collectors/windows.plugin/perflib-network.c453
-rw-r--r--src/collectors/windows.plugin/perflib-processor.c191
-rw-r--r--src/collectors/windows.plugin/perflib-rrd.c411
-rw-r--r--src/collectors/windows.plugin/perflib-rrd.h12
-rw-r--r--src/collectors/windows.plugin/perflib-storage.c317
-rw-r--r--src/collectors/windows.plugin/perflib.c671
-rw-r--r--src/collectors/windows.plugin/perflib.h72
-rw-r--r--src/collectors/windows.plugin/windows-internals.h18
-rw-r--r--src/collectors/windows.plugin/windows_plugin.c109
-rw-r--r--src/collectors/windows.plugin/windows_plugin.h24
-rw-r--r--src/daemon/analytics.c21
-rw-r--r--src/daemon/buildinfo.c10
-rw-r--r--src/daemon/commands.c12
-rw-r--r--src/daemon/common.c6
-rw-r--r--src/daemon/config/dyncfg-files.c17
-rw-r--r--src/daemon/config/dyncfg-internals.h4
-rw-r--r--src/daemon/config/dyncfg-tree.c2
-rw-r--r--src/daemon/config/dyncfg-unittest.c18
-rw-r--r--src/daemon/config/dyncfg.c4
-rw-r--r--src/daemon/daemon.c20
-rw-r--r--src/daemon/event_loop.c2
-rw-r--r--src/daemon/global_statistics.c96
-rw-r--r--src/daemon/main.c62
-rw-r--r--src/daemon/service.c14
-rw-r--r--src/daemon/static_threads.c3
-rw-r--r--src/daemon/static_threads.h3
-rw-r--r--src/daemon/static_threads_freebsd.c14
-rw-r--r--src/daemon/static_threads_linux.c40
-rw-r--r--src/daemon/static_threads_macos.c14
-rw-r--r--src/daemon/static_threads_windows.c33
-rw-r--r--src/daemon/watcher.c10
-rw-r--r--src/database/contexts/api_v2.c6
-rw-r--r--src/database/contexts/instance.c4
-rw-r--r--src/database/contexts/internal.h4
-rw-r--r--src/database/contexts/metric.c4
-rw-r--r--src/database/contexts/rrdcontext.c25
-rw-r--r--src/database/contexts/rrdcontext.h28
-rw-r--r--src/database/contexts/worker.c143
-rw-r--r--src/database/engine/cache.c27
-rw-r--r--src/database/engine/datafile.c1
-rw-r--r--src/database/engine/dbengine-stresstest.c4
-rw-r--r--src/database/engine/dbengine-unittest.c2