edit the NetworkInterfaceMonitor.java

This commit is contained in:
fanfuxiaoran 2013-09-23 19:42:23 +08:00
parent 61ffffa751
commit a969d32a83
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ public class NetworkInterfaceMonitor extends LinuxFileRead {
while ((nextline = br.readLine()) != null) {
if (nextline.contains("eth")) {
token = new StringTokenizer(nextline);
String instance = token.nextToken();// instance
String instance = token.nextToken().replace(":", "");// instance
instances.add(instance);
String str = token.nextToken();// received bytes
bytesReceived.put(instance, Double.parseDouble(str));
@ -88,7 +88,7 @@ public class NetworkInterfaceMonitor extends LinuxFileRead {
while ((nextline = br.readLine()) != null) {
if (nextline.contains("eth")) {
token = new StringTokenizer(nextline);
String instance = token.nextToken();// instance
String instance = token.nextToken().replace(":", "");// instance
String str = token.nextToken();// received bytes
bytesReceived.put(instance, Double.parseDouble(str)