fix linux io counter to return relative I/Os
diff --git a/hyracks/hyracks-client/src/test/java/edu/uci/ics/hyracks/client/stats/HyracksUtils.java b/hyracks/hyracks-client/src/test/java/edu/uci/ics/hyracks/client/stats/HyracksUtils.java
index 7bda39d..a58aa9c 100644
--- a/hyracks/hyracks-client/src/test/java/edu/uci/ics/hyracks/client/stats/HyracksUtils.java
+++ b/hyracks/hyracks-client/src/test/java/edu/uci/ics/hyracks/client/stats/HyracksUtils.java
@@ -53,6 +53,7 @@
         ccConfig.defaultMaxJobAttempts = 0;
         ccConfig.jobHistorySize = 0;
         ccConfig.profileDumpPeriod = -1;
+        ccConfig.heartbeatPeriod = 50;
 
         // cluster controller
         cc = new ClusterControllerService(ccConfig);
diff --git a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/profiling/IOCounterLinux.java b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/profiling/IOCounterLinux.java
index 589857b..1e8baa1 100644
--- a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/profiling/IOCounterLinux.java
+++ b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/profiling/IOCounterLinux.java
@@ -25,11 +25,19 @@
     public static final String COMMAND2 = "cat /proc/self/io";
     public static final int PAGE_SIZE = 4096;
 
+    private final long baseReads;
+    private final long baseWrites;
+
+    public IOCounterLinux() {
+        baseReads = getReads();
+        baseWrites = getWrites();
+    }
+
     @Override
     public long getReads() {
         try {
             long reads = extractColumn(4);
-            return reads;
+            return reads - baseReads;
         } catch (IOException e) {
             try {
                 long reads = extractRow(4);
@@ -44,7 +52,7 @@
     public long getWrites() {
         try {
             long writes = extractColumn(5);
-            return writes;
+            return writes - baseWrites;
         } catch (IOException e) {
             try {
                 long writes = extractRow(5);
@@ -73,6 +81,7 @@
                     String column = tokenizer.nextToken();
                     if (i == columnIndex) {
                         ios += Long.parseLong(column);
+                        break;
                     }
                     i++;
                 }