apps.plugin: add per-Windows-service process tree grouping (#21925)
* apps.plugin: add per-Windows-service process tree grouping Add a new grouping dimension to apps.plugin on Windows that groups processes by their owning Windows Service. Service root PIDs are tagged via EnumServicesStatusEx (already called for process naming), then untagged processes walk up the tree to inherit their ancestor's service, with "Other" as fallback for non-service processes. Charts use type "service" and label "service" to naturally group with the existing windows.plugin service state charts. Enabled by default; disable with --without-services. Files changed: - apps_plugin.h: PROCESSES_HAVE_SERVICE flag, TARGET_TYPE_SERVICE, service_name/service_target fields, externs - apps_targets.c: services_root_target, get_service_target() - apps_os_windows.c: set p->service_name in GetServiceNames() - apps_aggregations.c: assign_service_to_all_processes() with 3-phase walk-up, zero/aggregate blocks - apps_plugin.c: enable_services_charts, CLI flag, chart output - apps_pid.c: cleanup service_name on process deletion - metadata.yaml: new services module with Windows-only metrics * apps.plugin: rename service fallback group from "Other" to "not-services" "Other" was misleading as it implied other services not individually monitored. "not-services" clearly indicates processes that do not belong to any Windows service. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(apps.plugin): detect Windows PID reuse to prevent bogus CPU spikes When Windows recycles a PID, the new process has less accumulated CPU time than the old one. The unsigned ULONGLONG subtraction in perflib_cpu_utilization() and perflib_rate() would underflow, producing massive values (e.g., 184725% CPU). Fix: detect PID reuse by comparing process creation times (Elapsed Time counter). When a change is detected, reset all counter history and re-read the process identity (comm, ppid, cmdline, SID, service). Also add safety guards (data1 >= data0) in rate calculations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(apps.plugin): update metadata to match code changes - Change 'Other' to 'not-services' in method_description - Fix 'Zero additional overhead' to 'No additional SCM query overhead' - Document both CLI flag forms (without-services / no-services) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>