Skip to content

Commit

Permalink
Replace busybox free with *real* free from procps-ng
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dagwieers committed Apr 19, 2013
1 parent e4adbcc commit 7a9953f
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/debug/meta
Expand Up @@ -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"
Expand Down
35 changes: 35 additions & 0 deletions 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
33 changes: 33 additions & 0 deletions 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/
36 changes: 36 additions & 0 deletions 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"
2 changes: 1 addition & 1 deletion packages/sysutils/busybox/config/busybox.conf
Expand Up @@ -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
Expand Down

0 comments on commit 7a9953f

Please sign in to comment.