Closed chaos-zhu closed 2 years ago
I think inputMb and outputMb should not be affected by interval. Please correct any mistakes
// Compute input output metrics[oldStats[i].interface]['inputMb'] = parseFloat(((newStats[i].inputBytes - oldStats[i].inputBytes) / interval * 1000 / 1000000).toFixed(2)) metrics[oldStats[i].interface]['outputMb'] = parseFloat(((newStats[i].outputBytes - oldStats[i].outputBytes) / interval * 1000 / 1000000).toFixed(2)) // When I get it every 10 seconds, it's no longer accurate netstat.inOut(10*1000) // 10s