Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column sizing #3

Closed
dcarosone opened this issue Feb 1, 2019 · 7 comments
Closed

Column sizing #3

dcarosone opened this issue Feb 1, 2019 · 7 comments

Comments

@dcarosone
Copy link
Contributor

dcarosone commented Feb 1, 2019

The column widths seem to be calculated from the full dataset, rather than the subset that will actually get displayed.

image

(I expected cupsd to show up listening on 631, and don't really understand why it doesn't, but that's a separate issue once I figure out what's up)

@dcarosone
Copy link
Contributor Author

Aside: it might be an idea to think about using a crate like prettytable? That also offers the opportunity for CSV and other structured output for consumption by other tools. I can't recall if it's that one or another, but at least one of them had nice pagination support too.

dalance added a commit that referenced this issue Feb 1, 2019
@dalance
Copy link
Owner

dalance commented Feb 1, 2019

Thanks! I fixed it.
And I forgot to display port bound to IPv6 address. This may cause port 631 missing.
Could you try v0.3.1 or later?

@dcarosone
Copy link
Contributor Author

Just tried current head and the columns are fixed!

The port thing turns out to be a permissions issue in /proc, as per the following from netstat -ap:

(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)

@dalance
Copy link
Owner

dalance commented Feb 1, 2019

Right. Some columns ( like TCP/UDP/Read/Write ) can't be shown by permission issue.
If use sudo procs, all info should be shown.

@dcarosone
Copy link
Contributor Author

dcarosone commented Feb 1, 2019

Yep, PR incoming in a sec with a readme update.

I wonder if the display could distinguish:

  • listening ports: [123, 456]
  • not listening: []
  • not able to tell because of permissions: (empty, no braces)

@dalance
Copy link
Owner

dalance commented Feb 1, 2019

I fixed port display with permission issue.

@dcarosone
Copy link
Contributor Author

Brilliant!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants