Skip to content

apps.plugin for windows#18594

Merged
ktsaou merged 95 commits intonetdata:masterfrom
ktsaou:windows-apps
Sep 30, 2024
Merged

apps.plugin for windows#18594
ktsaou merged 95 commits intonetdata:masterfrom
ktsaou:windows-apps

Conversation

@ktsaou
Copy link
Member

@ktsaou ktsaou commented Sep 22, 2024

This is almost a total rewrite of the code of apps.plugin:

  • remove fixed allocations for struct pid_stat pointers. The previous logic was assuming that the number of possible PIDs is small. However windows supports pids up to 2 billion, so the index is now a hashtable.
  • reworked the sort list to have dynamic allocation for pointers.
  • use ARAL for allocations of struct pid_stat.
  • remove limitation on command name length (now it is a STRING).
  • new process grouping that automatically detects the top level process and groups all its sub-processes to it (process_tree grouping).
  • perflib moved to libnetdata
  • new tree grouping, which uses the top-level process of the process tree, to aggregate all the processes to. This eliminates the need to maintain app_groups.conf.
    • systemd and pid 1 are already considered process orchestrators
    • user configuration is needed only for identifying other process orchestrators (e.g. containerd)
  • apps.plugin now maintains CPU utilization in NANOSECONDCORES, so in 1 billion increments per core.
  • apps.plugin now maintains memory utilization in bytes (was MiB)
  • apps.plugin now maintains disk I/O in bytes/sec (was KiB/sec)

On Windows, apps_groups.conf is not supported. The only possible grouping is tree.


Tests needed:

Operating System CPU Memory Disk I/O
Linux Verified Verified Pending
Windows Verified Verified Pending
MacOS Pending Pending Pending
FreeBSD Pending Pending Pending

To verify CPU, I have added a program called busy_threads, which creates N busy threads. The CPU utilization shown at the processes function and the charts, should match the number of busy threads spawn.

@github-actions github-actions bot added area/collectors Everything related to data collection collectors/apps labels Sep 22, 2024
@ktsaou ktsaou requested a review from a team as a code owner September 22, 2024 22:44
@github-actions github-actions bot added area/packaging Packaging and operating systems support area/build Build system (autotools and cmake). collectors/windows labels Sep 22, 2024
@ktsaou ktsaou merged commit 06bf663 into netdata:master Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build system (autotools and cmake). area/collectors Everything related to data collection area/docs area/packaging Packaging and operating systems support collectors/apps collectors/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants