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.
This commit is contained in:
Dag Wieers 2013-04-19 19:09:23 +02:00 committed by Stephan Raue
parent 16442f04bb
commit ff9995e982
5 changed files with 106 additions and 2 deletions

View File

@ -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"

35
packages/debug/procps-ng/build Executable file
View File

@ -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

View File

@ -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/

View File

@ -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"

View File

@ -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