mirror of
				https://github.com/containers/podman.git
				synced 2025-10-30 09:25:59 +08:00 
			
		
		
		
	Change to using gopsutil for cross-OS process ops
Instead of trying to write out own code to do basic process operations (e.g. checking if a PID is still running in a multi-OS friendly manner), use shirou/gopsutil, a multi-platform library that should abstract all the complexity away. Unlike our previous approach on Windows, this one should actually work. Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
		
							
								
								
									
										26
									
								
								vendor/github.com/power-devops/perfstat/lparstat.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								vendor/github.com/power-devops/perfstat/lparstat.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | ||||
| // +build aix | ||||
|  | ||||
| package perfstat | ||||
|  | ||||
| /* | ||||
| #cgo LDFLAGS: -lperfstat | ||||
|  | ||||
| #include <libperfstat.h> | ||||
| */ | ||||
| import "C" | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| ) | ||||
|  | ||||
| func PartitionStat() (*PartitionConfig, error) { | ||||
| 	var part C.perfstat_partition_config_t | ||||
|  | ||||
| 	rc := C.perfstat_partition_config(nil, &part, C.sizeof_perfstat_partition_config_t, 1) | ||||
| 	if rc != 1 { | ||||
| 		return nil, fmt.Errorf("perfstat_partition_config() error") | ||||
| 	} | ||||
| 	p := perfstatpartitionconfig2partitionconfig(part) | ||||
| 	return &p, nil | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Matt Heon
					Matt Heon