1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
/*
* pr_stats.h: Include file used to display system statistics
* (C) 1999-2009 by Sebastien Godard (sysstat <at> orange.fr)
*/
#ifndef _PRF_STATS_H
#define _PRF_STATS_H
#include "common.h"
/*
***************************************************************************
* Definitions for functions used by sadf.
***************************************************************************
*/
#define PT_NOFLAG 0x0000 /* Prevent undescribed '0' in render calls */
#define PT_USEINT 0x0001 /* Use the integer final arg, not double */
#define PT_NEWLIN 0x0002 /* Terminate the current output line */
#define NOVAL 0 /* For placeholder zeros */
#define DNOVAL 0.0 /* Wilma! */
/*
* Conses are used to type independent passing
* of variable optional data into our rendering routine.
*/
typedef enum e_tcons {iv, sv} tcons; /* Types of conses */
typedef struct {
tcons t; /* Type in {iv,sv} */
union {
unsigned long int i;
char *s;
} a, b; /* Value pair, either ints or char *s */
} Cons;
/*
***************************************************************************
* Prototypes for functions used to display system statistics
***************************************************************************
*/
/* Functions used to display statistics in the format selected by sadf */
extern __print_funct_t render_pcsw_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_cpu_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_irq_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_swap_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_paging_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_io_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_memory_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_ktables_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_queue_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_serial_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_disk_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_dev_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_edev_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_nfs_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_nfsd_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_sock_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_ip_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_eip_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_icmp_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_eicmp_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_tcp_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_etcp_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_udp_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_sock6_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_ip6_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_eip6_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_icmp6_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_eicmp6_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_net_udp6_stats
(struct activity *, int, char *, int, unsigned long long);
extern __print_funct_t render_pwr_cpufreq_stats
(struct activity *, int, char *, int, unsigned long long);
/* Functions used to display statistics in XML */
extern void xprintf
(int, const char *, ...);
extern __print_funct_t xml_print_cpu_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_pcsw_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_irq_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_swap_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_paging_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_io_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_memory_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_ktables_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_queue_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_serial_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_disk_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_dev_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_edev_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_nfs_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_nfsd_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_sock_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_ip_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_eip_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_icmp_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_eicmp_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_tcp_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_etcp_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_udp_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_sock6_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_ip6_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_eip6_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_icmp6_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_eicmp6_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_net_udp6_stats
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_pwr_cpufreq_stats
(struct activity *, int, int, unsigned long long);
#endif /* _PRF_STATS_H */
|