Waterfall interview question

How to get port statistics in Linux