Changeset 4423dc7 for tools/tracestats


Ignore:
Timestamp:
12/03/07 23:11:00 (13 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
fdc7502
Parents:
25024fd
Message:

Add support to various tools for outputting the number of dropped packets
they've seen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracestats/tracestats.c

    rfbc4342 r4423dc7  
    8585        uint64_t count = 0;
    8686        uint64_t bytes = 0;
     87        uint64_t packets;
    8788
    8889        fprintf(stderr,"%s:\n",uri);
     
    134135                filters[i].count=0;
    135136        }
     137        packets=trace_get_received_packets(trace);
     138        if (packets!=UINT64_MAX)
     139                fprintf(stderr,"%30s:\t%12" PRIu64"\n",
     140                                "Input packets", packets);
     141        packets=trace_get_filtered_packets(trace);
     142        if (packets!=UINT64_MAX)
     143                fprintf(stderr,"%30s:\t%12" PRIu64"\n",
     144                                "Filtered packets", packets);
     145        packets=trace_get_dropped_packets(trace);
     146        if (packets!=UINT64_MAX)
     147                fprintf(stderr,"%30s:\t%12" PRIu64"\n",
     148                                "Dropped packets",packets);
     149        packets=trace_get_accepted_packets(trace);
     150        if (packets!=UINT64_MAX)
     151                fprintf(stderr,"%30s:\t%12" PRIu64 "\n",
     152                                "Accepted Packets",packets);
    136153        printf("%30s:\t%12"PRIu64"\t%12" PRIu64 "\n","Total",count,bytes);
    137154        totcount+=count;
Note: See TracChangeset for help on using the changeset viewer.