420.status-network
Dag-Erling Smørgrav
des at des.no
Fri Feb 15 01:07:21 PST 2008
In my continuing quest to reduce periodic/daily email to something that
can actually be read and understood at a glance, I've come up with the
following patch, which strips uninteresting interfaces and link-level
data from the output of 420.status-network:
Index: 420.status-network
===================================================================
RCS file: /home/ncvs/src/etc/periodic/daily/420.status-network,v
retrieving revision 1.6
diff -u -r1.6 420.status-network
--- 420.status-network 14 Sep 2000 17:19:10 -0000 1.6
+++ 420.status-network 15 Feb 2008 09:02:08 -0000
@@ -21,9 +21,11 @@
netstat -i && rc=0 || rc=3;;
*)
netstat -in && rc=0 || rc=3;;
- esac;;
-
- *) rc=0;;
+ esac | egrep -v '(^(lo|faith)[0-9]+|pflog\>)|<Link\#[0-9]+>'
+ ;;
+ *)
+ rc=0
+ ;;
esac
exit $rc
Instead of this:
Network interface status:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
msk0 1500 <Link#1> 00:16:e6:dc:b5:62 10094199 0 9731102 0 0
msk0 1500 10.0.0.0 ds4 10100875 - 9967045 - -
lo0 16384 <Link#2> 1341743 0 1341741 0 0
lo0 16384 fe80:2::1 fe80:2::1 0 - 0 - -
lo0 16384 localhost ::1 0 - 0 - -
lo0 16384 your-net localhost 1290637 - 1290633 - -
pflog 33160 <Link#3> 0 0 147 0 0
I get this:
Network interface status:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
msk0 1500 10.0.0.0 ds4 10100920 - 9967083 - -
BTW, I think daily_status_network_usedns should be off by default.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-rc
mailing list