netdata icon indicating copy to clipboard operation
netdata copied to clipboard

apps.plugin for windows

Open ktsaou opened this issue 1 year ago • 1 comments

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

  • [x] 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.
  • [x] reworked the sort list to have dynamic allocation for pointers.
  • [x] use ARAL for allocations of struct pid_stat.
  • [x] remove limitation on command name length (now it is a STRING).
  • [x] new process grouping that automatically detects the top level process and groups all its sub-processes to it (process_tree grouping).
  • [x] perflib moved to libnetdata
  • [x] 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.
    • [x] systemd and pid 1 are already considered process orchestrators
    • [ ] user configuration is needed only for identifying other process orchestrators (e.g. containerd)
  • [x] apps.plugin now maintains CPU utilization in NANOSECONDCORES, so in 1 billion increments per core.
  • [x] apps.plugin now maintains memory utilization in bytes (was MiB)
  • [x] 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.

ktsaou avatar Sep 22 '24 11:09 ktsaou

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: ktsaou
:x: Costa Tsaousis


Costa Tsaousis seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Sep 26 '24 13:09 CLAassistant