diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2014-04-24 19:40:47 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-04-24 19:40:47 -0300 |
commit | e0209da88faf3b390d71ff174065abd407abfdfd (patch) | |
tree | 8525c6da1e7f8b4469f27758bbc31631226d15e2 /ProcessList.c | |
parent | 4e2c2d79271bfecffcbe3166dde2d2fa04bdc746 (diff) |
Support pagefaults stats. Closes #45.
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ProcessList.c b/ProcessList.c index 908d88fc..d3621155 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -444,10 +444,14 @@ static bool ProcessList_readStatFile(Process *process, const char* dirname, cons location += 1; process->flags = strtoul(location, &location, 10); location += 1; - location = strchr(location, ' ')+1; - location = strchr(location, ' ')+1; - location = strchr(location, ' ')+1; - location = strchr(location, ' ')+1; + process->minflt = strtoull(location, &location, 10); + location += 1; + process->cminflt = strtoull(location, &location, 10); + location += 1; + process->majflt = strtoull(location, &location, 10); + location += 1; + process->cmajflt = strtoull(location, &location, 10); + location += 1; process->utime = strtoull(location, &location, 10); location += 1; process->stime = strtoull(location, &location, 10); |