| Summary: | sockstat truncates field | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Poul-Henning Kamp <phk> |
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 5.0-CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Poul-Henning Kamp
2001-03-11 22:40:01 UTC
Responsible Changed From-To: freebsd-bugs->des I wrote sockstat(1). Poul-Henning Kamp <phk@critter.freebsd.dk> writes: > femmer:/home/jail/nsx/etc/namedb# netstat -an | grep 212.242.86.173 > tcp4 0 0 212.242.86.173.53 *.* LISTEN > udp4 0 0 212.242.86.173.1141 *.* > udp4 0 0 212.242.86.173.53 *.* > udp4 0 0 212.242.86.173.123 *.* The problem is that sockstat(1) uses 'netstat -Aan', which truncates port numbers to restrict the source and destination address to 19 characters each (15 for dotted quad + 1 for colon leave only 3 for port number). Unfortunately, there's no way to join the information from 'netstat -an' with that from 'netstat -Aan' (no common key), so this will remain a problem until an option is added to netstat(1) to *not* truncate even if this causes individual lines to exceed 80 characters. DES -- Dag-Erling Smorgrav - des@ofug.org In message <xzp3dcisb0x.fsf@flood.ping.uio.no>, Dag-Erling Smorgrav writes: >Poul-Henning Kamp <phk@critter.freebsd.dk> writes: >> femmer:/home/jail/nsx/etc/namedb# netstat -an | grep 212.242.86.173 >> tcp4 0 0 212.242.86.173.53 *.* LISTEN >> udp4 0 0 212.242.86.173.1141 *.* >> udp4 0 0 212.242.86.173.53 *.* >> udp4 0 0 212.242.86.173.123 *.* > >The problem is that sockstat(1) uses 'netstat -Aan', which truncates >port numbers to restrict the source and destination address to 19 >characters each (15 for dotted quad + 1 for colon leave only 3 for >port number). Well, then netstat -Aan should be fixed :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. State Changed From-To: open->closed Fixed before 4.3-RELEASE. |