Skip to content

Conversation

@Dylan-M
Copy link
Contributor

@Dylan-M Dylan-M commented Dec 23, 2025

Description

This PR adds comprehensive AIX process support to gopsutil by implementing the full process package and host metrics for the AIX platform.

This includes:

  • New SignalsPending() method for retrieving pending signals for a process (with stubs for other OSes returning "Not Implemented")
  • Implementation of numProcs() in the host package to count running processes via ps aux command
  • Full AIX process package implementation with complete process information retrieval and metrics

Part 7 of splitting #1969: process package
Depends on #1979 #1980 #1981 #1982 #1983 #1984

Changes

  • Add SignalsPending() method to retrieve pending signals for a process
  • Implement numProcs() in host package for AIX using ps aux | wc -l command
  • Implement AIX-specific process package (process_aix.go) with support for:
    • Process information retrieval (status, cmdline, name, executable, environment, etc.)
    • Process metrics (CPU times, memory usage, page faults, I/O stats)
    • Memory mapping information via procmap command
    • Process relationships (parent, children, status)
    • Signal handling and process control
  • Add comprehensive test suite for AIX process functionality (process_aix_test.go)
  • Add test data and fixtures for AIX platform testing (real procfs binary snapshots)
  • Update platform-specific implementations across multiple OS modules

Testing

  • All existing tests continue to pass
  • New AIX process tests added with real AIX system test data
  • Tested on actual AIX system (ppc64) to verify functionality
  • Process count verification: numProcs() output matches ps aux command exactly
  • Code formatted with gofmt
  • Passes all 26 golangci-lint linters with AIX cross-compilation configuration

@Dylan-M Dylan-M changed the title Add AIX process support to gopsutil feat: Add AIX process support to gopsutil Dec 23, 2025
@Dylan-M Dylan-M force-pushed the dylanmyers/aix_process branch from 96258fa to 1b23ea7 Compare December 23, 2025 19:05
@Dylan-M Dylan-M marked this pull request as ready for review December 23, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant