unsigned long long to keep in sync with current kernels.
WARNING: This breaks compatibility with older sar data
files format for network statistics.
+ * Changed IPv4 counters (used by sar -n { IP | EIP}) to
+ unsigned long long to keep in sync with current kernels.
+ WARNING: This breaks compatibility with older sar data
+ files format for IPv4 statistics.
* [Peter Schiffer]: Added option -y to iostat. This option
prevents iostat from displaying its first report with
statistics since system boot.
struct activity net_ip_act = {
.id = A_NET_IP,
.options = AO_NULL,
- .magic = ACTIVITY_MAGIC_BASE,
+ .magic = ACTIVITY_MAGIC_BASE + 1,
.group = G_SNMP,
#ifdef SOURCE_SADC
.f_count = NULL,
struct activity net_eip_act = {
.id = A_NET_EIP,
.options = AO_NULL,
- .magic = ACTIVITY_MAGIC_BASE,
+ .magic = ACTIVITY_MAGIC_BASE + 1,
.group = G_SNMP,
#ifdef SOURCE_SADC
.f_count = NULL,
if (!strncmp(line, "Ip:", 3)) {
if (sw) {
- sscanf(line + 3, "%*u %*u %lu %*u %*u %lu %*u %*u "
- "%lu %lu %*u %*u %*u %lu %lu %*u %lu %*u %lu",
+ sscanf(line + 3, "%*u %*u %llu %*u %*u %llu %*u %*u "
+ "%llu %llu %*u %*u %*u %llu %llu %*u %llu %*u %llu",
&st_net_ip->InReceives,
&st_net_ip->ForwDatagrams,
&st_net_ip->InDelivers,
if (!strncmp(line, "Ip:", 3)) {
if (sw) {
- sscanf(line + 3, "%*u %*u %*u %lu %lu %*u %lu %lu "
- "%*u %*u %lu %lu %*u %*u %*u %lu %*u %lu",
+ sscanf(line + 3, "%*u %*u %*u %llu %llu %*u %llu %llu "
+ "%*u %*u %llu %llu %*u %*u %*u %llu %*u %llu",
&st_net_eip->InHdrErrors,
&st_net_eip->InAddrErrors,
&st_net_eip->InUnknownProtos,
/* Structure for IP statistics */
struct stats_net_ip {
- unsigned long InReceives __attribute__ ((aligned (8)));
- unsigned long ForwDatagrams __attribute__ ((aligned (8)));
- unsigned long InDelivers __attribute__ ((aligned (8)));
- unsigned long OutRequests __attribute__ ((aligned (8)));
- unsigned long ReasmReqds __attribute__ ((aligned (8)));
- unsigned long ReasmOKs __attribute__ ((aligned (8)));
- unsigned long FragOKs __attribute__ ((aligned (8)));
- unsigned long FragCreates __attribute__ ((aligned (8)));
+ unsigned long long InReceives __attribute__ ((aligned (16)));
+ unsigned long long ForwDatagrams __attribute__ ((aligned (16)));
+ unsigned long long InDelivers __attribute__ ((aligned (16)));
+ unsigned long long OutRequests __attribute__ ((aligned (16)));
+ unsigned long long ReasmReqds __attribute__ ((aligned (16)));
+ unsigned long long ReasmOKs __attribute__ ((aligned (16)));
+ unsigned long long FragOKs __attribute__ ((aligned (16)));
+ unsigned long long FragCreates __attribute__ ((aligned (16)));
};
#define STATS_NET_IP_SIZE (sizeof(struct stats_net_ip))
/* Structure for IP errors statistics */
struct stats_net_eip {
- unsigned long InHdrErrors __attribute__ ((aligned (8)));
- unsigned long InAddrErrors __attribute__ ((aligned (8)));
- unsigned long InUnknownProtos __attribute__ ((aligned (8)));
- unsigned long InDiscards __attribute__ ((aligned (8)));
- unsigned long OutDiscards __attribute__ ((aligned (8)));
- unsigned long OutNoRoutes __attribute__ ((aligned (8)));
- unsigned long ReasmFails __attribute__ ((aligned (8)));
- unsigned long FragFails __attribute__ ((aligned (8)));
+ unsigned long long InHdrErrors __attribute__ ((aligned (16)));
+ unsigned long long InAddrErrors __attribute__ ((aligned (16)));
+ unsigned long long InUnknownProtos __attribute__ ((aligned (16)));
+ unsigned long long InDiscards __attribute__ ((aligned (16)));
+ unsigned long long OutDiscards __attribute__ ((aligned (16)));
+ unsigned long long OutNoRoutes __attribute__ ((aligned (16)));
+ unsigned long long ReasmFails __attribute__ ((aligned (16)));
+ unsigned long long FragFails __attribute__ ((aligned (16)));
};
#define STATS_NET_EIP_SIZE (sizeof(struct stats_net_eip))