Aggregate advanced accounting data.
The libaacct.a library.
#define <sys/aacct.h>
int agg_arm_stat(tran_list, arm_list);
struct aacct_tran_rec *tran_list
struct agg_arm_stat **arm_list
int agg_proc_stat(sortcrit1, sortcrit2, sortcrit3, sortcrit4, tran_list, proc_list);
int sortcrit1, sortcrit2, sortcrit3, sortcrit4
struct aacct_tran_rec *tran_list
struct agg_proc_stat **proc_list
int agg_lpar_stat(l_type, *tran_list, l_list);
int l_type
struct aacct_tran_rec *tran_list
union agg_lpar_rec *l_list
void free_agg_list(list);
void *list
The agg_proc_stat, agg_lpar_stat, and agg_arm_stat subroutines return a linked list of aggregated transaction records for process, LPAR, and ARM, respectively.
Some of the process transaction records (of type TRID_agg_proc) cannot be aggregated based on group IDs and command names. For such records, agg_proc_stat returns an asterisk (*) character as the command name and a value of -2 as the group ID. This indicates to the caller that these records cannot be aggregated.
If the aggregation is not necessary on a specific criteria, agg_proc_stat returns a value of -1 in the respective field. For example, if the aggregation is not necessary on the group ID (CRIT_GID), the retrieved list of aggregation records has a value of -1 filled in the group ID fields.
The agg_arm_list retrieves an aggregated list of ARM transaction records from the list of transaction records provided as input. The aggregated transaction records are returned to the caller through the structure pointer of type struct agg_arm_stat.
The free_agg_list subroutine frees the memory allocated to the aggregated records returned by the agg_proc_stat, agg_lpar_stat, or agg_arm_stat subroutine.
Item | Description |
---|---|
arm_list | Pointer to the linked list of struct agg_arm_stat nodes to be returned. |
l_list | Pointer to union agg_lpar_rec address to which the aggregated LPAR records are returned. |
l_type | Integer value that represents the type of LPAR resource to be aggregated. |
list | Pointer to the aggregated list to be freed. |
proc_list | Pointer to the linked list of struct agg_proc_stat nodes to be returned. |
sortcrit1, sortcrit2, sortcrit3, sortcrit4 | Integer values that represent the sorting criteria to be passed to agg_proc_stat. |
tran_list | Pointer to the input list of transaction records |
No restrictions. Any user can call this function.
Item | Description |
---|---|
0 | The call to the subroutine was successful. |
-1 | The call to the subroutine failed. |
Item | Description |
---|---|
EINVAL | The passed pointer is NULL. |
ENOMEM | Insufficient memory. |
EPERM | Permission denied. Unable to read the data file. |