From: Peter Korsgaard Date: Tue, 21 Oct 2008 12:38:31 +0000 (-0000) Subject: package/memstat: add memstat package X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=923e61ee5bda17dc158dad1cd13eb3948ee92752;p=buildroot.git package/memstat: add memstat package Memstat lists all the processes, executables, and shared libraries that are using up virtual memory. It's helpful to see how the shared memory is used and which 'old' libs are loaded. --- diff --git a/package/Config.in b/package/Config.in index 339c1531be..84aaa3eab8 100644 --- a/package/Config.in +++ b/package/Config.in @@ -94,6 +94,7 @@ source "package/lsof/Config.in" source "package/ltp-testsuite/Config.in" source "package/ltrace/Config.in" source "package/ltt/Config.in" +source "package/memstat/Config.in" if !BR2_PACKAGE_BUSYBOX_HIDE_OTHERS source "package/module-init-tools/Config.in" source "package/modutils/Config.in" diff --git a/package/memstat/Config.in b/package/memstat/Config.in new file mode 100644 index 0000000000..ca34ea37be --- /dev/null +++ b/package/memstat/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MEMSTAT + bool "memstat" + help + Memstat lists all the processes, executables, and shared + libraries that are using up virtual memory. It's helpful to + see how the shared memory is used and which 'old' libs are + loaded. diff --git a/package/memstat/memstat.mk b/package/memstat/memstat.mk new file mode 100644 index 0000000000..5e07a41111 --- /dev/null +++ b/package/memstat/memstat.mk @@ -0,0 +1,49 @@ +############################################################# +# +# memstat +# +############################################################# + +MEMSTAT_VERSION:=0.5 +MEMSTAT_SOURCE:=memstat_$(MEMSTAT_VERSION).tar.gz +MEMSTAT_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/memstat +MEMSTAT_DIR:=$(BUILD_DIR)/memstat-$(MEMSTAT_VERSION) + +$(DL_DIR)/$(MEMSTAT_SOURCE): + $(WGET) -P $(DL_DIR) $(MEMSTAT_SITE)/$(MEMSTAT_SOURCE) + +$(MEMSTAT_DIR)/.unpacked: $(DL_DIR)/$(MEMSTAT_SOURCE) + $(ZCAT) $(DL_DIR)/$(MEMSTAT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + toolchain/patch-kernel.sh $(MEMSTAT_DIR) package/memstat/ memstat-$(MEMSTAT_VERSION)\*.patch + touch $@ + +$(MEMSTAT_DIR)/.configured: $(MEMSTAT_DIR)/.unpacked + touch $@ + +$(MEMSTAT_DIR)/memstat: $(MEMSTAT_DIR)/.configured + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(@D)/memstat.c -o $@ + +$(TARGET_DIR)/usr/bin/memstat: $(MEMSTAT_DIR)/memstat + [ -e $(TARGET_DIR)/etc/memstat.conf ] || \ + $(INSTALL) -m 0644 -D $(^D)/memstat.conf $(TARGET_DIR)/etc + $(INSTALL) -m 0755 -D $^ $@ + $(STRIPCMD) $(STRIP_STRIP_ALL) $@ + +memstat: uclibc $(TARGET_DIR)/usr/bin/memstat + +memstat-source: $(DL_DIR)/$(MEMSTAT_SOURCE) + +memstat-clean: + rm -f $(MEMSTAT_DIR)/memstat \ + $(TARGET_DIR)/etc/memstat.conf $(TARGET_DIR)/usr/bin/memstat + +memstat-dirclean: + rm -rf $(MEMSTAT_DIR) +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_MEMSTAT)),y) +TARGETS+=memstat +endif