Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions host/host_aix.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ func HostIDWithContext(ctx context.Context) (string, error) {
return strings.Split(string(out), "\n")[0], nil
}

func numProcs(_ context.Context) (uint64, error) {
return 0, common.ErrNotImplementedError
}

func BootTimeWithContext(ctx context.Context) (btime uint64, err error) {
return common.BootTimeWithContext(ctx, invoke)
}
Expand Down
18 changes: 18 additions & 0 deletions host/host_aix_cgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build aix && cgo

package host

import (
"context"

"github.com/power-devops/perfstat"
)

func numProcs(_ context.Context) (uint64, error) {
procs, err := perfstat.ProcessStat()
if err != nil {
return 0, err
}
return uint64(len(procs)), nil
}
14 changes: 14 additions & 0 deletions host/host_aix_nocgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build aix && !cgo

package host

import (
"context"

"github.com/shirou/gopsutil/v4/internal/common"
)

func numProcs(_ context.Context) (uint64, error) {
return 0, common.ErrNotImplementedError
}
Loading