mirror of https://github.com/xzeldon/htop.git
parent
686309e34c
commit
3bed682b1e
|
@ -236,10 +236,8 @@ static void NetBSDProcessList_scanProcs(NetBSDProcessList* this) {
|
||||||
proc->pgrp = kproc->p__pgid;
|
proc->pgrp = kproc->p__pgid;
|
||||||
proc->isKernelThread = proc->pgrp == 0;
|
proc->isKernelThread = proc->pgrp == 0;
|
||||||
proc->isUserlandThread = proc->pid != proc->tgid;
|
proc->isUserlandThread = proc->pid != proc->tgid;
|
||||||
proc->st_uid = kproc->p_uid;
|
|
||||||
proc->starttime_ctime = kproc->p_ustart_sec;
|
proc->starttime_ctime = kproc->p_ustart_sec;
|
||||||
Process_fillStarttimeBuffer(proc);
|
Process_fillStarttimeBuffer(proc);
|
||||||
proc->user = UsersTable_getRef(this->super.usersTable, proc->st_uid);
|
|
||||||
ProcessList_add(&this->super, proc);
|
ProcessList_add(&this->super, proc);
|
||||||
|
|
||||||
NetBSDProcessList_updateExe(kproc, proc);
|
NetBSDProcessList_updateExe(kproc, proc);
|
||||||
|
@ -254,6 +252,11 @@ static void NetBSDProcessList_scanProcs(NetBSDProcessList* this) {
|
||||||
NetBSDProcessList_updateCwd(kproc, proc);
|
NetBSDProcessList_updateCwd(kproc, proc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (proc->st_uid != kproc->p_uid) {
|
||||||
|
proc->st_uid = kproc->p_uid;
|
||||||
|
proc->user = UsersTable_getRef(this->super.usersTable, proc->st_uid);
|
||||||
|
}
|
||||||
|
|
||||||
proc->m_virt = kproc->p_vm_vsize;
|
proc->m_virt = kproc->p_vm_vsize;
|
||||||
proc->m_resident = kproc->p_vm_rssize;
|
proc->m_resident = kproc->p_vm_rssize;
|
||||||
proc->percent_mem = (proc->m_resident * pageSizeKB) / (double)(this->super.totalMem) * 100.0;
|
proc->percent_mem = (proc->m_resident * pageSizeKB) / (double)(this->super.totalMem) * 100.0;
|
||||||
|
|
Loading…
Reference in New Issue