[PATCH 2/3] nfsstat: -Z showing incorrect server stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The server stats were not being updated with the
-Z options causing the stats to be incorrect.
    
Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>

diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
index 6d81f66..5adb571 100644
--- a/utils/nfsstat/nfsstat.c
+++ b/utils/nfsstat/nfsstat.c
@@ -442,7 +442,11 @@ main(int argc, char **argv)
 			}
 			fflush(stdout);
 
-			update_old_counters(clientinfo_tmp, clientinfo);
+			if (opt_srv)
+				update_old_counters(serverinfo_tmp, serverinfo);
+			if (opt_clt)
+				update_old_counters(clientinfo_tmp, clientinfo);
+
 			sleep(sleep_time);
 		}	
 	} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux