what I meant is no way to infer link utilisation from rtt and loss. In
stead, you may try to install trace on every node, e.g.
void FlowTrace::SetupTxTrace(int dev_id, int ith_id)
{
std::ostringstream oss;
oss << "/NodeList/"<<dev_id<<"/DeviceList/"<<ith_id<<"/
$ns3::CsmaNetDevice/TxQueue/Dequeue";
Config::Connect (oss.str (), MakeCallback (&FlowTrace::TxTrace,
this));
}
and then in the callback, capture number of bytes entering the link.
void FlowTrace::TxTrace(std::string context, Ptr<Packet const> packet)
{
total_bytes[dev][iface]+=packet->GetSize();
}
and then compute link utilisation for every specified time window
(e.g. 1s)
void FlowTrace::CalcStatictis()
{
//compute link utilisation
...
...
Simulator::Schedule (Seconds (1), &FlowTrace::CalcStatictis,
this);
}
Hope this helps.
-Posco