podman
315 строк · 6.2 Кб
1// +build !aix
2
3// Copyright 2020 Power-Devops.com. All rights reserved.
4// Use of this source code is governed by the license
5// that can be found in the LICENSE file.
6/*
7Package perfstat is Go interface to IBM AIX libperfstat.
8To use it you need AIX with installed bos.perf.libperfstat. You can check, if is installed using the following command:
9
10$ lslpp -L bos.perf.perfstat
11
12The package is written using Go 1.14.7 and AIX 7.2 TL5. It should work with earlier TLs of AIX 7.2, but I
13can't guarantee that perfstat structures in the TLs have all the same fields as the structures in AIX 7.2 TL5.
14
15For documentation of perfstat on AIX and using it in programs refer to the official IBM documentation:
16https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat.html
17*/
18package perfstat19
20import (21"fmt"22"time"23)
24
25// EnableLVMStat() switches on LVM (logical volumes and volume groups) performance statistics.
26// With this enabled you can use fields KBReads, KBWrites, and IOCnt
27// in LogicalVolume and VolumeGroup data types.
28func EnableLVMStat() {}29
30// DisableLVMStat() switchess of LVM (logical volumes and volume groups) performance statistics.
31// This is the default state. In this case LogicalVolume and VolumeGroup data types are
32// populated with informations about LVM structures, but performance statistics fields
33// (KBReads, KBWrites, IOCnt) are empty.
34func DisableLVMStat() {}35
36// CpuStat() returns array of CPU structures with information about
37// logical CPUs on the system.
38// IBM documentation:
39// * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_int_cpu.html
40// * https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu.html
41func CpuStat() ([]CPU, error) {42return nil, fmt.Errorf("not implemented")43}
44
45// CpuTotalStat() returns general information about CPUs on the system.
46// IBM documentation:
47// * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_glob_cpu.html
48// * https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cputot.html
49func CpuTotalStat() (*CPUTotal, error) {50return nil, fmt.Errorf("not implemented")51}
52
53// CpuUtilStat() calculates CPU utilization.
54// IBM documentation:
55// * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_cpu_util.html
56// * https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu_util.html
57func CpuUtilStat(intvl time.Duration) (*CPUUtil, error) {58return nil, fmt.Errorf("not implemented")59}
60
61func DiskTotalStat() (*DiskTotal, error) {62return nil, fmt.Errorf("not implemented")63}
64
65func DiskAdapterStat() ([]DiskAdapter, error) {66return nil, fmt.Errorf("not implemented")67}
68
69func DiskStat() ([]Disk, error) {70return nil, fmt.Errorf("not implemented")71}
72
73func DiskPathStat() ([]DiskPath, error) {74return nil, fmt.Errorf("not implemented")75}
76
77func FCAdapterStat() ([]FCAdapter, error) {78return nil, fmt.Errorf("not implemented")79}
80
81func PartitionStat() (*PartitionConfig, error) {82return nil, fmt.Errorf("not implemented")83}
84
85func LogicalVolumeStat() ([]LogicalVolume, error) {86return nil, fmt.Errorf("not implemented")87}
88
89func VolumeGroupStat() ([]VolumeGroup, error) {90return nil, fmt.Errorf("not implemented")91}
92
93func MemoryTotalStat() (*MemoryTotal, error) {94return nil, fmt.Errorf("not implemented")95}
96
97func MemoryPageStat() ([]MemoryPage, error) {98return nil, fmt.Errorf("not implemented")99}
100
101func PagingSpaceStat() ([]PagingSpace, error) {102return nil, fmt.Errorf("not implemented")103}
104
105func NetIfaceTotalStat() (*NetIfaceTotal, error) {106return nil, fmt.Errorf("not implemented")107}
108
109func NetBufferStat() ([]NetBuffer, error) {110return nil, fmt.Errorf("not implemented")111}
112
113func NetIfaceStat() ([]NetIface, error) {114return nil, fmt.Errorf("not implemented")115}
116
117func NetAdapterStat() ([]NetAdapter, error) {118return nil, fmt.Errorf("not implemented")119}
120
121func ProcessStat() ([]Process, error) {122return nil, fmt.Errorf("not implemented")123}
124
125func ThreadStat() ([]Thread, error) {126return nil, fmt.Errorf("not implemented")127}
128
129func Sysconf(name int32) (int64, error) {130return 0, fmt.Errorf("not implemented")131}
132
133func GetCPUImplementation() string {134return ""135}
136
137func POWER9OrNewer() bool {138return false139}
140
141func POWER9() bool {142return false143}
144
145func POWER8OrNewer() bool {146return false147}
148
149func POWER8() bool {150return false151}
152
153func POWER7OrNewer() bool {154return false155}
156
157func POWER7() bool {158return false159}
160
161func HasTransactionalMemory() bool {162return false163}
164
165func Is64Bit() bool {166return false167}
168
169func IsSMP() bool {170return false171}
172
173func HasVMX() bool {174return false175}
176
177func HasVSX() bool {178return false179}
180
181func HasDFP() bool {182return false183}
184
185func HasNxGzip() bool {186return false187}
188
189func PksCapable() bool {190return false191}
192
193func PksEnabled() bool {194return false195}
196
197func CPUMode() string {198return ""199}
200
201func KernelBits() int {202return 0203}
204
205func IsLPAR() bool {206return false207}
208
209func CpuAddCapable() bool {210return false211}
212
213func CpuRemoveCapable() bool {214return false215}
216
217func MemoryAddCapable() bool {218return false219}
220
221func MemoryRemoveCapable() bool {222return false223}
224
225func DLparCapable() bool {226return false227}
228
229func IsNUMA() bool {230return false231}
232
233func KernelKeys() bool {234return false235}
236
237func RecoveryMode() bool {238return false239}
240
241func EnhancedAffinity() bool {242return false243}
244
245func VTpmEnabled() bool {246return false247}
248
249func IsVIOS() bool {250return false251}
252
253func MLSEnabled() bool {254return false255}
256
257func SPLparCapable() bool {258return false259}
260
261func SPLparEnabled() bool {262return false263}
264
265func DedicatedLpar() bool {266return false267}
268
269func SPLparCapped() bool {270return false271}
272
273func SPLparDonating() bool {274return false275}
276
277func SmtCapable() bool {278return false279}
280
281func SmtEnabled() bool {282return false283}
284
285func VrmCapable() bool {286return false287}
288
289func VrmEnabled() bool {290return false291}
292
293func AmeEnabled() bool {294return false295}
296
297func EcoCapable() bool {298return false299}
300
301func EcoEnabled() bool {302return false303}
304
305func BootTime() (uint64, error) {306return 0, fmt.Errorf("Not implemented")307}
308
309func UptimeSeconds() (uint64, error) {310return 0, fmt.Errorf("Not implemented")311}
312
313func FileSystemStat() ([]FileSystem, error) {314return nil, fmt.Errorf("Not implemented")315}
316