# FreeBSD Manual Pages

IPAGGMANIP(1) IPAGGMANIP(1)NAMEipaggmanip - manipulate aggregate statistics, often of network trafficSYNOPSISipaggmanip [transformation options...] [file] >outputDESCRIPTIONTheipaggmanipprogram reads an aggregate file summarizing IP trace data (or other data), transforms that file or calculates one of its statistics, and writes the result to standard output. Aggregate files use the format produced byipaggcreate(1), and can be text or binary. An aggregate file consists of pairs oflabelsandcounts. The resulting dataset is modeled either as a partial function mapping labels to counts, or as a multiset of labels. Elements of the multiset are called "packets" for convenience, although counts need not correspond to network packets. For example, the--sampleoption is described as sampling "packets"; this means that the aggregate file is treated as a multiset of labels, and each element of the multiset is dropped with a uniform probability. When an option refers explicitly to a "label", the partial function representation is assumed. Thus, the--num-labelsoption reports the number of labels. This is the same as the number of labels whose count is greater than 0, since labels with 0 counts are left out of the partial function. Several options refer to "p-aggregates". Ap-aggregate consists of a set of labels whose high-orderpbits are the same. Labels are 32 bits long, so a 32-aggregate is the same as a label. Consider an aggregate file with the following data: 0 3 1 2 2 1 This file contains two 31-aggregates, as follows: 0 5 # combines labels 0 and 1 2 1 # only label 2 Ap-aggregate label has the lower 32-pbits set to zero.OPTIONSTransformationsTransformation options change an aggregate file into another aggregate file. You may supply several transformation options; they are applied in order. Thus, for example, `ipaggmanip--prefix16--posterize' will read an aggregate file, aggregate to prefix level 16, and then replace all nonzero counts with 1. This has the same effect as `ipaggmanip--prefix16 | ipaggmanip--posterize'.--prefixp,-ppAggregates to prefix levelp. That is, replaces each label with itsp-aggregate's label and outputs the result. The counts from any labels in the same aggregate are combined.--posterize,-PReplaces each label's (nonzero) count with 1.--samplenSample packets with uniform random probability 1/n. The output will have roughlyntimes fewer packets compared with the input.--cullnReduce the input to at mostnpackets by randomly sampling packets. Input aggregates with no more thannpackets are output unchanged.--cull-labelsnReduce the input to at mostnlabels by randomly sampling labels. Input aggregates withnor fewer labels are output unchanged. If a label is included in the output, then its count is the same as in the input.--cull-labels-by-packetsnReduce the input to at mostnlabels by randomly samplingpackets. That is, throw away packets one at a time until the aggregate has at mostnlabels. Input aggregates withnor fewer labels are output unchanged. Labels included in the output may have lower counts than in the input because of the packet sampling.--cut-smallernDrop labels with count less thann. Other labels are left unchanged.--cut-largernDrop labels with count greater than or equal ton.--cut-smaller-aggregatesp,nDrop all labels whose containingp-aggregates contain less thannpackets. For instance, given this input: 0 1 1 3 2 1 3 1 the `--cut-smaller-aggregates31,3' option would produce: 0 1 1 3 Labels 2 and 3 have been dropped because their shared 31-aggregate contains only 2 packets.--cut-larger-aggregatesp,nDrop all labels whose containingp-aggregates contain greater than or equal tonpackets.--cut-smaller-label-aggregatesp,nDrop all labels whose containingp-aggregates contain greater than or equal tonlabels. For instance, given this input: 0 1 1 1 2 1 4 1 5 1 the `--cut-smaller-label-aggregates30,3' option would produce: 0 1 1 1 2 1 Labels 4 and 5 have been dropped because their shared 30-aggregate contains only 2 labels.--cut-larger-label-aggregatesp,nDrop all labels whose containingp-aggregates contain greater than or equal tonlabels.--fake-by-discriminating-prefixes[=type]--fake-by-branching-counts--fake-by-dirichlet--remap-prefixesargActionsAction options calculate a statistic from an aggregate file and output that statistic. Eachipaggmaniprun can contain at most one action. Unless otherwise noted, statistics containing multiple numbers are output on one line, separated by spaces.--num-labels,-nOutput the number of labels.--num-in-prefixesOutput the number of activep-aggregates for eachp, 0<=p<=32. The result is 33 space-separated numbers; the first is the number of active 0-aggregates, the last the number of active 32-aggregates (that is, the number of labels). Thepth number is at most 2^p.--num-in-left-prefixesOutput the number of active left-handp-aggregates for eachp, 0<=p<=32. A left-handp-aggregate has its lowest-order bit equal to 0. Consider label 6, which identifies a 32-aggregate and a 31-aggregate. (It does not identify a 30-aggregate or above.) Label 6 is a left-hand 32-aggregate, since bit 31 is 0, but it isright-hand 31-aggregate, since bit 30 is 1. As a special case, the single 0-aggregate is considered left-hand. The result is 33 space-separated numbers, as in--num-in-prefixes.--discriminating-prefix-countsOutput the number of labels that have discriminating prefixpfor eachp, 0<=p<=32. The discriminating prefix for a labelLis the smallestpso that thep-aggregate containingLcontains no other label. The result is 33 space-separated numbers whose sum will equal--num-labels.--all-discriminating-prefix-countsThe output is 33 lines, numbered 0 through 32. Line numberpequals the result of `--prefixp--discriminating-prefix-counts' for the input data: that is, the discriminating prefixes for the data'sp-aggregates. The discriminating prefix for ap-aggregate must be less than or equal top, so linepcontainsp+1 space- separated numbers.--countsOutput the count for each active label, sorted in label order. The result is--num-labelsspace-separated numbers.--sorted-countsOutput the count for each active label, sorted in descending order by count. The result is--num-labelsspace-separated numbers.--count-countsFor each countc, calculaten, the number of labels that have countc. Output a series of lines containing "cn", sorted in ascending order byc.--container-countspCalculate the number of packets in each label's containingp-aggregate. Output each active label's value, sorted in label order. The result is--num-labelsspace-separated numbers.--balancep--average-and-variance--average-and-variance-by-prefix--haar-wavelet-energy--balancen--balance-histogramn,nbuckets--branching-countsp,step--all-branching-countsstep--conditional-split-countsp--correlation-size-container-addressespMultiplefiles--each,-e--or,-|--and,-&--minus--xor,-^--and-list--assign-countsOtheroptions--readfile,-rfile--outputfile,-ofile--binary,-b--text--ip--help,-hPrint a help message to the standard output, then exit.--version,-vPrint version number and license information to the standard output, then exit.SEE ALSOipaggcreate(1),tcpdump(1),tcpdpriv(1),click(1),ipsumdump(1) See http://www.pdos.csail.mit.edu/click/ for more on Click.AUTHOREddie Kohler <kohler@cs.ucla.edu>, based on the Click modular router. Version 1.86 2014-05-02 IPAGGMANIP(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | SEE ALSO | AUTHOR

Want to link to this manual page? Use this URL:

<https://www.freebsd.org/cgi/man.cgi?query=ipaggmanip&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>