summaryrefslogtreecommitdiffstats
path: root/daemon
AgeCommit message (Collapse)Author
2022-06-01Dictionary with JudyHS and double linked list (#13032)Costa Tsaousis
* dictionary internals isolation * more dictionary cleanups * added unit test * we should use DICT internally * disable cups in cmake * implement DICTIONARY with Judy arrays * operational JUDY implementation * JUDY cleanup * JUDY summary added * JudyHS implementation with double linked list * test negative searches too * optimize destruction * optimize set to insert first without lookup * updated stats * code cleanup; better organization; updated info * more code cleanup and commenting * more cleanup, renames and comments * fix rename * more cleanups * use Judy.h from system paths * added foreach traversal; added flag to add item in front; isolated locks to their own functions; destruction returns the number of bytes freed * more comments; flags are now 16-bit * completed unittesting * addressed comments and added reference counters maintainance * added unittest in main; tested removal of items in front, back and middle * added read/write walkthrough and foreach; allowed walkthrough and foreach in write mode to delete the current element (used by cups.plugin); referenced counters removed from the API * DICTFE.name should be const too * added API calls for exposing all statistics * dictionary flags as enum and reference counters as atomic operations * more comments; improved error handling at unit tests * added functions to allow unsafe access while traversing the dictionary with locks in place * check for libcups in cmake * added delete callback; implemented statsd with this dictionary * added missing dfe_done() * added alternative implementation with AVL * added documentation * added comments and warning about AVL * dictionary walktrhough on new code * simplified foreach; updated docs * updated docs * AVL is much faster without hashes * AVL should follow DBENGINE
2022-05-24Run the /net/dev module of the proc plugin in a separate thread (#12996)Vladimir Kobal
2022-05-24Fix compilation warnings (#12993)Vladimir Kobal
2022-05-23Make heartbeat a static chart (#12986)Emmanuel Vasilakis
2022-05-20chore: check link local address before querying cloud instance metadata (#12973)Ilya Mashchenko
check link local address before querying cloud providers data
2022-05-20fix: keep virtualization unknown if all used commands are not available (#12964)Ilya Mashchenko
2022-05-18detailed dbengine stats (#12948)Costa Tsaousis
2022-05-17feat: move dirs, logs, and env vars config options to separate sections (#12935)Ilya Mashchenko
2022-05-17Reduce timeout to 1 second for getting cloud instance info (#12941)Emmanuel Vasilakis
2022-05-16fix virtualization detection when `systemd-detect-virt` is not available ↵Ilya Mashchenko
(#12911)
2022-05-16fix `[global statistics]` section in netdata.conf (#12916)Ilya Mashchenko
2022-05-10workers fixes and improvements (#12863)Costa Tsaousis
2022-05-10Initialize the metadata database when performing dbengine stress test (#12861)Stelios Fragkakis
* Remove error (no real value) * Add a parameter to create an in-memory database for stress testing * Add a new parameter to the stresstest command to set the number of deisred libuv worker threads
2022-05-09Workers utilization charts (#12807)Costa Tsaousis
* initial version of worker utilization * working example * without mutexes * monitoring DBENGINE, ACLKSYNC, WEB workers * added charts to monitor worker usage * fixed charts units * updated contexts * updated priorities * added documentation * converted threads to stacked chart * One query per query thread * Revert "One query per query thread" This reverts commit 6aeb391f5987c3c6ba2864b559fd7f0cd64b14d3. * fixed priority for web charts * read worker cpu utilization from proc * read workers cpu utilization via /proc/self/task/PID/stat, so that we have cpu utilization even when the jobs are too long to finish within our update_every frequency * disabled web server cpu utilization monitoring - it is now monitored by worker utilization * tight integration of worker utilization to web server * monitoring statsd worker threads * code cleanup and renaming of variables * contrained worker and statistics conflict to just one variable * support for rendering jobs per type * better priorities and removed the total jobs chart * added busy time in ms per job type * added proc.plugin monitoring, switch clock to MONOTONIC_RAW if available, global statistics now cleans up old worker threads * isolated worker thread families * added cgroups.plugin workers * remove unneeded dimensions when then expected worker is just one * plugins.d and streaming monitoring * rebased; support worker_is_busy() to be called one after another * added diskspace plugin monitoring * added tc.plugin monitoring * added ML threads monitoring * dont create dimensions and charts that are not needed * fix crash when job types are added on the fly * added timex and idlejitter plugins; collected heartbeat statistics; reworked heartbeat according to the POSIX * the right name is heartbeat for this chart * monitor streaming senders * added streaming senders to global stats * prevent division by zero * added clock_init() to external C plugins * added freebsd and macos plugins * added freebsd and macos to global statistics * dont use new as a variable; address compiler warnings on FreeBSD and MacOS * refactored contexts to be unique; added health threads monitoring Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
2022-05-07fix memory leaks and mismatches of the use of the z functions for ↵Costa Tsaousis
allocations (#12841) * fix mismatches of the use of the z functions for allocations * when there was no memory; the original name of the dimensions was freed, and with mismatching deallocator.. * fixed memory leak at rrdeng_load_metric_*() functions * fixed memory leak on exit of plugins.d parser * fixed memory leak on plugins and streaming receiver threads exit * fixed compiler warnings
2022-05-04* Add a parameter for the libuv worker threads to pre-initialize (#12814)Stelios Fragkakis
* Set the thread name for libuv threads to LIBUV_WORKER * Make sure the dbengine thread has the correct name
2022-05-04Metric correlations (#12582)Emmanuel Vasilakis
* initial attempt at metric correlations * fix loop * simplify struct * change json * get points from query * comment * dont lock the host as much * add a configuration option to enable/disable metric correlations * remove KSfbar from header file * lock charts * add timeout * cast multiplication * add licencing info * better licencing * use onewayalloc * destroy owa
2022-05-03Remove node.d.plugin and relevant files (#12769)Suraj Neupane
* Remove node.d.plugin and relevant files * fix build packages * remove node.d related words/phrases from docs and tests
2022-05-03Trace rwlocks of netdata (#12785)Costa Tsaousis
* with -DNETDATA_INTERNAL_CHECKS=1 enable rwlocks tracing * fix strings alignment on terminal * remove wrong addition * removed formating warning; now counting active locks per thread; tracing is enabled with -DNETDATA_TRACE_RWLOCKS=1 * added the missing netdata_mutex_destroy() * optimized clocks usage in locks * added also main * fixed formatting warning * add compiler warning when compiling with -DNETDATA_TRACE_RWLOCKS=1 * cleanup and documentation * fix for old variable * >= not just > to allow proper comparisons * dont print 0x twice and print the lock pointer on every line * trace locks deeper
2022-05-03One way allocator to double the speed of parallel context queries (#12787)Costa Tsaousis
* one way allocator to speed up context queries * fixed a bug while expanding memory pages * reworked for clarity and finally fixed the bug of allocating memory beyond the page size * further optimize allocation step to minimize the number of allocations made * implement strdup with memcpy instead of strcpy * added documentation * prevent an uninitialized use of owa * added callocz() interface * integrate onewayalloc everywhere - apart sql queries * one way allocator is now used in context queries using archived charts in sql * align on the size of pointers * forgotten freez() * removed not needed memcpys * give unique names to global variables to avoid conflicts with system definitions
2022-05-02Make atomics a hard-dep. (#12730)vkalintiris
They are used extensively throughout our code base, and not having support for them does not generate a thread-safe agent.
2022-04-27fix: use 'diskutil info` to calculate the disk size on macOS (#12764)Ilya Mashchenko
2022-04-25fix(cgroups.plugin): remove "enable cgroup X" config option on cgroup ↵Ilya Mashchenko
deletion (#12746)
2022-04-11Add a timeout parameter to data queries (#12649)Stelios Fragkakis
* Add timeout parameter in queries and in calling functions * Add CANCEL flag in RRDR and code to cancel a query * Update swagger * Format swagger file properly
2022-04-11feat: add k8s_cluster_name host tag (GKE only) (#12638)Ilya Mashchenko
2022-04-06feat: add support for cloud providers info to /api/v1/info (#12613)Ilya Mashchenko
2022-04-04Fix coverity issues (#12598)vkalintiris
* Clamp LagN to non-zero values. * Free static threads even on test failure. * Initialize rusage. * s/free/freez/
2022-04-01Fix memory leaks on Netdata exit (#12511)Vladimir Kobal
* Fix memory leaks in dimensions and charts * Initialize superblock memory regions * Clean up static threads * Fix memory leaks in compression * Fix memory leaks in rrdcaltemplate * Fix memory leaks in health config * Fix ACLK memory leaks
2022-03-30Make sure registered static threads are unique. (#12538)vkalintiris
2022-03-29fix: use `/proc/cpuinfo` for CPU freq detection as a last resort (#12550)Ilya Mashchenko
2022-03-28Allocate buffer and release on callback when executing agent CLI commands ↵Stelios Fragkakis
(#12540) * Allocate buffer and release on callback * Allocate MAX_COMMAND_LENGTH for now. Proper allocation depending on the size of the message will be addressed in a future PR
2022-03-28docs: fix unresolved file references (#12528)Ilya Mashchenko
2022-03-28Use live charts to count the total number of dimensions. (#12504)vkalintiris
2022-03-24fix: Netdata segfault because of 2 timex.plugin threads (#12512)Ilya Mashchenko
2022-03-24timex: this plugin enables timex plugin for non-linux systems (#12489)Suraj Neupane
* timex: this plugin enables timex plugin for non-linux system * refactoring and fixing PR comments * move OS specific macros to libnetdata * Update README.md Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
2022-03-18fix: CPU frequency detection of FreeBSD (#12440)Ilya Mashchenko
2022-03-15chore: remove "web files" options leftovers (#12403)Ilya Mashchenko
2022-03-15Remove backends subsystem (#12146)Vladimir Kobal
2022-03-14Fix crash when netdatacli command output too long (#12393)Timotej S
* check the remaining length
2022-03-14Remove owner check from webserver (#12339)thiagoftsm
2022-03-11Change default OOM score and scheduling policy to behave more sanely. (#12271)Austin S. Hemmelgarn
2022-03-10minor - fix analytics_build_info (#12354)Timotej S
2022-03-08fix: container virtualization detection with systemd-detect-virt (#12338)Ilya Mashchenko
2022-03-04fix: returning 0 for CPU frequency when unknown (#12323)Ilya Mashchenko
2022-03-03fix: CPU frequency detection for some containers (#12306)Ilya Mashchenko
2022-03-03fix: cpu system info detection on macOS (#12293)Ilya Mashchenko
2022-03-02chore: remove unused variable in the system-info script (#12297)Ilya Mashchenko
2022-02-24minor - remove dead code from ACLK Legacy (#12230)Timotej S
2022-02-23Improve cleaning up of orphan hosts (#12201)Stelios Fragkakis
* Move the rrdhost_cleanup_orphan_hosts_nolock to the service that processes obsolete charts * Add OPCODE to mark a host as orphan * Queue cmd to mark a host as orphan
2022-02-22Remove unused NETDATA_NO_ATOMIC_INSTRUCTIONS macro (#12045)vkalintiris