Cached metrics interfaces

Cached metrics interfaces are used when the system configuration changes to inform the libperfstat API that it must reset cached metrics, which consist of values that seldom change such as disk size or processor description.

The following table lists the metrics that are cached:
Object Content Sample value
perfstat_cpu_total char cpu_description [IDENTIFIER_LENGTH] u_longlong_t processorHZ PowerPC_POWER3375000000
perfstat_diskadapter The list of disk adapters The number of disk adapters u_longlong_t size u_longlong_t free char description [IDENTIFIER_LENGTH] scsi0, scsi1, ide0 3 17344 15296 Wide/Ultra-3 SCSI I/O Controller
perfstat_pagingspace The list of paging spaces The number of paging spaces char automatic char type longlong_t lpsize longlong_t mbsize char hostname [IDENTIFIER_LENGTH] char filename [IDENTIFIER_LENGTH] hd6 1 1 NFS_PAGING 16 512pompei or rootvg /var/tmp/nfsswap/swapfile1
perfstat_disk char adapter [IDENTIFIER_LENGTH] char description [IDENTIFIER_LENGTH] char vgname [IDENTIFIER_LENGTH] u_longlong_t sizeu_longlong_t free scsi0 16 Bit LVD SCSI Disk Drive rootvg 17344 15296
perfstat_diskpath char adapter [IDENTIFIER_LENGTH] scsi0
perfstat_netinterface char description [IDENTIFIER_LENGTH] Standard Ethernet Network Interface
perfstat_logicalvolume char description [IDENTIFIER_LENGTH] Logical volume1
perfstat_volumegroup char description [IDENTIFIER_LENGTH] Volume group1
You can use the following AIX® interfaces to refresh the cached metrics:
Interface Purpose Definition of interface
perfstat_reset Resets every cached metric void perfstat_reset (void);
perfstat_partial_reset Resets selected cached metrics or resets the system's minimum and maximum counters for disks void perfstat_partial_reset (char * name, u_longlong_t resetmask);
The usage of the parameters for all of the interfaces is as follows:
Parameter Usage
char *name Identifies the name of the component of the cached metric that must be reset from the libperfstat API cache. If the value of the parameter is NULL, this signifies all of the components.
u_longlong_t resetmask Identifies the category of the component if the value of the name parameter is not NULL. The possible values are:
  • FLUSH_CPUTOTAL
  • FLUSH_DISK
  • RESET_DISK_MINMAX
  • FLUSH_DISKADAPTER
  • FLUSH_DISKPATH
  • FLUSH_NETINTERFACE
  • FLUSH_PAGINGSPACE
  • FLUSH_LOGICALVOLUME
  • FLUSH_VOLUMEGROUP
If the value of the name parameter is NULL, the resetmask parameter value consists of a combination of values. For example: RESET_DISK_MINMAX|FLUSH_CPUTOTAL|FLUSH_DISK