Enqueue and dequeue records can be selected in trace output with the tcsim_filter script.
Usage:
tcsim_filter -c -s time -e-d selector output file
The following fields are recognized:
tos | TOS byte |
len | Total length field |
src | Source IP address |
dst | Destination IP address |
sport | Source port (TCP or UDP) |
dport | Destination port (TCP or UDP) |
dev | Device name (e.g. eth0) |
Selected records are condensed into an identification string that begins with the event type (E or D), followed by the hexadecimal values of all output fields, separated by colons.
When counting, the records with the same ID string are counted. When printing records, each line contains the time, the ID string, the packet length in bytes, and the skb address (or, if using -g, the generation number), separated by spaces.
Examples:
tcsim examples/dsmark+policing | tcsim_filter -c tos D:00 201 D:b8 139 E:00 201 E:01 201
tcsim examples/dsmark+policing | tcsim_filter -c tos=0xb8 D 141
tcsim examples/dsmark+policing | tcsim_filter src | sed 4q 0.000000 E:0a000001 1000 0x80b7888 0.000000 D:0a000001 1000 0x80b7888 0.000000 E:0a000001 1000 0x80ba060 0.000800 D:0a000001 1000 0x80ba060