private List<DataEntity> buildNetworkInfo() {
List<DataEntity> entities = new ArrayList<DataEntity>();
for (String netInterface : m_envConfig.getTrafficInterfaceList()) {
try {
NetInterfaceStat curIfStat = m_sigar.getNetInterfaceStat(netInterface);
NetInterfaceStat preIfStat = m_preIfStatMap.get(netInterface);
if (preIfStat != null) {
Map<String, Double> values = new HashMap<String, Double>();
double totalRxBytes = curIfStat.getRxBytes() - preIfStat.getRxBytes();
double totalTxBytes = curIfStat.getTxBytes() - preIfStat.getTxBytes();
values.put(buildSystemId(netInterface + "-inFlow"), totalRxBytes);
values.put(buildSystemId(netInterface + "-outFlow"), totalTxBytes);
if (m_envConfig.getPackageInterface().equals(netInterface)) {
double txDropped = curIfStat.getTxDropped() - preIfStat.getTxDropped();
double txErrors = curIfStat.getTxErrors() - preIfStat.getTxErrors();
double txCollisions = curIfStat.getTxCollisions() - preIfStat.getTxCollisions();
values.put(buildSystemId(netInterface + "-dropped"), txDropped);
values.put(buildSystemId(netInterface + "-errors"), txErrors);
values.put(buildSystemId(netInterface + "-collisions"), txCollisions);
}