summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-16 14:52:08 -0200
committerHisham <hisham@gobolinux.org>2016-02-16 14:52:08 -0200
commit0627a5f0e90d09e9cd6c6e81a1265b5943c31341 (patch)
tree794eb8d4e9cc25c327ab706997bd359c284e120d
parente0c364b9cce211c63bce5460001d7cc7a447ca83 (diff)
parentd10f4f615a88c41046e54c4d2e23dc2f403fa1f5 (diff)
Merge branch 'master' of https://github.com/hishamhm/htop
-rwxr-xr-xautogen.sh14
-rw-r--r--freebsd/FreeBSDProcessList.c2
2 files changed, 3 insertions, 13 deletions
diff --git a/autogen.sh b/autogen.sh
index a3b71cce..c07e0854 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,15 +1,3 @@
#!/bin/sh
-
-glibtoolize=$(which glibtoolize 2> /dev/null)
-if [ ${#glibtoolize} -gt 0 ]
-then libtoolize=glibtoolize
-else libtoolize=libtoolize
-fi
-
mkdir -p m4
-aclocal -I m4
-autoconf
-autoheader
-$libtoolize --copy --force
-automake --add-missing --copy
-
+autoreconf --install --force
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c
index b9359e54..06499beb 100644
--- a/freebsd/FreeBSDProcessList.c
+++ b/freebsd/FreeBSDProcessList.c
@@ -483,6 +483,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
proc->time = (kproc->ki_runtime + 5000) / 10000;
proc->percent_cpu = 100.0 * ((double)kproc->ki_pctcpu / (double)kernelFScale);
+ proc->percent_mem = 100.0 * (proc->m_resident * PAGE_SIZE_KB) / (double)(this->totalMem);
+
if (proc->percent_cpu > 0.1) {
// system idle process should own all CPU time left regardless of CPU count
if ( strcmp("idle", kproc->ki_comm) == 0 ) {