/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos72V src/bos/usr/ccs/lib/libperfstat/libperfstat.h 1.4.10.55 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* Restricted Materials of IBM */ /* */ /* COPYRIGHT International Business Machines Corp. 2000,2020 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* * LEVEL 1, 5 Years Bull Confidential Information * */ /* @(#)91 1.4.10.55 src/bos/usr/ccs/lib/libperfstat/libperfstat.h, libperfstat, bos72V, v2020_07A5 2/5/20 06:51:18 */ #ifndef LIBPERFSTAT_H #define LIBPERFSTAT_H /* This file describes the structures and constants used by the libperfstat API */ #include #include #include #include #ifdef __cplusplus extern "C" { #endif #define IDENTIFIER_LENGTH 64 /* length of strings included in the structures */ #define PERFSTAT_SIZE 64 /* Size of the Adapter Name */ #define CEC_ID_LEN 40 /* CEC identifier length */ #define PERFSTAT_ENABLE 0x80000000 /* To enable cluster statistics collection by calling perfstat_config API */ #define PERFSTAT_DISABLE 0x40000000 /* To disable cluster statistics by calling perfstat_config API */ #define PERFSTAT_RESET 0x20000000 /* To Reset the cluster statistics support */ #define PERFSTAT_QUERY 0x10000000 /* Check whether the cluster statistics collection is enabled or not */ #define PERFSTAT_IOSTAT 0x00000001 #define PERFSTAT_LV 0x00000002 /* Enable the collection for Logical Volume (LV) */ #define PERFSTAT_VG 0x00000003 /* Enable the collection for Volume Group(VG) */ #define PERFSTAT_DICTIONARY 0x00000004 #define PERFSTAT_HYPSTATS 0x00000005 /* Mask to Enable or Disable the Hypervisor stats */ #define PERFSTAT_CLUSTER_STATS 0x00000006 /* Mask to Configure the cluster statistics */ #define PERFSTAT_FWD_COMPATIBLE 0x00000007 /* Forward Compatibility support enabled or not*/ #define PERFSTAT_DK_ODM 0x00000008 /* Mask to enable or Disable the ODM */ #define PERFSTAT_HFISTATS 0x00000009 /* Check wether the Host Fabric Interface(HFI) statistics are available or not */ #define CONFIG_HCALL_STATS 11 /* Configure the Hypervisor statistics */ #define UNCONFIG_HCALL_STATS 12 /* Unconfigure the Hypervisor statistics */ #define KILOBYTE 1024 /* Number of Bytes in one kilobyte */ #define MEGABYTE 1048576 /* number of bytes in one megabyte */ #define PGTOMB(x) (((float)(x) * PAGESIZE) / MEGABYTE) /* Size in Pages to megabyte */ #define PGTOKB(x) (((float)(x) * PAGESIZE) / KILOBYTE) /* Size in Pages to kilobyte */ #define BYTE2KB(x) ((float)(x) / KILOBYTE) /* Size in bytes to kilobyte */ #define BYTE2MB(x) ((float)(x) / MEGABYTE) /* Size in bytes to megabyte */ #define VPGTOMB(x,size) (((float)(x) * size) / MEGABYTE) /* Conversion of a page of specific Size to megabyte */ /*definitions moved from libperfstat_lv.h*/ #define FIRST_LOGICALVOLUME "" /* pseudo-name for the first logical volume */ #define FIRST_VOLUMEGROUP "" /* pseudo-name for the first volume group */ #define POOLNAME 128 /* SSP Pool Name length */ #define CLUSTERNAMELN 256 /* SSP Cluster Name length */ #define FIRST_CPU "" /* pseudo-name for the first logical cpu */ #define FIRST_DISK "" /* pseudo-name for the first disk */ #define FIRST_TAPE "" /* pseudo-name for the first tape */ #define FIRST_DISKPATH "" /* pseudo-name for the first disk path */ #define FIRST_DISKADAPTER "" /* pseudo-name for the first disk adapter */ #define FIRST_NETINTERFACE "" /* pseudo-name for the first network interface */ #define FIRST_NETADAPTER "" /* pseudo-name for the first network adapter */ #define FIRST_FCADAPTER "" /* pseudo-name for the first Fiber Channel adapter */ #define FIRST_PAGINGSPACE "" /* pseudo-name for the first paging space */ #define FIRST_PROTOCOL "" /* pseudo-name for the first protocol */ #define FIRST_NETBUFFER "" /* pseudo-name for the first network buffer size */ #define FIRST_PSIZE (0ull) /* Pseudo-name for the first memory page-size */ #define FIRST_VTD "" /* pseudo-name for the first Virtual Target Device */ #define FIRST_VHOST "" /* pseudo-name for the first Virtual SCSI/SAS adapter */ #define FIRST_VFCHOST "" /* pseudo-name for the first Virtual FC adapter */ #define FIRST_SEA "ent0" /* pseudo-name for the first SEA adapter (Valid SEA name must be Filled) */ #define FIRST_WPARNAME "" /* pseudo-name for the first WPAR */ #define FIRST_WPARID -1 /* pseudo-id for the first WPAR */ #define FIRST_CLUSTERNAME "" /* pseudo-name for the first cluster */ #define FIRST_NODENAME "" /* pseudo-name for the first node */ #define FIRST_NODEID -1 /* pseudo-id for the first node */ #define FIRST_HFI "" /* pseudo-name for the first available Host Fabric Interface */ #define FIRST_WINDOW -1 /* pseudo-id for the first available HFI Window */ #define DEFAULT_DEF "not available" #define XINTFRAC ((double)(_system_configuration.Xint)/(double)(_system_configuration.Xfrac)) #define HTIC2NANOSEC(x) (((double)(x) * XINTFRAC)) /*The below two macros to be in sync with vio library macros VIO_UDID_LENGTH and VIO_STR_256*/ #define VIOS_UDID_LENGTH 256 #define VIOS_STR_256 256 #define VIOS_STR_128 128 /*from vio.h. SHould bein sync with vio.h*/ #define VIO_UP 0x00001 /**< VIO partition state is up */ #define VIO_DOWN 0x00002 /**< VIO partition state is down */ typedef struct { /* structure element identifier */ char name[IDENTIFIER_LENGTH]; /* name of the identifier */ } perfstat_id_t; typedef struct { /* structure element identifier */ char name[IDENTIFIER_LENGTH]; /* name of the fc adapter identifier */ u_longlong_t initiator_wwpn_name; /* initiator WWPN (World Wide Port Name) name */ } perfstat_wwpn_id_t; typedef enum { WPARNAME, WPARID, RSETHANDLE } wparid_specifier; typedef struct { /* WPAR identifier */ wparid_specifier spec; /* Specifier to choose wpar id or name */ union { cid_t wpar_id; /* WPAR ID */ rsethandle_t rset; /* Rset Handle */ char wparname[MAXCORRALNAMELEN+1]; /* WPAR NAME */ } u; char name[IDENTIFIER_LENGTH]; /* name of the structure element identifier */ } perfstat_id_wpar_t; typedef enum { NODENAME, NODEID, CLUSTERNAME } nodeid_specifier_t; typedef struct { /* Node Identifier */ nodeid_specifier_t spec; /* Specifier to choose (nodeid or nodename) */ union { u_longlong_t nodeid; /* NODE ID */ char nodename[MAXHOSTNAMELEN]; /* NODE NAME */ } u; char name[IDENTIFIER_LENGTH]; /* name of the structure element identifier */ } perfstat_id_node_t; #define PERFFILT_TIER 1 /*Filter is enabled for tier*/ #define PERFFILT_FG 2 /*Filter is enabled for Failure Group */ #define PERFFILT_PHYSV 4 /*Filter is enabled for physical volume */ #define PERFFILT_ID 8 /*Filter is based on ID */ #define PERFFILT_NAME 16 /*Filter is based on Name */ #define PERFFILT_NODE 32 /*Filter is based on Node Name */ typedef struct { unsigned long long id; char name[VIOS_STR_128]; }ssp_filter_t; typedef struct { char name[MAXHOSTNAMELEN]; }ssp_filter_node_t; typedef struct { unsigned int version; int spec; ssp_filter_t pool; ssp_filter_t tier; ssp_filter_t fg; ssp_filter_t pv;/*For PV both udid and name are string. So both will be copied to name even if spec is set to ID*/ perfstat_id_t node; }perfstat_ssp_id_t; typedef struct { /* HFI (Host Fabric Interface) Window Identifier */ char name[IDENTIFIER_LENGTH]; /* name of the structure element identifier (hfi0 or hfi1) */ u_longlong_t windowid; /* WINDOW ID (0, 1, 2 ...) */ } perfstat_id_window_t; typedef struct { int type; /* Holds any of the below defined values */ #define UTIL_CPU_TOTAL 10 #define UTIL_CPU 11 #define UTIL_PROCESS 12 #define SHARED_POOL_UTIL 13 perfstat_id_t name; /* Name Element */ void *curstat; /* Pointer to Data Buffer */ void *prevstat; /* Pointer to Data Buffer */ int sizeof_data; /* Sizeof the stat Buffer */ int cur_elems; /* Number of Current Elements */ int prev_elems; /* Number of Previous Elements */ } perfstat_rawdata_t; typedef union { uint w; struct { unsigned smt_capable :1; /* OS supports SMT mode */ unsigned smt_enabled :1; /* SMT mode is on */ unsigned lpar_capable :1; /* OS supports logical partitioning */ unsigned lpar_enabled :1; /* logical partitioning is on */ unsigned shared_capable :1; /* OS supports shared processor LPAR */ unsigned shared_enabled :1; /* partition runs in shared mode */ unsigned dlpar_capable :1; /* OS supports dynamic LPAR */ unsigned capped :1; /* partition is capped */ unsigned kernel_is_64 :1; /* kernel is 64 bit */ unsigned pool_util_authority :1;/* pool utilization available */ unsigned donate_capable :1; /* capable of donating cycles */ unsigned donate_enabled :1; /* enabled for donating cycles */ unsigned ams_capable:1; /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */ unsigned ams_enabled:1; /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */ unsigned power_save:1; /*1= Power saving mode is enabled*/ unsigned ame_enabled:1; /* Active Memory Expansion is enabled */ unsigned shared_extended :1; unsigned spare :15; /* reserved for future usage */ } b; } perfstat_partition_type_t; typedef struct { /* partition total information */ char name[IDENTIFIER_LENGTH]; /* name of the logical partition */ perfstat_partition_type_t type; /* set of bits describing the partition */ int lpar_id; /* logical partition identifier */ int group_id; /* identifier of the LPAR group this partition is a member of */ int pool_id; /* Identifier of shared processor pool of physical processors, to which this partition belongs.*/ int online_cpus; /* number of virtual CPUs currently online on the partition */ int max_cpus; /* maximum number of virtual CPUs this parition can ever have */ int min_cpus; /* minimum number of virtual CPUs this partition must have */ u_longlong_t online_memory; /* amount of memory currently online */ u_longlong_t max_memory; /* maximum amount of memory this partition can ever have */ u_longlong_t min_memory; /* minimum amount of memory this partition must have */ int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */ int max_proc_capacity; /* maximum number of processor units this partition can ever have */ int min_proc_capacity; /* minimum number of processor units this partition must have */ int proc_capacity_increment; /* increment value to the entitled capacity */ int unalloc_proc_capacity; /* Unallocated processor units in the shared processor pool, to which this partition belongs. */ int var_proc_capacity_weight; /* Unallocated variable capacity, weight units in shared processor pool, to which this partition belongs. */ int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated in the shared processor pool this partition belongs to */ int online_phys_cpus_sys; /* number of physical CPUs currently active in the system containing this partition */ int max_phys_cpus_sys; /* maximum possible number of physical CPUs in the system containing this partition */ int phys_cpus_pool; /* Available physical CPUs in the shared processor pool, to which this partition belongs. */ u_longlong_t puser; /* raw number of physical processor tics in user mode */ u_longlong_t psys; /* raw number of physical processor tics in system mode */ u_longlong_t pidle; /* raw number of physical processor tics idle */ u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */ u_longlong_t pool_idle_time; /* number of clock tics a processor in the shared pool was idle */ u_longlong_t phantintrs; /* number of phantom interrupts received by the partition */ u_longlong_t invol_virt_cswitch; /* number involuntary virtual CPU context switches */ u_longlong_t vol_virt_cswitch; /* number voluntary virtual CPU context switches */ u_longlong_t timebase_last; /* Total number of clock ticks */ u_longlong_t reserved_pages; /* Currenlty number of 16GB pages. Cannot participate in DR operations */ u_longlong_t reserved_pagesize; /*Currently 16GB pagesize Cannot participate in DR operations */ u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */ u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */ u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */ u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */ u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ /* structure members added through Line item 0SK/KER feature 576885*/ u_longlong_t shcpus_in_sys; /* Number of physical processors allocated for Shared Processor use, across all shared processors pool (i.e Pool ID=0). */ u_longlong_t max_pool_capacity; /* Maximum processor capacity of shared processor pool, to which this partition belongs.*/ u_longlong_t entitled_pool_capacity;/* Entitled processor capacity of shared processor pool, to which this partition belongs. */ u_longlong_t pool_max_time; /* Summation of maximum time(in nano seconds) that could be consumed by the Shared processor pool, to which this parttion belongs */ u_longlong_t pool_busy_time; /* Summation of busy (non-idle) time (in nano seconds) accumulated across all partitions in the Shared processor pool, to which this partition belongs. */ u_longlong_t pool_scaled_busy_time; /* Summation of busy (non-idle) time (in nano seconds) accumulated across all partitions in the Shared Processor pool, to which this partition belongs. The time is against rated/nominal frequency */ u_longlong_t shcpu_tot_time; /* Summation of total time (in nano seconds) across all physical processors allocated for shared processor (i.e Pool ID=0) use, across all share processor pools */ u_longlong_t shcpu_busy_time; /* Summation of busy (non-idle) time (in nano seconds) accumulated across all physical processors allocated for shared processor (i.e pool ID=0)use, across all share processor pools. */ u_longlong_t shcpu_scaled_busy_time;/* Summation of busy (non-idle) time (in nano seconds) accumulated across all physical processors for shared processor (i.e Pool ID=0)use, across all share processor pools. The time is against rated/nominal frequency. */ int ams_pool_id; /* AMS pool id of the pool the LPAR belongs to */ int var_mem_weight; /* variable memory capacity weight */ u_longlong_t iome; /* I/O memory entitlement of the partition in bytes*/ u_longlong_t pmem; /* Physical memory currently backing the partition's logical memory in bytes*/ u_longlong_t hpi; /* number of hypervisor page-ins */ u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds)*/ u_longlong_t hypv_pagesize; /* Hypervisor page size in KB*/ uint online_lcpus; /*Number of online logical cpus */ uint smt_thrds; /* Number of SMT threads */ u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */ u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */ u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */ u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */ int spurrflag; /* set if running in spurr mode */ char hardwareid[CEC_ID_LEN]; /* CEC Identifier */ uint power_save_mode; /*Power save mode for the LPAR. Introduced through LI 53K PRF : Feature 728292*/ ushort ame_version; /* AME Version */ u_longlong_t true_memory; /* True Memory Size in 4KB pages */ u_longlong_t expanded_memory; /* Expanded Memory Size in 4KB pages */ u_longlong_t target_memexp_factr; /* Target Memory Expansion Factor scaled by 100 */ u_longlong_t current_memexp_factr; /* Current Memory Expansion Factor scaled by 100 */ u_longlong_t target_cpool_size; /* Target Compressed Pool Size in bytes */ u_longlong_t max_cpool_size; /* Max Size of Compressed Pool in bytes */ u_longlong_t min_ucpool_size; /* Min Size of Uncompressed Pool in bytes */ u_longlong_t ame_deficit_size; /*Deficit memory size in bytes */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t cmcs_total_time; /* Total CPU time spent due to active memory expansion */ u_longlong_t purr_coalescing; /* If the calling partition is * authorized to see pool wide statistics then * PURR cycles consumed to coalesce data * else set to zero.*/ u_longlong_t spurr_coalescing; /* If the calling partition is * authorized to see pool wide statistics then * SPURR cycles consumed to coalesce data * else set to zero.*/ u_longlong_t MemPoolSize ; /* Indicates the memory pool size * of the pool that the partition belongs to (in bytes)., mpsz */ u_longlong_t IOMemEntInUse; /* I/O memory entitlement of the LPAR in use in bytes. iomu */ u_longlong_t IOMemEntFree; /* free I/O memory entitlement in bytes. iomf */ u_longlong_t IOHighWaterMark; /* high water mark of I/O memory entitlement usage in bytes. iohwn */ u_longlong_t purr_counter; /* number of purr cycles spent in user + kernel mode */ u_longlong_t spurr_counter; /* number of spurr cycles spent in user + kernel mode */ /* Marketing Requirement(MR): MR1124083744 */ u_longlong_t real_free; /* free real memory (in 4KB pages) */ u_longlong_t real_avail; /* number of pages available for user application (memfree + numperm - minperm - minfree ) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_PARTITION_TOTAL 5 /* Incremented by one for every new release * * of perfstat_partition_total_t data structure */ } perfstat_partition_total_t; typedef union { /* WPAR Type & Flags */ uint w; struct { unsigned app_wpar :1; /* Application WPAR */ unsigned cpu_rset :1; /* WPAR restricted to CPU resource set */ unsigned cpu_xrset:1; /* WPAR restricted to CPU Exclusive resource set */ unsigned cpu_limits :1; /* CPU resource limits enforced */ unsigned mem_limits :1; /* Memory resource limits enforced */ unsigned spare :27; /* reserved for future usage */ } b; } perfstat_wpar_type_t; typedef struct { /* Workload partition Information */ char name[MAXCORRALNAMELEN+1]; /* name of the Workload Partition */ perfstat_wpar_type_t type; /* set of bits describing the wpar */ cid_t wpar_id; /* workload partition identifier */ uint online_cpus; /* Number of Virtual CPUs in partition rset or number of virtual CPUs currently online on the Global partition*/ int cpu_limit; /* CPU limit in 100ths of % - 1..10000 */ int mem_limit; /* Memory limit in 100ths of % - 1..10000 */ u_longlong_t online_memory; /* amount of memory currently online in Global Partition */ int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_WPAR_TOTAL 1 /* Incremented by one for every new release * * of perfstat_wpar_total_t data structure */ } perfstat_wpar_total_t; /* Min, Max, Online and Desired Statistics of Various Parameters*/ typedef struct{ u_longlong_t online; u_longlong_t max; u_longlong_t min; u_longlong_t desired; }perfstat_value_t; /*Partition Related Configuration*/ typedef struct { u_longlong_t version; /* Version number */ char partitionname[64]; /* Partition Name */ char nodename[64]; /* Node Name */ perfstat_partition_type_t conf; /* Partition Properties */ uint partitionnum; /* Partition Number */ uint groupid; /* Group ID */ /* Hardware Configuration */ char processorFamily[64]; /* Processor Type */ char processorModel[64]; /* Processor Model */ char machineID[64]; /* Machine ID */ double processorMHz; /* Processor Clock Speed in MHz */ perfstat_value_t numProcessors; /* Number of Configured Physical Processors in frame*/ /* Software Configuration */ char OSName[64]; /* Name of Operating System */ char OSVersion[64]; /* Version of operating System */ char OSBuild[64]; /* Build of Operating System */ /* Lpar Configuration */ uint lcpus; /* Number of Logical CPUs */ uint smtthreads; /* Number of SMT Threads */ uint drives; /* Total Number of Drives */ uint nw_adapters; /* Total Number of Network Adapters */ /* Physical CPU related Configuration */ perfstat_value_t cpucap; /* Min, Max and Online CPU Capacity */ uint cpucap_weightage; /* Variable Processor Capacity Weightage */ int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */ /* Virtual CPU related Configuration*/ perfstat_value_t vcpus; /* Min, Max and Online Virtual CPUs */ /* Processor Pool Related Configuration */ uint processor_poolid; /* Shared Pool ID of physical processors, to which this partition belongs*/ uint activecpusinpool; /* Count of physical CPUs in the shared processor pool, to which this partition belongs */ uint cpupool_weightage; /* Pool Weightage */ uint sharedpcpu; /* Number of physical processors allocated for shared processor use */ uint maxpoolcap; /* Maximum processor capacity of partition's pool */ uint entpoolcap; /* Entitled processor capacity of partition's pool */ /* Memory Related Configuration */ perfstat_value_t mem; /* Min, Max and Online Memory */ uint mem_weightage; /* Variable Memory Capacity Weightage */ /* AMS Related Configuration */ u_longlong_t totiomement; /* I/O Memory Entitlement of the partition in bytes */ int mempoolid; /* AMS pool id of the pool the LPAR belongs to */ u_longlong_t hyperpgsize; /* Hypervisor page size in KB*/ /* AME Related Configuration */ perfstat_value_t exp_mem; /* Min, Max and Online Expanded Memory */ u_longlong_t targetmemexpfactor; /* Target Memory Expansion Factor scaled by 100 */ u_longlong_t targetmemexpsize; /* Expanded Memory Size in MB */ uint subprocessor_mode; /* 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*/ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_PARTITION_CONFIG 2 /* Incremented by one for every new release * * of perfstat_partition_config_t data structure */ }perfstat_partition_config_t; typedef struct { /* cpu information */ char name[IDENTIFIER_LENGTH]; /* logical processor name (cpu0, cpu1, ..) */ u_longlong_t user; /* raw number of clock ticks spent in user mode */ u_longlong_t sys; /* raw number of clock ticks spent in system mode */ u_longlong_t idle; /* raw number of clock ticks spent idle */ u_longlong_t wait; /* raw number of clock ticks spent waiting for I/O */ u_longlong_t pswitch; /* number of context switches (changes of currently running process) */ u_longlong_t syscall; /* number of system calls executed */ u_longlong_t sysread; /* number of read system calls executed */ u_longlong_t syswrite; /* number of write system calls executed */ u_longlong_t sysfork; /* number of fork system call executed */ u_longlong_t sysexec; /* number of exec system call executed */ u_longlong_t readch; /* number of characters tranferred with read system call */ u_longlong_t writech; /* number of characters tranferred with write system call */ u_longlong_t bread; /* number of block reads */ u_longlong_t bwrite; /* number of block writes */ u_longlong_t lread; /* number of logical read requests */ u_longlong_t lwrite; /* number of logical write requests */ u_longlong_t phread; /* number of physical reads (reads on raw device) */ u_longlong_t phwrite; /* number of physical writes (writes on raw device) */ u_longlong_t iget; /* number of inode lookups */ u_longlong_t namei; /* number of vnode lookup from a path name */ u_longlong_t dirblk; /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ u_longlong_t msg; /* number of IPC message operations */ u_longlong_t sema; /* number of IPC semaphore operations */ u_longlong_t minfaults; /* number of page faults with no I/O */ u_longlong_t majfaults; /* number of page faults with disk I/O */ u_longlong_t puser; /* raw number of physical processor tics in user mode */ u_longlong_t psys; /* raw number of physical processor tics in system mode */ u_longlong_t pidle; /* raw number of physical processor tics idle */ u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */ u_longlong_t redisp_sd0; /* number of thread redispatches within the scheduler affinity domain 0 */ u_longlong_t redisp_sd1; /* number of thread redispatches within the scheduler affinity domain 1 */ u_longlong_t redisp_sd2; /* number of thread redispatches within the scheduler affinity domain 2 */ u_longlong_t redisp_sd3; /* number of thread redispatches within the scheduler affinity domain 3 */ u_longlong_t redisp_sd4; /* number of thread redispatches within the scheduler affinity domain 4 */ u_longlong_t redisp_sd5; /* number of thread redispatches within the scheduler affinity domain 5 */ u_longlong_t migration_push; /* number of thread migrations from the local runque to another queue due to starvation load balancing */ u_longlong_t migration_S3grq; /* number of thread migrations from the global runque to the local runque resulting in a move accross scheduling domain 3 */ u_longlong_t migration_S3pul; /* number of thread migrations from another processor's runque resulting in a move accross scheduling domain 3 */ u_longlong_t invol_cswitch; /* number of involuntary thread context switches */ u_longlong_t vol_cswitch; /* number of voluntary thread context switches */ u_longlong_t runque; /* number of threads on the runque */ u_longlong_t bound; /* number of bound threads */ u_longlong_t decrintrs; /* number of decrementer tics interrupts */ u_longlong_t mpcrintrs; /* number of mpc's received interrupts */ u_longlong_t mpcsintrs; /* number of mpc's sent interrupts */ u_longlong_t devintrs; /* number of device interrupts */ u_longlong_t softintrs; /* number of offlevel handlers called */ u_longlong_t phantintrs; /* number of phantom interrupts */ u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */ u_longlong_t idle_donated_spurr;/* number of idle spurr cycles donated by a dedicated partition enabled for donation */ u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */ u_longlong_t busy_donated_spurr;/* number of busy spurr cycles donated by a dedicated partition enabled for donation */ u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t hpi; /* number of hypervisor page-ins */ u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds)*/ u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */ u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */ u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */ u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */ int spurrflag; /* set if running in spurr mode */ /* home SRAD redispatch statistics */ u_longlong_t localdispatch; /* number of local thread dispatches on this logical CPU */ u_longlong_t neardispatch; /* number of near thread dispatches on this logical CPU */ u_longlong_t fardispatch; /* number of far thread dispatches on this logical CPU */ u_longlong_t cswitches; /* Context switches */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t tb_last; /* timebase counter */ char state; /* Show whether the CPU is offline or online */ u_longlong_t vtb_last; /* Last virtual timebase read */ u_longlong_t icount_last; /* Last instruction count read */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_CPU 4 /* Incremented by one for every new release * * of perfstat_cpu_t data structure */ } perfstat_cpu_t; typedef struct { /* global cpu information */ int ncpus; /* number of active logical processors */ int ncpus_cfg; /* number of configured processors */ char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */ u_longlong_t processorHZ; /* processor speed in Hz */ u_longlong_t user; /* raw total number of clock ticks spent in user mode */ u_longlong_t sys; /* raw total number of clock ticks spent in system mode */ u_longlong_t idle; /* raw total number of clock ticks spent idle */ u_longlong_t wait; /* raw total number of clock ticks spent waiting for I/O */ u_longlong_t pswitch; /* number of process switches (change in currently running process) */ u_longlong_t syscall; /* number of system calls executed */ u_longlong_t sysread; /* number of read system calls executed */ u_longlong_t syswrite; /* number of write system calls executed */ u_longlong_t sysfork; /* number of forks system calls executed */ u_longlong_t sysexec; /* number of execs system calls executed */ u_longlong_t readch; /* number of characters tranferred with read system call */ u_longlong_t writech; /* number of characters tranferred with write system call */ u_longlong_t devintrs; /* number of device interrupts */ u_longlong_t softintrs; /* number of software interrupts */ time_t lbolt; /* number of ticks since last reboot */ u_longlong_t loadavg[3]; /* (1<. */ u_longlong_t runque; /* length of the run queue (processes ready) */ u_longlong_t swpque; /* ength of the swap queue (processes waiting to be paged in) */ u_longlong_t bread; /* number of blocks read */ u_longlong_t bwrite; /* number of blocks written */ u_longlong_t lread; /* number of logical read requests */ u_longlong_t lwrite; /* number of logical write requests */ u_longlong_t phread; /* number of physical reads (reads on raw devices) */ u_longlong_t phwrite; /* number of physical writes (writes on raw devices) */ u_longlong_t runocc; /* updated whenever runque is updated, i.e. the runqueue is occupied. * This can be used to compute the simple average of ready processes */ u_longlong_t swpocc; /* 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 */ u_longlong_t iget; /* number of inode lookups */ u_longlong_t namei; /* number of vnode lookup from a path name */ u_longlong_t dirblk; /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ u_longlong_t msg; /* number of IPC message operations */ u_longlong_t sema; /* number of IPC semaphore operations */ u_longlong_t rcvint; /* number of tty receive interrupts */ u_longlong_t xmtint; /* number of tyy transmit interrupts */ u_longlong_t mdmint; /* number of modem interrupts */ u_longlong_t tty_rawinch; /* number of raw input characters */ u_longlong_t tty_caninch; /* number of canonical input characters (always zero) */ u_longlong_t tty_rawoutch;/* number of raw output characters */ u_longlong_t ksched; /* number of kernel processes created */ u_longlong_t koverf; /* kernel process creation attempts where: * -the user has forked to their maximum limit * -the configuration limit of processes has been reached */ u_longlong_t kexit; /* number of kernel processes that became zombies */ u_longlong_t rbread; /* number of remote read requests */ u_longlong_t rcread; /* number of cached remote reads */ u_longlong_t rbwrt; /* number of remote writes */ u_longlong_t rcwrt; /* number of cached remote writes */ u_longlong_t traps; /* number of traps */ int ncpus_high; /* index of highest processor online */ u_longlong_t puser; /* raw number of physical processor tics in user mode */ u_longlong_t psys; /* raw number of physical processor tics in system mode */ u_longlong_t pidle; /* raw number of physical processor tics idle */ u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */ u_longlong_t decrintrs; /* number of decrementer tics interrupts */ u_longlong_t mpcrintrs; /* number of mpc's received interrupts */ u_longlong_t mpcsintrs; /* number of mpc's sent interrupts */ u_longlong_t phantintrs; /* number of phantom interrupts */ u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */ u_longlong_t idle_donated_spurr;/* number of idle spurr cycles donated by a dedicated partition enabled for donation */ u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */ u_longlong_t busy_donated_spurr;/* number of busy spurr cycles donated by a dedicated partition enabled for donation */ u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */ u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ short iowait; /* number of processes that are asleep waiting for buffered I/O */ short physio; /* number of processes waiting for raw I/O */ longlong_t twait; /* number of threads that are waiting for filesystem direct(cio) */ u_longlong_t hpi; /* number of hypervisor page-ins */ u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds) */ u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */ u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */ u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */ u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */ int spurrflag; /* set if running in spurr mode */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t tb_last; /*time base counter */ u_longlong_t purr_coalescing; /* If the calling partition is * authorized to see pool wide statistics then * PURR cycles consumed to coalesce data * else set to zero.*/ u_longlong_t spurr_coalescing; /* If the calling partition is * authorized to see pool wide statistics then * SPURR cycles consumed to coalesce data * else set to zero. */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_CPU_TOTAL 2 /* Incremented by one for every new release * * of perfstat_cpu_total_t data structure */ } perfstat_cpu_total_t; typedef struct { /* hypervisor data */ u_longlong_t hyper_purr; u_longlong_t ncalls; u_longlong_t total_purr; u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_HYPERSTAT_TOTAL 1 /* Incremented by one for every new release * * of perfstat_hyperstat_total_t data structure */ } perfstat_hyperstat_total_t; typedef struct { u_longlong_t version; char cpu_id[IDENTIFIER_LENGTH]; /* holds the id of the cpu */ float entitlement; /* Partition's entitlement */ float user_pct; /* % of utilization in user mode */ float kern_pct; /* % of utilization in kernel mode */ float idle_pct; /* % of utilization in idle mode */ float wait_pct; /* % of utilization in wait mode */ float physical_busy; /* physical cpus busy */ float physical_consumed; /* total cpus consumed by the partition */ float freq_pct; /* Average freq% over the last interval */ float entitlement_pct; /* % of entitlement used */ float busy_pct; /* % of entitlement busy */ float idle_donated_pct; /* % idle cycles donated */ float busy_donated_pct; /* % of busy cycles donated */ float idle_stolen_pct; /* % idle cycles stolen */ float busy_stolen_pct; /* % busy cycles stolen */ float l_user_pct; /* % of utilization in user mode, in terms of logical processor ticks */ float l_kern_pct; /* % of utilization in kernel mode, in terms of logical processor ticks*/ float l_idle_pct; /* % of utilization in idle mode, in terms of logical processor ticks */ float l_wait_pct; /* % of utilization in wait mode, in terms of logical processor ticks */ u_longlong_t delta_time; /* delta time in milliseconds, for which utilization is evaluated */ #define CURR_VERSION_CPU_UTIL 2 /* Incremented by one for every new release * * of perfstat_cpu_util_t data structure */ } perfstat_cpu_util_t; typedef struct { u_longlong_t version; /*Version Number for data Structure*/ int ssp_id; /*Identifier of Shared Pool of physical processors, to which this partition belongs*/ u_longlong_t max_capacity; /*Maximum processor capacity of partition's pool*/ u_longlong_t entitled_capacity; /*Entitled processor capacity of partition's pool*/ int phys_cpus_pool; /*Available Physical CPUs in the Shared Processor Pool, to which this partition belongs*/ float idle_cores; /*Available Physical processors in the Shared Processor Pool over the last interval*/ float max_cores; /*For last interval, the summation of maximum number of cores, that could be consumed by the Shared Processor Pool, to which this partition belongs*/ float busy_cores; /*For last interval, summation of busy (non-idle) cores, accumulated across all partitions in the Shared Processor Pool, to which this partition belongs.*/ float sbusy_cores; /*For last interval, normalized summation of busy (non-idle) cores, accumulated across all partitions in the Shared Processor Pool, to which this partition belongs. This is if cores run at nominal/rated frequency.*/ float gpool_tot_cores; /*For last interval, summation of cores, across all physical processors allocated for shared processor use(across all pools).*/ float gpool_busy_cores; /*For last interval, summation of busy (non-idle) cores, accumulated across all shared processor partitions(across all pools)*/ float gpool_sbusy_cores; /*For last interval, normalized summation of busy cores accumulated across all shared processor partitions(across all pools), if cores run at nominal/rated frequency.*/ u_longlong_t tb_last_delta; /*elapsed number of clock ticks*/ #define CURR_VERSION_POOL_UTIL 1 /* Incremented by one for every new release of perfstat_processor_pool_util_t data structure */ }perfstat_processor_pool_util_t; typedef struct { /* WPAR cpu total information */ int ncpus; /* number of active logical processors in Global */ char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */ u_longlong_t processorHZ; /* processor speed in Hz */ u_longlong_t pswitch; /* number of process switches (change in currently running process) */ u_longlong_t sysfork; /* number of forks system calls executed */ u_longlong_t loadavg[3]; /* (1<. */ u_longlong_t runque; /* length of the run queue (processes ready) */ u_longlong_t swpque; /* ength of the swap queue (processes waiting to be paged in) */ u_longlong_t runocc; /* updated whenever runque is updated, i.e. the runqueue is occupied. * This can be used to compute the simple average of ready processes */ u_longlong_t swpocc; /* 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 */ u_longlong_t puser; /* raw number of physical processor tics in user mode */ u_longlong_t psys; /* raw number of physical processor tics in system mode */ u_longlong_t pidle; /* raw number of physical processor tics idle */ u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */ int ncpus_cfg; /* number of configured processors in the system*/ u_longlong_t syscall; /* number of system calls executed */ u_longlong_t sysread; /* number of read system calls executed */ u_longlong_t syswrite; /* number of write system calls executed */ u_longlong_t sysexec; /* number of execs system calls executed */ u_longlong_t readch; /* number of characters tranferred with read system call */ u_longlong_t writech; /* number of characters tranferred with write system call */ u_longlong_t devintrs; /* number of device interrupts */ u_longlong_t softintrs; /* number of software interrupts */ u_longlong_t bread; /* number of blocks read */ u_longlong_t bwrite; /* number of blocks written */ u_longlong_t lread; /* number of logical read requests */ u_longlong_t lwrite; /* number of logical write requests */ u_longlong_t phread; /* number of physical reads (reads on raw devices) */ u_longlong_t phwrite; /* number of physical writes (writes on raw devices) */ u_longlong_t iget; /* number of inode lookups */ u_longlong_t namei; /* number of vnode lookup from a path name */ u_longlong_t dirblk; /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ u_longlong_t msg; /* number of IPC message operations */ u_longlong_t sema; /* number of IPC semaphore operations */ u_longlong_t ksched; /* number of kernel processes created */ u_longlong_t koverf; /* kernel process creation attempts where: * -the user has forked to their maximum limit * -the configuration limit of processes has been reached */ u_longlong_t kexit; /* number of kernel processes that became zombies */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_CPU_TOTAL_WPAR 1 /* Incremented by one for every new release * * of perfstat_cpu_total_wpar_t data structure */ } perfstat_cpu_total_wpar_t; typedef struct { u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t pid; /* Process ID */ char proc_name[64]; /* Name of The Process */ int proc_priority; /* Process Priority */ u_longlong_t num_threads; /* Thread Count */ /* Credentials */ u_longlong_t proc_uid; /* Owner Info */ u_longlong_t proc_classid; /* WLM Class Name */ /* Memory Related Statistics */ u_longlong_t proc_size; /* Virtual Size of the Process in KB(Exclusive Usage, Leaving all Shared Library Text * & Shared File Pages, Shared Memory, Memory Mapped) */ u_longlong_t proc_real_mem_data; /* Real Memory used for Data in KB */ u_longlong_t proc_real_mem_text; /* Real Memory used for Text in KB */ u_longlong_t proc_virt_mem_data; /* Virtual Memory used to Data in KB */ u_longlong_t proc_virt_mem_text; /* Virtual Memory used for Text in KB */ u_longlong_t shared_lib_data_size; /* Data Size from Shared Library in KB */ u_longlong_t heap_size; /* Heap Size in KB*/ u_longlong_t real_inuse; /* 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 */ u_longlong_t virt_inuse; /* 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 */ u_longlong_t pinned; /* Pinned Memory(in KB) for this process inclusive of all segments */ u_longlong_t pgsp_inuse; /* Paging Space used(in KB) inclusive of all segments */ u_longlong_t filepages; /* File Pages used(in KB) including shared pages */ u_longlong_t real_inuse_map; /* Real memory used(in KB) for Shared Memory and Memory Mapped regions */ u_longlong_t virt_inuse_map; /* Virtual Memory used(in KB) for Shared Memory and Memory Mapped regions */ u_longlong_t pinned_inuse_map; /* Pinned memory(in KB) for Shared Memory and Memory Mapped regions */ /* CPU Related Stats */ double ucpu_time; /* User Mode CPU time will be in percentage or milliseconds based on, * whether it is filled by perfstat_process_util or perfstat_process respectively. */ double scpu_time; /* System Mode CPU time will be in percentage or milliseconds based on, * whether it is filled by perfstat_process_util or perfstat_process respectively. */ u_longlong_t last_timebase; /* Timebase Counter */ /* Disk Related Stats */ u_longlong_t inBytes; /* Bytes Read from Disk */ u_longlong_t outBytes; /* Bytes Written to Disk */ u_longlong_t inOps; /* In Operations from Disk */ u_longlong_t outOps; /* Out Operations from Disk */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_PROCESS 1 /* Incremented by one for every new release * * of perfstat_process_t data structure */ } perfstat_process_t; typedef struct { /* identification */ tid_t tid; /* thread identifier */ pid_t pid; /* process identifier */ /* scheduler information */ pid_t cpuid; /* processor on which I'm bound */ /* accounting data */ double ucpu_time; /* User Mode CPU time will be in percentage or milliseconds based on, * whether it is filled by perfstat_thread_util or perfstat_thread respectively. */ double scpu_time; /* System Mode CPU time will be in percentage or milliseconds based on, * whether it is filled by perfstat_thread_util or perfstat_thread respectively. */ u_longlong_t last_timebase; /* Timebase Counter */ u_longlong_t version; /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_THREAD 1 /* Incremented by one for every new release * * of perfstat_thread_t data structure */ } perfstat_thread_t; typedef struct { /* Virtual memory utilization */ u_longlong_t virt_total; /* total virtual memory (in 4KB pages) */ u_longlong_t real_total; /* total real memory (in 4KB pages) */ u_longlong_t real_free; /* free real memory (in 4KB pages) */ u_longlong_t real_pinned; /* real memory which is pinned (in 4KB pages) */ u_longlong_t real_inuse; /* real memory which is in use (in 4KB pages) */ u_longlong_t pgbad; /* number of bad pages */ u_longlong_t pgexct; /* number of page faults */ u_longlong_t pgins; /* number of pages paged in */ u_longlong_t pgouts; /* number of pages paged out */ u_longlong_t pgspins; /* number of page ins from paging space */ u_longlong_t pgspouts; /* number of page outs from paging space */ u_longlong_t scans; /* number of page scans by clock */ u_longlong_t cycles; /* number of page replacement cycles */ u_longlong_t pgsteals; /* number of page steals */ u_longlong_t numperm; /* number of frames used for files (in 4KB pages) */ u_longlong_t pgsp_total; /* total paging space (in 4KB pages) */ u_longlong_t pgsp_free; /* free paging space (in 4KB pages) */ u_longlong_t pgsp_rsvd; /* reserved paging space (in 4KB pages) */ u_longlong_t real_system; /* real memory used by system segments (in 4KB pages). This is the sum of all the used pages in segment marked for system usage. * Since segment classifications are not always guaranteed to be accurate, this number is only an approximation. */ u_longlong_t real_user; /* real memory used by non-system segments (in 4KB pages). This is the sum of all pages used in segments not marked for system usage. * Since segment classifications are not always guaranteed to be accurate, this number is only an approximation. */ u_longlong_t real_process; /* real memory used by process segments (in 4KB pages). This is real_total-real_free-numperm-real_system. Since real_system is an * approximation, this number is too. */ u_longlong_t virt_active; /* Active virtual pages. Virtual pages are considered active if they have been accessed */ u_longlong_t iome; /* I/O memory entitlement of the partition in bytes*/ u_longlong_t iomu; /* I/O memory entitlement of the partition in use in bytes*/ u_longlong_t iohwm; /* High water mark of I/O memory entitlement used in bytes*/ u_longlong_t pmem; /* Amount of physical mmeory currently backing partition's logical memory in bytes*/ u_longlong_t comprsd_total; /* Total numbers of pages in compressed pool (in 4KB pages) */ u_longlong_t comprsd_wseg_pgs; /* Number of compressed working storage pages */ u_longlong_t cpgins; /* number of page ins to compressed pool */ u_longlong_t cpgouts; /* number of page outs from compressed pool */ /* The following metrics are relative to the true memory */ u_longlong_t true_size; /* True Memory Size in 4KB pages */ u_longlong_t expanded_memory; /* Expanded Memory Size in 4KB pages */ u_longlong_t comprsd_wseg_size; /* Total size of the compressed working storage pages in the pool */ u_longlong_t target_cpool_size; /* Target Compressed Pool Size in bytes */ u_longlong_t max_cpool_size; /* Max Size of Compressed Pool in bytes */ u_longlong_t min_ucpool_size; /* Min Size of Uncompressed Pool in bytes */ u_longlong_t cpool_size; /* Compressed Pool size in bytes */ u_longlong_t ucpool_size; /* Uncompressed Pool size in bytes */ u_longlong_t cpool_inuse; /* Compressed Pool Used in bytes */ u_longlong_t ucpool_inuse; /* Uncompressed Pool Used in bytes */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t real_avail; /* number of pages (in 4KB pages) of memory * * available without paging out working segments */ u_longlong_t bytes_coalesced; /* The number of bytes of the calling * partition.s logical real memory coalesced * because they contained duplicated data */ u_longlong_t bytes_coalesced_mempool;/* If the calling partition is * authorized to see pool wide statistics then * the number of bytes of logical real memory * coalesced because they contained duplicated * data in the calling partition.s memory * pool else set to zero.*/ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_MEMORY_TOTAL 2 /* Incremented by one for every new release * * of perfstat_memory_total_t data structure */ } perfstat_memory_total_t; typedef struct { u_longlong_t kbuff_inuse; /* # of packets of this type currently in use */ u_longlong_t kbuff_calls; /* total packets of this type ever allocated */ u_longlong_t kmem_inuse; /* total memory held in bytes */ u_longlong_t kbuff_limblocks; /* number of times blocked for hitting limit */ u_longlong_t kbuff_mapblocks; /* number of times blocked for kernel map */ u_longlong_t kbuff_maxused; /* maximum number ever used */ u_longlong_t kbuff_limit; /* most that are allowed to exist */ u_longlong_t kalloc_failed; /* total failed allocations */ u_longlong_t kalloc_delayed; /* total delayed allocations */ u_longlong_t klock; /* total locks */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_KMEMSTAT_TOTAL 1 /* Incremented by one for every new release * * of perfstat_kmemstat_total_t data structure */ }perfstat_kmemstat_total_t; typedef struct { /* WPAR Virtual memory utilization */ u_longlong_t real_total; /* Global total real memory (in 4KB pages) */ u_longlong_t real_free; /* Global free real memory (in 4KB pages) */ u_longlong_t real_pinned; /* real memory which is pinned (in 4KB pages) */ u_longlong_t real_inuse; /* real memory which is in use (in 4KB pages) */ u_longlong_t pgexct; /* number of page faults */ u_longlong_t pgins; /* number of pages paged in */ u_longlong_t pgouts; /* number of pages paged out */ u_longlong_t pgspins; /* number of page ins from paging space */ u_longlong_t pgspouts; /* number of page outs from paging space */ u_longlong_t scans; /* number of page scans by clock */ u_longlong_t pgsteals; /* number of page steals */ u_longlong_t numperm; /* number of frames used for files (in 4KB pages) */ u_longlong_t virt_active; /* Active virtual pages. Virtual pages are considered active if they have been accessed */ u_longlong_t comprsd_total; /* Total numbers of pages in compressed pool (in 4KB pages) */ u_longlong_t comprsd_wseg_pgs; /* Number of compressed working storage pages */ u_longlong_t cpgins; /* number of page ins to compressed pool */ u_longlong_t cpgouts; /* number of page outs from compressed pool */ u_longlong_t comprsd_wseg_size; /* Total size of the compressed working storage pages in the pool */ u_longlong_t ucpool_size; /* Uncompressed Pool size in bytes */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_MEMORY_TOTAL_WPAR 1 /* Incremented by one for every new release * * of perfstat_memory_total_wpar_t data structure */ } perfstat_memory_total_wpar_t; enum { LV_PAGING=1, NFS_PAGING, UNKNOWN_PAGING }; typedef struct { /* Page size identifier */ #define PAGE_4K (4*1024ull) /* 4K page-size */ #define PAGE_64K (64*1024ull) /* 64K page-size */ #define PAGE_16M (16*1024*1024ull) /* 16M page-size */ #define PAGE_16G (16*1024*1024*1024ull) /* 16G page-size */ psize_t psize; /* Page size in bytes */ } perfstat_psize_t; typedef struct { /* Per page size memory statistics */ psize_t psize; /* page size in bytes */ u_longlong_t real_total; /* number of real memory frames of this page size */ u_longlong_t real_free; /* number of pages on free list */ u_longlong_t real_pinned; /* number of pages pinned */ u_longlong_t real_inuse; /* number of pages in use */ u_longlong_t pgexct; /* number of page faults */ u_longlong_t pgins; /* number of pages paged in */ u_longlong_t pgouts; /* number of pages paged out */ u_longlong_t pgspins; /* number of page ins from paging space */ u_longlong_t pgspouts; /* number of page outs from paging space */ u_longlong_t scans; /* number of page scans by clock */ u_longlong_t cycles; /* number of page replacement cycles */ u_longlong_t pgsteals; /* number of page steals */ u_longlong_t numperm; /* number of frames used for files */ u_longlong_t numpgsp; /* number of pages with allocated paging space */ u_longlong_t real_system; /* number of pages used by system segments. * * This is the sum of all the used pages in segment marked for system usage. * * Since segment classifications are not always guaranteed to be accurate, * * This number is only an approximation. */ u_longlong_t real_user; /* number of pages used by non-system segments. * * This is the sum of all pages used in segments not marked for system usage. * * Since segment classifications are not always guaranteed to be accurate, * * This number is only an approximation. */ u_longlong_t real_process; /* number of pages used by process segments. * * This is real_total - real_free - numperm - real_system. * * Since real_system is an approximation, this number is too. */ u_longlong_t virt_active; /* Active virtual pages. * * Virtual pages are considered active if they have been accessed */ u_longlong_t comprsd_total; /* Number of pages of this size compressed */ u_longlong_t comprsd_wseg_pgs; /* Number of compressed working storage pages */ u_longlong_t cpgins; /* number of page ins of this page size to compressed pool */ u_longlong_t cpgouts; /* number of page outs of this page size from compressed pool */ /* The following metrics are relative to the true memory */ u_longlong_t cpool_inuse; /* Compressed Size of this page size in Compressed Pool*/ u_longlong_t ucpool_size; /* Uncompressed Pool size in bytes of this page size */ u_longlong_t comprsd_wseg_size; /* Total size of the compressed working storage pages in the pool */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t real_avail; /* number of pages (in 4KB pages) of memory * * available without paging out working segments */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_MEMORY_PAGE 1 /* Incremented by one for every new release * * of perfstat_memory_page_t data structure */ } perfstat_memory_page_t; typedef struct { /* page-size statistics instrumented for wpars */ psize_t psize; /* page size in bytes */ u_longlong_t real_total; /* number of real memory frames of this page size */ u_longlong_t real_pinned; /* number of pages pinned */ u_longlong_t real_inuse; /* number of pages in use */ u_longlong_t pgexct; /* number of page faults */ u_longlong_t pgins; /* number of pages paged in */ u_longlong_t pgouts; /* number of pages paged out */ u_longlong_t pgspins; /* number of page ins from paging space */ u_longlong_t pgspouts; /* number of page outs from paging space */ u_longlong_t scans; /* number of page scans by clock */ u_longlong_t pgsteals; /* number of page steals */ u_longlong_t comprsd_total; /* Number of pages of this size compressed */ u_longlong_t comprsd_wseg_pgs; /* Number of compressed working storage pages */ u_longlong_t cpgins; /* number of page ins of this page size to compressed pool */ u_longlong_t cpgouts; /* number of page outs of this page size from compressed pool */ /* The following metrics are relative to the true memory */ u_longlong_t cpool_inuse; /* Compressed Size of this page size in Compressed Pool*/ u_longlong_t ucpool_size; /* Uncompressed Pool size in bytes of this page size */ u_longlong_t comprsd_wseg_size; /* Total size of the compressed working storage pages in the pool */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_MEMORY_PAGE_WPAR 1 /* Incremented by one for every new release * * of perfstat_memory_page_wpar_t data structure */ } perfstat_memory_page_wpar_t; typedef struct { /* Paging space data for a specific logical volume */ char name[IDENTIFIER_LENGTH]; /* Paging space name */ char type; /* type of paging device (LV_PAGING or NFS_PAGING) * * Possible values are: * * LV_PAGING logical volume * * NFS_PAGING NFS file */ union{ struct{ char hostname[IDENTIFIER_LENGTH]; /* host name of paging server */ char filename[IDENTIFIER_LENGTH]; /* swap file name on server */ } nfs_paging; struct{ char vgname[IDENTIFIER_LENGTH];/* volume group name */ } lv_paging; } u; longlong_t lp_size; /* size in number of logical partitions */ longlong_t mb_size; /* size in megabytes */ longlong_t mb_used; /* portion used in megabytes */ longlong_t io_pending; /* number of pending I/O */ char active; /* indicates if active (1 if so, 0 if not) */ char automatic; /* indicates if automatic (1 if so, 0 if not) */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_PAGINGSPACE 1 /* Incremented by one for every new release * * of perfstat_pagingspace_t data structure */ } perfstat_pagingspace_t; typedef union { uint w; struct { unsigned pseudo_disk :1; /*Indicates whether pseudo or physical disk */ /* 0 . physical, 1- pseudo disk */ unsigned type_vtd:1; /* 1- Virtual Target Disk, 0 - Others */ unsigned spare :30; /* reserved for future usage */ } b; } perfstat_dktype_t; typedef struct { /* disk information */ char name[IDENTIFIER_LENGTH]; /* name of the disk */ char description[IDENTIFIER_LENGTH]; /* disk description (from ODM) */ char vgname[IDENTIFIER_LENGTH]; /* volume group name (from ODM) */ u_longlong_t size; /* size of the disk (in MB) */ u_longlong_t free; /* free portion of the disk (in MB) */ u_longlong_t bsize; /* disk block size (in bytes) */ u_longlong_t xrate; /* OBSOLETE: xrate capability */ #define __rxfers xrate /* number of transfers from disk */ u_longlong_t xfers; /* number of transfers to/from disk */ u_longlong_t wblks; /* number of blocks written to disk */ u_longlong_t rblks; /* number of blocks read from disk */ u_longlong_t qdepth; /* instantaneous "service" queue depth (number of requests sent to disk and not completed yet) */ u_longlong_t time; /* amount of time disk is active */ char adapter[IDENTIFIER_LENGTH];/* disk adapter name */ uint paths_count; /* number of paths to this disk */ u_longlong_t q_full; /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */ u_longlong_t rserv; /* read or receive service time */ u_longlong_t rtimeout; /* number of read request timeouts */ u_longlong_t rfailed; /* number of failed read requests */ u_longlong_t min_rserv; /* min read or receive service time */ u_longlong_t max_rserv; /* max read or receive service time */ u_longlong_t wserv; /* write or send service time */ u_longlong_t wtimeout; /* number of write request timeouts */ u_longlong_t wfailed; /* number of failed write requests */ u_longlong_t min_wserv; /* min write or send service time */ u_longlong_t max_wserv; /* max write or send service time */ u_longlong_t wq_depth; /* instantaneous wait queue depth * (number of requests waiting to be sent to disk) */ u_longlong_t wq_sampled; /* accumulated sampled dk_wq_depth */ u_longlong_t wq_time; /* accumulated wait queueing time */ u_longlong_t wq_min_time; /* min wait queueing time */ u_longlong_t wq_max_time; /* max wait queueing time */ u_longlong_t q_sampled; /* accumulated sampled dk_q_depth */ cid_t wpar_id; /* WPAR identifier.*/ /* Pad of 3 short is available here*/ u_longlong_t version; /* version number (1, 2, etc.,) */ perfstat_dktype_t dk_type; /* Holds more information about the disk */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_DISK 2 /* Incremented by one for every new release * * of perfstat_disk_t data structure */ } perfstat_disk_t; typedef struct { /* global disk information */ int number; /* total number of disks */ u_longlong_t size; /* total size of all disks (in MB) */ u_longlong_t free; /* free portion of all disks (in MB) */ u_longlong_t xrate; /* __rxfers: total number of transfers from disk */ u_longlong_t xfers; /* total number of transfers to/from disk */ u_longlong_t wblks; /* 512 bytes blocks written to all disks */ u_longlong_t rblks; /* 512 bytes blocks read from all disks */ u_longlong_t time; /* amount of time disks are active */ cid_t wpar_id; /* WPAR identifier.*/ /* Pad of 3 short is available here*/ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t rserv; /* Average read or receive service time */ u_longlong_t min_rserv; /* min read or receive service time */ u_longlong_t max_rserv; /* max read or receive service time */ u_longlong_t rtimeout; /* number of read request timeouts */ u_longlong_t rfailed; /* number of failed read requests */ u_longlong_t wserv; /* Average write or send service time */ u_longlong_t min_wserv; /* min write or send service time */ u_longlong_t max_wserv; /* max write or send service time */ u_longlong_t wtimeout; /* number of write request timeouts */ u_longlong_t wfailed; /* number of failed write requests */ u_longlong_t wq_depth; /* instantaneous wait queue depth * (number of requests waiting to be sent to disk) */ u_longlong_t wq_time; /* accumulated wait queueing time */ u_longlong_t wq_min_time; /* min wait queueing time */ u_longlong_t wq_max_time; /* max wait queueing time */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_DISK_TOTAL 2 /* Incremented by one for every new release * * of perfstat_disk_total_t data structure */ } perfstat_disk_total_t; typedef enum { SCSI, VHOST, FC } adapter_type_t; typedef struct { /* Disk adapter information */ char name[IDENTIFIER_LENGTH]; /* name of the adapter (from ODM)*/ char description[IDENTIFIER_LENGTH]; /* adapter description (from ODM)*/ int number; /* number of disks connected to adapter */ u_longlong_t size; /* total size of all disks (in MB) */ u_longlong_t free; /* free portion of all disks (in MB) */ u_longlong_t xrate; /* __rxfers: total number of reads via adapter */ u_longlong_t xfers; /* total number of transfers via adapter */ u_longlong_t rblks; /* 512 bytes blocks written via adapter */ u_longlong_t wblks; /* 512 bytes blocks read via adapter */ u_longlong_t time; /* amount of time disks are active */ u_longlong_t version; /* version number (1, 2, etc.,) */ adapter_type_t adapter_type; /* 0 ==> SCSI, SAS, other legacy adapter types * 1 ==> Virtual SCSI/SAS Adapter * 2 ==> Fiber Channel Adapter */ u_longlong_t dk_bsize; /* Number of Bytes in a block for this disk*/ u_longlong_t dk_rxfers; /* Number of transfers from disk */ u_longlong_t dk_rserv; /* read or receive service time */ u_longlong_t dk_wserv; /* write or send service time */ u_longlong_t min_rserv; /* Minimum read service time */ u_longlong_t max_rserv; /*Maximum read service time */ u_longlong_t min_wserv; /*Minimum Write service time */ u_longlong_t max_wserv; /*Maximum write service time*/ u_longlong_t wq_depth; /* driver wait queue depth */ u_longlong_t wq_sampled; /* accumulated sampled dk_wq_depth */ u_longlong_t wq_time; /* accumulated wait queueing time */ u_longlong_t wq_min_time; /* minimum wait queueing time */ u_longlong_t wq_max_time; /* maximum wait queueing time */ u_longlong_t q_full; /* "Service" queue full occurrence count (number of times the adapter/devices connected to the adapter is not accepting any more request) */ u_longlong_t q_sampled; /* accumulated sampled */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_DISKADAPTER 3 /* Incremented by one for every new release * * of perfstat_diskadapter_t data structure */ } perfstat_diskadapter_t; typedef struct perfstat_bio_dev { char name[32]; /* Device Name */ dev64_t devid; /* 64bit device id*/ u_longlong_t rbytes; /* Bytes read*/ u_longlong_t wbytes; /* Bytes Written*/ u_longlong_t rerrs; /* Number of read errors*/ u_longlong_t werrs; /* Number of write errors*/ u_longlong_t rtime; /* Aggregate time (reads)*/ u_longlong_t wtime; /* Aggregate time (writes)*/ u_longlong_t nread; /* Number of reads */ u_longlong_t nwrite; /* Number of writes*/ u_longlong_t dev_status; /* Status of device 1 - Available 0 - Unavailable 0xFFFFFFFF0ERRORNO otherwise */ #define GET_DEVERROR(x) ((int)((x<0)?(x & 0x00000000FFFFFFFFLL):0)) } perfstat_bio_dev_t; typedef struct { /* mpio information */ char name[IDENTIFIER_LENGTH]; /* name of the path */ u_longlong_t xrate; /* __rxfers: number of reads via the path */ u_longlong_t xfers; /* number of transfers via the path */ u_longlong_t rblks; /* 512 bytes blocks written via the path */ u_longlong_t wblks; /* 512 bytes blocks read via the path */ u_longlong_t time; /* amount of time disks are active */ char adapter[IDENTIFIER_LENGTH]; /* disk adapter name (from ODM) */ u_longlong_t q_full; /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */ u_longlong_t rserv; /* read or receive service time */ u_longlong_t rtimeout; /* number of read request timeouts */ u_longlong_t rfailed; /* number of failed read requests */ u_longlong_t min_rserv; /* min read or receive service time */ u_longlong_t max_rserv; /* max read or receive service time */ u_longlong_t wserv; /* write or send service time */ u_longlong_t wtimeout; /* number of write request timeouts */ u_longlong_t wfailed; /* number of failed write requests */ u_longlong_t min_wserv; /* min write or send service time */ u_longlong_t max_wserv; /* max write or send service time */ u_longlong_t wq_depth; /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ u_longlong_t wq_sampled; /* accumulated sampled dk_wq_depth */ u_longlong_t wq_time; /* accumulated wait queueing time */ u_longlong_t wq_min_time; /* min wait queueing time */ u_longlong_t wq_max_time; /* max wait queueing time */ u_longlong_t q_sampled; /* accumulated sampled dk_q_depth */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_DISKPATH 1 /* Incremented by one for every new release * * of perfstat_diskpath_t data structure */ } perfstat_diskpath_t; typedef struct {/* tape information */ char name[IDENTIFIER_LENGTH]; /* name of the tape */ char description[IDENTIFIER_LENGTH]; /* tape description (from ODM) */ u_longlong_t size; /* size of the tape (in MB) */ u_longlong_t free; /* free portion of the tape (in MB) */ u_longlong_t bsize; /* tape block size (in bytes) */ u_longlong_t xfers; /* number of transfers to/from tape */ u_longlong_t rxfers; /* number of read transfers to/from tape */ u_longlong_t wblks; /* number of blocks written to tape */ u_longlong_t rblks; /* number of blocks read from tape */ u_longlong_t time; /* amount of time tape is active */ char adapter[IDENTIFIER_LENGTH]; /* tape adapter name */ uint paths_count; /* number of paths to this tape */ u_longlong_t rserv; /* read or receive service time */ u_longlong_t rtimeout; /* number of read request timeouts */ u_longlong_t rfailed; /* number of failed read requests */ u_longlong_t min_rserv; /* min read or receive service time */ u_longlong_t max_rserv; /* max read or receive service time */ u_longlong_t wserv; /* write or send service time */ u_longlong_t wtimeout; /* number of write request timeouts */ u_longlong_t wfailed; /* number of failed write requests */ u_longlong_t min_wserv; /* min write or send service time */ u_longlong_t max_wserv; /* max write or send service time */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_TAPE 1 /* Incremented by one for every new release * * of perfstat_tape_t data structure */ } perfstat_tape_t; typedef struct { /* global tape information */ int number; /* total number of tapes */ u_longlong_t size; /* total size of all tapes (in MB) */ u_longlong_t free; /* free portion of all tapes(in MB) */ u_longlong_t rxfers; /* number of read transfers to/from tape */ u_longlong_t xfers; /* total number of transfers to/from tape */ u_longlong_t wblks; /* 512 bytes blocks written to all tapes */ u_longlong_t rblks; /* 512 bytes blocks read from all tapes */ u_longlong_t time; /* amount of time tapes are active */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_TAPE_TOTAL 1 /* Incremented by one for every new release * * of perfstat_tape_total_t data structure */ }perfstat_tape_total_t; typedef struct { /* Description of the network interface */ char name[IDENTIFIER_LENGTH]; /* name of the interface */ char description[IDENTIFIER_LENGTH]; /* interface description (from ODM, similar to lscfg output) */ uchar type; /* ethernet, tokenring, etc. interpretation can be done using /usr/include/net/if_types.h */ u_longlong_t mtu; /* network frame size */ u_longlong_t ipackets; /* number of packets received on interface */ u_longlong_t ibytes; /* number of bytes received on interface */ u_longlong_t ierrors; /* number of input errors on interface */ u_longlong_t opackets; /* number of packets sent on interface */ u_longlong_t obytes; /* number of bytes sent on interface */ u_longlong_t oerrors; /* number of output errors on interface */ u_longlong_t collisions; /* number of collisions on csma interface */ u_longlong_t bitrate; /* adapter rating in bit per second */ u_longlong_t xmitdrops; /* number of packets not transmitted */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t if_iqdrops; /* Dropped on input, this interface */ u_longlong_t if_arpdrops; /* Dropped because no arp response */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_NETINTERFACE 3 /* Incremented by one for every new release * * of perfstat_netinterface_t data structure */ } perfstat_netinterface_t; typedef struct { /* Description of the network interfaces */ int number; /* number of network interfaces */ u_longlong_t ipackets; /* number of packets received on interface */ u_longlong_t ibytes; /* number of bytes received on interface */ u_longlong_t ierrors; /* number of input errors on interface */ u_longlong_t opackets; /* number of packets sent on interface */ u_longlong_t obytes; /* number of bytes sent on interface */ u_longlong_t oerrors; /* number of output errors on interface */ u_longlong_t collisions; /* number of collisions on csma interface */ u_longlong_t xmitdrops; /* number of packets not transmitted */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_NETINTERFACE_TOTAL 2 /* Incremented by one for every new release * * of perfstat_netinterface_total_t data structure */ } perfstat_netinterface_total_t; typedef enum { NET_PHY, NET_SEA,NET_VIR, NET_HEA, NET_EC, NET_VLAN } netadap_type_t; typedef struct { /* Description of the network and ethernet generic device statistics */ u_longlong_t version; /* version number (1,2, etc) */ char name[IDENTIFIER_LENGTH]; /* name of the adapter */ /* Transmit Statistics */ u_longlong_t tx_packets; /* Transmit Packets on interface*/ u_longlong_t tx_bytes; /* Transmit Bytes on interface */ u_longlong_t tx_interrupts; /* Transfer Interrupts */ u_longlong_t tx_errors; /* Transmit Errors */ u_longlong_t tx_packets_dropped; /* Packets Dropped at the time of Data Transmission */ u_longlong_t tx_queue_size; /* Maximum Packets on Software Transmit Queue */ u_longlong_t tx_queue_len; /* Transmission Queue Length */ u_longlong_t tx_queue_overflow; /* Transmission Queue Overflow */ u_longlong_t tx_broadcast_packets; /* Number of Broadcast Packets Transmitted */ u_longlong_t tx_multicast_packets; /* Number of Multicast packets Transmitted */ u_longlong_t tx_carrier_sense; /* Lost Carrier Sense signal count */ u_longlong_t tx_DMA_underrun; /* Count of DMA Under-runs for Transmission */ u_longlong_t tx_lost_CTS_errors; /* The number of unsuccessful transmissions due to the loss * of the Clear-to-Send signal error */ u_longlong_t tx_max_collision_errors; /* Maximum Collision Errors at Transmission */ u_longlong_t tx_late_collision_errors; /* Late Collision Errors at Transmission */ u_longlong_t tx_deferred; /* The number of packets deferred for Transmission. */ u_longlong_t tx_timeout_errors; /* Time Out Errors for Transmission */ u_longlong_t tx_single_collision_count; /* Count of Single Collision error at Transmission */ u_longlong_t tx_multiple_collision_count; /* Count of Multiple Collision error at Transmission */ /* Receive Statistics */ u_longlong_t rx_packets; /* Receive Packets on interface*/ u_longlong_t rx_bytes; /* Receive Bytes on interface */ u_longlong_t rx_interrupts; /* Receive Interrupts */ u_longlong_t rx_errors; /* Input errors on interface */ u_longlong_t rx_packets_dropped; /* The number of packets accepted by the device driver for transmission * which were not (for any reason) given to the device. */ u_longlong_t rx_bad_packets; /* Count of Bad Packets Received. */ u_longlong_t rx_multicast_packets; /* Number of MultiCast Packets Received */ u_longlong_t rx_broadcast_packets; /* Number of Broadcast Packets Received */ u_longlong_t rx_CRC_errors; /* Count of Packets Received with CRC errors */ u_longlong_t rx_DMA_overrun; /* Count of DMA over-runs for Data Receival. */ u_longlong_t rx_alignment_errors; /* Packets Received with Alignment Error */ u_longlong_t rx_noresource_errors; /* Packets Received with No Resource Errors */ u_longlong_t rx_collision_errors; /* Packets Received with Collision errors */ u_longlong_t rx_packet_tooshort_errors; /* Count of Short Packets Received. */ u_longlong_t rx_packet_toolong_errors; /* Count of Too Long Packets Received. */ u_longlong_t rx_packets_discardedbyadapter; /* Count of Received Packets discarded by Adapter. */ netadap_type_t adapter_type; /* 0 - Physical, 1 - SEA, 2 - Virtual, 3 -HEA */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_NETADAPTER 2 /* Incremented by one for every new release of * perfstat_netadapter_t data structure */ }perfstat_netadapter_t; typedef enum { FC_DOWN, FC_UP } fc_state_t; typedef struct /*Fiber Channel Statistics */ { u_longlong_t version; /* version number (1, 2, etc.,) */ char name[IDENTIFIER_LENGTH]; /* name of the adapter */ fc_state_t state; /* FC Adapter state UP or DOWN */ /* Traffic Statistics */ u_longlong_t InputRequests; /* Number of Input Requests*/ u_longlong_t OutputRequests; /* Number of Output Requests */ u_longlong_t InputBytes; /* Number of Input Bytes */ u_longlong_t OutputBytes; /* Number of Output Bytes */ /* Tranfer Statistics */ u_longlong_t EffMaxTransfer; /* Adapter's Effective Maximum Transfer Value */ /* Driver Statistics */ u_longlong_t NoDMAResourceCnt; /* Count of DMA failures due to no DMA Resource available */ u_longlong_t NoCmdResourceCnt; /* Count of failures to allocate a command due to no command resource available */ /* chba_link Statistics */ int AttentionType; /* Link up or down Indicator */ /* chba Statistics */ u_longlong_t SecondsSinceLastReset; /* Displays the seconds since last reset of the statistics on the adapter.*/ u_longlong_t TxFrames; /* Number of frames transmitted */ u_longlong_t TxWords; /* Fiber Channel Kbytes transmitted */ u_longlong_t RxFrames; /* Number of Frames Received.*/ u_longlong_t RxWords; /* Fiber Channel Kbytes Received */ u_longlong_t LIPCount; /* Count of LIP(Loop Initialization Protocol) Events received in case we have FC-AL * (arbitrated loop - a FC topology) */ u_longlong_t NOSCount; /* Count of NOS(Not_Operational) Events. This indicates a link failure state. * Count is number of times such events occurred. * high level, this just indicates that we lost connection to FC network. */ u_longlong_t ErrorFrames; /* Number of frames received with the CRC Error */ u_longlong_t DumpedFrames; /* Number of lost frames */ u_longlong_t LinkFailureCount; /* Count of Link failures */ u_longlong_t LossofSyncCount; /* Count of loss of sync */ u_longlong_t LossofSignal; /* Count of loss of Signal. */ u_longlong_t PrimitiveSeqProtocolErrCount; /* number of times a primitive sequence was in error. */ u_longlong_t InvalidTxWordCount; /* Count of Invalid Transmission words received */ u_longlong_t InvalidCRCCount; /* Count of CRC Errors in a Received Frame */ /* iocinfo Statistics - IOCINFO ioctl statistics info */ u_longlong_t PortFcId; /* SCSI Id of the adapter */ u_longlong_t PortSpeed; /* Speed of Adapter in GBIT */ char PortType[PERFSTAT_SIZE]; /* Type of connection. The Possible Values are Fabric, Private Loop, Point-to-Point,unknown*/ /* port ODM Statistics*/ u_longlong_t PortWWN; /* World Wide Port name */ u_longlong_t PortSupportedSpeed; /* Supported Port Speed in GBIT */ char adapter_type; /* 0 - Fiber Chanel, * 1 - Virtual Fiber Chanel Adapter */ char vfc_name[IDENTIFIER_LENGTH]; /* name of the Virtual Fiber Chanel(VFC) adapter */ char client_part_name[IDENTIFIER_LENGTH]; /* name of the client partition */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_FCSTAT 2 /* Incremented by one for every new release of * perfstat_fcstat_t data structure */ }perfstat_fcstat_t; typedef struct { /* network buffers */ char name[IDENTIFIER_LENGTH]; /* size in ascii, always power of 2 (ex: "32", "64", "128") */ u_longlong_t inuse; /* number of buffer currently allocated */ u_longlong_t calls; /* number of buffer allocations since last reset */ u_longlong_t delayed; /* number of delayed allocations */ u_longlong_t free; /* number of free calls */ u_longlong_t failed; /* number of failed allocations */ u_longlong_t highwatermark; /* high threshold for number of buffer allocated */ u_longlong_t freed; /* number of buffers freed */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_NETBUFFER 1 /* Incremented by one for every new release * * of perfstat_netbuffer_t data structure */ } perfstat_netbuffer_t; typedef struct { /* utilization of protocols */ char name[IDENTIFIER_LENGTH]; /* ip, ipv6, icmp, icmpv6, udp, tcp, rpc, nfs, nfsv2, nfsv3*/ union{ struct{ u_longlong_t ipackets; /* number of input packets */ u_longlong_t ierrors; /* number of input errors */ u_longlong_t iqueueoverflow; /* number of input queue overflows */ u_longlong_t opackets; /* number of output packets */ u_longlong_t oerrors; /* number of output errors */ } ip; struct{ u_longlong_t ipackets; /* number of input packets */ u_longlong_t ierrors; /* number of input errors */ u_longlong_t iqueueoverflow; /* number of input queue overflows */ u_longlong_t opackets; /* number of output packets */ u_longlong_t oerrors; /* number of output errors */ } ipv6; struct{ u_longlong_t received; /* number of packets received */ u_longlong_t sent; /* number of packets sent */ u_longlong_t errors; /* number of errors */ } icmp; struct{ u_longlong_t received; /* number of packets received */ u_longlong_t sent; /* number of packets sent */ u_longlong_t errors; /* number of errors */ } icmpv6; struct{ u_longlong_t ipackets; /* number of input packets */ u_longlong_t ierrors; /* number of input errors */ u_longlong_t opackets; /* number of output packets */ u_longlong_t no_socket; /* number of packets dropped due to no socket */ } udp; struct{ u_longlong_t ipackets; /* number of input packets */ u_longlong_t ierrors; /* number of input errors */ u_longlong_t opackets; /* number of output packets */ u_longlong_t initiated; /* number of connections initiated */ u_longlong_t accepted; /* number of connections accepted */ u_longlong_t established; /* number of connections established */ u_longlong_t dropped; /* number of connections dropped */ } tcp; struct{ struct{ struct{ u_longlong_t calls; /* total NFS client RPC connection-oriented calls */ u_longlong_t badcalls; /* rejected NFS client RPC calls */ u_longlong_t badxids; /* bad NFS client RPC call responses */ u_longlong_t timeouts; /* timed out NFS client RPC calls with no reply */ u_longlong_t newcreds; /* total NFS client RPC authentication refreshes */ u_longlong_t badverfs; /* total NFS client RPC bad verifier in response */ u_longlong_t timers; /* NFS client RPC timout greater than timeout value */ u_longlong_t nomem; /* NFS client RPC calls memory allocation failure */ u_longlong_t cantconn; /* failed NFS client RPC calls */ u_longlong_t interrupts;/* NFS client RPC calls fail due to interrupt */ } stream; /* connection oriented rpc client */ struct{ u_longlong_t calls; /* total NFS client RPC connectionless calls */ u_longlong_t badcalls; /* rejected NFS client RPC calls */ u_longlong_t retrans; /* retransmitted NFS client RPC calls */ u_longlong_t badxids; /* bad NFS client RPC call responses */ u_longlong_t timeouts; /* timed out NFS client RPC calls with no reply */ u_longlong_t newcreds; /* total NFS client RPC authentication refreshes */ u_longlong_t badverfs; /* total NFS client RPC bad verifier in response */ u_longlong_t timers; /* NFS client RPC timout greater than timeout value */ u_longlong_t nomem; /* NFS client RPC calls memory allocation failure */ u_longlong_t cantsend; /* NFS client RPC calls not sent */ } dgram; /* connection less rpc client */ } client; /* rpc client */ struct{ struct{ u_longlong_t calls; /* total NFS server RPC connection-oriented requests */ u_longlong_t badcalls; /* rejected NFS server RPC requests */ u_longlong_t nullrecv; /* NFS server RPC calls failed due to unavailable packet */ u_longlong_t badlen; /* NFS server RPC requests failed due to bad length */ u_longlong_t xdrcall; /* NFS server RPC requests failed due to bad header */ u_longlong_t dupchecks;/* NFS server RPC calls found in request cache */ u_longlong_t dupreqs; /* total NFS server RPC call duplicates */ } stream; /* connection oriented rpc server */ struct{ u_longlong_t calls; /* total NFS server RPC connectionless requests */ u_longlong_t badcalls; /* rejected NFS server RPC requests */ u_longlong_t nullrecv; /* NFS server RPC calls failed due to unavailable packet */ u_longlong_t badlen; /* NFS server RPC requests failed due to bad length */ u_longlong_t xdrcall; /* NFS server RPC requests failed due to bad header */ u_longlong_t dupchecks;/* NFS server RPC calls found in request cache */ u_longlong_t dupreqs; /* total NFS server RPC call duplicates */ } dgram; /* connection less rpc server */ } server; /* rpc server*/ } rpc; struct{ struct{ u_longlong_t calls; /* total NFS client requests */ u_longlong_t badcalls; /* total NFS client failed calls */ u_longlong_t clgets; /* total number of client nfs clgets */ u_longlong_t cltoomany;/* total number of client nfs cltoomany */ } client; /* nfs client */ struct{ u_longlong_t calls; /* total NFS server requests */ u_longlong_t badcalls; /* total NFS server failed calls */ u_longlong_t public_v2; /* total number of nfs version 2 server calls */ u_longlong_t public_v3; /* total number of nfs version 3 server calls */ } server; /* nfs server */ } nfs; struct{ struct{ u_longlong_t calls; /* NFS V2 client requests */ u_longlong_t null; /* NFS V2 client null requests */ u_longlong_t getattr; /* NFS V2 client getattr requests */ u_longlong_t setattr; /* NFS V2 client setattr requests */ u_longlong_t root; /* NFS V2 client root requests */ u_longlong_t lookup; /* NFS V2 client file name lookup requests */ u_longlong_t readlink; /* NFS V2 client readlink requests */ u_longlong_t read; /* NFS V2 client read requests */ u_longlong_t writecache;/* NFS V2 client write cache requests */ u_longlong_t write; /* NFS V2 client write requests */ u_longlong_t create; /* NFS V2 client file creation requests */ u_longlong_t remove; /* NFS V2 client file removal requests */ u_longlong_t rename; /* NFS V2 client file rename requests */ u_longlong_t link; /* NFS V2 client link creation requests */ u_longlong_t symlink; /* NFS V2 client symbolic link creation requests */ u_longlong_t mkdir; /* NFS V2 client directory creation requests */ u_longlong_t rmdir; /* NFS V2 client directory removal requests */ u_longlong_t readdir; /* NFS V2 client read-directory requests */ u_longlong_t statfs; /* NFS V2 client file stat requests */ } client; /* nfs2 client */ struct{ u_longlong_t calls; /* NFS V2 server requests */ u_longlong_t null; /* NFS V2 server null requests */ u_longlong_t getattr; /* NFS V2 server getattr requests */ u_longlong_t setattr; /* NFS V2 server setattr requests */ u_longlong_t root; /* NFS V2 server root requests */ u_longlong_t lookup; /* NFS V2 server file name lookup requests */ u_longlong_t readlink; /* NFS V2 server readlink requests */ u_longlong_t read; /* NFS V2 server read requests */ u_longlong_t writecache;/* NFS V2 server cache requests */ u_longlong_t write; /* NFS V2 server write requests */ u_longlong_t create; /* NFS V2 server file creation requests */ u_longlong_t remove; /* NFS V2 server file removal requests */ u_longlong_t rename; /* NFS V2 server file rename requests */ u_longlong_t link; /* NFS V2 server link creation requests */ u_longlong_t symlink; /* NFS V2 server symbolic link creation requests */ u_longlong_t mkdir; /* NFS V2 server directory creation requests */ u_longlong_t rmdir; /* NFS V2 server directory removal requests */ u_longlong_t readdir; /* NFS V2 server read-directory requests */ u_longlong_t statfs; /* NFS V2 server file stat requests */ } server; /* nfsv2 server */ } nfsv2; struct{ struct{ u_longlong_t calls; /* NFS V3 client calls */ u_longlong_t null; /* NFS V3 client null requests */ u_longlong_t getattr; /* NFS V3 client getattr requests */ u_longlong_t setattr; /* NFS V3 client setattr requests */ u_longlong_t lookup; /* NFS V3 client file name lookup requests */ u_longlong_t access; /* NFS V3 client access requests */ u_longlong_t readlink; /* NFS V3 client readlink requests */ u_longlong_t read; /* NFS V3 client read requests */ u_longlong_t write; /* NFS V3 client write requests */ u_longlong_t create; /* NFS V3 client file creation requests */ u_longlong_t mkdir; /* NFS V3 client directory creation requests */ u_longlong_t symlink; /* NFS V3 client symbolic link creation requests */ u_longlong_t mknod; /* NFS V3 client mknod creation requests */ u_longlong_t remove; /* NFS V3 client file removal requests */ u_longlong_t rmdir; /* NFS V3 client directory removal requests */ u_longlong_t rename; /* NFS V3 client file rename requests */ u_longlong_t link; /* NFS V3 client link creation requests */ u_longlong_t readdir; /* NFS V3 client read-directory requests */ u_longlong_t readdirplus; /* NFS V3 client read-directory plus requests */ u_longlong_t fsstat; /* NFS V3 client file stat requests */ u_longlong_t fsinfo; /* NFS V3 client file info requests */ u_longlong_t pathconf; /* NFS V3 client path configure requests */ u_longlong_t commit; /* NFS V3 client commit requests */ } client; /* nfsv3 client */ struct{ u_longlong_t calls; /* NFS V3 server requests */ u_longlong_t null; /* NFS V3 server null requests */ u_longlong_t getattr; /* NFS V3 server getattr requests */ u_longlong_t setattr; /* NFS V3 server setattr requests */ u_longlong_t lookup; /* NFS V3 server file name lookup requests */ u_longlong_t access; /* NFS V3 server file access requests */ u_longlong_t readlink; /* NFS V3 server readlink requests */ u_longlong_t read; /* NFS V3 server read requests */ u_longlong_t write; /* NFS V3 server write requests */ u_longlong_t create; /* NFS V3 server file creation requests */ u_longlong_t mkdir; /* NFS V3 server director6 creation requests */ u_longlong_t symlink; /* NFS V3 server symbolic link creation requests */ u_longlong_t mknod; /* NFS V3 server mknode creation requests */ u_longlong_t remove; /* NFS V3 server file removal requests */ u_longlong_t rmdir; /* NFS V3 server directory removal requests */ u_longlong_t rename; /* NFS V3 server file rename requests */ u_longlong_t link; /* NFS V3 server link creation requests */ u_longlong_t readdir; /* NFS V3 server read-directory requests */ u_longlong_t readdirplus; /* NFS V3 server read-directory plus requests */ u_longlong_t fsstat; /* NFS V3 server file stat requests */ u_longlong_t fsinfo; /* NFS V3 server file info requests */ u_longlong_t pathconf; /* NFS V3 server path configure requests */ u_longlong_t commit; /* NFS V3 server commit requests */ } server; /* nfsv3 server */ } nfsv3; struct { struct { u_longlong_t operations; /* NFS V4 client operations */ u_longlong_t null; /* NFS V4 client null operations */ u_longlong_t getattr; /* NFS V4 client getattr operations */ u_longlong_t setattr; /* NFS V4 client setattr operations */ u_longlong_t lookup; /* NFS V4 client lookup operations */ u_longlong_t access; /* NFS V4 client access operations */ u_longlong_t readlink; /* NFS V4 client read link operations */ u_longlong_t read; /* NFS V4 client read operations */ u_longlong_t write; /* NFS V4 client write operations */ u_longlong_t create; /* NFS V4 client create operations */ u_longlong_t mkdir; /* NFS V4 client mkdir operations */ u_longlong_t symlink; /* NFS V4 client symlink operations */ u_longlong_t mknod; /* NFS V4 client mknod operations */ u_longlong_t remove; /* NFS V4 client remove operations */ u_longlong_t rmdir; /* NFS V4 client rmdir operations */ u_longlong_t rename; /* NFS V4 client rename operations */ u_longlong_t link; /* NFS V4 client link operations */ u_longlong_t readdir; /* NFS V4 client readdir operations */ u_longlong_t statfs; /* NFS V4 client statfs operations */ u_longlong_t finfo; /* NFS V4 client file info operations */ u_longlong_t commit; /* NFS V4 client commit operations */ u_longlong_t open; /* NFS V4 client open operations */ u_longlong_t open_confirm; /* NFS V4 client open confirm operations */ u_longlong_t open_downgrade; /* NFS V4 client open downgrade operations */ u_longlong_t close; /* NFS V4 client close operations */ u_longlong_t lock; /* NFS V4 client lock operations */ u_longlong_t unlock; /* NFS V4 client unlock operations */ u_longlong_t lock_test; /* NFS V4 client lock test operations */ u_longlong_t set_clientid; /* NFS V4 client set client id operations */ u_longlong_t renew; /* NFS V4 client renew operations */ u_longlong_t client_confirm;/* NFS V4 client confirm operations */ u_longlong_t secinfo; /* NFS V4 client secinfo operations */ u_longlong_t release_lock; /* NFS V4 client release lock operations */ u_longlong_t replicate; /* NFS V4 client replicate operations */ u_longlong_t pcl_stat; /* NFS V4 client pcl_stat operations */ u_longlong_t acl_stat_l; /* NFS V4 client acl_stat long operations */ u_longlong_t pcl_stat_l; /* NFS V4 client pcl_stat long operations */ u_longlong_t acl_read; /* NFS V4 client acl_read operations */ u_longlong_t pcl_read; /* NFS V4 client pcl_read operations */ u_longlong_t acl_write; /* NFS V4 client acl_write operations */ u_longlong_t pcl_write; /* NFS V4 client pcl_write operations */ u_longlong_t delegreturn; /* NFS V4 client delegreturn operations */ } client; /* nfsv4 client*/ struct { u_longlong_t null; /* NFS V4 server null calls */ u_longlong_t compound; /* NFS V4 server compound calls */ u_longlong_t operations; /* NFS V4 server operations */ u_longlong_t access; /* NFS V4 server access operations */ u_longlong_t close; /* NFS V4 server close operations */ u_longlong_t commit; /* NFS V4 server commit operations */ u_longlong_t create; /* NFS V4 server create operations */ u_longlong_t delegpurge; /* NFS V4 server del_purge operations */ u_longlong_t delegreturn; /* NFS V4 server del_ret operations */ u_longlong_t getattr; /* NFS V4 server getattr operations */ u_longlong_t getfh; /* NFS V4 server getfh operations */ u_longlong_t link; /* NFS V4 server link operations */ u_longlong_t lock; /* NFS V4 server lock operations */ u_longlong_t lockt; /* NFS V4 server lockt operations */ u_longlong_t locku; /* NFS V4 server locku operations */ u_longlong_t lookup; /* NFS V4 server lookup operations */ u_longlong_t lookupp; /* NFS V4 server lookupp operations */ u_longlong_t nverify; /* NFS V4 server nverify operations */ u_longlong_t open; /* NFS V4 server open operations */ u_longlong_t openattr; /* NFS V4 server openattr operations */ u_longlong_t open_confirm; /* NFS V4 server confirm operations */ u_longlong_t open_downgrade; /* NFS V4 server downgrade operations */ u_longlong_t putfh; /* NFS V4 server putfh operations */ u_longlong_t putpubfh; /* NFS V4 server putpubfh operations */ u_longlong_t putrootfh; /* NFS V4 server putrotfh operations */ u_longlong_t read; /* NFS V4 server read operations */ u_longlong_t readdir; /* NFS V4 server readdir operations */ u_longlong_t readlink; /* NFS V4 server readlink operations */ u_longlong_t remove; /* NFS V4 server remove operations */ u_longlong_t rename; /* NFS V4 server rename operations */ u_longlong_t renew; /* NFS V4 server renew operations */ u_longlong_t restorefh; /* NFS V4 server restorefh operations */ u_longlong_t savefh; /* NFS V4 server savefh operations */ u_longlong_t secinfo; /* NFS V4 server secinfo operations */ u_longlong_t setattr; /* NFS V4 server setattr operations */ u_longlong_t set_clientid; /* NFS V4 server setclid operations */ u_longlong_t clientid_confirm; /* NFS V4 server clid_cfm operations */ u_longlong_t verify; /* NFS V4 server verify operations */ u_longlong_t write; /* NFS V4 server write operations */ u_longlong_t release_lock; /* NFS V4 server release_lo operations */ } server; /* nfsv4 server*/ } nfsv4; } u; u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_PROTOCOL 1 /* Incremented by one for every new release * * of perfstat_protocol_t data structure */ } perfstat_protocol_t; typedef struct { /* logical volume data */ char name[IDENTIFIER_LENGTH]; /* logical volume name */ char vgname[IDENTIFIER_LENGTH]; /* volume group name */ u_longlong_t open_close; /* LVM_QLVOPEN, etc. (see lvm.h) */ u_longlong_t state; /* LVM_UNDEF, etc. (see lvm.h) */ u_longlong_t mirror_policy; /* LVM_PARALLEL, etc. (see lvm.h) */ u_longlong_t mirror_write_consistency;/* LVM_CONSIST, etc. (see lvm.h) */ u_longlong_t write_verify; /* LVM_VERIFY, etc. (see lvm.h) */ u_longlong_t ppsize; /* physical partition size in MB */ u_longlong_t logical_partitions; /* total number of logical paritions configured for this logical volume */ ushort mirrors; /* number of physical mirrors for each logical partition */ u_longlong_t iocnt; /* Number of read and write requests */ u_longlong_t kbreads; /*Number of Kilobytes read*/ u_longlong_t kbwrites; /*Number of Kilobytes written*/ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_LOGICALVOLUME 1 /* Incremented by one for every new release * * of perfstat_logicalvolume_t data structure */ } perfstat_logicalvolume_t; typedef struct { /* volume group data */ char name[IDENTIFIER_LENGTH]; /* volume group name */ u_longlong_t total_disks; /* number of physical volumes in the volume group */ u_longlong_t active_disks; /* number of active physical volumes in the volume group */ u_longlong_t total_logical_volumes; /* number of logical volumes in the volume group */ u_longlong_t opened_logical_volumes;/* number of logical volumes opened in the volume group */ u_longlong_t iocnt; /*Number of read and write requests*/ u_longlong_t kbreads; /*Number of Kilobytes read*/ u_longlong_t kbwrites; /*Number of Kilobytes written*/ u_longlong_t version; /* version number (1, 2, etc.,) */ unsigned char variedState; /* Indicates volume group available or not */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_VOLUMEGROUP 2 /* Incremented by one for every new release * * of perfstat_volumegroup_t data structure */ } perfstat_volumegroup_t; /* Data structures for cluster aware perfstat library */ typedef struct { /* Node Identifier */ u_longlong_t nodeid; /* NODE ID */ char nodename[MAXHOSTNAMELEN]; /* NODE NAME */ u_longlong_t version; /* version number (1, 2, etc.,) */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_NODE 1 /* Incremented by one for every new release * * of perfstat_node_t data structure */ } perfstat_node_t; typedef struct { /* multicast group information */ sa_family_t the_family; in_port_t the_port; union { struct ip_mreq ip_mreq4; struct ipv6_mreq ip_mreq6; } ip_mreq; } perfstat_multicast_addr_t; typedef struct { /* IP Address */ sa_family_t the_family; union { struct in_addr ip4; struct in6_addr ip6; } ip; } perfstat_ip_addr_t; typedef union { /* State of the node */ uint w; struct { unsigned is_up :1; /* State is UP */ unsigned is_down :1; /* State is DOWN */ unsigned is_down_not_posted :1; /* State is DOWN, BUT NOT POSTED TO CLUSTER */ unsigned is_deleted :1; /* State is DELETED */ unsigned is_joined :1; /* State is JOINED */ unsigned spare :27; /* reserved for future usage */ } b; } perfstat_node_status_t; typedef struct { /* cluster node details */ char name[MAXHOSTNAMELEN]; /* Name of the node */ u_longlong_t shorthand_id; /* Cluster shorthand ID for the node */ perfstat_node_status_t status; /* State of the node */ uint num_clusters; /* Number of clusters node is a member in */ uint num_zones; /* Number of zones node is a member in */ uint num_points_of_contact; /* Number of interfaces node has communicated on */ perfstat_ip_addr_t net_addr; /* Primary IP Address of the node */ } perfstat_node_data_t; typedef union { /* cluster disk status details */ uint w; struct { unsigned is_found :1; /* cluster disk not found. */ unsigned is_ready :1; /* cluster disk not ready. */ unsigned spare :30; /* reserved for future usage */ } b; } perfstat_disk_status_t; #define ATTRVALSIZE 256 /* Size of the Disk uuid */ typedef struct { /* cluster disk data details */ char name[IDENTIFIER_LENGTH]; /* name of the disk */ dev64_t cluster_dev_t; /* dev_t of the disk in the cluster */ char uuid[ATTRVALSIZE]; /* disk uuids */ perfstat_disk_status_t status; /* status of the disk */ char udid[ATTRVALSIZE]; /* disk udid */ } perfstat_disk_data_t; typedef union { uint w; struct { unsigned is_local :1; /* Cluster type is LOCAL */ unsigned is_zone :1; /* Cluster type is ZONE */ unsigned is_link :1; /* Cluster type is LINK */ unsigned spare :29; /* reserved for future usage */ } b; } perfstat_cluster_type_t; typedef struct { /* cluster total information */ char name[MAXHOSTNAMELEN]; /* name of the cluster */ perfstat_cluster_type_t type; /* set of bits describing the cluster */ uint num_nodes; /* number of nodes in the cluster */ perfstat_node_data_t *node_data; /* Contains node details * * Can be either NULL or (sizeof_node_data * total number of nodes) * * NOTE: Memory need to be allocated by the user */ uint sizeof_node_data; /* Equals sizeof(perfstat_node_data_t) * * NOTE: To be filled in by the user */ uint num_disks; /* number of disks in the cluster */ perfstat_disk_data_t *disk_data; /* Contains disk details * * Can be either NULL or (sizeof_disk_data * desired number of disks) * * NOTE: Memory need to be allocated by the user */ uint sizeof_disk_data; /* Equals sizeof(perfstat_disk_data_t) * * NOTE: To be filled in by the user */ u_longlong_t version; /* version number (1, 2, etc.,) for perfstat_cluster_total_t structure */ u_longlong_t node_data_version; /* version number (1, 2, etc.,) for perfstat_node_data_t structure */ u_longlong_t disk_data_version; /* version number (1, 2, etc.,) for perfstat_disk_data_t structure */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_NODE_DATA 1 /* Incremented by one for every new release * * of perfstat_node_data_t data structure */ #define CURR_VERSION_DISK_DATA 2 /* Incremented by one for every new release * * of perfstat_disk_data_t data structure */ #define CURR_VERSION_CLUSTER_TOTAL 1 /* Incremented by one for every new release * * of perfstat_cluster_total_t data structure */ } perfstat_cluster_total_t; /* Host Fabric Interface (HFI) performance counters */ typedef struct { /* non-window based (Aggregate) Counters */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t hfiid; /* Host Fabric Interface Identifier (0, 1, ...) */ /* ISR (Integrated Switch Router) * * Performance Counters */ u_longlong_t cycles_blocked_sending; /* Cycles Blocked From Sending (64 bit counter) */ /* This counter increments every 2 or 3 GHz chip cycle * * that a waiting flit cannot be sent over the link. */ u_longlong_t flits_sent; /* Flits Sent (64 bit counter) */ /* Similar to the cycles blocked counter except this one increments * * each time a flit header passes over the corresponding ISR interface. */ u_longlong_t flits_dropped; /* Flits Dropped (40 bit counter) */ /* Flits are dropped and counted whenever certain events happen like * * 1. a Port?s Link Status bit is off * 2. the ISR ID is not valid, etc., */ u_longlong_t link_retries; /* Link Level Retries (24 bit counter) */ /* This counter increments each time a flit is removed from the link * * replay buffer and sent over the link again due to an error. */ /* HFI (Host Fabric Interface) * * Aggregate Performance Counters */ u_longlong_t pkts_sent; /* Aggregate Packet Sent Count (56 bit counter) */ /* Count of packets sent to the cluster network, regardless of window. * * Increments whenever a Packet Sent Count from any window increments. */ u_longlong_t pkts_dropped_sending; /* Aggregate Packet Dropped from Sending Count (56 bit counter) */ /* Count of packets from a Send FIFO, but dropped (not sent), * * regardless of window */ u_longlong_t pkts_received; /* Aggregate Packet Receive Count (56 bit counter) */ /* Count of packets successfully received from the cluster * * network, regardless of window. Increments whenever a * * Packet Received Count from any window increments. */ u_longlong_t pkts_dropped_receiving; /* Aggregate Packet Dropped from Receive Count (56 bit counter) */ /* Count of packets from the ISR, but dropped (not receive), * * regardless of window */ u_longlong_t immediate_send_pkt_count; /* Aggregate Immediate Send Packet Sent Count (56 bit counter) */ /* Count of Immediate Send packets sent, regardless of window */ u_longlong_t send_recv_pkt_count; /* Aggregate Send/Rcv Packet Send Count (56 bit counter) */ /* Count of Send/Receive packets sent from the Send FIFO, * * regardless of window. Immediate Sends are not counted here. */ u_longlong_t fullRDMA_sent_count; /* Aggregate Full-RDMA Packet Sent Count (56 bit counter) */ /* Count of Full-RDMA packets sent, regardless of window. */ u_longlong_t halfRDMA_sent_count; /* Aggregate Half-RDMA Packet Sent Count (56 bit counter) */ /* Count of Half-RDMA packets sent, regardless of window. * * Doesn?t increment for notifications */ u_longlong_t smallRDMA_sent_count; /* Aggregate Small-RDMA Packet Sent Count (56 bit counter) */ /* Count of Small-RDMA packets sent, regardless of window. * * Doesn?t increment for notifications. */ u_longlong_t ip_pkt_sent_count; /* Aggregate IP Packet Sent Count (56 bit counter) */ /* Count of IP packets sent, regardless of window */ u_longlong_t cau_pkt_sent_count; /* Aggregate CAU Packet Sent Count (56 bit counter) */ /* Count of CAU packets sent, regardless of window */ u_longlong_t gups_pkt_sent_count; /* Aggregate GUPS Packet Sent Count (56 bit counter) */ /* Count of GUPS packets sent, regardless of window */ u_longlong_t addr_xlat_wait_count; /* Addr Xlat Wait Count (56 bit counter) */ /* Incremented any time a translation miss is pending. * * Write of any value clears this register */ /* nMMU (Nest Memory Management Unit)* * Statistics */ u_longlong_t mmu_cache_hits; /* nMMU Cache hits */ u_longlong_t mmu_cache_misses; /* nMMU Cache misses */ u_longlong_t mmu_atlb_hits; /* nMMU ATLB (Address Translation Buffer) hits */ u_longlong_t mmu_atlb_misses; /* nMMU ATLB (Address Translation Buffer) misses */ /* CAU (Collectives Acceleration Unit)* * Non-indexed Counter */ u_longlong_t cycles_waiting_on_a_credit; /* Cycles waiting on credit */ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_HFISTAT 1 /* Incremented by one for every new release * * of perfstat_hfistat_t data structure */ } perfstat_hfistat_t; typedef struct { /* Host Fabric Interface (HFI) window based counters */ u_longlong_t version; /* version number (1, 2, etc.,) */ u_longlong_t hfiid; /* Host Fabric Interface Identifier (0, 1, ...) */ u_longlong_t windowid; /* Window number (0, 1, 2 ...) */ u_longlong_t pkts_sent; /* Packet Sent Count (56 bit counter) */ /* Count of packets successfully sent to the cluster network (includes * * packets sent to the same HFI by sending them to the cluster * network, where they are wrapped-back). */ u_longlong_t pkts_dropped_sending; /* Packet Dropped from Sending Count (40 bit counter) */ /* Count of packets from a Send FIFO that were dropped (not sent). */ u_longlong_t pkt_indicated_send_count; /* Packet-Indicated Sent Count (56 bit counter) */ /* Increments whenever a packet is sent that has the * Packet-Indicated-Count bit in the header set. */ u_longlong_t immediate_send_pkt_count; /* Immed Send Packet Count (56 bit counter) */ u_longlong_t pkts_received; /* Packet Received Count (56 bit counter) */ /* Count of packets successfully received from the cluster network * * (includes packets received from the same HFI, * * which were wrapped-back by the cluster network). */ u_longlong_t pkts_dropped_receiving; /* Packet Dropped from Receiving Count (40 bit counter) */ /* Count of packets from the ISR that were dropped (not received). */ u_longlong_t pkt_indicated_rcv_count; /* Packet-Indicated Receive Count (56 bit counter) */ /* Increments whenever a packet is receive that has the * * Packet-Indicated-Count bit in the header set, but before the * * packet is written to memory. */ /* >>> END OF STRUCTURE DEFINITION <<< */ #define CURR_VERSION_HFISTAT_WINDOW 1 /* Incremented by one for every new release * * of perfstat_hfistat_window_t data structure */ } perfstat_hfistat_window_t; typedef enum { SSPGLOBAL= 1, SSPDISK, SSPVTD, SSPTIER, SSPFG, SSPPV, SSPNODE } ssp_flag_t; typedef struct { char diskname[CLUSTERNAMELN]; /* Contains Disk and VTD names */ char udid[ATTRVALSIZE]; /* disk udids */ unsigned long long capacity;/*Capacity of the physical volume*/ char tiername[VIOS_STR_128]; /*Tier name to which this physical volume belongs to */ char fgname[VIOS_STR_128]; /*Failure Group Name to which the physical volume belongs to */ unsigned long long fgid;/*Failure Group ID to which the physical volume belongs to */ unsigned long long tierid; /*Tier ID to which the physical volume belongs to */ unsigned long long free; }perfstat_ssp_disk_data_t; typedef struct { char tiername[VIOS_STR_128]; /*Tier Name*/ unsigned long long tierid; /*Tier ID */ }perfstat_ssp_tier_t; typedef struct { char fgname[VIOS_STR_128]; /*Failure Group Name*/ unsigned long long fgid; /*Failure Group ID */ char tiername[VIOS_STR_128]; /*Tier name to which failure group belong to */ unsigned long long tierid; /*Tier Id to which this failure group belongs to*/ }perfstat_ssp_fg_t; typedef struct { uint poolstatus; char hostname[MAXHOSTNAMELEN]; char mtms[VIOS_STR_256]; char ip[MAXHOSTNAMELEN]; uint lparid; char ioslevel[VIOS_STR_256]; uint status; }perfstat_ssp_node_t; typedef struct { /* SSP (Shared Storage Pool ) Information */ u_longlong_t version; /* version number (1, 2, etc.,) */ char cluster_name[CLUSTERNAMELN]; /* Name of the Cluster */ char spool_name[POOLNAME]; /* Name of the Storage Pool */ union { struct { u_longlong_t total_space; /* Total Space */ u_longlong_t total_used_space; /* Total Used Space */ }global; perfstat_ssp_disk_data_t disk; struct { char vtd_name[IDENTIFIER_LENGTH]; /* Contains the vtd name */ char lu_name[IDENTIFIER_LENGTH]; /* Contains the logical unit name */ char lu_type[IDENTIFIER_LENGTH]; /* Contains logical unit type */ u_longlong_t lu_size; /* Size of the logical unit */ u_longlong_t lu_free; /* Free space available in logical unit */ u_longlong_t lu_usage; /* Physical usage of logical unit in mb */ int client_id; /* VIO Client ID */ char mtm[128]; /* Machine Type Model(MTM)*/ char drcname[VIOS_STR_256];/*Virtual Host Adapter DRCNAME*/ char lu_udid[VIOS_UDID_LENGTH]; /*Unique Device identifier */ }vtd; perfstat_ssp_tier_t tier; /*Tier Data */ perfstat_ssp_fg_t fg;/*Failure Group Data */ perfstat_ssp_node_t node; }u ; char poolid[VIOS_STR_128]; char clusterid[VIOS_STR_128]; /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_SSP 2 /* Incremented by one for every new release of * perfstat_ssp_t data structure */ } perfstat_ssp_t; #define HYP_NAME_MAX_LEN 64 typedef struct { u_longlong_t count; /* total calls */ u_longlong_t tics; /* total TB tics in call */ u_longlong_t max_tics; /* longest call */ char name[HYP_NAME_MAX_LEN]; /* hypervisor call name */ u_longlong_t version; /* version number (1, 2, etc.,)*/ /* >>>>> END OF STRUCTURE DEFINITION <<<<< */ #define CURR_VERSION_HYPERSTAT 1 /* Incremented by one for every new release * * of perfstat_hyperstat_t data structure */ } perfstat_hyperstat_t; /* This enum contains name of all valid hypervisor calls, any new hypervisor call name should be added to this in the order same as struture hcall_stats*/ typedef enum { hyp_remove, hyp_read, hyp_nclear_mod, hyp_page_init, hyp_clear_ref, hyp_protect, hyp_put_tce, hyp_h_put_tce_indirect , hyp_xirr, hyp_eoi, hyp_ipi, hyp_cppr, hyp_asr, hyp_others, hyp_cede, hyp_enter, hyp_migrate_dma, hyp_put_rtce, hyp_confer, hyp_prod, hyp_get_ppp, hyp_set_ppp, hyp_purr, hyp_pic, hyp_bulk_remove, hyp_send_crq, hyp_copy_rdma, hyp_get_tce, hyp_send_logical_lan, hyp_add_logical_lan_buf, hyp_h_remove_rtce, hyp_h_ipoll, hyp_h_stuff_tce, hyp_h_get_mpp, hyp_h_set_mpp, hyp_h_get_mpp_x, hyp_h_get_em_parms, hyp_h_vpm_pstat, hyp_h_hfi_start_interface, hyp_h_hfi_stop_interface, hyp_h_hfi_query_interface, hyp_h_hfi_query_window, hyp_h_hfi_open_window, hyp_h_hfi_close_window, hyp_h_hfi_dump_info, hyp_h_hfi_adapter_attach, hyp_h_hfi_modify_rcxt, hyp_h_hfi_route_info, hyp_h_cau_write_index, hyp_h_cau_read_index, hyp_h_nmmu_start, hyp_h_nmmu_stop, hyp_h_nmmu_allocate_resource, hyp_h_nmmu_free_resource, hyp_h_nmmu_modify_resource, hyp_h_confer_adjunct, hyp_h_adjunct_mode, hyp_h_get_ppp_x, hyp_h_cop_op, hyp_h_stop_cop_op, hyp_h_random, hyp_h_enter_decomp, hyp_h_remove_comp, hyp_h_xirr_x, hyp_h_get_perf_info, hyp_h_block_remove, hyp_h_get_24x7_cat_page, hyp_h_get_24x7_data, hyp_h_attach_ca_process, hyp_h_detach_ca_process, hyp_h_control_ca_function, hyp_h_control_ca_faults, hyp_h_collect_ca_int_info, hyp_h_download_ca_function, hyp_h_download_ca_facility, hyp_h_clean_slb, hyp_h_invalidate_pid, hyp_h_register_process_table, hyp_h_put_rtce_indirect, hyp_h_get_vf_info_stat, hyp_h_modify_vas_window_stat, hyp_h_query_vas_window_stat, hyp_h_get_vas_fault_stat, hyp_h_user_mode_cop_op_stat, hyp_h_reg_crq_stat, hyp_h_free_crq_stat, hyp_h_read_rdma_stat, hyp_h_write_rdma_stat, hyp_h_free_logical_lan_buffer_stat, hyp_h_reg_sub_crq_stat, hyp_h_free_sub_crq_stat, hyp_h_send_sub_crq_stat, hyp_h_send_sub_crq_indirect_stat, MAXHCALL } hyp_name_t; typedef struct { /* structure element identifier */ int name_id; /* Hypervisor call name. If this is set to -1, then hypervisor call stats for the all hypervisor call will be collected otherwise hypervisor call stats for the Hypervisor call name mentioned here only will be displayed */ } perfstat_hyperstat_id_t; /*Array Hyp_Name contains all the valid hcall name, any new entry to hcall name should be added to this array in the order same as structure hcall_stats */ char *Hyp_Name[] = {"remove", "read", "nclear_mod", "page_init", "clear_ref", "protect", "put_tce", "h_put_tce_indirect", "xirr", "eoi", "ipi", "cppr", "asr", "others", "cede", "enter", "migrate_dma", "put_rtce", "confer", "prod", "get_ppp", "set_ppp", "purr", "pic", "bulk_remove", "send_crq", "copy_rdma", "get_tce", "send_logical_lan", "add_logical_lan_buf", "h_remove_rtce", "h_ipoll", "h_stuff_tce", "h_get_mpp", "h_set_mpp", "h_get_mpp_x", "h_get_em_parms", "h_vpm_pstat", "h_hfi_start_interface", "h_hfi_stop_interface", "h_hfi_query_interface", "h_hfi_query_window", "h_hfi_open_window", "h_hfi_close_window", "h_hfi_dump_info", "h_hfi_adapter_attach", "h_hfi_modify_rcxt", "h_hfi_route_info", "h_cau_write_index", "h_cau_read_index", "h_nmmu_start", "h_nmmu_stop", "h_nmmu_allocate_resource", "h_nmmu_free_resource", "h_nmmu_modify_resource", "h_confer_adjunct", "h_adjunct_mode", "h_get_ppp_x", "h_cop_op", "h_stop_cop_op", "h_random", "h_enter_decomp", "h_remove_comp", "h_xirr_x", "h_get_perf_info", "h_block_remove", "h_get_24x7_cat_page", "h_get_24x7_data", "h_attach_ca_process", "h_detach_ca_process", "h_control_ca_function", "h_control_ca_faults", "h_collect_ca_int_info", "h_download_ca_function", "h_download_ca_facility", "h_clean_slb", "h_invalidate_pid", "h_register_process_table", "h_put_rtce_indirect", "h_get_vf_info_stat", "h_modify_vas_window", "h_query_vas_window", "h_get_vas_fault", "h_user_mode_cop_op", "h_reg_crq", "h_free_crq", "h_read_rdma", "h_write_rdma", "h_free_logical_lan_buffer", "h_reg_sub_crq", "h_free_sub_crq", "h_send_sub_crq", "h_send_sub_crq_indirect" }; #define FIRST_HCALL -1 /*Pseudo hypervisor call id to collect hypervisor statistics for all the hcalls */ extern int perfstat_logicalvolume(perfstat_id_t *name, perfstat_logicalvolume_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_logicalvolume_node(perfstat_id_node_t *name, perfstat_logicalvolume_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_volumegroup(perfstat_id_t *name, perfstat_volumegroup_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_volumegroup_node(perfstat_id_node_t *name, perfstat_volumegroup_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_total(perfstat_id_t *name, perfstat_cpu_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_total_node(perfstat_id_node_t *name, perfstat_cpu_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_total_wpar(perfstat_id_wpar_t *name, perfstat_cpu_total_wpar_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_total_rset(perfstat_id_wpar_t *name, perfstat_cpu_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu(perfstat_id_t *name, perfstat_cpu_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_node(perfstat_id_node_t *name, perfstat_cpu_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_rset(perfstat_id_wpar_t *name, perfstat_cpu_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_disk_total(perfstat_id_t *name, perfstat_disk_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_disk_total_node(perfstat_id_node_t *name, perfstat_disk_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_disk_total_wpar(perfstat_id_wpar_t *name, perfstat_disk_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_disk(perfstat_id_t *name, perfstat_disk_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_disk_node(perfstat_id_node_t *name, perfstat_disk_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_tape(perfstat_id_t *name, perfstat_tape_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_tape_node(perfstat_id_node_t *name, perfstat_tape_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_tape_total(perfstat_id_t *name, perfstat_tape_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_tape_total_node(perfstat_id_node_t *name, perfstat_tape_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_diskadapter(perfstat_id_t *name, perfstat_diskadapter_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_diskadapter_node(perfstat_id_node_t *name, perfstat_diskadapter_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_bio_stats(perfstat_id_t *name, perfstat_bio_dev_t* userbuff, int sizeof_userbuff, u_longlong_t desired_number); extern int perfstat_devname2id(perfstat_id_t *name, u_longlong_t *userbuff); extern int perfstat_biostat_reset(); extern int perfstat_diskpath(perfstat_id_t *name, perfstat_diskpath_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_diskpath_node(perfstat_id_node_t *name, perfstat_diskpath_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_memory_page(perfstat_psize_t *psize, perfstat_memory_page_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_memory_page_node(perfstat_id_node_t *name, perfstat_psize_t *psize, perfstat_memory_page_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_memory_page_wpar(perfstat_id_wpar_t *name, perfstat_psize_t *psize, perfstat_memory_page_wpar_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_memory_total(perfstat_id_t *name, perfstat_memory_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_memory_total_node(perfstat_id_node_t *name, perfstat_memory_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_memory_total_wpar(perfstat_id_wpar_t *name, perfstat_memory_total_wpar_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netinterface_total(perfstat_id_t *name, perfstat_netinterface_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netinterface_total_node(perfstat_id_node_t *name, perfstat_netinterface_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netinterface(perfstat_id_t *name, perfstat_netinterface_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netinterface_node(perfstat_id_node_t *name, perfstat_netinterface_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netadapter(perfstat_id_t *name, perfstat_netadapter_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netadapter_node(perfstat_id_node_t *name, perfstat_netadapter_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_fcstat(perfstat_id_t *name, perfstat_fcstat_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_fcstat_node(perfstat_id_node_t *name, perfstat_fcstat_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_fcstat_wwpn(perfstat_wwpn_id_t *name, perfstat_fcstat_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_pagingspace(perfstat_id_t *name, perfstat_pagingspace_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_pagingspace_node(perfstat_id_node_t *name, perfstat_pagingspace_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netbuffer(perfstat_id_t *name, perfstat_netbuffer_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_netbuffer_node(perfstat_id_node_t *name, perfstat_netbuffer_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_protocol(perfstat_id_t *name, perfstat_protocol_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_protocol_node(perfstat_id_node_t *name, perfstat_protocol_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_partition_total(perfstat_id_t *name, perfstat_partition_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_partition_total_node(perfstat_id_node_t *name, perfstat_partition_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cluster_total(perfstat_id_node_t *name, perfstat_cluster_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_node_list(perfstat_id_node_t *name, perfstat_node_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_wpar_total(perfstat_id_wpar_t *name, perfstat_wpar_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_kmemstat_total(perfstat_id_t *name, perfstat_kmemstat_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_kmemstat_total_node(perfstat_id_node_t *name, perfstat_kmemstat_total_t* userbuff, int sizeof_userbuff, int desired_number); extern void perfstat_reset(void); extern int perfstat_hyperstat_total(perfstat_id_t *name, perfstat_hyperstat_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_hfistat(perfstat_id_t *name, perfstat_hfistat_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_hfistat_window(perfstat_id_window_t *name, perfstat_hfistat_window_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_ssp(perfstat_id_t* name, perfstat_ssp_t* userbuff, int sizeof_userbuff, int desired_number, ssp_flag_t ssp_flag); #define FLUSH_CPUTOTAL 1LL #define FLUSH_DISK 2LL #define RESET_DISK_MINMAX 4LL #define FLUSH_DISKADAPTER 8LL #define FLUSH_DISKPATH 16LL #define FLUSH_PAGINGSPACE 32LL #define FLUSH_NETINTERFACE 64LL #define RESET_DISK_ALL 128LL #define FLUSH_LOGICALVOLUME 128LL #define FLUSH_VOLUMEGROUP 256LL extern int perfstat_partial_reset(char * name,u_longlong_t defmask); extern int perfstat_config(uint command, void* arg); extern int perfstat_partition_config(perfstat_id_t *name, perfstat_partition_config_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_process(perfstat_id_t *name, perfstat_process_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_process_util(perfstat_rawdata_t *data, perfstat_process_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_cpu_util(perfstat_rawdata_t *cpustats, perfstat_cpu_util_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_processor_pool_util(perfstat_rawdata_t *data, perfstat_processor_pool_util_t *userbuff, int sizeoff_userbuff, int desired_number); extern int perfstat_virtualdiskadapter(perfstat_id_t *name, perfstat_diskadapter_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_virtualdiskadapter_node(perfstat_id_node_t *name, perfstat_diskadapter_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_virtualdisktarget(perfstat_id_t *name, perfstat_disk_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_virtualdisktarget_node(perfstat_id_node_t *name, perfstat_disk_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_virtual_fcadapter(perfstat_id_t *name, perfstat_fcstat_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_virtual_fcadapter_node(perfstat_id_node_t *name, perfstat_fcstat_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_bridgedadapters(perfstat_id_t *name, perfstat_netadapter_t * userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_bridgedadapters_node(perfstat_id_node_t *name, perfstat_netadapter_t * userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_hyperstat (perfstat_hyperstat_id_t *name, perfstat_hyperstat_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_thread(perfstat_id_t *name, perfstat_thread_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_thread_util(perfstat_rawdata_t *name, perfstat_thread_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_thread_node(perfstat_id_node_t *name, perfstat_thread_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_hyperstat_total_node(perfstat_id_node_t *name, perfstat_hyperstat_total_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_hyperstat_node(perfstat_id_node_t *name, perfstat_hyperstat_t *userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_get_24x7_catalogpage(void *RequestBufferAddress, int RequestBufferSize, int VersionNumber, int Index); extern int perfstat_get_24x7_data(void *RequestBufferAddress, int RequestBufferSize, void *ResultBufferAddress, int ResultBufferSize); extern int perfstat_get_24x7_catalogpage_ext(void *RequestBufferAddress, uint64_t RequestBufferSize, uint64_t VersionNumber, uint64_t Index); extern int perfstat_get_24x7_data_ext(void *RequestBufferAddress, uint64_t RequestBufferSize, void *ResultBufferAddress, uint64_t ResultBufferSize); extern int perfstat_get_cec_perf_count(int size, void * call_buf); extern int perfstat_cluster_disk(perfstat_id_node_t *name, perfstat_disk_data_t* userbuff, int sizeof_userbuff, int desired_number); extern int perfstat_ssp_ext(perfstat_ssp_id_t* name, perfstat_ssp_t* userbuff, int sizeof_userbuff, int desired_number, ssp_flag_t ssp_flag); #ifdef __cplusplus } #endif #endif /*unnef LIBPERFSTAT_H*/