FreeBSD Bugzilla – Attachment 166956 Details for
Bug 207120
sysutils/htop memory percentage column all 0%
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes CPU% to be the same as top and ps.
htop.diff (text/plain), 1.37 KB, created by
Cy Schubert
on 2016-02-13 21:23:27 UTC
(
hide
)
Description:
Fixes CPU% to be the same as top and ps.
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2016-02-13 21:23:27 UTC
Size:
1.37 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 408755) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= htop > PORTVERSION= 2.0.0 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= sysutils > > MAINTAINER= gaod@hychen.org >Index: files/patch-freebsd__FreeBSDProcessList.c >=================================================================== >--- files/patch-freebsd__FreeBSDProcessList.c (revision 408755) >+++ files/patch-freebsd__FreeBSDProcessList.c (working copy) >@@ -1,5 +1,5 @@ >---- freebsd/FreeBSDProcessList.c.orig 2016-02-13 00:37:56.160832000 +0800 >-+++ freebsd/FreeBSDProcessList.c 2016-02-13 00:38:19.671290000 +0800 >+--- freebsd/FreeBSDProcessList.c.orig 2016-02-10 12:48:39.000000000 -0800 >++++ freebsd/FreeBSDProcessList.c 2016-02-13 10:00:05.259692744 -0800 > @@ -477,8 +477,8 @@ > } > >@@ -11,3 +11,13 @@ > proc->nlwp = kproc->ki_numthreads; > proc->time = (kproc->ki_runtime + 5000) / 10000; > >+@@ -487,9 +487,6 @@ >+ // system idle process should own all CPU time left regardless of CPU count >+ if ( strcmp("idle", kproc->ki_comm) == 0 ) { >+ isIdleProcess = true; >+- } else { >+- if (cpus > 1) >+- proc->percent_cpu = proc->percent_cpu / (double) cpus; >+ } >+ } >+ if (isIdleProcess == false && proc->percent_cpu >= 99.8) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207120
: 166956 |
166957
|
168310
|
168311
|
168312