From ff9995e98207b007cc7868c7b398ecc1dd543485 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 19 Apr 2013 19:09:23 +0200 Subject: [PATCH] Replace busybox free with *real* free from procps-ng Busybox free reports incorrectly the used and free memory on a system. Which makes it harder to understand and compare information from other sources. In the same effort we add some other useful procps-ng tools, like pgrep, pkill, pmap, slabtop, vmstat and watch. --- packages/debug/meta | 2 +- packages/debug/procps-ng/build | 35 ++++++++++++++++++ packages/debug/procps-ng/install | 33 +++++++++++++++++ packages/debug/procps-ng/meta | 36 +++++++++++++++++++ packages/sysutils/busybox/config/busybox.conf | 2 +- 5 files changed, 106 insertions(+), 2 deletions(-) create mode 100755 packages/debug/procps-ng/build create mode 100755 packages/debug/procps-ng/install create mode 100644 packages/debug/procps-ng/meta diff --git a/packages/debug/meta b/packages/debug/meta index 99b211cea6..718659885d 100644 --- a/packages/debug/meta +++ b/packages/debug/meta @@ -25,7 +25,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.openelec.tv" PKG_URL="" -PKG_DEPENDS="acpica cpuid dmidecode dstat evtest gdb hddtemp htop i2c-tools iftop pmtools powertop smem strace wireless_tools tcpdump iperf" +PKG_DEPENDS="acpica cpuid dmidecode dstat evtest gdb hddtemp htop i2c-tools iftop pmtools powertop procps-ng smem strace wireless_tools tcpdump iperf" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" PKG_SECTION="debug" diff --git a/packages/debug/procps-ng/build b/packages/debug/procps-ng/build new file mode 100755 index 0000000000..a9068d2af6 --- /dev/null +++ b/packages/debug/procps-ng/build @@ -0,0 +1,35 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/ncurses" +export LDFLAGS="$LDFLAGS -ltinfo" + +cd $PKG_BUILD +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + +make diff --git a/packages/debug/procps-ng/install b/packages/debug/procps-ng/install new file mode 100755 index 0000000000..079f15bba7 --- /dev/null +++ b/packages/debug/procps-ng/install @@ -0,0 +1,33 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/bin/ + cp $PKG_BUILD/proc/.libs/libproc*so* $INSTALL/usr/lib/ + cp $PKG_BUILD/.libs/free $INSTALL/usr/bin/ + cp $PKG_BUILD/.libs/pgrep $INSTALL/usr/bin/ + ln -f $INSTALL/usr/bin/pgrep $INSTALL/usr/bin/pkill + cp $PKG_BUILD/.libs/pmap $INSTALL/usr/bin/ + cp $PKG_BUILD/.libs/slabtop $INSTALL/usr/bin/ + cp $PKG_BUILD/.libs/vmstat $INSTALL/usr/bin/ + cp $PKG_BUILD/.libs/watch $INSTALL/usr/bin/ diff --git a/packages/debug/procps-ng/meta b/packages/debug/procps-ng/meta new file mode 100644 index 0000000000..f1c44f1f7f --- /dev/null +++ b/packages/debug/procps-ng/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="procps-ng" +PKG_VERSION="3.3.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://gitorious.org/procps/procps" +PKG_URL="$SOURCEFORGE_SRC/procps-ng/Production/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="ncurses" +PKG_BUILD_DEPENDS="toolchain ncurses" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="procps: Small useful utilities that give information about processes" +PKG_LONGDESC="procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/busybox/config/busybox.conf b/packages/sysutils/busybox/config/busybox.conf index 55d7768365..f8b5d4d7c9 100644 --- a/packages/sysutils/busybox/config/busybox.conf +++ b/packages/sysutils/busybox/config/busybox.conf @@ -904,7 +904,7 @@ CONFIG_FEATURE_TOP_SMP_PROCESS=y CONFIG_FEATURE_TOPMEM=y CONFIG_UPTIME=y # CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set -CONFIG_FREE=y +# CONFIG_FREE is not set CONFIG_FUSER=y CONFIG_KILL=y CONFIG_KILLALL=y