perfstat

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2020 Power-Devops.com. All rights reserved. Use of this source code is governed by the license that can be found in the LICENSE file.

Package perfstat is Go interface to IBM AIX libperfstat. To use it you need AIX with installed bos.perf.libperfstat. You can check, if is installed using the following command:

$ lslpp -L bos.perf.perfstat

The 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 can't guarantee that perfstat structures in the TLs have all the same fields as the structures in AIX 7.2 TL5.

For documentation of perfstat on AIX and using it in programs refer to the official IBM documentation: https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat.html

Index

Constants

View Source
const (
	DA_SCSI  = 0 /* 0 ==> SCSI, SAS, other legacy adapter types */
	DA_VSCSI     /* 1 ==> Virtual SCSI/SAS Adapter */
	DA_FCA       /* 2 ==> Fiber Channel Adapter */
)

Disk Adapter Types

View Source
const (
	FC_DOWN = 0 // FC Adapter state is DOWN
	FC_UP   = 1 // FC Adapter state is UP
)
View Source
const (
	FCT_FCHBA = 0 // FC type - real Fiber Channel Adapter
	FCT_VFC   = 1 // FC type - virtual Fiber Channel
)
View Source
const (
	FS_JFS2    = 0  /* AIX physical fs "jfs2" */
	FS_NAMEFS  = 1  /* AIX pseudo fs "namefs" */
	FS_NFS     = 2  /* SUN Network File System "nfs" */
	FS_JFS     = 3  /* AIX R3 physical fs "jfs" */
	FS_CDROM   = 5  /* CDROM File System "cdrom" */
	FS_PROCFS  = 6  /* PROCFS File System "proc" */
	FS_SFS     = 16 /* AIX Special FS (STREAM mounts) */
	FS_CACHEFS = 17 /* Cachefs file system */
	FS_NFS3    = 18 /* NFSv3 file system */
	FS_AUTOFS  = 19 /* Automount file system */
	FS_POOLFS  = 20 /* Pool file system */
	FS_VXFS    = 32 /* THRPGIO File System "vxfs" */
	FS_VXODM   = 33 /* For Veritas File System */
	FS_UDF     = 34 /* UDFS file system */
	FS_NFS4    = 35 /* NFSv4 file system */
	FS_RFS4    = 36 /* NFSv4 Pseudo file system */
	FS_CIFS    = 37 /* AIX SMBFS (CIFS client) */
	FS_PMEMFS  = 38 /* MCR Async Mobility pseudo file system */
	FS_AHAFS   = 39 /* AHAFS File System "aha" */
	FS_STNFS   = 40 /* Short-Term NFS */
	FS_ASMFS   = 41 /* Oracle ASM FS */
)

Filesystem types

View Source
const (
	VFS_READONLY     = 0x00000001 /* rdonly access to vfs */
	VFS_REMOVABLE    = 0x00000002 /* removable (diskette) media */
	VFS_DEVMOUNT     = 0x00000004 /* physical device mount */
	VFS_REMOTE       = 0x00000008 /* file system is on network */
	VFS_SYSV_MOUNT   = 0x00000010 /* System V style mount */
	VFS_UNMOUNTING   = 0x00000020 /* originated by unmount() */
	VFS_NOSUID       = 0x00000040 /* don't maintain suid-ness across this mount */
	VFS_NODEV        = 0x00000080 /* don't allow device access across this mount */
	VFS_NOINTEG      = 0x00000100 /* no integrity mount option */
	VFS_NOMANAGER    = 0x00000200 /* mount managed fs w/o manager */
	VFS_NOCASE       = 0x00000400 /* do not map dir names */
	VFS_UPCASE       = 0x00000800 /* map dir names to uppercase */
	VFS_NBC          = 0x00001000 /* NBC cached file in this vfs */
	VFS_MIND         = 0x00002000 /* multi-segment .indirect */
	VFS_RBR          = 0x00004000 /* Release-behind when reading */
	VFS_RBW          = 0x00008000 /* Release-behind when writing */
	VFS_DISCONNECTED = 0x00010000 /* file mount not in use */
	VFS_SHUTDOWN     = 0x00020000 /* forced unmount for shutdown */
	VFS_VMOUNTOK     = 0x00040000 /* dir/file mnt permission flag */
	VFS_SUSER        = 0x00080000 /* client-side suser perm. flag */
	VFS_SOFT_MOUNT   = 0x00100000 /* file-over-file or directory over directory "soft" mount */
	VFS_UNMOUNTED    = 0x00200000 /* unmount completed, stale vnodes are left in the vfs */
	VFS_DEADMOUNT    = 0x00400000 /* softmount vfs should be disconnected at last vnode free */
	VFS_SNAPSHOT     = 0x00800000 /* snapshot mount */
	VFS_VCM_ON       = 0x01000000 /* VCM is currently active */
	VFS_VCM_MONITOR  = 0x02000000 /* VCM monitoring is active */
	VFS_ATIMEOFF     = 0x04000000 /* no atime updates during i/o */
	VFS_READMOSTLY   = 0x10000000 /* ROFS allows open for write */
	VFS_CIOR         = 0x20000000 /* O_CIOR mount */
	VFS_CIO          = 0x40000000 /* O_CIO mount */
	VFS_DIO          = 0x80000000 /* O_DIRECT mount */
)

Filesystem flags

View Source
const (
	LV_PAGING      = 1
	NFS_PAGING     = 2
	UNKNOWN_PAGING = 3
)

paging space types

View Source
const (
	IFT_OTHER       = 0x1
	IFT_1822        = 0x2 /* old-style arpanet imp */
	IFT_HDH1822     = 0x3 /* HDH arpanet imp */
	IFT_X25DDN      = 0x4 /* x25 to imp */
	IFT_X25         = 0x5 /* PDN X25 interface (RFC877) */
	IFT_ETHER       = 0x6 /* Ethernet CSMACD */
	IFT_ISO88023    = 0x7 /* CMSA CD */
	IFT_ISO88024    = 0x8 /* Token Bus */
	IFT_ISO88025    = 0x9 /* Token Ring */
	IFT_ISO88026    = 0xa /* MAN */
	IFT_STARLAN     = 0xb
	IFT_P10         = 0xc /* Proteon 10MBit ring */
	IFT_P80         = 0xd /* Proteon 10MBit ring */
	IFT_HY          = 0xe /* Hyperchannel */
	IFT_FDDI        = 0xf
	IFT_LAPB        = 0x10
	IFT_SDLC        = 0x11
	IFT_T1          = 0x12
	IFT_CEPT        = 0x13 /* E1 - european T1 */
	IFT_ISDNBASIC   = 0x14
	IFT_ISDNPRIMARY = 0x15
	IFT_PTPSERIAL   = 0x16 /* Proprietary PTP serial */
	IFT_PPP         = 0x17 /* RFC 1331 */
	IFT_LOOP        = 0x18 /* loopback */
	IFT_EON         = 0x19 /* ISO over IP */
	IFT_XETHER      = 0x1a /* obsolete 3MB experimental ethernet */
	IFT_NSIP        = 0x1b /* XNS over IP */
	IFT_SLIP        = 0x1c /* IP over generic TTY */
	IFT_ULTRA       = 0x1d /* Ultra Technologies */
	IFT_DS3         = 0x1e /* Generic T3 */
	IFT_SIP         = 0x1f /* SMDS */
	IFT_FRELAY      = 0x20 /* Frame Relay DTE only */
	IFT_RS232       = 0x21
	IFT_PARA        = 0x22 /* parallel-port */
	IFT_ARCNET      = 0x23
	IFT_ARCNETPLUS  = 0x24
	IFT_ATM         = 0x25 /* ATM cells */
	IFT_MIOX25      = 0x26
	IFT_SONET       = 0x27 /* SONET or SDH */
	IFT_X25PLE      = 0x28
	IFT_ISO88022LLC = 0x29
	IFT_LOCALTALK   = 0x2a
	IFT_SMDSDXI     = 0x2b
	IFT_FRELAYDCE   = 0x2c /* Frame Relay DCE */
	IFT_V35         = 0x2d
	IFT_HSSI        = 0x2e
	IFT_HIPPI       = 0x2f
	IFT_MODEM       = 0x30 /* Generic Modem */
	IFT_AAL5        = 0x31 /* AAL5 over ATM */
	IFT_SONETPATH   = 0x32
	IFT_SONETVT     = 0x33
	IFT_SMDSICIP    = 0x34 /* SMDS InterCarrier Interface */
	IFT_PROPVIRTUAL = 0x35 /* Proprietary Virtual/internal */
	IFT_PROPMUX     = 0x36 /* Proprietary Multiplexing */
	IFT_VIPA        = 0x37 /* Virtual Interface */
	IFT_SN          = 0x38 /* Federation Switch */
	IFT_SP          = 0x39 /* SP switch */
	IFT_FCS         = 0x3a /* IP over Fiber Channel */
	IFT_TUNNEL      = 0x3b
	IFT_GIFTUNNEL   = 0x3c /* IPv4 over IPv6 tunnel */
	IFT_HF          = 0x3d /* Support for PERCS HFI*/
	IFT_CLUSTER     = 0x3e /* cluster pseudo network interface */
	IFT_FB          = 0xc7 /* IP over Infiniband. Number by IANA */
)

Network Interface types

View Source
const (
	NET_PHY  = 0 /* physical device */
	NET_SEA  = 1 /* shared ethernet adapter */
	NET_VIR  = 2 /* virtual device */
	NET_HEA  = 3 /* host ethernet adapter */
	NET_EC   = 4 /* etherchannel */
	NET_VLAN = 5 /* vlan pseudo device */
)

Network adapter types

Variables

This section is empty.

Functions

func AmeEnabled

func AmeEnabled() bool

func BootTime

func BootTime() (uint64, error)

func CPUMode

func CPUMode() string

func CpuAddCapable

func CpuAddCapable() bool

func CpuRemoveCapable

func CpuRemoveCapable() bool

func DLparCapable

func DLparCapable() bool

func DedicatedLpar

func DedicatedLpar() bool

func DisableLVMStat

func DisableLVMStat()

DisableLVMStat() switchess of LVM (logical volumes and volume groups) performance statistics. This is the default state. In this case LogicalVolume and VolumeGroup data types are populated with informations about LVM structures, but performance statistics fields (KBReads, KBWrites, IOCnt) are empty.

func EcoCapable

func EcoCapable() bool

func EcoEnabled

func EcoEnabled() bool

func EnableLVMStat

func EnableLVMStat()

EnableLVMStat() switches on LVM (logical volumes and volume groups) performance statistics. With this enabled you can use fields KBReads, KBWrites, and IOCnt in LogicalVolume and VolumeGroup data types.

func EnhancedAffinity

func EnhancedAffinity() bool

func GetCPUImplementation

func GetCPUImplementation() string

func HasDFP

func HasDFP() bool

func HasNxGzip

func HasNxGzip() bool

func HasTransactionalMemory

func HasTransactionalMemory() bool

func HasVMX

func HasVMX() bool

func HasVSX

func HasVSX() bool

func Is64Bit

func Is64Bit() bool

func IsLPAR

func IsLPAR() bool

func IsNUMA

func IsNUMA() bool

func IsSMP

func IsSMP() bool

func IsVIOS

func IsVIOS() bool

func KernelBits

func KernelBits() int

func KernelKeys

func KernelKeys() bool

func MLSEnabled

func MLSEnabled() bool

func MemoryAddCapable

func MemoryAddCapable() bool

func MemoryRemoveCapable

func MemoryRemoveCapable() bool

func POWER7

func POWER7() bool

func POWER7OrNewer

func POWER7OrNewer() bool

func POWER8

func POWER8() bool

func POWER8OrNewer

func POWER8OrNewer() bool

func POWER9

func POWER9() bool

func POWER9OrNewer

func POWER9OrNewer() bool

func PksCapable

func PksCapable() bool

func PksEnabled

func PksEnabled() bool

func RecoveryMode

func RecoveryMode() bool

func SPLparCapable

func SPLparCapable() bool

func SPLparCapped

func SPLparCapped() bool

func SPLparDonating

func SPLparDonating() bool

func SPLparEnabled

func SPLparEnabled() bool

func SmtCapable

func SmtCapable() bool

func SmtEnabled

func SmtEnabled() bool

func Sysconf

func Sysconf(name int32) (int64, error)

func UptimeSeconds

func UptimeSeconds() (uint64, error)

func VTpmEnabled

func VTpmEnabled() bool

func VrmCapable

func VrmCapable() bool

func VrmEnabled

func VrmEnabled() bool

Types

type CPU

type CPU struct {
	Name             string /* logical processor name (cpu0, cpu1, ..) */
	User             int64  /* raw number of clock ticks spent in user mode */
	Sys              int64  /* raw number of clock ticks spent in system mode */
	Idle             int64  /* raw number of clock ticks spent idle */
	Wait             int64  /* raw number of clock ticks spent waiting for I/O */
	PSwitch          int64  /* number of context switches (changes of currently running process) */
	Syscall          int64  /* number of system calls executed */
	Sysread          int64  /* number of read system calls executed */
	Syswrite         int64  /* number of write system calls executed */
	Sysfork          int64  /* number of fork system call executed */
	Sysexec          int64  /* number of exec system call executed */
	Readch           int64  /* number of characters tranferred with read system call */
	Writech          int64  /* number of characters tranferred with write system call */
	Bread            int64  /* number of block reads */
	Bwrite           int64  /* number of block writes */
	Lread            int64  /* number of logical read requests */
	Lwrite           int64  /* number of logical write requests */
	Phread           int64  /* number of physical reads (reads on raw device) */
	Phwrite          int64  /* number of physical writes (writes on raw device) */
	Iget             int64  /* number of inode lookups */
	Namei            int64  /* number of vnode lookup from a path name */
	Dirblk           int64  /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
	Msg              int64  /* number of IPC message operations */
	Sema             int64  /* number of IPC semaphore operations  */
	MinFaults        int64  /* number of page faults with no I/O */
	MajFaults        int64  /* number of page faults with disk I/O */
	PUser            int64  /* raw number of physical processor tics in user mode */
	PSys             int64  /* raw number of physical processor tics in system mode */
	PIdle            int64  /* raw number of physical processor tics idle */
	PWait            int64  /* raw number of physical processor tics waiting for I/O */
	RedispSD0        int64  /* number of thread redispatches within the scheduler affinity domain 0 */
	RedispSD1        int64  /* number of thread redispatches within the scheduler affinity domain 1 */
	RedispSD2        int64  /* number of thread redispatches within the scheduler affinity domain 2 */
	RedispSD3        int64  /* number of thread redispatches within the scheduler affinity domain 3 */
	RedispSD4        int64  /* number of thread redispatches within the scheduler affinity domain 4 */
	RedispSD5        int64  /* number of thread redispatches within the scheduler affinity domain 5 */
	MigrationPush    int64  /* number of thread migrations from the local runque to another queue due to starvation load balancing */
	MigrationS3grq   int64  /* number of  thread migrations from the global runque to the local runque resulting in a move accross scheduling domain 3 */
	MigrationS3pul   int64  /* number of  thread migrations from another processor's runque resulting in a move accross scheduling domain 3 */
	InvolCSwitch     int64  /* number of  involuntary thread context switches */
	VolCSwitch       int64  /* number of  voluntary thread context switches */
	RunQueue         int64  /* number of  threads on the runque */
	Bound            int64  /* number of  bound threads */
	DecrIntrs        int64  /* number of decrementer tics interrupts */
	MpcRIntrs        int64  /* number of mpc's received interrupts */
	MpcSIntrs        int64  /* number of mpc's sent interrupts */
	DevIntrs         int64  /* number of device interrupts */
	SoftIntrs        int64  /* number of offlevel handlers called */
	PhantIntrs       int64  /* number of phantom interrupts */
	IdleDonatedPurr  int64  /* number of idle cycles donated by a dedicated partition enabled for donation */
	IdleDonatedSpurr int64  /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
	BusyDonatedPurr  int64  /* number of busy cycles donated by a dedicated partition enabled for donation */
	BusyDonatedSpurr int64  /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
	IdleStolenPurr   int64  /* number of idle cycles stolen by the hypervisor from a dedicated partition */
	IdleStolenSpurr  int64  /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
	BusyStolenPurr   int64  /* number of busy cycles stolen by the hypervisor from a dedicated partition */
	BusyStolenSpurr  int64  /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
	Hpi              int64  /* number of hypervisor page-ins */
	Hpit             int64  /* Time spent in hypervisor page-ins (in nanoseconds)*/
	PUserSpurr       int64  /* number of spurr cycles spent in user mode */
	PSysSpurr        int64  /* number of spurr cycles spent in kernel mode */
	PIdleSpurr       int64  /* number of spurr cycles spent in idle mode */
	PWaitSpurr       int64  /* number of spurr cycles spent in wait mode */
	SpurrFlag        int32  /* set if running in spurr mode */
	LocalDispatch    int64  /* number of local thread dispatches on this logical CPU */
	NearDispatch     int64  /* number of near thread dispatches on this logical CPU */
	FarDispatch      int64  /* number of far thread dispatches on this logical CPU */
	CSwitches        int64  /* Context switches */
	Version          int64  /* version number (1, 2, etc.,) */
	TbLast           int64  /* timebase counter */
	State            int    /* Show whether the CPU is offline or online */
	VtbLast          int64  /* Last virtual timebase read */
	ICountLast       int64  /* Last instruction count read */
}

func CpuStat

func CpuStat() ([]CPU, error)

CpuStat() returns array of CPU structures with information about logical CPUs on the system. IBM documentation:

type CPUTotal

type CPUTotal struct {
	NCpus            int     /* number of active logical processors */
	NCpusCfg         int     /* number of configured processors */
	Description      string  /* processor description (type/official name) */
	ProcessorHz      int64   /* processor speed in Hz */
	User             int64   /*  raw total number of clock ticks spent in user mode */
	Sys              int64   /* raw total number of clock ticks spent in system mode */
	Idle             int64   /* raw total number of clock ticks spent idle */
	Wait             int64   /* raw total number of clock ticks spent waiting for I/O */
	PSwitch          int64   /* number of process switches (change in currently running process) */
	Syscall          int64   /* number of system calls executed */
	Sysread          int64   /* number of read system calls executed */
	Syswrite         int64   /* number of write system calls executed */
	Sysfork          int64   /* number of forks system calls executed */
	Sysexec          int64   /* number of execs system calls executed */
	Readch           int64   /* number of characters tranferred with read system call */
	Writech          int64   /* number of characters tranferred with write system call */
	DevIntrs         int64   /* number of device interrupts */
	SoftIntrs        int64   /* number of software interrupts */
	Lbolt            int64   /* number of ticks since last reboot */
	LoadAvg1         float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes.    */
	LoadAvg5         float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes.    */
	LoadAvg15        float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes.    */
	RunQueue         int64   /* length of the run queue (processes ready) */
	SwpQueue         int64   /* length of the swap queue (processes waiting to be paged in) */
	Bread            int64   /* number of blocks read */
	Bwrite           int64   /* number of blocks written */
	Lread            int64   /* number of logical read requests */
	Lwrite           int64   /* number of logical write requests */
	Phread           int64   /* number of physical reads (reads on raw devices) */
	Phwrite          int64   /* number of physical writes (writes on raw devices) */
	RunOcc           int64   /* updated whenever runque is updated, i.e. the runqueue is occupied. This can be used to compute the simple average of ready processes  */
	SwpOcc           int64   /* updated whenever swpque is updated. i.e. the swpqueue is occupied. This can be used to compute the simple average processes waiting to be paged in */
	Iget             int64   /* number of inode lookups */
	Namei            int64   /* number of vnode lookup from a path name */
	Dirblk           int64   /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
	Msg              int64   /* number of IPC message operations */
	Sema             int64   /* number of IPC semaphore operations */
	RcvInt           int64   /* number of tty receive interrupts */
	XmtInt           int64   /* number of tyy transmit interrupts */
	MdmInt           int64   /* number of modem interrupts */
	TtyRawInch       int64   /* number of raw input characters  */
	TtyCanInch       int64   /* number of canonical input characters (always zero) */
	TtyRawOutch      int64   /* number of raw output characters */
	Ksched           int64   /* number of kernel processes created */
	Koverf           int64   /* kernel process creation attempts where: -the user has forked to their maximum limit -the configuration limit of processes has been reached */
	Kexit            int64   /* number of kernel processes that became zombies */
	Rbread           int64   /* number of remote read requests */
	Rcread           int64   /* number of cached remote reads */
	Rbwrt            int64   /* number of remote writes */
	Rcwrt            int64   /* number of cached remote writes */
	Traps            int64   /* number of traps */
	NCpusHigh        int64   /* index of highest processor online */
	PUser            int64   /* raw number of physical processor tics in user mode */
	PSys             int64   /* raw number of physical processor tics in system mode */
	PIdle            int64   /* raw number of physical processor tics idle */
	PWait            int64   /* raw number of physical processor tics waiting for I/O */
	DecrIntrs        int64   /* number of decrementer tics interrupts */
	MpcRIntrs        int64   /* number of mpc's received interrupts */
	MpcSIntrs        int64   /* number of mpc's sent interrupts */
	PhantIntrs       int64   /* number of phantom interrupts */
	IdleDonatedPurr  int64   /* number of idle cycles donated by a dedicated partition enabled for donation */
	IdleDonatedSpurr int64   /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
	BusyDonatedPurr  int64   /* number of busy cycles donated by a dedicated partition enabled for donation */
	BusyDonatedSpurr int64   /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
	IdleStolenPurr   int64   /* number of idle cycles stolen by the hypervisor from a dedicated partition */
	IdleStolenSpurr  int64   /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
	BusyStolenPurr   int64   /* number of busy cycles stolen by the hypervisor from a dedicated partition */
	BusyStolenSpurr  int64   /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
	IOWait           int32   /* number of processes that are asleep waiting for buffered I/O */
	PhysIO           int32   /* number of processes waiting for raw I/O */
	TWait            int64   /* number of threads that are waiting for filesystem direct(cio) */
	Hpi              int64   /* number of hypervisor page-ins */
	Hpit             int64   /* Time spent in hypervisor page-ins (in nanoseconds) */
	PUserSpurr       int64   /* number of spurr cycles spent in user mode */
	PSysSpurr        int64   /* number of spurr cycles spent in kernel mode */
	PIdleSpurr       int64   /* number of spurr cycles spent in idle mode */
	PWaitSpurr       int64   /* number of spurr cycles spent in wait mode */
	SpurrFlag        int     /* set if running in spurr mode */
	Version          int64   /* version number (1, 2, etc.,) */
	TbLast           int64   /*time base counter */
	PurrCoalescing   int64   /* If the calling partition is authorized to see pool wide statistics then PURR cycles consumed to coalesce data else set to zero.*/
	SpurrCoalescing  int64   /* If the calling partition is authorized to see pool wide statistics then SPURR cycles consumed to coalesce data else set to zero.  */
}

type CPUUtil

type CPUUtil struct {
	Version          int64
	CpuID            string  /* holds the id of the cpu */
	Entitlement      float32 /* Partition's entitlement */
	UserPct          float32 /* % of utilization in user mode */
	KernPct          float32 /* % of utilization in kernel mode */
	IdlePct          float32 /* % of utilization in idle mode */
	WaitPct          float32 /* % of utilization in wait mode */
	PhysicalBusy     float32 /* physical cpus busy */
	PhysicalConsumed float32 /* total cpus consumed by the partition */
	FreqPct          float32 /* Average freq% over the last interval */
	EntitlementPct   float32 /* % of entitlement used */
	BusyPct          float32 /* % of entitlement busy */
	IdleDonatedPct   float32 /* % idle cycles donated */
	BusyDonatedPct   float32 /* % of busy cycles donated */
	IdleStolenPct    float32 /* % idle cycles stolen */
	BusyStolenPct    float32 /* % busy cycles stolen */
	LUserPct         float32 /* % of utilization in user mode, in terms of logical processor ticks */
	LKernPct         float32 /* % of utilization in kernel mode, in terms of logical processor ticks*/
	LIdlePct         float32 /* % of utilization in idle mode, in terms of logical processor ticks */
	LWaitPct         float32 /* % of utilization in wait mode, in terms of logical processor ticks */
	DeltaTime        int64   /*   delta time in milliseconds, for which utilization is evaluated */
}

type Disk

type Disk struct {
	Name        string /* name of the disk */
	Description string /* disk description (from ODM) */
	VGName      string /* volume group name (from ODM) */
	Size        int64  /* size of the disk (in MB) */
	Free        int64  /* free portion of the disk (in MB) */
	BSize       int64  /* disk block size (in bytes) */
	XRate       int64  /* number of transfers from disk */
	Xfers       int64  /* number of transfers to/from disk */
	Wblks       int64  /* number of blocks written to disk */
	Rblks       int64  /* number of blocks read from disk */
	QDepth      int64  /* instantaneous "service" queue depth (number of requests sent to disk and not completed yet) */
	Time        int64  /* amount of time disk is active */
	Adapter     string /* disk adapter name */
	PathsCount  int32  /* number of paths to this disk */
	QFull       int64  /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */
	Rserv       int64  /* read or receive service time */
	RTimeOut    int64  /* number of read request timeouts */
	Rfailed     int64  /* number of failed read requests */
	MinRserv    int64  /* min read or receive service time */
	MaxRserv    int64  /* max read or receive service time */
	Wserv       int64  /* write or send service time */
	WTimeOut    int64  /* number of write request timeouts */
	Wfailed     int64  /* number of failed write requests */
	MinWserv    int64  /* min write or send service time */
	MaxWserv    int64  /* max write or send service time */
	WqDepth     int64  /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */
	WqSampled   int64  /* accumulated sampled dk_wq_depth */
	WqTime      int64  /* accumulated wait queueing time */
	WqMinTime   int64  /* min wait queueing time */
	WqMaxTime   int64  /* max wait queueing time */
	QSampled    int64  /* accumulated sampled dk_q_depth */
	Version     int64  /* version number (1, 2, etc.,) */
	PseudoDisk  bool   /*Indicates whether pseudo or physical disk */
	VTDisk      bool   /* 1- Virtual Target Disk, 0 - Others */
}

func DiskStat

func DiskStat() ([]Disk, error)

type DiskAdapter

type DiskAdapter struct {
	Name        string /* name of the adapter (from ODM) */
	Description string /* adapter description (from ODM) */
	Number      int32  /* number of disks connected to adapter */
	Size        int64  /* total size of all disks (in MB)  */
	Free        int64  /* free portion of all disks (in MB)  */
	XRate       int64  /* __rxfers: total number of reads via adapter */
	Xfers       int64  /* total number of transfers via adapter */
	Rblks       int64  /* 512 bytes blocks written via adapter */
	Wblks       int64  /* 512 bytes blocks read via adapter  */
	Time        int64  /* amount of time disks are active */
	Version     int64  /* version number (1, 2, etc.,) */
	AdapterType int64  /* 0 ==> SCSI, SAS, other legacy adapter types, 1 ==> Virtual SCSI/SAS Adapter, 2 ==> Fiber Channel Adapter */
	DkBSize     int64  /* Number of Bytes in a block for this disk*/
	DkRxfers    int64  /* Number of transfers from disk */
	DkRserv     int64  /* read or receive service time */
	DkWserv     int64  /* write or send service time */
	MinRserv    int64  /* Minimum read service time */
	MaxRserv    int64  /* Maximum read service time */
	MinWserv    int64  /* Minimum Write service time */
	MaxWserv    int64  /* Maximum write service time */
	WqDepth     int64  /* driver wait queue depth */
	WqSampled   int64  /* accumulated sampled dk_wq_depth */
	WqTime      int64  /* accumulated wait queueing time */
	WqMinTime   int64  /* minimum wait queueing time */
	WqMaxTime   int64  /* maximum wait queueing time */
	QFull       int64  /* "Service" queue full occurrence count (number of times the adapter/devices connected to the adapter is not accepting any more request) */
	QSampled    int64  /* accumulated sampled */
}

func DiskAdapterStat

func DiskAdapterStat() ([]DiskAdapter, error)

type DiskPath

type DiskPath struct {
	Name      string /* name of the path */
	XRate     int64  /* __rxfers: number of reads via the path */
	Xfers     int64  /* number of transfers via the path */
	Rblks     int64  /* 512 bytes blocks written via the path */
	Wblks     int64  /* 512 bytes blocks read via the path  */
	Time      int64  /* amount of time disks are active */
	Adapter   string /* disk adapter name (from ODM) */
	QFull     int64  /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */
	Rserv     int64  /* read or receive service time */
	RTimeOut  int64  /* number of read request timeouts */
	Rfailed   int64  /* number of failed read requests */
	MinRserv  int64  /* min read or receive service time */
	MaxRserv  int64  /* max read or receive service time */
	Wserv     int64  /* write or send service time */
	WTimeOut  int64  /* number of write request timeouts */
	Wfailed   int64  /* number of failed write requests */
	MinWserv  int64  /* min write or send service time */
	MaxWserv  int64  /* max write or send service time */
	WqDepth   int64  /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */
	WqSampled int64  /* accumulated sampled dk_wq_depth */
	WqTime    int64  /* accumulated wait queueing time */
	WqMinTime int64  /* min wait queueing time */
	WqMaxTime int64  /* max wait queueing time */
	QSampled  int64  /* accumulated sampled dk_q_depth */
	Version   int64  /* version number (1, 2, etc.,)   */
}

func DiskPathStat

func DiskPathStat() ([]DiskPath, error)

type DiskTotal

type DiskTotal struct {
	Number    int32 /* total number of disks */
	Size      int64 /* total size of all disks (in MB) */
	Free      int64 /* free portion of all disks (in MB) */
	XRate     int64 /* __rxfers: total number of transfers from disk */
	Xfers     int64 /* total number of transfers to/from disk */
	Wblks     int64 /* 512 bytes blocks written to all disks */
	Rblks     int64 /* 512 bytes blocks read from all disks */
	Time      int64 /* amount of time disks are active */
	Version   int64 /* version number (1, 2, etc.,) */
	Rserv     int64 /* Average read or receive service time */
	MinRserv  int64 /* min read or receive service time */
	MaxRserv  int64 /* max read or receive service time */
	RTimeOut  int64 /* number of read request timeouts */
	RFailed   int64 /* number of failed read requests */
	Wserv     int64 /* Average write or send service time */
	MinWserv  int64 /* min write or send service time */
	MaxWserv  int64 /* max write or send service time */
	WTimeOut  int64 /* number of write request timeouts */
	WFailed   int64 /* number of failed write requests */
	WqDepth   int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */
	WqTime    int64 /* accumulated wait queueing time */
	WqMinTime int64 /* min wait queueing time */
	WqMaxTime int64 /* max wait queueing time */
}

func DiskTotalStat

func DiskTotalStat() (*DiskTotal, error)

type FCAdapter

type FCAdapter struct {
	Version                      int64  /* version number (1, 2, etc.,) */
	Name                         string /* name of the adapter */
	State                        int32  /* FC Adapter state  UP or DOWN */
	InputRequests                int64  /* Number of Input Requests*/
	OutputRequests               int64  /* Number of Output Requests */
	InputBytes                   int64  /* Number of Input Bytes */
	OutputBytes                  int64  /* Number of Output Bytes */
	EffMaxTransfer               int64  /* Adapter's Effective Maximum  Transfer Value */
	NoDMAResourceCnt             int64  /* Count of DMA failures due to no DMA Resource available */
	NoCmdResourceCnt             int64  /* Count of failures to allocate a command due to no command resource available */
	AttentionType                int32  /* Link up or down Indicator */
	SecondsSinceLastReset        int64  /* Displays the seconds since last reset of the statistics on the adapter */
	TxFrames                     int64  /* Number of frames transmitted */
	TxWords                      int64  /* Fiber Channel Kbytes transmitted */
	RxFrames                     int64  /* Number of Frames Received */
	RxWords                      int64  /* Fiber Channel Kbytes Received */
	LIPCount                     int64  /* Count of LIP (Loop Initialization Protocol) Events received in case we have FC-AL */
	NOSCount                     int64  /* Count of NOS (Not_Operational) Events. This indicates a link failure state. */
	ErrorFrames                  int64  /* Number of frames received with the CRC Error */
	DumpedFrames                 int64  /* Number of lost frames */
	LinkFailureCount             int64  /* Count of Link failures */
	LossofSyncCount              int64  /* Count of loss of sync */
	LossofSignal                 int64  /* Count of loss of Signal */
	PrimitiveSeqProtocolErrCount int64  /* number of times a primitive sequence was in error */
	InvalidTxWordCount           int64  /* Count of Invalid Transmission words received */
	InvalidCRCCount              int64  /* Count of CRC Errors in a Received Frame */
	PortFcId                     int64  /* SCSI Id of the adapter */
	PortSpeed                    int64  /* Speed of Adapter in GBIT */
	PortType                     string /* Type of connection. The Possible Values are Fabric, Private Loop, Point-to-Point, unknown */
	PortWWN                      int64  /* World Wide Port name */
	PortSupportedSpeed           int64  /* Supported Port Speed in GBIT */
	AdapterType                  int    /* 0 - Fiber Chanel, 1 - Virtual Fiber Chanel Adapter */
	VfcName                      string /* name of the Virtual Fiber Chanel(VFC) adapter */
	ClientPartName               string /* name of the client partition */
}

func FCAdapterStat

func FCAdapterStat() ([]FCAdapter, error)

type FileSystem

type FileSystem struct {
	Device      string /* name of the mounted device */
	MountPoint  string /* where the device is mounted */
	FSType      int    /* File system type, see the constants below */
	Flags       uint   /* Flags of the file system */
	TotalBlocks int64  /* number of 512 bytes blocks in the filesystem */
	FreeBlocks  int64  /* number of free 512 bytes block in the filesystem */
	TotalInodes int64  /* total number of inodes in the filesystem */
	FreeInodes  int64  /* number of free inodes in the filesystem */
}

func FileSystemStat

func FileSystemStat() ([]FileSystem, error)

func (*FileSystem) FlagsString

func (f *FileSystem) FlagsString() string

func (*FileSystem) TypeString

func (f *FileSystem) TypeString() string

type LogicalVolume

type LogicalVolume struct {
	Name                   string /* logical volume name */
	VGName                 string /* volume group name  */
	OpenClose              int64  /* LVM_QLVOPEN, etc. (see lvm.h) */
	State                  int64  /* LVM_UNDEF, etc. (see lvm.h) */
	MirrorPolicy           int64  /* LVM_PARALLEL, etc. (see lvm.h) */
	MirrorWriteConsistency int64  /* LVM_CONSIST, etc. (see lvm.h) */
	WriteVerify            int64  /* LVM_VERIFY, etc. (see lvm.h) */
	PPsize                 int64  /* physical partition size in MB */
	LogicalPartitions      int64  /* total number of logical paritions configured for this logical volume */
	Mirrors                int32  /* number of physical mirrors for each logical partition */
	IOCnt                  int64  /* Number of read and write requests */
	KBReads                int64  /* Number of Kilobytes read */
	KBWrites               int64  /* Number of Kilobytes written */
	Version                int64  /* version number (1, 2, etc.,) */
}

func LogicalVolumeStat

func LogicalVolumeStat() ([]LogicalVolume, error)

type MemoryPage

type MemoryPage struct {
	PSize           int64 /* page size in bytes */
	RealTotal       int64 /* number of real memory frames of this page size */
	RealFree        int64 /* number of pages on free list */
	RealPinned      int64 /* number of pages pinned */
	RealInUse       int64 /* number of pages in use */
	PgExct          int64 /* number of page faults  */
	PgIns           int64 /* number of pages paged in */
	PgOuts          int64 /* number of pages paged out */
	PgSpIns         int64 /* number of page ins from paging space */
	PgSpOuts        int64 /* number of page outs from paging space */
	Scans           int64 /* number of page scans by clock */
	Cycles          int64 /* number of page replacement cycles */
	PgSteals        int64 /* number of page steals */
	NumPerm         int64 /* number of frames used for files */
	NumPgSp         int64 /* number of pages with allocated paging space */
	RealSystem      int64 /* number of pages used by system segments. */
	RealUser        int64 /* number of pages used by non-system segments. */
	RealProcess     int64 /* number of pages used by process segments. */
	VirtActive      int64 /* Active virtual pages. */
	ComprsdTotal    int64 /* Number of pages of this size compressed */
	ComprsdWsegPgs  int64 /* Number of compressed working storage pages */
	CPgIns          int64 /* number of page ins of this page size to compressed pool */
	CPgOuts         int64 /* number of page outs of this page size from compressed pool */
	CPoolInUse      int64 /* Compressed Size of this page size in Compressed Pool */
	UCPoolSize      int64 /* Uncompressed Pool size in bytes of this page size */
	ComprsdWsegSize int64 /* Total size of the compressed working storage pages in the pool */
	Version         int64 /* version number (1, 2, etc.,) */
	RealAvail       int64 /* number of pages (in 4KB pages) of memory available without paging out working segments */
}

func MemoryPageStat

func MemoryPageStat() ([]MemoryPage, error)

type MemoryTotal

type MemoryTotal struct {
	VirtualTotal          int64 /* total virtual memory (in 4KB pages) */
	RealTotal             int64 /* total real memory (in 4KB pages) */
	RealFree              int64 /* free real memory (in 4KB pages) */
	RealPinned            int64 /* real memory which is pinned (in 4KB pages) */
	RealInUse             int64 /* real memory which is in use (in 4KB pages) */
	BadPages              int64 /* number of bad pages */
	PageFaults            int64 /* number of page faults */
	PageIn                int64 /* number of pages paged in */
	PageOut               int64 /* number of pages paged out */
	PgSpIn                int64 /* number of page ins from paging space */
	PgSpOut               int64 /* number of page outs from paging space */
	Scans                 int64 /* number of page scans by clock */
	Cycles                int64 /* number of page replacement cycles */
	PgSteals              int64 /* number of page steals */
	NumPerm               int64 /* number of frames used for files (in 4KB pages) */
	PgSpTotal             int64 /* total paging space (in 4KB pages) */
	PgSpFree              int64 /* free paging space (in 4KB pages) */
	PgSpRsvd              int64 /* reserved paging space (in 4KB pages) */
	RealSystem            int64 /* real memory used by system segments (in 4KB pages). */
	RealUser              int64 /* real memory used by non-system segments (in 4KB pages). */
	RealProcess           int64 /* real memory used by process segments (in 4KB pages). */
	VirtualActive         int64 /* Active virtual pages. Virtual pages are considered active if they have been accessed */
	IOME                  int64 /* I/O memory entitlement of the partition in bytes*/
	IOMU                  int64 /* I/O memory entitlement of the partition in use in bytes*/
	IOHWM                 int64 /* High water mark of I/O memory entitlement used in bytes*/
	PMem                  int64 /* Amount of physical mmeory currently backing partition's logical memory in bytes*/
	CompressedTotal       int64 /* Total numbers of pages in compressed pool (in 4KB pages) */
	CompressedWSegPg      int64 /* Number of compressed working storage pages */
	CPgIn                 int64 /* number of page ins to compressed pool */
	CPgOut                int64 /* number of page outs from compressed pool */
	TrueSize              int64 /* True Memory Size in 4KB pages */
	ExpandedMemory        int64 /* Expanded Memory Size in 4KB pages */
	CompressedWSegSize    int64 /* Total size of the compressed working storage pages in the pool */
	TargetCPoolSize       int64 /* Target Compressed Pool Size in bytes */
	MaxCPoolSize          int64 /* Max Size of Compressed Pool in bytes */
	MinUCPoolSize         int64 /* Min Size of Uncompressed Pool in bytes */
	CPoolSize             int64 /* Compressed Pool size in bytes */
	UCPoolSize            int64 /* Uncompressed Pool size in bytes */
	CPoolInUse            int64 /* Compressed Pool Used in bytes */
	UCPoolInUse           int64 /* Uncompressed Pool Used in bytes */
	Version               int64 /* version number (1, 2, etc.,) */
	RealAvailable         int64 /* number of pages (in 4KB pages) of memory available without paging out working segments */
	BytesCoalesced        int64 /* The number of bytes of the calling partition.s logical real memory  coalesced because they contained duplicated data */
	BytesCoalescedMemPool int64 /* number of bytes of logical real memory coalesced because they contained duplicated data in the calling partition.s memory */
}

func MemoryTotalStat

func MemoryTotalStat() (*MemoryTotal, error)

type NetAdapter

type NetAdapter struct {
	Version                    int64  /* version number (1,2, etc) */
	Name                       string /* name of the adapter */
	TxPackets                  int64  /* Transmit Packets on interface */
	TxBytes                    int64  /* Transmit Bytes on interface */
	TxInterrupts               int64  /* Transfer Interrupts */
	TxErrors                   int64  /* Transmit Errors */
	TxPacketsDropped           int64  /* Packets Dropped at the time of Data Transmission */
	TxQueueSize                int64  /* Maximum Packets on Software Transmit Queue */
	TxQueueLen                 int64  /* Transmission Queue Length */
	TxQueueOverflow            int64  /* Transmission Queue Overflow */
	TxBroadcastPackets         int64  /* Number of Broadcast Packets Transmitted */
	TxMulticastPackets         int64  /* Number of Multicast packets Transmitted */
	TxCarrierSense             int64  /* Lost Carrier Sense signal count */
	TxDMAUnderrun              int64  /* Count of DMA Under-runs for Transmission */
	TxLostCTSErrors            int64  /* The number of unsuccessful transmissions due to the loss of the Clear-to-Send signal error */
	TxMaxCollisionErrors       int64  /* Maximum Collision Errors at Transmission */
	TxLateCollisionErrors      int64  /* Late Collision Errors at Transmission */
	TxDeferred                 int64  /* The number of packets deferred for Transmission. */
	TxTimeoutErrors            int64  /* Time Out Errors for Transmission */
	TxSingleCollisionCount     int64  /* Count of Single Collision error at Transmission */
	TxMultipleCollisionCount   int64  /* Count of Multiple Collision error at Transmission */
	RxPackets                  int64  /* Receive Packets on interface */
	RxBytes                    int64  /* Receive Bytes on interface */
	RxInterrupts               int64  /* Receive Interrupts */
	RxErrors                   int64  /* Input errors on interface */
	RxPacketsDropped           int64  /* The number of packets accepted by the device driver for transmission which were not (for any reason) given to the device. */
	RxBadPackets               int64  /* Count of Bad Packets Received. */
	RxMulticastPackets         int64  /* Number of MultiCast Packets Received */
	RxBroadcastPackets         int64  /* Number of Broadcast Packets Received */
	RxCRCErrors                int64  /* Count of Packets Received with CRC errors  */
	RxDMAOverrun               int64  /* Count of DMA over-runs for Data Receival. */
	RxAlignmentErrors          int64  /* Packets Received with Alignment Error  */
	RxNoResourceErrors         int64  /* Packets Received with No Resource Errors */
	RxCollisionErrors          int64  /* Packets Received with Collision errors */
	RxPacketTooShortErrors     int64  /* Count of Short Packets Received. */
	RxPacketTooLongErrors      int64  /* Count of Too Long Packets Received. */
	RxPacketDiscardedByAdapter int64  /* Count of Received Packets discarded by Adapter. */
	AdapterType                int32  /* 0 - Physical, 1 - SEA, 2 - Virtual, 3 -HEA */
}

func NetAdapterStat

func NetAdapterStat() ([]NetAdapter, error)

type NetBuffer

type NetBuffer struct {
	Name          string /* size in ascii, always power of 2 (ex: "32", "64", "128") */
	InUse         int64  /* number of buffer currently allocated */
	Calls         int64  /* number of buffer allocations since last reset */
	Delayed       int64  /* number of delayed allocations */
	Free          int64  /* number of free calls */
	Failed        int64  /* number of failed allocations */
	HighWatermark int64  /* high threshold for number of buffer allocated */
	Freed         int64  /* number of buffers freed */
	Version       int64  /* version number (1, 2, etc.,) */
}

func NetBufferStat

func NetBufferStat() ([]NetBuffer, error)

type NetIface

type NetIface struct {
	Name        string /* name of the interface */
	Description string /* interface description (from ODM, similar to lscfg output) */
	Type        uint8  /* ethernet, tokenring, etc. interpretation can be done using /usr/include/net/if_types.h */
	MTU         int64  /* network frame size */
	IPackets    int64  /* number of packets received on interface */
	IBytes      int64  /* number of bytes received on interface */
	IErrors     int64  /* number of input errors on interface */
	OPackets    int64  /* number of packets sent on interface */
	OBytes      int64  /* number of bytes sent on interface */
	OErrors     int64  /* number of output errors on interface */
	Collisions  int64  /* number of collisions on csma interface */
	Bitrate     int64  /* adapter rating in bit per second */
	XmitDrops   int64  /* number of packets not transmitted */
	Version     int64  /* version number (1, 2, etc.,) */
	IfIqDrops   int64  /* Dropped on input, this interface */
	IfArpDrops  int64  /* Dropped because no arp response */
}

func NetIfaceStat

func NetIfaceStat() ([]NetIface, error)

type NetIfaceTotal

type NetIfaceTotal struct {
	Number     int32 /* number of network interfaces  */
	IPackets   int64 /* number of packets received on interface */
	IBytes     int64 /* number of bytes received on interface */
	IErrors    int64 /* number of input errors on interface */
	OPackets   int64 /* number of packets sent on interface */
	OBytes     int64 /* number of bytes sent on interface */
	OErrors    int64 /* number of output errors on interface */
	Collisions int64 /* number of collisions on csma interface */
	XmitDrops  int64 /* number of packets not transmitted */
	Version    int64 /* version number (1, 2, etc.,) */
}

func NetIfaceTotalStat

func NetIfaceTotalStat() (*NetIfaceTotal, error)

type PagingSpace

type PagingSpace struct {
	Name      string /* Paging space name */
	Type      uint8  /* type of paging device (LV_PAGING or NFS_PAGING) */
	VGName    string /* volume group name */
	Hostname  string /* host name of paging server */
	Filename  string /* swap file name on server */
	LPSize    int64  /* size in number of logical partitions  */
	MBSize    int64  /* size in megabytes  */
	MBUsed    int64  /* portion used in megabytes  */
	IOPending int64  /* number of pending I/O */
	Active    uint8  /* indicates if active (1 if so, 0 if not) */
	Automatic uint8  /* indicates if automatic (1 if so, 0 if not) */
	Version   int64  /* version number (1, 2, etc.,) */
}

func PagingSpaceStat

func PagingSpaceStat() ([]PagingSpace, error)

type PartitionConfig

type PartitionConfig struct {
	Version                  int64          /* Version number */
	Name                     string         /* Partition Name */
	Node                     string         /* Node Name */
	Conf                     PartitionType  /* Partition Properties */
	Number                   int32          /* Partition Number */
	GroupID                  int32          /* Group ID */
	ProcessorFamily          string         /* Processor Type */
	ProcessorModel           string         /* Processor Model */
	MachineID                string         /* Machine ID */
	ProcessorMhz             float64        /* Processor Clock Speed in MHz */
	NumProcessors            PartitionValue /* Number of Configured Physical Processors in frame*/
	OSName                   string         /* Name of Operating System */
	OSVersion                string         /* Version of operating System */
	OSBuild                  string         /* Build of Operating System */
	LCpus                    int32          /* Number of Logical CPUs */
	SmtThreads               int32          /* Number of SMT Threads */
	Drives                   int32          /* Total Number of Drives */
	NetworkAdapters          int32          /* Total Number of Network Adapters */
	CpuCap                   PartitionValue /* Min, Max and Online CPU Capacity */
	Weightage                int32          /* Variable Processor Capacity Weightage */
	EntCapacity              int32          /* number of processor units this partition is entitled to receive */
	VCpus                    PartitionValue /* Min, Max and Online Virtual CPUs */
	PoolID                   int32          /* Shared Pool ID of physical processors, to which this partition belongs*/
	ActiveCpusInPool         int32          /* Count of physical CPUs in the shared processor pool, to which this partition belongs */
	PoolWeightage            int32          /* Pool Weightage */
	SharedPCpu               int32          /* Number of physical processors allocated for shared processor use */
	MaxPoolCap               int32          /* Maximum processor capacity of partition's pool */
	EntPoolCap               int32          /* Entitled processor capacity of partition's pool */
	Mem                      PartitionValue /* Min, Max and Online Memory */
	MemWeightage             int32          /* Variable Memory Capacity Weightage */
	TotalIOMemoryEntitlement int64          /* I/O Memory Entitlement of the partition in bytes */
	MemPoolID                int32          /* AMS pool id of the pool the LPAR belongs to */
	HyperPgSize              int64          /* Hypervisor page size in KB*/
	ExpMem                   PartitionValue /* Min, Max and Online Expanded Memory */
	TargetMemExpFactor       int64          /* Target Memory Expansion Factor scaled by 100 */
	TargetMemExpSize         int64          /* Expanded Memory Size in MB */
	SubProcessorMode         int32          /* Split core mode, its value can be 0,1,2 or 4. 0 for unsupported, 1 for capable but not enabled, 2 or 4 for enabled*/
}

func PartitionStat

func PartitionStat() (*PartitionConfig, error)

type PartitionType

type PartitionType struct {
	SmtCapable        bool /* OS supports SMT mode */
	SmtEnabled        bool /* SMT mode is on */
	LparCapable       bool /* OS supports logical partitioning */
	LparEnabled       bool /* logical partitioning is on */
	SharedCapable     bool /* OS supports shared processor LPAR */
	SharedEnabled     bool /* partition runs in shared mode */
	DLparCapable      bool /* OS supports dynamic LPAR */
	Capped            bool /* partition is capped */
	Kernel64bit       bool /* kernel is 64 bit */
	PoolUtilAuthority bool /* pool utilization available */
	DonateCapable     bool /* capable of donating cycles */
	DonateEnabled     bool /* enabled for donating cycles */
	AmsCapable        bool /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */
	AmsEnabled        bool /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */
	PowerSave         bool /*1= Power saving mode is enabled*/
	AmeEnabled        bool /* Active Memory Expansion is enabled */
	SharedExtended    bool
}

type PartitionValue

type PartitionValue struct {
	Online  int64
	Max     int64
	Min     int64
	Desired int64
}

type Process

type Process struct {
	Version           int64   /* version number (1, 2, etc.,) */
	PID               int64   /* Process ID */
	ProcessName       string  /* Name of The Process */
	Priority          int32   /* Process Priority */
	NumThreads        int64   /* Thread Count */
	UID               int64   /* Owner Info */
	ClassID           int64   /* WLM Class Name */
	Size              int64   /* Virtual Size of the Process in KB(Exclusive Usage, Leaving all Shared Library Text & Shared File Pages, Shared Memory, Memory Mapped) */
	RealMemData       int64   /* Real Memory used for Data in KB */
	RealMemText       int64   /* Real Memory used for Text in KB */
	VirtMemData       int64   /* Virtual Memory used to Data in KB */
	VirtMemText       int64   /* Virtual Memory used for Text in KB */
	SharedLibDataSize int64   /* Data Size from Shared Library in KB */
	HeapSize          int64   /* Heap Size in KB */
	RealInUse         int64   /* The Real memory in use(in KB) by the process including all kind of segments (excluding system segments). This includes Text, Data, Shared Library Text, Shared Library Data, File Pages, Shared Memory & Memory Mapped */
	VirtInUse         int64   /* The Virtual memory in use(in KB) by the process including all kind of segments (excluding system segments). This includes Text, Data, Shared Library Text, Shared Library Data, File Pages, Shared Memory & Memory Mapped */
	Pinned            int64   /* Pinned Memory(in KB) for this process inclusive of all segments */
	PgSpInUse         int64   /* Paging Space used(in KB) inclusive of all segments */
	FilePages         int64   /* File Pages used(in KB) including shared pages */
	RealInUseMap      int64   /* Real memory used(in KB) for Shared Memory and Memory Mapped regions */
	VirtInUseMap      int64   /* Virtual Memory used(in KB) for Shared Memory and Memory Mapped regions */
	PinnedInUseMap    int64   /* Pinned memory(in KB) for Shared Memory and Memory Mapped regions */
	UCpuTime          float64 /* User Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_process_util or perfstat_process respectively. */
	SCpuTime          float64 /* System Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_process_util or perfstat_process respectively. */
	LastTimeBase      int64   /* Timebase Counter */
	InBytes           int64   /* Bytes Read from Disk */
	OutBytes          int64   /* Bytes Written to Disk */
	InOps             int64   /* In Operations from Disk */
	OutOps            int64   /* Out Operations from Disk */
}

func ProcessStat

func ProcessStat() ([]Process, error)

type Thread

type Thread struct {
	TID          int64   /* thread identifier */
	PID          int64   /* process identifier */
	CpuID        int64   /* processor on which I'm bound */
	UCpuTime     float64 /* User Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_thread_util or perfstat_thread respectively. */
	SCpuTime     float64 /* System Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_thread_util or perfstat_thread respectively. */
	LastTimeBase int64   /* Timebase Counter */
	Version      int64
}

func ThreadStat

func ThreadStat() ([]Thread, error)

type VolumeGroup

type VolumeGroup struct {
	Name                 string /* volume group name */
	TotalDisks           int64  /* number of physical volumes in the volume group */
	ActiveDisks          int64  /* number of active physical volumes in the volume group */
	TotalLogicalVolumes  int64  /* number of logical volumes in the volume group */
	OpenedLogicalVolumes int64  /* number of logical volumes opened in the volume group */
	IOCnt                int64  /* Number of read and write requests */
	KBReads              int64  /* Number of Kilobytes read */
	KBWrites             int64  /* Number of Kilobytes written */
	Version              int64  /* version number (1, 2, etc.,) */
	VariedState          int    /* Indicates volume group available or not */
}

func VolumeGroupStat

func VolumeGroupStat() ([]VolumeGroup, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL