summaryrefslogtreecommitdiff
path: root/vendor/github.com/power-devops/perfstat/lparstat.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-14 13:18:54 -0600
committermo khan <mo@mokhan.ca>2025-05-14 13:18:54 -0600
commit4b2d609a0efcc1d9b2f1a08f954d067ad1d9cd1e (patch)
tree0afacf9217b0569130da6b97d4197331681bf119 /vendor/github.com/power-devops/perfstat/lparstat.go
parentab373d1fe698cd3f53258c09bc8515d88a6d0b9e (diff)
test: use playwright to test out an OIDC login
Diffstat (limited to 'vendor/github.com/power-devops/perfstat/lparstat.go')
-rw-r--r--vendor/github.com/power-devops/perfstat/lparstat.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/power-devops/perfstat/lparstat.go b/vendor/github.com/power-devops/perfstat/lparstat.go
index 0ce35e3..470a1af 100644
--- a/vendor/github.com/power-devops/perfstat/lparstat.go
+++ b/vendor/github.com/power-devops/perfstat/lparstat.go
@@ -1,3 +1,4 @@
+//go:build aix
// +build aix
package perfstat
@@ -6,11 +7,13 @@ package perfstat
#cgo LDFLAGS: -lperfstat
#include <libperfstat.h>
+#include <sys/dr.h>
*/
import "C"
import (
"fmt"
+ "unsafe"
)
func PartitionStat() (*PartitionConfig, error) {
@@ -24,3 +27,14 @@ func PartitionStat() (*PartitionConfig, error) {
return &p, nil
}
+
+func LparInfo() (*PartitionInfo, error) {
+ var pinfo C.lpar_info_format2_t
+
+ rc := C.lpar_get_info(C.LPAR_INFO_FORMAT2, unsafe.Pointer(&pinfo), C.sizeof_lpar_info_format2_t)
+ if rc != 0 {
+ return nil, fmt.Errorf("lpar_get_info() error")
+ }
+ p := lparinfo2partinfo(pinfo)
+ return &p, nil
+}