Skip to content

Comments

feat: Add SystemCalls and Interrupts support for AIX load metrics#1981

Open
Dylan-M wants to merge 2 commits intoshirou:masterfrom
Dylan-M:dylanmyers/aix_load
Open

feat: Add SystemCalls and Interrupts support for AIX load metrics#1981
Dylan-M wants to merge 2 commits intoshirou:masterfrom
Dylan-M:dylanmyers/aix_load

Conversation

@Dylan-M
Copy link
Contributor

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

Description

Add support for SystemCalls() and Interrupts() functions for AIX platform to retrieve system calls and interrupt counts since boot.

Part 3 of splitting #1969: load package
Depends on #1979 #1980

Changes

  • Add SystemCalls() and Interrupts() functions to load_aix.go that delegate to context-aware implementations
  • Implement SystemCallsWithContext() and InterruptsWithContext() in load_aix_nocgo.go using vmstat command
  • Add parseVmstatLine() helper function to parse vmstat output and extract context switches, interrupts, and syscalls
  • Add getVmstatMetrics() helper function for shared metric extraction logic
  • Implement test dependency injection via testInvoker and getInvoker() for better testability
  • Update AvgWithContext() to use the new getInvoker() abstraction
  • Improve MiscWithContext() to properly parse AIX process states (A, I, W, T, Z) and populate context switches from vmstat
  • Update command invocations to use the new invoker abstraction for consistency

Testing

Changes have been validated with gofmt and golangci-lint.

@Dylan-M Dylan-M force-pushed the dylanmyers/aix_load branch from b9d2e44 to a8f7194 Compare February 16, 2026 14:34
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