All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] atop: new package
Date: Fri,  7 Oct 2016 17:30:28 -0300	[thread overview]
Message-ID: <20161007203031.21528-1-ricardo.martincoski@datacom.ind.br> (raw)

Atop is an ASCII full-screen performance monitor for Linux.

- install only the basic functionality (command line tool atop).

- add patch to fix musl build by removing unused include of termio.h.
  Patch was accepted upstream.

Support for extra functionality can be added by follow-up patches:
- init scripts (sysv and systemd) to autostart logging the system
  activity.
- process accounting (needs counterpart enabled in the kernel).

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
---
 package/Config.in                                  |  1 +
 .../0001-remove-unused-include-of-termio.h.patch   | 52 ++++++++++++++++++++++
 package/atop/Config.in                             | 18 ++++++++
 package/atop/atop.hash                             |  2 +
 package/atop/atop.mk                               | 21 +++++++++
 5 files changed, 94 insertions(+)
 create mode 100644 package/atop/0001-remove-unused-include-of-termio.h.patch
 create mode 100644 package/atop/Config.in
 create mode 100644 package/atop/atop.hash
 create mode 100644 package/atop/atop.mk

diff --git a/package/Config.in b/package/Config.in
index 2941c45..a1da86a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1687,6 +1687,7 @@ endmenu
 menu "System tools"
 	source "package/acl/Config.in"
 	source "package/android-tools/Config.in"
+	source "package/atop/Config.in"
 	source "package/attr/Config.in"
 	source "package/audit/Config.in"
 	source "package/bootutils/Config.in"
diff --git a/package/atop/0001-remove-unused-include-of-termio.h.patch b/package/atop/0001-remove-unused-include-of-termio.h.patch
new file mode 100644
index 0000000..3a04b05
--- /dev/null
+++ b/package/atop/0001-remove-unused-include-of-termio.h.patch
@@ -0,0 +1,52 @@
+remove unused include of termio.h
+
+This header is not provided by musl, leading to build failures.
+
+Patch status: accepted upstream.
+
+Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
+---
+diff -purN atop-2.2-3.orig/showgeneric.c atop-2.2-3/showgeneric.c
+--- atop-2.2-3.orig/showgeneric.c	2016-07-19 22:07:43.275324499 -0300
++++ atop-2.2-3/showgeneric.c	2016-07-19 22:08:16.171453283 -0300
+@@ -268,7 +268,6 @@ static const char rcsid[] = "$Id: showge
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <string.h>
+-#include <termio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+diff -purN atop-2.2-3.orig/showlinux.c atop-2.2-3/showlinux.c
+--- atop-2.2-3.orig/showlinux.c	2016-07-19 22:07:43.275324499 -0300
++++ atop-2.2-3/showlinux.c	2016-07-19 22:08:20.979472459 -0300
+@@ -274,7 +274,6 @@ static const char rcsid[] = "$Id: showli
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+diff -purN atop-2.2-3.orig/showprocs.c atop-2.2-3/showprocs.c
+--- atop-2.2-3.orig/showprocs.c	2016-07-19 22:07:43.275324499 -0300
++++ atop-2.2-3/showprocs.c	2016-07-19 22:08:25.083488900 -0300
+@@ -94,7 +94,6 @@ static const char rcsid[] = "$Id: showpr
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+diff -purN atop-2.2-3.orig/showsys.c atop-2.2-3/showsys.c
+--- atop-2.2-3.orig/showsys.c	2016-07-19 22:07:43.275324499 -0300
++++ atop-2.2-3/showsys.c	2016-07-19 22:08:29.099505047 -0300
+@@ -80,7 +80,6 @@ static const char rcsid[] = "XXXXXX";
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
diff --git a/package/atop/Config.in b/package/atop/Config.in
new file mode 100644
index 0000000..d42a201
--- /dev/null
+++ b/package/atop/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_ATOP
+	bool "atop"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_ZLIB
+	help
+	  Atop is an ASCII full-screen performance monitor for Linux
+	  that is capable of reporting the activity of all processes
+	  (even if processes have finished during the interval), daily
+	  logging of system and process activity for long-term analysis,
+	  highlighting overloaded system resources by using colors, etc.
+	  At regular intervals, it shows system-level activity related
+	  to the CPU, memory, swap, disks (including LVM) and network
+	  layers, and for every process (and thread) it shows e.g. the
+	  CPU utilization, memory growth, disk utilization, priority,
+	  username, state, and exit code.
+
+	  http://www.atoptool.nl
diff --git a/package/atop/atop.hash b/package/atop/atop.hash
new file mode 100644
index 0000000..bbf268d
--- /dev/null
+++ b/package/atop/atop.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d  atop-2.2-3.tar.gz
diff --git a/package/atop/atop.mk b/package/atop/atop.mk
new file mode 100644
index 0000000..27e1f82
--- /dev/null
+++ b/package/atop/atop.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# atop
+#
+################################################################################
+
+ATOP_VERSION = 2.2-3
+ATOP_SITE = http://www.atoptool.nl/download
+ATOP_LICENSE = GPLv2+
+ATOP_LICENSE_FILES = COPYING
+ATOP_DEPENDENCIES = ncurses zlib
+
+define ATOP_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define ATOP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/atop $(TARGET_DIR)/usr/bin/atop
+endef
+
+$(eval $(generic-package))
-- 
2.9.3

             reply	other threads:[~2016-10-07 20:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 20:30 Ricardo Martincoski [this message]
2016-10-07 20:30 ` [Buildroot] [PATCH 2/4] netatop: new package Ricardo Martincoski
2016-10-07 21:19   ` Thomas Petazzoni
2016-10-08 21:58     ` Ricardo Martincoski
2016-10-07 20:30 ` [Buildroot] [PATCH 3/4] netatop: enable required kernel feature Ricardo Martincoski
2016-10-07 21:20   ` Thomas Petazzoni
2016-10-08 20:45     ` Ricardo Martincoski
2016-10-07 20:30 ` [Buildroot] [PATCH 4/4] DEVELOPERS: list {, net}atop package under my name Ricardo Martincoski
2016-10-07 21:21   ` Thomas Petazzoni
2016-10-07 21:18 ` [Buildroot] [PATCH 1/4] atop: new package Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161007203031.21528-1-ricardo.martincoski@datacom.ind.br \
    --to=ricardo.martincoski@datacom.ind.br \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.