| Summary: | netstat truncates IP address in connection output | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Stanislav Kozina <skozina> |
| Component: | net-tools | Assignee: | Jiri Popelka <jpopelka> |
| Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.1 | CC: | maarten.litmaath, mhomolov |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 18:59:56 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Stanislav Kozina
2011-11-22 11:35:08 UTC
Hi Stanislav, this is expected behavior. Netstat produces output formatted to approx. 80 characters wide. To achieve this width, columns are truncated. Red Hat's version of netstat include a -T/--notrim (upstream named it -W/--wide) option that ensures no information is trimmed, even if it means making the output a little less pretty. Hi all,
for the record, the problem even occurs when the "-n" option _is_ used:
-----------------------------------------------------------------------------
[root@wms302 ~]# rpm -qf /bin/netstat
net-tools-1.60-82.el5
-----------------------------------------------------------------------------
[root@wms302 ~]# netstat -pan > /tmp/pan & netstat -panT > /tmp/panT
[1] 2057
[1]+ Done netstat -pan > /tmp/pan
-----------------------------------------------------------------------------
[root@wms302 ~]# diff /tmp/pan /tmp/panT
173c173
< tcp 0 0 ::ffff:128.142.16.169:9001 ::ffff:138.253.178.11:52489 FIN_WAIT2 -
---
> tcp 0 0 ::ffff:128.142.16.169:9001 ::ffff:138.253.178.110:52489 FIN_WAIT2 -
-----------------------------------------------------------------------------
Note how the IP address got truncated when the "-T" option was not used.
This issue just bit me badly, which is how I found out about it.
It is beyond me why anyone would prefer "nice" formatting over correct output...
I would say this gross misfeature actually is a bug that needs fixing.
(In reply to comment #2) > for the record, the problem even occurs when the "-n" option _is_ used: Yes, it's not dependent on the '-n' option. > It is beyond me why anyone would prefer "nice" formatting over correct > output... > I would say this gross misfeature actually is a bug that needs fixing. That's how it's always been working. If you think default should be wide/notrim raise this idea upstream at https://lists.sourceforge.net/lists/listinfo/net-tools-devel |