Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc add "-n" to netstat -i to avoid reverse query and better...



details:   https://anonhg.NetBSD.org/src/rev/4a82cfa1941e
branches:  trunk
changeset: 480793:4a82cfa1941e
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Jan 20 04:13:54 2000 +0000

description:
add "-n" to netstat -i to avoid reverse query and better audit.
print IPv6 interface stat by netstat -inv separately.

comments from: hubertf and others

diffstat:

 etc/daily |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 94f66542375a -r 4a82cfa1941e etc/daily
--- a/etc/daily Thu Jan 20 03:19:27 2000 +0000
+++ b/etc/daily Thu Jan 20 04:13:54 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: daily,v 1.31 2000/01/10 17:03:49 ad Exp $
+#      $NetBSD: daily,v 1.32 2000/01/20 04:13:54 itojun Exp $
 #      @(#)daily       8.2 (Berkeley) 1/25/94
 #
 
@@ -187,7 +187,11 @@
 if checkyesno check_network; then
        echo ""
        echo "network:"
-       netstat -i
+       # excluding IPv6
+       netstat -in | awk 'NR == 1 {print;} NR > 1 {if ($3 !~ /:/) print; }'
+       echo ""
+       echo "IPv6 network:"
+       netstat -inv | awk 'NR == 1 {print;} NR > 1 {if ($3 ~ /:/) print; }'
        echo ""
        t=/var/rwho/*
        if [ "$t" != '/var/rwho/*' ]; then



Home | Main Index | Thread Index | Old Index