JSONArray netInterfaces = new JSONArray();
for (int i = 0; i < netIf.length; i++) {
NetInterfaceStat net = new NetInterfaceStat();
net = sigar.getNetInterfaceStat(netIf[i]);
JSONObject netMap = new JSONObject();
netMap.putAll(net.toMap());
if(previousNetworkStats.containsKey(netIf[i])) {
JSONObject deltaMap = previousNetworkStats.get(netIf[i]);
deltaMap.put("RxBytes", Long.parseLong(netMap.get("RxBytes").toString()) - Long.parseLong(deltaMap.get("RxBytes").toString()));
deltaMap.put("RxDropped", Long.parseLong(netMap.get("RxDropped").toString()) - Long.parseLong(deltaMap.get("RxDropped").toString()));
deltaMap.put("RxErrors", Long.parseLong(netMap.get("RxErrors").toString()) - Long.parseLong(deltaMap.get("RxErrors").toString()));