How to sort network traffic using iftop onscreen command in Linux?
You can sort the network traffic details based on source or destination or bandwidth usage in last 2secs or bandwidth usage in last 10secs or bandwidth usage in last 40secs.
Here, we have toggled the display mode to view only the received traffic details using onscreen command option (which we have explained before) and then sorted the result using the following onscreen sort options.
Sort By Source: Press "<" - to sort the traffic details based on source,
Sort By Destination: Press ">" - to sort the traffic result based on destination,
Sort 1st / 2nd / 3rd Columns:
Press 1 - to sort based on bandwidth usage in last 2secs.
Press 2 - to sort based on bandwidth usage in last 10secs.
Press 3 - to sort based on bandwidth usage in last 40secs.
Note: Sort option results will vary based on frequent bandwidth usage updates. So, if you want to hold the sorting result, then use pause option which is explained in previous page.