summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wong <markwkm@gmail.com>2009-03-02 20:38:04 -0800
committerMark Wong <markwkm@gmail.com>2009-03-02 20:38:04 -0800
commit26f15d8dd5193af6ff23c5b8a55a8b1865b6484c (patch)
tree7fb4141772b8eb295e3fbb58f96fa1fa3fe270e9
parent102f5fd3589602db48caae844233904e826191dc (diff)
Fixed the calculation of wchar when determining differential stats for
i/o statistics in Linux.
-rw-r--r--machine/m_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/machine/m_linux.c b/machine/m_linux.c
index b96b98e..d8037b5 100644
--- a/machine/m_linux.c
+++ b/machine/m_linux.c
@@ -1357,7 +1357,7 @@ update_io_stats(struct io_node *node, pid_t pid, long long rchar,
{
/* Calculate difference between previous and current values. */
node->diff_rchar = rchar - node->old_rchar;
- node->diff_wchar = wchar - node->old_rchar;
+ node->diff_wchar = wchar - node->old_wchar;
node->diff_syscr = syscr - node->old_syscr;
node->diff_syscw = syscw - node->old_syscw;
node->diff_read_bytes = read_bytes - node->old_read_bytes;