src/hotspot/os/aix/libperfstat_aix.hpp
author clanger
Wed, 31 Jan 2018 16:48:41 +0100
changeset 48822 8a9808a9dd6b
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
permissions -rw-r--r--
8196487: AIX: os::get_summary_cpu_info does not need to call into libperfstat Reviewed-by: goetz, stuefe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     1
/*
48822
8a9808a9dd6b 8196487: AIX: os::get_summary_cpu_info does not need to call into libperfstat
clanger
parents: 47216
diff changeset
     2
 * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     4
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     8
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    13
 * accompanied this code).
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    14
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    18
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    21
 * questions.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    22
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    23
 */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    24
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    25
// Encapsulates the libperfstat library.
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    26
//
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    27
// The purpose of this code is to dynamically load the libperfstat library
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    28
// instead of statically linking against it. The libperfstat library is an
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    29
// AIX-specific library which only exists on AIX, not on PASE. If I want to
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    30
// share binaries between AIX and PASE, I cannot directly link against libperfstat.so.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    31
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    32
#ifndef OS_AIX_VM_LIBPERFSTAT_AIX_HPP
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    33
#define OS_AIX_VM_LIBPERFSTAT_AIX_HPP
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    34
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    35
#include <sys/types.h>
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    36
#include <stdlib.h>
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    37
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    38
///////////////////////////////////////////////////////////////////////////////////////////////
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    39
// These are excerpts from the AIX 5.3, 6.1, 7.1 libperfstat.h -
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    40
// this is all we need from libperfstat.h and I want to avoid having to include <libperfstat.h>
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    41
//
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    42
// Note: I define all structures as if I were to include libperfstat.h on an AIX 5.2
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    43
// build machine.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    44
//
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    45
// The ratio behind that is that if I would build on an AIX 5.2 build machine,
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    46
// include libperfstat.h and hard-link against libperfstat.a, the program should
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    47
// work without recompilation on all newer AIX versions.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    48
//
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    49
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    50
#define IDENTIFIER_LENGTH 64    /* length of strings included in the structures */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    51
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    52
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    53
typedef struct { /* structure element identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    54
  char name[IDENTIFIER_LENGTH]; /* name of the identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    55
} perfstat_id_t;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    56
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    57
#define CEC_ID_LEN 40           /* CEC identifier length */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    58
#define MAXCORRALNAMELEN 25     /* length of the wpar name */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    59
#define FIRST_WPARNAME ""       /* pseudo-name for the first WPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    60
#define FIRST_WPARID -1         /* pseudo-id for the first WPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    61
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    62
typedef unsigned short cid_t;   /* workload partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    63
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    64
typedef struct { /* Virtual memory utilization */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    65
  u_longlong_t virt_total;    /* total virtual memory (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    66
  u_longlong_t real_total;    /* total real memory (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    67
  u_longlong_t real_free;     /* free real memory (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    68
  u_longlong_t real_pinned;   /* real memory which is pinned (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    69
  u_longlong_t real_inuse;    /* real memory which is in use (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    70
  u_longlong_t pgbad;         /* number of bad pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    71
  u_longlong_t pgexct;        /* number of page faults */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    72
  u_longlong_t pgins;         /* number of pages paged in */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    73
  u_longlong_t pgouts;        /* number of pages paged out */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    74
  u_longlong_t pgspins;       /* number of page ins from paging space */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    75
  u_longlong_t pgspouts;      /* number of page outs from paging space */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    76
  u_longlong_t scans;         /* number of page scans by clock */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    77
  u_longlong_t cycles;        /* number of page replacement cycles */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    78
  u_longlong_t pgsteals;      /* number of page steals */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    79
  u_longlong_t numperm;       /* number of frames used for files (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    80
  u_longlong_t pgsp_total;    /* total paging space (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    81
  u_longlong_t pgsp_free;     /* free paging space (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    82
  u_longlong_t pgsp_rsvd;     /* reserved paging space (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    83
  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.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    84
                               * Since segment classifications are not always guaranteed to be accurate, this number is only an approximation. */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    85
  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.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    86
                               * Since segment classifications are not always guaranteed to be accurate, this number is only an approximation. */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    87
  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
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    88
                               * approximation, this number is too. */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    89
  u_longlong_t virt_active;   /* Active virtual pages. Virtual pages are considered active if they have been accessed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    90
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    91
} perfstat_memory_total_t;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    92
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    93
typedef struct { /* global cpu information AIX 5.3 < TL10 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    94
  int ncpus;                            /* number of active logical processors */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    95
  int ncpus_cfg;                        /* number of configured processors */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    96
  char description[IDENTIFIER_LENGTH];  /* processor description (type/official name) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    97
  u_longlong_t processorHZ;             /* processor speed in Hz */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    98
  u_longlong_t user;                    /* raw total number of clock ticks spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
    99
  u_longlong_t sys;                     /* raw total number of clock ticks spent in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   100
  u_longlong_t idle;                    /* raw total number of clock ticks spent idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   101
  u_longlong_t wait;                    /* raw total number of clock ticks spent waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   102
  u_longlong_t pswitch;                 /* number of process switches (change in currently running process) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   103
  u_longlong_t syscall;                 /* number of system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   104
  u_longlong_t sysread;                 /* number of read system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   105
  u_longlong_t syswrite;                /* number of write system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   106
  u_longlong_t sysfork;                 /* number of forks system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   107
  u_longlong_t sysexec;                 /* number of execs system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   108
  u_longlong_t readch;                  /* number of characters tranferred with read system call */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   109
  u_longlong_t writech;                 /* number of characters tranferred with write system call */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   110
  u_longlong_t devintrs;                /* number of device interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   111
  u_longlong_t softintrs;               /* number of software interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   112
  time_t lbolt;                         /* number of ticks since last reboot */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   113
  u_longlong_t loadavg[3];              /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   114
                                               * To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   115
  u_longlong_t runque;                  /* length of the run queue (processes ready) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   116
  u_longlong_t swpque;                  /* ength of the swap queue (processes waiting to be paged in) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   117
  u_longlong_t bread;                   /* number of blocks read */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   118
  u_longlong_t bwrite;                  /* number of blocks written */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   119
  u_longlong_t lread;                   /* number of logical read requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   120
  u_longlong_t lwrite;                  /* number of logical write requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   121
  u_longlong_t phread;                  /* number of physical reads (reads on raw devices) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   122
  u_longlong_t phwrite;                 /* number of physical writes (writes on raw devices) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   123
  u_longlong_t runocc;                  /* updated whenever runque is updated, i.e. the runqueue is occupied.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   124
                                               * This can be used to compute the simple average of ready processes  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   125
  u_longlong_t swpocc;                  /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   126
                                               * This can be used to compute the simple average processes waiting to be paged in */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   127
  u_longlong_t iget;                    /* number of inode lookups */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   128
  u_longlong_t namei;                   /* number of vnode lookup from a path name */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   129
  u_longlong_t dirblk;                  /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   130
  u_longlong_t msg;                     /* number of IPC message operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   131
  u_longlong_t sema;                    /* number of IPC semaphore operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   132
  u_longlong_t rcvint;                  /* number of tty receive interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   133
  u_longlong_t xmtint;                  /* number of tyy transmit interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   134
  u_longlong_t mdmint;                  /* number of modem interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   135
  u_longlong_t tty_rawinch;             /* number of raw input characters  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   136
  u_longlong_t tty_caninch;             /* number of canonical input characters (always zero) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   137
  u_longlong_t tty_rawoutch;            /* number of raw output characters */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   138
  u_longlong_t ksched;                  /* number of kernel processes created */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   139
  u_longlong_t koverf;                  /* kernel process creation attempts where:
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   140
                                               * -the user has forked to their maximum limit
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   141
                                               * -the configuration limit of processes has been reached */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   142
  u_longlong_t kexit;                   /* number of kernel processes that became zombies */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   143
  u_longlong_t rbread;                  /* number of remote read requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   144
  u_longlong_t rcread;                  /* number of cached remote reads */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   145
  u_longlong_t rbwrt;                   /* number of remote writes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   146
  u_longlong_t rcwrt;                   /* number of cached remote writes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   147
  u_longlong_t traps;                   /* number of traps */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   148
  int ncpus_high;                       /* index of highest processor online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   149
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   150
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   151
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   152
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   153
  u_longlong_t decrintrs;               /* number of decrementer tics interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   154
  u_longlong_t mpcrintrs;               /* number of mpc's received interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   155
  u_longlong_t mpcsintrs;               /* number of mpc's sent interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   156
  u_longlong_t phantintrs;              /* number of phantom interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   157
  u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   158
  u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   159
  u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   160
  u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   161
  u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   162
  u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   163
  u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   164
  u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   165
  short iowait;                         /* number of processes that are asleep waiting for buffered I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   166
  short physio;                         /* number of processes waiting for raw I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   167
  longlong_t twait;                     /* number of threads that are waiting for filesystem direct(cio) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   168
  u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   169
  u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   170
} perfstat_cpu_total_t_53;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   171
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   172
typedef struct { /* global cpu information AIX 6.1|5.3 > TL09 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   173
  int ncpus;                            /* number of active logical processors */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   174
  int ncpus_cfg;                        /* number of configured processors */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   175
  char description[IDENTIFIER_LENGTH];  /* processor description (type/official name) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   176
  u_longlong_t processorHZ;             /* processor speed in Hz */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   177
  u_longlong_t user;                    /* raw total number of clock ticks spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   178
  u_longlong_t sys;                     /* raw total number of clock ticks spent in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   179
  u_longlong_t idle;                    /* raw total number of clock ticks spent idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   180
  u_longlong_t wait;                    /* raw total number of clock ticks spent waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   181
  u_longlong_t pswitch;                 /* number of process switches (change in currently running process) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   182
  u_longlong_t syscall;                 /* number of system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   183
  u_longlong_t sysread;                 /* number of read system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   184
  u_longlong_t syswrite;                /* number of write system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   185
  u_longlong_t sysfork;                 /* number of forks system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   186
  u_longlong_t sysexec;                 /* number of execs system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   187
  u_longlong_t readch;                  /* number of characters tranferred with read system call */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   188
  u_longlong_t writech;                 /* number of characters tranferred with write system call */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   189
  u_longlong_t devintrs;                /* number of device interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   190
  u_longlong_t softintrs;               /* number of software interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   191
  time_t lbolt;                         /* number of ticks since last reboot */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   192
  u_longlong_t loadavg[3];              /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   193
                                               * To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   194
  u_longlong_t runque;                  /* length of the run queue (processes ready) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   195
  u_longlong_t swpque;                  /* length of the swap queue (processes waiting to be paged in) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   196
  u_longlong_t bread;                   /* number of blocks read */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   197
  u_longlong_t bwrite;                  /* number of blocks written */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   198
  u_longlong_t lread;                   /* number of logical read requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   199
  u_longlong_t lwrite;                  /* number of logical write requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   200
  u_longlong_t phread;                  /* number of physical reads (reads on raw devices) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   201
  u_longlong_t phwrite;                 /* number of physical writes (writes on raw devices) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   202
  u_longlong_t runocc;                  /* updated whenever runque is updated, i.e. the runqueue is occupied.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   203
                                               * This can be used to compute the simple average of ready processes  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   204
  u_longlong_t swpocc;                  /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   205
                                               * This can be used to compute the simple average processes waiting to be paged in */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   206
  u_longlong_t iget;                    /* number of inode lookups */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   207
  u_longlong_t namei;                   /* number of vnode lookup from a path name */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   208
  u_longlong_t dirblk;                  /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   209
  u_longlong_t msg;                     /* number of IPC message operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   210
  u_longlong_t sema;                    /* number of IPC semaphore operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   211
  u_longlong_t rcvint;                  /* number of tty receive interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   212
  u_longlong_t xmtint;                  /* number of tyy transmit interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   213
  u_longlong_t mdmint;                  /* number of modem interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   214
  u_longlong_t tty_rawinch;             /* number of raw input characters  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   215
  u_longlong_t tty_caninch;             /* number of canonical input characters (always zero) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   216
  u_longlong_t tty_rawoutch;            /* number of raw output characters */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   217
  u_longlong_t ksched;                  /* number of kernel processes created */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   218
  u_longlong_t koverf;                  /* kernel process creation attempts where:
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   219
                                               * -the user has forked to their maximum limit
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   220
                                               * -the configuration limit of processes has been reached */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   221
  u_longlong_t kexit;                   /* number of kernel processes that became zombies */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   222
  u_longlong_t rbread;                  /* number of remote read requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   223
  u_longlong_t rcread;                  /* number of cached remote reads */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   224
  u_longlong_t rbwrt;                   /* number of remote writes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   225
  u_longlong_t rcwrt;                   /* number of cached remote writes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   226
  u_longlong_t traps;                   /* number of traps */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   227
  int ncpus_high;                       /* index of highest processor online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   228
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   229
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   230
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   231
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   232
  u_longlong_t decrintrs;               /* number of decrementer tics interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   233
  u_longlong_t mpcrintrs;               /* number of mpc's received interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   234
  u_longlong_t mpcsintrs;               /* number of mpc's sent interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   235
  u_longlong_t phantintrs;              /* number of phantom interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   236
  u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   237
  u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   238
  u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   239
  u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   240
  u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   241
  u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   242
  u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   243
  u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   244
  short iowait;                         /* number of processes that are asleep waiting for buffered I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   245
  short physio;                         /* number of processes waiting for raw I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   246
  longlong_t twait;                     /* number of threads that are waiting for filesystem direct(cio) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   247
  u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   248
  u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   249
  u_longlong_t puser_spurr;             /* number of spurr cycles spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   250
  u_longlong_t psys_spurr;              /* number of spurr cycles spent in kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   251
  u_longlong_t pidle_spurr;             /* number of spurr cycles spent in idle mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   252
  u_longlong_t pwait_spurr;             /* number of spurr cycles spent in wait mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   253
  int spurrflag;                        /* set if running in spurr mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   254
} perfstat_cpu_total_t_61;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   255
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   256
typedef struct { /* global cpu information AIX 7.1 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   257
  int ncpus;                            /* number of active logical processors */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   258
  int ncpus_cfg;                        /* number of configured processors */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   259
  char description[IDENTIFIER_LENGTH];  /* processor description (type/official name) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   260
  u_longlong_t processorHZ;             /* processor speed in Hz */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   261
  u_longlong_t user;                    /* raw total number of clock ticks spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   262
  u_longlong_t sys;                     /* raw total number of clock ticks spent in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   263
  u_longlong_t idle;                    /* raw total number of clock ticks spent idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   264
  u_longlong_t wait;                    /* raw total number of clock ticks spent waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   265
  u_longlong_t pswitch;                 /* number of process switches (change in currently running process) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   266
  u_longlong_t syscall;                 /* number of system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   267
  u_longlong_t sysread;                 /* number of read system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   268
  u_longlong_t syswrite;                /* number of write system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   269
  u_longlong_t sysfork;                 /* number of forks system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   270
  u_longlong_t sysexec;                 /* number of execs system calls executed */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   271
  u_longlong_t readch;                  /* number of characters tranferred with read system call */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   272
  u_longlong_t writech;                 /* number of characters tranferred with write system call */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   273
  u_longlong_t devintrs;                /* number of device interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   274
  u_longlong_t softintrs;               /* number of software interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   275
  time_t lbolt;                         /* number of ticks since last reboot */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   276
  u_longlong_t loadavg[3];              /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   277
                                               * To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   278
  u_longlong_t runque;                  /* length of the run queue (processes ready) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   279
  u_longlong_t swpque;                  /* ength of the swap queue (processes waiting to be paged in) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   280
  u_longlong_t bread;                   /* number of blocks read */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   281
  u_longlong_t bwrite;                  /* number of blocks written */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   282
  u_longlong_t lread;                   /* number of logical read requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   283
  u_longlong_t lwrite;                  /* number of logical write requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   284
  u_longlong_t phread;                  /* number of physical reads (reads on raw devices) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   285
  u_longlong_t phwrite;                 /* number of physical writes (writes on raw devices) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   286
  u_longlong_t runocc;                  /* updated whenever runque is updated, i.e. the runqueue is occupied.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   287
                                               * This can be used to compute the simple average of ready processes  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   288
  u_longlong_t swpocc;                  /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   289
                                               * This can be used to compute the simple average processes waiting to be paged in */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   290
  u_longlong_t iget;                    /* number of inode lookups */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   291
  u_longlong_t namei;                   /* number of vnode lookup from a path name */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   292
  u_longlong_t dirblk;                  /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   293
  u_longlong_t msg;                     /* number of IPC message operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   294
  u_longlong_t sema;                    /* number of IPC semaphore operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   295
  u_longlong_t rcvint;                  /* number of tty receive interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   296
  u_longlong_t xmtint;                  /* number of tyy transmit interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   297
  u_longlong_t mdmint;                  /* number of modem interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   298
  u_longlong_t tty_rawinch;             /* number of raw input characters  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   299
  u_longlong_t tty_caninch;             /* number of canonical input characters (always zero) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   300
  u_longlong_t tty_rawoutch;            /* number of raw output characters */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   301
  u_longlong_t ksched;                  /* number of kernel processes created */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   302
  u_longlong_t koverf;                  /* kernel process creation attempts where:
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   303
                                               * -the user has forked to their maximum limit
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   304
                                               * -the configuration limit of processes has been reached */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   305
  u_longlong_t kexit;                   /* number of kernel processes that became zombies */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   306
  u_longlong_t rbread;                  /* number of remote read requests */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   307
  u_longlong_t rcread;                  /* number of cached remote reads */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   308
  u_longlong_t rbwrt;                   /* number of remote writes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   309
  u_longlong_t rcwrt;                   /* number of cached remote writes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   310
  u_longlong_t traps;                   /* number of traps */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   311
  int ncpus_high;                       /* index of highest processor online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   312
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   313
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   314
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   315
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   316
  u_longlong_t decrintrs;               /* number of decrementer tics interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   317
  u_longlong_t mpcrintrs;               /* number of mpc's received interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   318
  u_longlong_t mpcsintrs;               /* number of mpc's sent interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   319
  u_longlong_t phantintrs;              /* number of phantom interrupts */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   320
  u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   321
  u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   322
  u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   323
  u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   324
  u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   325
  u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   326
  u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   327
  u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   328
  short iowait;                         /* number of processes that are asleep waiting for buffered I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   329
  short physio;                         /* number of processes waiting for raw I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   330
  longlong_t twait;                     /* number of threads that are waiting for filesystem direct(cio) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   331
  u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   332
  u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   333
  u_longlong_t puser_spurr;             /* number of spurr cycles spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   334
  u_longlong_t psys_spurr;              /* number of spurr cycles spent in kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   335
  u_longlong_t pidle_spurr;             /* number of spurr cycles spent in idle mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   336
  u_longlong_t pwait_spurr;             /* number of spurr cycles spent in wait mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   337
  int spurrflag;                        /* set if running in spurr mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   338
  u_longlong_t  version;                /* version number (1, 2, etc.,) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   339
/*      >>>>> END OF STRUCTURE DEFINITION <<<<<         */
39298
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   340
/* #define CURR_VERSION_CPU_TOTAL 1              Incremented by one for every new release *
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   341
                                               * of perfstat_cpu_total_t data structure   */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   342
} perfstat_cpu_total_t_71;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   343
39298
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   344
typedef struct { /* global cpu information AIX 7.2  / 6.1 TL6 (see oslevel -r) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   345
  int ncpus;                /* number of active logical processors */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   346
  int ncpus_cfg;             /* number of configured processors */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   347
  char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   348
  u_longlong_t processorHZ; /* processor speed in Hz */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   349
  u_longlong_t user;        /*  raw total number of clock ticks spent in user mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   350
  u_longlong_t sys;         /* raw total number of clock ticks spent in system mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   351
  u_longlong_t idle;        /* raw total number of clock ticks spent idle */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   352
  u_longlong_t wait;        /* raw total number of clock ticks spent waiting for I/O */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   353
  u_longlong_t pswitch;     /* number of process switches (change in currently running process) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   354
  u_longlong_t syscall;     /* number of system calls executed */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   355
  u_longlong_t sysread;     /* number of read system calls executed */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   356
  u_longlong_t syswrite;    /* number of write system calls executed */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   357
  u_longlong_t sysfork;     /* number of forks system calls executed */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   358
  u_longlong_t sysexec;     /* number of execs system calls executed */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   359
  u_longlong_t readch;      /* number of characters tranferred with read system call */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   360
  u_longlong_t writech;     /* number of characters tranferred with write system call */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   361
  u_longlong_t devintrs;    /* number of device interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   362
  u_longlong_t softintrs;   /* number of software interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   363
  time_t lbolt;             /* number of ticks since last reboot */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   364
  u_longlong_t loadavg[3];  /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.    */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   365
                            /* To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   366
  u_longlong_t runque;      /* length of the run queue (processes ready) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   367
  u_longlong_t swpque;      /* ength of the swap queue (processes waiting to be paged in) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   368
  u_longlong_t bread;       /* number of blocks read */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   369
  u_longlong_t bwrite;      /* number of blocks written */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   370
  u_longlong_t lread;       /* number of logical read requests */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   371
  u_longlong_t lwrite;      /* number of logical write requests */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   372
  u_longlong_t phread;      /* number of physical reads (reads on raw devices) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   373
  u_longlong_t phwrite;     /* number of physical writes (writes on raw devices) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   374
  u_longlong_t runocc;      /* updated whenever runque is updated, i.e. the runqueue is occupied.
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   375
                             * This can be used to compute the simple average of ready processes  */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   376
  u_longlong_t swpocc;      /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   377
                             * This can be used to compute the simple average processes waiting to be paged in */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   378
  u_longlong_t iget;        /* number of inode lookups */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   379
  u_longlong_t namei;       /* number of vnode lookup from a path name */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   380
  u_longlong_t dirblk;      /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   381
  u_longlong_t msg;         /* number of IPC message operations */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   382
  u_longlong_t sema;        /* number of IPC semaphore operations */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   383
  u_longlong_t rcvint;      /* number of tty receive interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   384
  u_longlong_t xmtint;      /* number of tyy transmit interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   385
  u_longlong_t mdmint;      /* number of modem interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   386
  u_longlong_t tty_rawinch; /* number of raw input characters  */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   387
  u_longlong_t tty_caninch; /* number of canonical input characters (always zero) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   388
  u_longlong_t tty_rawoutch;/* number of raw output characters */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   389
  u_longlong_t ksched;      /* number of kernel processes created */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   390
  u_longlong_t koverf;      /* kernel process creation attempts where:
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   391
                             * -the user has forked to their maximum limit
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   392
                             * -the configuration limit of processes has been reached */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   393
  u_longlong_t kexit;       /* number of kernel processes that became zombies */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   394
  u_longlong_t rbread;      /* number of remote read requests */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   395
  u_longlong_t rcread;      /* number of cached remote reads */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   396
  u_longlong_t rbwrt;       /* number of remote writes */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   397
  u_longlong_t rcwrt;       /* number of cached remote writes */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   398
  u_longlong_t traps;       /* number of traps */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   399
  int ncpus_high;           /* index of highest processor online */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   400
  u_longlong_t puser;       /* raw number of physical processor tics in user mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   401
  u_longlong_t psys;        /* raw number of physical processor tics in system mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   402
  u_longlong_t pidle;       /* raw number of physical processor tics idle */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   403
  u_longlong_t pwait;       /* raw number of physical processor tics waiting for I/O */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   404
  u_longlong_t decrintrs;   /* number of decrementer tics interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   405
  u_longlong_t mpcrintrs;   /* number of mpc's received interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   406
  u_longlong_t mpcsintrs;   /* number of mpc's sent interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   407
  u_longlong_t phantintrs;  /* number of phantom interrupts */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   408
  u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   409
  u_longlong_t idle_donated_spurr;/* number of idle spurr cycles donated by a dedicated partition enabled for donation */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   410
  u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   411
  u_longlong_t busy_donated_spurr;/* number of busy spurr cycles donated by a dedicated partition enabled for donation */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   412
  u_longlong_t idle_stolen_purr;  /* number of idle cycles stolen by the hypervisor from a dedicated partition */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   413
  u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   414
  u_longlong_t busy_stolen_purr;  /* number of busy cycles stolen by the hypervisor from a dedicated partition */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   415
  u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   416
  short iowait;             /* number of processes that are asleep waiting for buffered I/O */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   417
  short physio;             /* number of processes waiting for raw I/O */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   418
  longlong_t twait;         /* number of threads that are waiting for filesystem direct(cio) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   419
  u_longlong_t hpi;         /* number of hypervisor page-ins */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   420
  u_longlong_t hpit;        /* Time spent in hypervisor page-ins (in nanoseconds) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   421
  u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   422
  u_longlong_t psys_spurr;  /* number of spurr cycles spent in kernel mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   423
  u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   424
  u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   425
  int spurrflag;            /* set if running in spurr mode */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   426
  u_longlong_t  version;    /* version number (1, 2, etc.,) */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   427
  u_longlong_t tb_last;     /*time base counter */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   428
  u_longlong_t purr_coalescing;   /* If the calling partition is
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   429
                                   * authorized to see pool wide statistics then
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   430
                                   * PURR cycles consumed to coalesce data
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   431
                                   * else set to zero.*/
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   432
  u_longlong_t spurr_coalescing;  /* If the calling partition is
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   433
                                   * authorized to see pool wide statistics then
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   434
                                   * SPURR cycles consumed to coalesce data
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   435
                                   * else set to zero.*/
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   436
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   437
/*      >>>>> END OF STRUCTURE DEFINITION <<<<<         */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   438
#define CURR_VERSION_CPU_TOTAL 2 /* Incremented by one for every new release *
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   439
                                  * of perfstat_cpu_total_t data structure   */
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   440
} perfstat_cpu_total_t_72;
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   441
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   442
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   443
typedef union {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   444
  uint    w;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   445
  struct {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   446
          unsigned smt_capable :1;          /* OS supports SMT mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   447
          unsigned smt_enabled :1;          /* SMT mode is on */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   448
          unsigned lpar_capable :1;         /* OS supports logical partitioning */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   449
          unsigned lpar_enabled :1;         /* logical partitioning is on */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   450
          unsigned shared_capable :1;       /* OS supports shared processor LPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   451
          unsigned shared_enabled :1;       /* partition runs in shared mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   452
          unsigned dlpar_capable :1;        /* OS supports dynamic LPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   453
          unsigned capped :1;               /* partition is capped */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   454
          unsigned kernel_is_64 :1;         /* kernel is 64 bit */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   455
          unsigned pool_util_authority :1;  /* pool utilization available */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   456
          unsigned donate_capable :1;       /* capable of donating cycles */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   457
          unsigned donate_enabled :1;       /* enabled for donating cycles */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   458
          unsigned ams_capable:1;           /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   459
          unsigned ams_enabled:1;           /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   460
          unsigned power_save:1;            /* 1 = Power saving mode is enabled */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   461
          unsigned ame_enabled:1;           /* Active Memory Expansion is enabled */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   462
          unsigned shared_extended :1;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   463
          unsigned spare :15;               /* reserved for future usage */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   464
  } b;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   465
} perfstat_partition_type_t;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   466
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   467
typedef struct { /* partition total information AIX 5.3 < TL6 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   468
  char name[IDENTIFIER_LENGTH];         /* name of the logical partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   469
  perfstat_partition_type_t type;       /* set of bits describing the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   470
  int lpar_id;                          /* logical partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   471
  int group_id;                         /* identifier of the LPAR group this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   472
  int pool_id;                          /* identifier of the shared pool of physical processors this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   473
  int online_cpus;                      /* number of virtual CPUs currently online on the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   474
  int max_cpus;                         /* maximum number of virtual CPUs this parition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   475
  int min_cpus;                         /* minimum number of virtual CPUs this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   476
  u_longlong_t online_memory;           /* amount of memory currently online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   477
  u_longlong_t max_memory;              /* maximum amount of memory this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   478
  u_longlong_t min_memory;              /* minimum amount of memory this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   479
  int entitled_proc_capacity;           /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   480
  int max_proc_capacity;                /* maximum number of processor units this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   481
  int min_proc_capacity;                /* minimum number of processor units this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   482
  int proc_capacity_increment;          /* increment value to the entitled capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   483
  int unalloc_proc_capacity;            /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   484
  int var_proc_capacity_weight;         /* partition priority weight to receive extra capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   485
  int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated  in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   486
  int online_phys_cpus_sys;             /* number of physical CPUs currently active in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   487
  int max_phys_cpus_sys;                /* maximum possible number of physical CPUs in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   488
  int phys_cpus_pool;                   /* number of the physical CPUs currently in the shared processor pool this partition belong to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   489
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   490
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   491
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   492
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   493
  u_longlong_t pool_idle_time;          /* number of clock tics a processor in the shared pool was idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   494
  u_longlong_t phantintrs;              /* number of phantom interrupts received by the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   495
  u_longlong_t invol_virt_cswitch;      /* number involuntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   496
  u_longlong_t vol_virt_cswitch;        /* number voluntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   497
  u_longlong_t timebase_last;           /* most recently cpu time base */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   498
  u_longlong_t reserved_pages;          /* Currenlty number of 16GB pages. Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   499
  u_longlong_t reserved_pagesize;       /* Currently 16GB pagesize Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   500
} perfstat_partition_total_t_53_5;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   501
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   502
typedef struct { /* partition total information AIX 5.3 < TL10 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   503
  char name[IDENTIFIER_LENGTH];         /* name of the logical partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   504
  perfstat_partition_type_t type;       /* set of bits describing the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   505
  int lpar_id;                          /* logical partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   506
  int group_id;                         /* identifier of the LPAR group this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   507
  int pool_id;                          /* identifier of the shared pool of physical processors this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   508
  int online_cpus;                      /* number of virtual CPUs currently online on the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   509
  int max_cpus;                         /* maximum number of virtual CPUs this parition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   510
  int min_cpus;                         /* minimum number of virtual CPUs this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   511
  u_longlong_t online_memory;           /* amount of memory currently online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   512
  u_longlong_t max_memory;              /* maximum amount of memory this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   513
  u_longlong_t min_memory;              /* minimum amount of memory this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   514
  int entitled_proc_capacity;           /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   515
  int max_proc_capacity;                /* maximum number of processor units this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   516
  int min_proc_capacity;                /* minimum number of processor units this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   517
  int proc_capacity_increment;          /* increment value to the entitled capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   518
  int unalloc_proc_capacity;            /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   519
  int var_proc_capacity_weight;         /* partition priority weight to receive extra capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   520
  int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated  in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   521
  int online_phys_cpus_sys;             /* number of physical CPUs currently active in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   522
  int max_phys_cpus_sys;                /* maximum possible number of physical CPUs in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   523
  int phys_cpus_pool;                   /* number of the physical CPUs currently in the shared processor pool this partition belong to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   524
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   525
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   526
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   527
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   528
  u_longlong_t pool_idle_time;          /* number of clock tics a processor in the shared pool was idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   529
  u_longlong_t phantintrs;              /* number of phantom interrupts received by the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   530
  u_longlong_t invol_virt_cswitch;      /* number involuntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   531
  u_longlong_t vol_virt_cswitch;        /* number voluntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   532
  u_longlong_t timebase_last;           /* most recently cpu time base */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   533
  u_longlong_t reserved_pages;          /* Currenlty number of 16GB pages. Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   534
  u_longlong_t reserved_pagesize;       /* Currently 16GB pagesize Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   535
  u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   536
  u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   537
  u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   538
  u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   539
  u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   540
  u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   541
  u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   542
  u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   543
  u_longlong_t shcpus_in_sys;           /* Number of physical processors allocated for shared processor use */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   544
  u_longlong_t max_pool_capacity;       /* Maximum processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   545
  u_longlong_t entitled_pool_capacity;  /* Entitled processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   546
  u_longlong_t pool_max_time;           /* Summation of maximum time that could be consumed by the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   547
  u_longlong_t pool_busy_time;          /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   548
  u_longlong_t pool_scaled_busy_time;   /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   549
  u_longlong_t shcpu_tot_time;          /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   550
  u_longlong_t shcpu_busy_time;         /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   551
  u_longlong_t shcpu_scaled_busy_time;  /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   552
  int ams_pool_id;                      /* AMS pool id of the pool the LPAR belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   553
  int var_mem_weight;                   /* variable memory capacity weight */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   554
  u_longlong_t iome;                    /* I/O memory entitlement of the partition in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   555
  u_longlong_t pmem;                    /* Physical memory currently backing the partition's logical memory in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   556
  u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   557
  u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds)*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   558
  u_longlong_t hypv_pagesize;           /* Hypervisor page size in KB*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   559
} perfstat_partition_total_t_53;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   560
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   561
typedef struct { /* partition total information AIX 6.1|5.3 > TL09 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   562
  char name[IDENTIFIER_LENGTH];         /* name of the logical partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   563
  perfstat_partition_type_t type;       /* set of bits describing the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   564
  int lpar_id;                          /* logical partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   565
  int group_id;                         /* identifier of the LPAR group this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   566
  int pool_id;                          /* identifier of the shared pool of physical processors this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   567
  int online_cpus;                      /* number of virtual CPUs currently online on the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   568
  int max_cpus;                         /* maximum number of virtual CPUs this parition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   569
  int min_cpus;                         /* minimum number of virtual CPUs this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   570
  u_longlong_t online_memory;           /* amount of memory currently online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   571
  u_longlong_t max_memory;              /* maximum amount of memory this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   572
  u_longlong_t min_memory;              /* minimum amount of memory this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   573
  int entitled_proc_capacity;           /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   574
  int max_proc_capacity;                /* maximum number of processor units this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   575
  int min_proc_capacity;                /* minimum number of processor units this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   576
  int proc_capacity_increment;          /* increment value to the entitled capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   577
  int unalloc_proc_capacity;            /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   578
  int var_proc_capacity_weight;         /* partition priority weight to receive extra capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   579
  int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated  in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   580
  int online_phys_cpus_sys;             /* number of physical CPUs currently active in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   581
  int max_phys_cpus_sys;                /* maximum possible number of physical CPUs in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   582
  int phys_cpus_pool;                   /* number of the physical CPUs currently in the shared processor pool this partition belong to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   583
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   584
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   585
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   586
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   587
  u_longlong_t pool_idle_time;          /* number of clock tics a processor in the shared pool was idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   588
  u_longlong_t phantintrs;              /* number of phantom interrupts received by the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   589
  u_longlong_t invol_virt_cswitch;      /* number involuntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   590
  u_longlong_t vol_virt_cswitch;        /* number voluntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   591
  u_longlong_t timebase_last;           /* most recently cpu time base */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   592
  u_longlong_t reserved_pages;          /* Currenlty number of 16GB pages. Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   593
  u_longlong_t reserved_pagesize;       /* Currently 16GB pagesize Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   594
  u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   595
  u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   596
  u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   597
  u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   598
  u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   599
  u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   600
  u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   601
  u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   602
  u_longlong_t shcpus_in_sys;           /* Number of physical processors allocated for shared processor use */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   603
  u_longlong_t max_pool_capacity;       /* Maximum processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   604
  u_longlong_t entitled_pool_capacity;  /* Entitled processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   605
  u_longlong_t pool_max_time;           /* Summation of maximum time that could be consumed by the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   606
  u_longlong_t pool_busy_time;          /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   607
  u_longlong_t pool_scaled_busy_time;   /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   608
  u_longlong_t shcpu_tot_time;          /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   609
  u_longlong_t shcpu_busy_time;         /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   610
  u_longlong_t shcpu_scaled_busy_time;  /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   611
  int ams_pool_id;                      /* AMS pool id of the pool the LPAR belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   612
  int var_mem_weight;                   /* variable memory capacity weight */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   613
  u_longlong_t iome;                    /* I/O memory entitlement of the partition in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   614
  u_longlong_t pmem;                    /* Physical memory currently backing the partition's logical memory in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   615
  u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   616
  u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds)*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   617
  u_longlong_t hypv_pagesize;           /* Hypervisor page size in KB*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   618
  uint online_lcpus;                    /* number of online logical cpus */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   619
  uint smt_thrds;                       /* number of hardware threads that are running */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   620
  u_longlong_t puser_spurr;             /* number of spurr cycles spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   621
  u_longlong_t psys_spurr;              /* number of spurr cycles spent in kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   622
  u_longlong_t pidle_spurr;             /* number of spurr cycles spent in idle mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   623
  u_longlong_t pwait_spurr;             /* number of spurr cycles spent in wait mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   624
  int spurrflag;                        /* set if running in spurr mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   625
} perfstat_partition_total_t_61;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   626
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   627
typedef struct { /* partition total information AIX 7.1 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   628
  char name[IDENTIFIER_LENGTH];         /* name of the logical partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   629
  perfstat_partition_type_t type;       /* set of bits describing the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   630
  int lpar_id;                          /* logical partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   631
  int group_id;                         /* identifier of the LPAR group this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   632
  int pool_id;                          /* identifier of the shared pool of physical processors this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   633
  int online_cpus;                      /* number of virtual CPUs currently online on the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   634
  int max_cpus;                         /* maximum number of virtual CPUs this parition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   635
  int min_cpus;                         /* minimum number of virtual CPUs this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   636
  u_longlong_t online_memory;           /* amount of memory currently online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   637
  u_longlong_t max_memory;              /* maximum amount of memory this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   638
  u_longlong_t min_memory;              /* minimum amount of memory this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   639
  int entitled_proc_capacity;           /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   640
  int max_proc_capacity;                /* maximum number of processor units this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   641
  int min_proc_capacity;                /* minimum number of processor units this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   642
  int proc_capacity_increment;          /* increment value to the entitled capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   643
  int unalloc_proc_capacity;            /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   644
  int var_proc_capacity_weight;         /* partition priority weight to receive extra capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   645
  int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated  in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   646
  int online_phys_cpus_sys;             /* number of physical CPUs currently active in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   647
  int max_phys_cpus_sys;                /* maximum possible number of physical CPUs in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   648
  int phys_cpus_pool;                   /* number of the physical CPUs currently in the shared processor pool this partition belong to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   649
  u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   650
  u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   651
  u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   652
  u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   653
  u_longlong_t pool_idle_time;          /* number of clock tics a processor in the shared pool was idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   654
  u_longlong_t phantintrs;              /* number of phantom interrupts received by the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   655
  u_longlong_t invol_virt_cswitch;      /* number involuntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   656
  u_longlong_t vol_virt_cswitch;        /* number voluntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   657
  u_longlong_t timebase_last;           /* most recently cpu time base */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   658
  u_longlong_t reserved_pages;          /* Currenlty number of 16GB pages. Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   659
  u_longlong_t reserved_pagesize;       /* Currently 16GB pagesize Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   660
  u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   661
  u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   662
  u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   663
  u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   664
  u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   665
  u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   666
  u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   667
  u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   668
  u_longlong_t shcpus_in_sys;           /* Number of physical processors allocated for shared processor use */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   669
  u_longlong_t max_pool_capacity;       /* Maximum processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   670
  u_longlong_t entitled_pool_capacity;  /* Entitled processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   671
  u_longlong_t pool_max_time;           /* Summation of maximum time that could be consumed by the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   672
  u_longlong_t pool_busy_time;          /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   673
  u_longlong_t pool_scaled_busy_time;   /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   674
  u_longlong_t shcpu_tot_time;          /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   675
  u_longlong_t shcpu_busy_time;         /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   676
  u_longlong_t shcpu_scaled_busy_time;  /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   677
  int ams_pool_id;                      /* AMS pool id of the pool the LPAR belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   678
  int var_mem_weight;                   /* variable memory capacity weight */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   679
  u_longlong_t iome;                    /* I/O memory entitlement of the partition in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   680
  u_longlong_t pmem;                    /* Physical memory currently backing the partition's logical memory in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   681
  u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   682
  u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds)*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   683
  u_longlong_t hypv_pagesize;           /* Hypervisor page size in KB*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   684
  uint online_lcpus;                    /* number of online logical cpus */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   685
  uint smt_thrds;                       /* number of hardware threads that are running */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   686
  u_longlong_t puser_spurr;             /* number of spurr cycles spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   687
  u_longlong_t psys_spurr;              /* number of spurr cycles spent in kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   688
  u_longlong_t pidle_spurr;             /* number of spurr cycles spent in idle mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   689
  u_longlong_t pwait_spurr;             /* number of spurr cycles spent in wait mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   690
  int spurrflag;                        /* set if running in spurr mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   691
  char hardwareid[CEC_ID_LEN];          /* CEC Identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   692
        uint power_save_mode;                 /* Power save mode for the LPAR. Introduced through LI 53K PRF : Feature 728 292*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   693
        ushort ame_version;                   /* AME Version */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   694
        u_longlong_t true_memory;             /* True Memory Size in 4KB pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   695
        u_longlong_t expanded_memory;         /* Expanded Memory Size in 4KB pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   696
        u_longlong_t target_memexp_factr;     /* Target Memory Expansion Factor scaled by 100 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   697
        u_longlong_t current_memexp_factr;    /* Current Memory Expansion Factor scaled by 100 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   698
        u_longlong_t target_cpool_size;       /* Target Compressed Pool Size in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   699
        u_longlong_t max_cpool_size;          /* Max Size of Compressed Pool in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   700
        u_longlong_t min_ucpool_size;         /* Min Size of Uncompressed Pool in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   701
        u_longlong_t ame_deficit_size;        /*Deficit memory size in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   702
        u_longlong_t version;                 /* version number (1, 2, etc.,) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   703
        u_longlong_t cmcs_total_time;         /* Total CPU time spent due to active memory expansion */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   704
} perfstat_partition_total_t_71;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   705
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   706
typedef struct { /* partition total information AIX 7.1 >= TL1*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   707
        char name[IDENTIFIER_LENGTH];         /* name of the logical partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   708
        perfstat_partition_type_t type;       /* set of bits describing the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   709
        int lpar_id;                          /* logical partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   710
        int group_id;                         /* identifier of the LPAR group this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   711
        int pool_id;                          /* identifier of the shared pool of physical processors this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   712
        int online_cpus;                      /* number of virtual CPUs currently online on the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   713
        int max_cpus;                         /* maximum number of virtual CPUs this parition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   714
        int min_cpus;                         /* minimum number of virtual CPUs this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   715
        u_longlong_t online_memory;           /* amount of memory currently online */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   716
        u_longlong_t max_memory;              /* maximum amount of memory this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   717
        u_longlong_t min_memory;              /* minimum amount of memory this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   718
        int entitled_proc_capacity;           /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   719
        int max_proc_capacity;                /* maximum number of processor units this partition can ever have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   720
        int min_proc_capacity;                /* minimum number of processor units this partition must have */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   721
        int proc_capacity_increment;          /* increment value to the entitled capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   722
        int unalloc_proc_capacity;            /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   723
        int var_proc_capacity_weight;         /* partition priority weight to receive extra capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   724
        int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated  in the shared processor pool this partition belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   725
        int online_phys_cpus_sys;             /* number of physical CPUs currently active in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   726
        int max_phys_cpus_sys;                /* maximum possible number of physical CPUs in the system containing this partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   727
        int phys_cpus_pool;                   /* number of the physical CPUs currently in the shared processor pool this partition belong to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   728
        u_longlong_t puser;                   /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   729
        u_longlong_t psys;                    /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   730
        u_longlong_t pidle;                   /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   731
        u_longlong_t pwait;                   /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   732
        u_longlong_t pool_idle_time;          /* number of clock tics a processor in the shared pool was idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   733
        u_longlong_t phantintrs;              /* number of phantom interrupts received by the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   734
        u_longlong_t invol_virt_cswitch;      /* number involuntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   735
        u_longlong_t vol_virt_cswitch;        /* number voluntary virtual CPU context switches */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   736
        u_longlong_t timebase_last;           /* most recently cpu time base */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   737
        u_longlong_t reserved_pages;          /* Currenlty number of 16GB pages. Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   738
        u_longlong_t reserved_pagesize;       /* Currently 16GB pagesize Cannot participate in DR operations */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   739
        u_longlong_t idle_donated_purr;       /* number of idle cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   740
        u_longlong_t idle_donated_spurr;      /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   741
        u_longlong_t busy_donated_purr;       /* number of busy cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   742
        u_longlong_t busy_donated_spurr;      /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   743
        u_longlong_t idle_stolen_purr;        /* number of idle cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   744
        u_longlong_t idle_stolen_spurr;       /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   745
        u_longlong_t busy_stolen_purr;        /* number of busy cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   746
        u_longlong_t busy_stolen_spurr;       /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   747
        u_longlong_t shcpus_in_sys;           /* Number of physical processors allocated for shared processor use */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   748
        u_longlong_t max_pool_capacity;       /* Maximum processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   749
        u_longlong_t entitled_pool_capacity;  /* Entitled processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   750
        u_longlong_t pool_max_time;           /* Summation of maximum time that could be consumed by the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   751
        u_longlong_t pool_busy_time;          /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   752
        u_longlong_t pool_scaled_busy_time;   /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   753
        u_longlong_t shcpu_tot_time;          /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   754
        u_longlong_t shcpu_busy_time;         /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   755
        u_longlong_t shcpu_scaled_busy_time;  /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   756
        int ams_pool_id;                      /* AMS pool id of the pool the LPAR belongs to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   757
        int var_mem_weight;                   /* variable memory capacity weight */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   758
        u_longlong_t iome;                    /* I/O memory entitlement of the partition in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   759
        u_longlong_t pmem;                    /* Physical memory currently backing the partition's logical memory in bytes*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   760
        u_longlong_t hpi;                     /* number of hypervisor page-ins */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   761
        u_longlong_t hpit;                    /* Time spent in hypervisor page-ins (in nanoseconds)*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   762
        u_longlong_t hypv_pagesize;           /* Hypervisor page size in KB*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   763
        uint online_lcpus;                    /* number of online logical cpus */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   764
        uint smt_thrds;                       /* number of hardware threads that are running */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   765
        u_longlong_t puser_spurr;             /* number of spurr cycles spent in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   766
        u_longlong_t psys_spurr;              /* number of spurr cycles spent in kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   767
        u_longlong_t pidle_spurr;             /* number of spurr cycles spent in idle mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   768
        u_longlong_t pwait_spurr;             /* number of spurr cycles spent in wait mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   769
        int spurrflag;                        /* set if running in spurr mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   770
        char hardwareid[CEC_ID_LEN];          /* CEC Identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   771
        uint power_save_mode;                 /* Power save mode for the LPAR. Introduced through LI 53K PRF : Feature 728 292*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   772
        ushort ame_version;                   /* AME Version */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   773
        u_longlong_t true_memory;             /* True Memory Size in 4KB pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   774
        u_longlong_t expanded_memory;         /* Expanded Memory Size in 4KB pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   775
        u_longlong_t target_memexp_factr;     /* Target Memory Expansion Factor scaled by 100 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   776
        u_longlong_t current_memexp_factr;    /* Current Memory Expansion Factor scaled by 100 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   777
        u_longlong_t target_cpool_size;       /* Target Compressed Pool Size in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   778
        u_longlong_t max_cpool_size;          /* Max Size of Compressed Pool in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   779
        u_longlong_t min_ucpool_size;         /* Min Size of Uncompressed Pool in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   780
        u_longlong_t ame_deficit_size;        /*Deficit memory size in bytes */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   781
        u_longlong_t version;                 /* version number (1, 2, etc.,) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   782
        u_longlong_t cmcs_total_time;         /* Total CPU time spent due to active memory expansion */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   783
        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.*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   784
        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.*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   785
        u_longlong_t MemPoolSize;             /* Indicates the memory pool size of the pool that the partition belongs to (in bytes)., mpsz */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   786
        u_longlong_t IOMemEntInUse;           /* I/O memory entitlement of the LPAR in use in bytes. iomu */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   787
        u_longlong_t IOMemEntFree;            /* free I/O memory entitlement in bytes.  iomf */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   788
        u_longlong_t IOHighWaterMark;         /* high water mark of I/O memory entitlement usage in bytes. iohwn */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   789
        u_longlong_t purr_counter;            /* number of purr cycles spent in user + kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   790
        u_longlong_t spurr_counter;           /* number of spurr cycles spent in user + kernel mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   791
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   792
        /* Marketing Requirement(MR): MR1124083744  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   793
        u_longlong_t real_free;               /* free real memory (in 4KB pages) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   794
        u_longlong_t real_avail;              /* number of pages available for user application (memfree + numperm - minperm - minfree) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   795
        /*      >>>>> END OF STRUCTURE DEFINITION <<<<<         */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   796
#define CURR_VERSION_PARTITION_TOTAL 5        /* Incremented by one for every new release     *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   797
                                               * of perfstat_partition_total_t data structure */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   798
} perfstat_partition_total_t_71_1;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   799
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   800
typedef union { /* WPAR Type & Flags */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   801
        uint    w;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   802
        struct {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   803
                unsigned app_wpar :1;        /* Application WPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   804
                unsigned cpu_rset :1;        /* WPAR restricted to CPU resource set */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   805
                unsigned cpu_xrset:1;        /* WPAR restricted to CPU Exclusive resource set */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   806
                unsigned cpu_limits :1;      /* CPU resource limits enforced */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   807
                unsigned mem_limits :1;      /* Memory resource limits enforced */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   808
                unsigned spare :27;          /* reserved for future usage */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   809
        } b;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   810
} perfstat_wpar_type_t;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   811
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   812
typedef struct { /* Workload partition Information AIX 5.3 & 6.1*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   813
       char name[MAXCORRALNAMELEN+1]; /* name of the Workload Partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   814
       perfstat_wpar_type_t type;     /* set of bits describing the wpar */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   815
       cid_t wpar_id;                 /* workload partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   816
       uint  online_cpus;             /* Number of Virtual CPUs in partition rset or  number of virtual CPUs currently online on the Global partition*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   817
       int   cpu_limit;               /* CPU limit in 100ths of % - 1..10000 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   818
       int   mem_limit;               /* Memory limit in 100ths of % - 1..10000 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   819
       u_longlong_t online_memory;    /* amount of memory currently online in Global Partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   820
       int entitled_proc_capacity;    /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   821
} perfstat_wpar_total_t_61;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   822
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   823
typedef struct { /* Workload partition Information AIX 7.1*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   824
       char name[MAXCORRALNAMELEN+1]; /* name of the Workload Partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   825
       perfstat_wpar_type_t type;     /* set of bits describing the wpar */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   826
       cid_t wpar_id;                 /* workload partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   827
       uint  online_cpus;             /* Number of Virtual CPUs in partition rset or  number of virtual CPUs currently online on the Global partition*/
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   828
       int   cpu_limit;               /* CPU limit in 100ths of % - 1..10000 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   829
       int   mem_limit;               /* Memory limit in 100ths of % - 1..10000 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   830
       u_longlong_t online_memory;    /* amount of memory currently online in Global Partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   831
       int entitled_proc_capacity;    /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   832
       u_longlong_t version;          /* version number (1, 2, etc.,)                  */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   833
/*      >>>>> END OF STRUCTURE DEFINITION <<<<<         */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   834
#define CURR_VERSION_WPAR_TOTAL 1     /* Incremented by one for every new release      *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   835
                                       * of perfstat_wpar_total_t data structure       */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   836
} perfstat_wpar_total_t_71;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   837
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   838
typedef void * rsethandle_t;  /* Type to identify a resource set handle: rsethandle_t */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   839
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   840
typedef enum { WPARNAME, WPARID, RSETHANDLE } wparid_specifier; /* Type of wparid_specifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   841
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   842
typedef struct { /* WPAR identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   843
        wparid_specifier spec;  /* Specifier to choose wpar id or name */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   844
        union  {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   845
                cid_t wpar_id;                      /* WPAR ID */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   846
                rsethandle_t rset;                  /* Rset Handle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   847
                char wparname[MAXCORRALNAMELEN+1];  /* WPAR NAME */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   848
        } u;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   849
        char name[IDENTIFIER_LENGTH]; /* name of the structure element identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   850
} perfstat_id_wpar_t;
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   851
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   852
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   853
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   854
// end: libperfstat.h (AIX 5.2, 5.3, 6.1, 7.1)
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   855
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   856
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   857
#define PERFSTAT_PARTITON_TOTAL_T_LATEST perfstat_partition_total_t_71_1/* latest perfstat_partition_total_t structure */
39298
0517ab37a67c 8160565: AIX port: cleanup of libo4 wrapper stub
clanger
parents: 35594
diff changeset
   858
#define PERFSTAT_CPU_TOTAL_T_LATEST perfstat_cpu_total_t_72             /* latest perfstat_cpu_total_t structure */
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   859
#define PERFSTAT_WPAR_TOTAL_T_LATEST perfstat_wpar_total_t_71           /* latest perfstat_wpar_total_t structure */
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   860
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   861
class libperfstat {
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   862
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   863
public:
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   864
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   865
  // Load the libperfstat library (must be in LIBPATH).
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   866
  // Returns true if succeeded, false if error.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   867
  static bool init();
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   868
  static void cleanup();
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   869
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   870
  // Direct wrappers for the libperfstat functionality. All they do is
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   871
  // to call the functions with the same name via function pointers.
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   872
  // Get all available data also on newer AIX versions (PERFSTAT_CPU_TOTAL_T_LATEST).
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   873
  static int perfstat_cpu_total(perfstat_id_t *name, PERFSTAT_CPU_TOTAL_T_LATEST* userbuff,
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   874
                                int sizeof_userbuff, int desired_number);
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   875
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   876
  static int perfstat_memory_total(perfstat_id_t *name, perfstat_memory_total_t* userbuff,
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   877
                                   int sizeof_userbuff, int desired_number);
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   878
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   879
  static int perfstat_partition_total(perfstat_id_t *name, PERFSTAT_PARTITON_TOTAL_T_LATEST* userbuff,
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   880
                                      int sizeof_userbuff, int desired_number);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   881
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   882
  static void perfstat_reset();
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   883
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   884
  static int perfstat_wpar_total(perfstat_id_wpar_t *name, PERFSTAT_WPAR_TOTAL_T_LATEST* userbuff,
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   885
                                 int sizeof_userbuff, int desired_number);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   886
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   887
  static cid_t wpar_getcid();
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   888
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   889
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   890
  ////////////////////////////////////////////////////////////////
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   891
  // The convenience functions get_partitioninfo(), get_cpuinfo(), get_wparinfo() return
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   892
  // information about partition, cpu and wpars, respectivly. They can be used without
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   893
  // regard for which OS release we are on. On older AIX release, some output structure
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   894
  // members will be 0.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   895
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   896
  // Result struct for get_partitioninfo().
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   897
  struct partitioninfo_t {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   898
    // partition type info
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   899
    unsigned smt_capable :1;          /* OS supports SMT mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   900
    unsigned smt_enabled :1;          /* SMT mode is on */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   901
    unsigned lpar_capable :1;         /* OS supports logical partitioning */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   902
    unsigned lpar_enabled :1;         /* logical partitioning is on */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   903
    unsigned shared_capable :1;       /* OS supports shared processor LPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   904
    unsigned shared_enabled :1;       /* partition runs in shared mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   905
    unsigned dlpar_capable :1;        /* OS supports dynamic LPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   906
    unsigned capped :1;               /* partition is capped */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   907
    unsigned kernel_is_64 :1;         /* kernel is 64 bit */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   908
    unsigned pool_util_authority :1;  /* pool utilization available */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   909
    unsigned donate_capable :1;       /* capable of donating cycles */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   910
    unsigned donate_enabled :1;       /* enabled for donating cycles */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   911
    unsigned ams_capable:1;           /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   912
    unsigned ams_enabled:1;           /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   913
    unsigned power_save:1;            /* 1 = Power saving mode is enabled */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   914
    unsigned ame_enabled:1;           /* Active Memory Expansion is enabled */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   915
    // partition total info
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   916
    int online_cpus;                  /* number of virtual CPUs currently online on the partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   917
    int entitled_proc_capacity;       /* number of processor units this partition is entitled to receive */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   918
    int var_proc_capacity_weight;     /* partition priority weight to receive extra capacity */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   919
    int phys_cpus_pool;               /* number of the physical CPUs currently in the shared processor pool this partition belong to */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   920
    int pool_id;                      /* identifier of the shared pool of physical processors this partition is a member of */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   921
    u_longlong_t entitled_pool_capacity;  /* Entitled processor capacity of partitions pool */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   922
    char name[IDENTIFIER_LENGTH];     /* name of the logical partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   923
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   924
    u_longlong_t timebase_last;       /* most recently cpu time base (an incremented long int on PowerPC) */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   925
    u_longlong_t pool_idle_time;      /* pool idle time = number of clock tics a processor in the shared pool was idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   926
    u_longlong_t pcpu_tics_user;      /* raw number of physical processor tics in user mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   927
    u_longlong_t pcpu_tics_sys;       /* raw number of physical processor tics in system mode */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   928
    u_longlong_t pcpu_tics_idle;      /* raw number of physical processor tics idle */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   929
    u_longlong_t pcpu_tics_wait;      /* raw number of physical processor tics waiting for I/O */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   930
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   931
    u_longlong_t true_memory;          /* True Memory Size in 4KB pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   932
    u_longlong_t expanded_memory;      /* Expanded Memory Size in 4KB pages */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   933
    u_longlong_t target_memexp_factr;  /* Target Memory Expansion Factor scaled by 100 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   934
    u_longlong_t current_memexp_factr; /* Current Memory Expansion Factor scaled by 100 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   935
    u_longlong_t cmcs_total_time;      /* Total CPU time spent due to active memory expansion */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   936
  };
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   937
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   938
  // Result struct for get_cpuinfo().
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   939
  struct cpuinfo_t {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   940
    char description[IDENTIFIER_LENGTH];  // processor description (type/official name)
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   941
    u_longlong_t processorHZ;             // processor speed in Hz
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   942
    int ncpus;                            // number of active logical processors
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   943
    double loadavg[3];                    // (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   944
                                          // To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   945
    unsigned long long user_clock_ticks;  // raw total number of clock ticks spent in user mode
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   946
    unsigned long long sys_clock_ticks;   // raw total number of clock ticks spent in system mode
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   947
    unsigned long long idle_clock_ticks;  // raw total number of clock ticks spent idle
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   948
    unsigned long long wait_clock_ticks;  // raw total number of clock ticks spent waiting for I/O
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   949
  };
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   950
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   951
  // Result struct for get_wparinfo().
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   952
  struct wparinfo_t {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   953
    char name[MAXCORRALNAMELEN+1];  /* name of the Workload Partition */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   954
    unsigned short wpar_id;         /* workload partition identifier */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   955
    unsigned app_wpar :1;           /* Application WPAR */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   956
    unsigned cpu_rset :1;           /* WPAR restricted to CPU resource set */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   957
    unsigned cpu_xrset:1;           /* WPAR restricted to CPU Exclusive resource set */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   958
    unsigned cpu_limits :1;         /* CPU resource limits enforced */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   959
    unsigned mem_limits :1;         /* Memory resource limits enforced */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   960
    int cpu_limit;                  /* CPU limit in 100ths of % - 1..10000 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   961
    int mem_limit;                  /* Memory limit in 100ths of % - 1..10000 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   962
  };
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   963
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   964
  static bool get_partitioninfo(partitioninfo_t* ppi);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   965
  static bool get_cpuinfo(cpuinfo_t* pci);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents: 22831
diff changeset
   966
  static bool get_wparinfo(wparinfo_t* pwi);
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   967
};
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   968
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   969
#endif // OS_AIX_VM_LIBPERFSTAT_AIX_HPP