FS#36538 - nethogs defaults to eth0 which is not present on systemd based systems

Attached to Project: Community Packages
Opened by Andrew Cowie (afcowie) - Thursday, 15 August 2013, 04:42 GMT
Last edited by Kyle Keen (keenerd) - Friday, 16 August 2013, 14:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

nethogs assumes a default interface of eth0. This is no longer useful in a systemd world. Is there anyway we can have it default to the currently [most (sic)] up interface? Pain in the ass to have to do `ip addr` to dig out the 'enp0s25' string which is my network card on today's computer.

AfC
This task depends upon

Closed by  Kyle Keen (keenerd)
Friday, 16 August 2013, 14:05 GMT
Reason for closing:  Upstream
Additional comments about closing:  Fixed in upstream's cvs.
Comment by Dave Reisner (falconindy) - Thursday, 15 August 2013, 11:38 GMT
Why should arch do this and not upstream? What is the "default" interface when a machine has 5 NICs?

I suggest you write an alias.
Comment by Kyle Keen (keenerd) - Thursday, 15 August 2013, 12:56 GMT
Also, nethogs is in [community]. Make assigning the bug to me tricky.
Comment by Dave Reisner (falconindy) - Thursday, 15 August 2013, 13:02 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Packages: Extra → Packages)
  • Field changed: Architecture (All → All)
  • Task assigned to Kyle Keen (keenerd)
Enjoy =)
Comment by Kyle Keen (keenerd) - Thursday, 15 August 2013, 13:47 GMT
Right, what he said.

There is no way to hardcode a guess as to what your interfaces will be. I see two possible solutions:

1) Remove the default. Make nethogs error when there is no specified interface. Aka, BOFH solution.
2) Make the default smarter. Since it can't guess which of your ifaces are being used, the default should display traffic for all of them.

You can fake the second with
nethogs $(ip -4 -6 -o a | cut -f 2 -d ' ')

Personally I don't want to write either of these today. I suggest you try requesting the feature upstream.

I will close this tomorrow-ish unless there is meaningful input, such as an upstream feature request to link.
Comment by Kyle Keen (keenerd) - Friday, 16 August 2013, 14:04 GMT
Checked the upstream CVS, they've added this feature three months ago. Request a new point release instead :-)

Loading...