Bug 1557470
| Summary: | netstat -i cut's interface names | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Harald Reindl <h.reindl> |
| Component: | net-tools | Assignee: | Michal Ruprich <mruprich> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 27 | CC: | jpopelka, mruprich, omejzlik, rvokal, zdohnal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | net-tools-2.0-0.50.20160912git.fc28 net-tools-2.0-0.47.20160912git.fc27 net-tools-2.0-0.45.20160912git.fc26 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-27 23:07:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Harald Reindl
2018-03-16 15:55:29 UTC
I believe that this is intentional. When you use -i, netstat calls function ife_print_short. So with -i the output should be as short as possible (possibly to fit 80 chars as the default terminal width?). I suggest that you use netstat -ie which gives you more much better output or you could use ip -s link from iprout2 package. This command is suggested in the netstat man page due to netstat being deprecated for a long time now. Regards, Michal "80 chars as the default terminal width" is somehow 1970 on a 32" screen at least when there is no option to disable that crazy behavior
_________________
> I suggest that you use netstat -ie which gives you more much better output
how that?
you have a ton of lines instzead one per interface
how would you run code like below aginast that?
for i in $(netstat -i | cut -f1 -d" " | tail -n+3) ; do echo "$i: $(ethtool "$i" | grep Speed | sed 's/Speed://g')" ; done
_________________
ip -s link - the same
14: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 00:e0:4c:80:5c:ca brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
2476773 20984 0 0 0 0
TX: bytes packets errors dropped carrier collsns
7651953 17113 0 0 0 0
_________________
do you realize that "for i in $(netstat -i | cut -f1 -d" " | tail -n+3) ; do echo "$i: $(ethtool "$i" | grep Speed | sed 's/Speed://g')" ; done" is intended to get the current link speed of each interface?
for i in $(ip -o link | cut -f2 -d" " | sed 's/://g'); do echo "$i: $(ethtool "$i" | grep Speed | sed 's/Speed://g')" ; done ok, that works, but can we agree that "netstat -i" output is broken given that most cli software these days is aware about the dimensions of the terminal emulator instead hardcoded to 80 chars width *** Bug 1568317 has been marked as a duplicate of this bug. *** net-tools-2.0-0.50.20160912git.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-991485057f net-tools-2.0-0.47.20160912git.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-20fa8b3193 net-tools-2.0-0.45.20160912git.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c31581a549 net-tools-2.0-0.47.20160912git.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-20fa8b3193 net-tools-2.0-0.45.20160912git.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c31581a549 net-tools-2.0-0.50.20160912git.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-991485057f net-tools-2.0-0.50.20160912git.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. net-tools-2.0-0.47.20160912git.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. net-tools-2.0-0.45.20160912git.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |