Hi all,
I've been testing "ss" from iproute2 for a number of weeks now across
numerous trunk builds for x86. It's working well and builds without
problems. Digging through the svn tree turns up that this portion of
iproute2 has been disabled for several years now and hasn't been revisited.
There's a related ticket open on it:
https://dev.openwrt.org/ticket/7632
However, I didn't have to do the "fix" suggested therein. I'm providing
my patch here if any other wish to try it out. Here's some sample output
from my alix board:
root@alix:~# ss --help
Usage: ss [ OPTIONS ]
ss [ OPTIONS ] [ FILTER ]
-h, --help this message
-V, --version output version information
-n, --numeric don't resolve service names
-r, --resolve resolve host names
-a, --all display all sockets
-l, --listening display listening sockets
-o, --options show timer information
-e, --extended show detailed socket information
-m, --memory show socket memory usage
-p, --processes show process using socket
-i, --info show internal TCP information
-s, --summary show socket usage summary
-4, --ipv4 display only IP version 4 sockets
-6, --ipv6 display only IP version 6 sockets
-0, --packet display PACKET sockets
-t, --tcp display only TCP sockets
-u, --udp display only UDP sockets
-d, --dccp display only DCCP sockets
-w, --raw display only RAW sockets
-x, --unix display only Unix domain sockets
-f, --family=FAMILY display sockets of type FAMILY
-A, --query=QUERY
QUERY := {all|inet|tcp|udp|raw|unix|packet|netlink}[,QUERY]
-F, --filter=FILE read filter information from FILE
FILTER := [ state TCP-STATE ] [ EXPRESSION ]
root@alix:~#
root@alix:~# ss -V
ss utility, iproute2-ss2.6.39-1-openwrt
root@alix:~#
Signed-off-by: Adam Gensler <openwrt at kristenandadam.net>
Thanks,
Adam
---
Index: iproute2/Makefile
===================================================================
--- iproute2/Makefile (revision 30677)
+++ iproute2/Makefile (working copy)
@@ -9,7 +9,7 @@
PKG_NAME:=iproute2
PKG_VERSION:=2.6.39
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://devresources.linux-foundation.org/dev/iproute2/download/
@@ -47,15 +47,17 @@
TITLE:=General netlink utility frontend
endef
+define Package/ss
+$(call Package/iproute2/Default)
+ TITLE:=Socket Statistics
+endef
+
define Build/Configure
$(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
$(PKG_BUILD_DIR)/Makefile
$(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
$(PKG_BUILD_DIR)/Makefile
- # For now disable compiling of the misc directory because it seems to
fail
- rm -rf $(PKG_BUILD_DIR)/misc
- $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
echo "static const char SNAPSHOT[] =
\"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \
> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
endef
@@ -72,6 +74,7 @@
-I../include -DRESOLVE_HOSTNAMES"
$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) all
$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/tc $(MAKE_FLAGS) tc
+ $(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/misc $(MAKE_FLAGS)
ss
$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/ip $(MAKE_FLAGS) ip
endef
@@ -99,6 +102,12 @@
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
endef
+define Package/ss/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
+endef
+
$(eval $(call BuildPackage,ip))
$(eval $(call BuildPackage,tc))
$(eval $(call BuildPackage,genl))
+$(eval $(call BuildPackage,ss))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel