AIX Support Coming?
Is your feature request related to a problem? Please describe. No, but psutil support this os Describe the solution you'd like AIX/ppc64 support Describe alternatives you've considered psutil
We don't have access to this kind of hardware/operating system, we have to rely on external contributions for this (like in https://github.com/shirou/gopsutil/pull/834#issuecomment-593023654).
We already partially support aix
cpu/cpu_aix.go
cpu/cpu_aix_cgo.go
cpu/cpu_aix_nocgo.go
disk/disk_aix.go
disk/disk_aix_cgo.go
disk/disk_aix_nocgo.go
load/load_aix.go
load/load_aix_cgo.go
load/load_aix_nocgo.go
mem/mem_aix.go
mem/mem_aix_cgo.go
mem/mem_aix_nocgo.go
net/net_aix.go
net/net_aix_cgo.go
net/net_aix_nocgo.go
Can you confirm you are missing the host and process sub-packages? Can you confirm the cpu, disk, load, mem and net sub-packages are functional on aix/ppc64?
Ok the provided example works fine on Power8 (Go Support) .
is there a test bench that i can execute for all functions ?
cpu.Info() is also very expensive, because it is calling prtconf , how is the standard here if i want to make a pull request should i call processes and get values of use native C library?
cpu.Info() shells out to an external process only if you disable cgo ( CGO_ENABLED=0), it's defined twice in https://github.com/shirou/gopsutil/blob/042e63609b4e22a95b6201d48c874b62a976d133/cpu/cpu_aix_nocgo.go#L53 and https://github.com/shirou/gopsutil/blob/master/cpu/cpu_aix_cgo.go#L46
If you were to implement the missing packages with cgo, please add nocgo stubs like in https://github.com/shirou/gopsutil/blob/042e63609b4e22a95b6201d48c874b62a976d133/disk/disk_darwin_nocgo.go
There are tests for each packages, you can run all of them with go test github.com/shirou/gopsutil/v3/...
Host version detection: https://github.com/jxsl13/osfacts/blob/master/distro/distro_aix.go#L21
I'll be working on this here: https://github.com/Dylan-M/gopsutil/tree/aix_support
However, it will likely only be for nocgo support, since my software using it doesn't enable cgo. I'll make best effort to support it with cgo enabled as well.
Host version detection: https://github.com/jxsl13/osfacts/blob/master/distro/distro_aix.go#L21
Why specifically did you reference this?
I've implemented everything that I both have time to do, and is within my capabilities (I'm new at Golang) in #1651
This greatly improves AIX support in general, and covers all of my own use cases except processes. I hope to have time for that later.
Close as completed by #1651. Thank you for your contribution!