Subject: Re: netstat -i in /etc/daily
To: None <itojun@iijlab.net>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-net
Date: 01/17/2000 15:42:59
On Mon, 17 Jan 2000 itojun@iijlab.net wrote:
> there's no clear indication about which line belongs which af.
Using this input ("x"):
> Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
> sm1 1500 <Link> 00:00:86:05:80:fa 2358 0 2581 0 38
> sm1 1500 fe80:1::200:86ff:fe05:80fa/64 fe80:1::200:86ff:fe05:80fa 2358 0 2581 0 38
> sm1 1500 202.232.15.96 202.232.15.108 2358 0 2581 0 38
> sm1 1500 3ffe:507:0:1:200:86ff:fe05:80fa/64 3ffe:507:0:1:200:86ff:fe05:80fa 2358 0 2581 0 38
> lo0 32976 <Link> 96 0 96 0 0
> lo0 32976 fe80:2::1/64 fe80:2::1 96 0 96 0 0
> lo0 32976 ::1/128 ::1 96 0 96 0 0
> lo0 32976 127 127.0.0.1 96 0 96 0 0
> lo1* 32976 <Link> 0 0 0 0 0
how about this as a hack:
smaug% cat x | awk '{ if ( $4 !~ /:/ || $3 ~ /Link/ ) print ; }'
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
sm1 1500 <Link> 00:00:86:05:80:fa 2358 0 2581 0 38
sm1 1500 202.232.15.96 202.232.15.108 2358 0 2581 0 38
lo0 32976 <Link> 96 0 96 0 0
lo0 32976 127 127.0.0.1 96 0 96 0 0
lo1* 32976 <Link> 0 0 0 0 0
- Hubert
--
NetBSD - Better for your uptime than Viagra