printing number of bytes at a switch port

35 views
Skip to first unread message

Lakshmi Krishnaswamy

unread,
Aug 18, 2020, 1:28:17 PM8/18/20
to ns-3-users
Hello all,

Hope you all are doing well. I just wanted some help regarding printing out the number of bytes every second, received at a switch's port.
I am running simulations on a data center network, with leaf and spine switches - these are created using nodes (one NodeContainer for all leaves and one NodeContainer for all spines ), and there is a p2p channel installed between each leaf and spine node. There is a DropTailQueue of max.pkts = 10 set on these channels. 

In order to verify the network and if congestion is happening, I want to print out the number of bytes received by a switch's port every second. I am quite unclear of how to implement this print though. Any help, guidance or pointer to existing example or documentation would be highly appreciated. Thank you so much in advance! 

Bhaskar Kataria

unread,
Aug 19, 2020, 11:12:02 AM8/19/20
to ns-3-users
Hi,
https://gitlab.com/nsnam/ns-3-dev/-/blob/master/src/traffic-control/examples/fqcodel-l4s-example.cc#L344 here you can see that the bytes received/throughput at a particular node is measured every throughputSamplingInterval.

lakshmik...@gmail.com

unread,
Aug 19, 2020, 11:21:01 AM8/19/20
to ns-3-users
Hi,
Thank you very much for this, this is really useful -  thank you so much once again!

Reply all
Reply to author
Forward
0 new messages