Make process memory percentage calculation saner.

This commit is contained in:
Hisham Muhammad 2007-04-10 16:27:12 +00:00
parent f56c8014f7
commit d46dcf99fd
1 changed files with 2 additions and 2 deletions

View File

@ -602,8 +602,8 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
process->percent_cpu = (process->utime + process->stime - lasttimes) /
period * 100.0;
process->percent_mem = process->m_resident /
(float)(this->usedMem - this->cachedMem - this->buffersMem) *
process->percent_mem = (process->m_resident * PAGE_SIZE) /
(float)(this->totalMem) *
100.0;
this->totalTasks++;