Files
maven-mvnd/common
Guillaume Nodet 09e9f54391 Improve Windows RSS memory retrieval with multiple fallback strategies (#1414)
This commit enhances the Windows RSS memory retrieval functionality in OsUtils
to provide better compatibility and reliability across different Windows versions.

Key improvements:
- Added multiple fallback strategies for Windows RSS retrieval:
  1. PowerShell approach (modern, Windows 7+ with PowerShell 2.0+)
  2. WMIC approach (fallback for older systems)
  3. Tasklist approach (final fallback, most compatible from XP to Win11)

- Enhanced error handling with debug-level logging for memory queries
  to avoid log spam while maintaining visibility for debugging

- Added robust CSV parsing for tasklist output with proper handling
  of quoted fields and comma-separated numbers (e.g., '1,234 K')

- Improved regex pattern matching for memory values that handles
  various formats returned by Windows commands

- Refactored code structure by separating Unix and Windows logic
  into dedicated methods for better maintainability

These changes ensure reliable RSS memory retrieval across all supported
Windows versions while maintaining backward compatibility and improving
error handling.
2025-09-08 15:49:31 +02:00
..
2025-03-10 16:56:59 +01:00