--- ./vendor/github.com/elastic/elastic-agent-system-metrics/metric/memory/memory_aix.go_orig	2025-11-18 23:27:23.755991076 -0600
+++ ./vendor/github.com/elastic/elastic-agent-system-metrics/metric/memory/memory_aix.go	2025-11-18 23:34:12.345961642 -0600
@@ -74,3 +74,19 @@
 
 	return memData, nil
 }
+
+func getSwap() (SwapMetrics, error) {
+        swapData := SwapMetrics{}
+
+        meminfo := C.perfstat_memory_total_t{}
+        _, err := C.perfstat_memory_total(nil, &meminfo, C.sizeof_perfstat_memory_total_t, 1)
+        if err != nil {
+                return swapData, fmt.Errorf("perfstat_memory_total: %s", err)
+        }
+
+        swapData.Total = opt.UintWith(uint64(meminfo.pgsp_total) * 4096) 
+        swapData.Free = opt.UintWith(uint64(meminfo.pgsp_free) * 4096)
+        usedBytes := swapData.Total.ValueOr(0) - swapData.Free.ValueOr(0) 
+        swapData.Used.Bytes = opt.UintWith(usedBytes)
+        return swapData, nil
+}
--- ./vendor/github.com/elastic/elastic-agent-system-metrics/metric/memory/memory_aix.go_orig	2025-11-19 05:46:11.033572091 -0600
+++ ./vendor/github.com/elastic/elastic-agent-system-metrics/metric/memory/memory_aix.go	2025-11-19 05:46:54.707051949 -0600
@@ -71,6 +71,10 @@
 	memData.Used.Bytes = opt.UintWith(totalMem - freeMem)
 	memData.Actual.Free = opt.UintWith(freeMem + kern)
 	memData.Actual.Used.Bytes = opt.UintWith(memData.Used.Bytes.ValueOr(0) - kern)
+        memData.Swap, err = getSwap()
+        if err != nil {
+                return memData, fmt.Errorf("error getting swap data: %w", err)
+        }
 
 	return memData, nil
 }
