You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=netatop
  6. PKG_RELEASE:=1
  7. PKG_VERSION:=2.0
  8. PKG_LICENSE:=GPL-2.0
  9. PKG_SOURCE_URL:=https://www.atoptool.nl/download/
  10. PKG_HASH:=c66d7ca094d667428924f2faff2afb816b17565e8c3628e43bfa0e1a2e22c20e
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/kernel.mk
  15. define KernelPackage/netatop
  16. URL:=https://www.atoptool.nl/
  17. CATEGORY:=Kernel modules
  18. SUBMENU:=Netfilter Extensions
  19. TITLE:=netatop netfilter module
  20. FILES:= \
  21. $(PKG_BUILD_DIR)/module/netatop.$(LINUX_KMOD_SUFFIX)
  22. AUTOLOAD:=$(call AutoProbe,netatop)
  23. endef
  24. define KernelPackage/netatop/description
  25. The optional kernel module netatop can be loaded to gather statistics about
  26. the TCP and UDP packets that have been transmitted/received per process and
  27. per thread. As soon as atop discovers that this module is active, it shows
  28. the columns SNET and RNET in the generic screen for the number of transmitted
  29. and received packets per process. When the 'n' key is pressed, it shows
  30. detailed counters about the number packets transmitted/received via TCP and
  31. UDP, the average sizes of these packets, and the total bandwidth consumed
  32. for input and output per process/thread.
  33. endef
  34. define Package/netatop
  35. SECTION:=admin
  36. CATEGORY:=Administration
  37. TITLE:=network counter for atop
  38. DEPENDS:=+zlib +kmod-netatop
  39. URL:=https://www.atoptool.nl/
  40. endef
  41. define Package/netatop/description
  42. The daemon netatopd is packaged with the netatop kernel module. This
  43. daemon takes care that information is gathered about processes that are
  44. finished. For every finished process that has transferred network packets,
  45. a binary record is written to a dedicated logfile. The added records in the
  46. logfile are read by atop with every sample to show information about the
  47. network activity of finished processes as well.
  48. endef
  49. NETATOP_KMOD_MAKEOPTS= \
  50. ARCH="$(LINUX_KARCH)" \
  51. CROSS_COMPILE="$(TARGET_CROSS)" \
  52. KERNDIR="$(LINUX_DIR)"
  53. NETATOP_DAEMON_MAKEOPTS= \
  54. CC="$(TARGET_CC)" \
  55. CFLAGS="$(TARGET_CFLAGS)" \
  56. LDFLAGS="$(TARGET_LDFLAGS)"
  57. define Build/Compile/netatop
  58. $(MAKE) -C $(PKG_BUILD_DIR)/module \
  59. $(NETATOP_KMOD_MAKEOPTS) \
  60. netatop.$(LINUX_KMOD_SUFFIX)
  61. $(MAKE) -C $(PKG_BUILD_DIR)/daemon \
  62. $(NETATOP_DAEMON_MAKEOPTS) \
  63. all
  64. endef
  65. define Build/Compile
  66. $(call Build/Compile/netatop)
  67. endef
  68. define Package/netatop/install
  69. $(INSTALL_DIR) $(1)/usr/sbin/
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/netatopd $(1)/usr/sbin/
  71. endef
  72. $(eval $(call KernelPackage,netatop))
  73. $(eval $(call BuildPackage,netatop))