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

NetStat fails on *NIX with older versions of lsof #26

Closed
cljohnso opened this issue Mar 3, 2021 · 1 comment
Closed

NetStat fails on *NIX with older versions of lsof #26

cljohnso opened this issue Mar 3, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cljohnso
Copy link
Contributor

cljohnso commented Mar 3, 2021

NetStat parsing of lsof output depends on the inclusion of the f (file descriptor) field as the first field of a "file" line. Newer versions of lsof include the f field regardless of its designation in the -F option value; older versions only include the f field when the f value is provided in the -F option argument. (This is contrary to lsof documentation but ...) The current version of NetStat does not include the f value in the -F option argument so parsing of the output from older versions of lsof fails.

Fortunately, inclusion of the f value in the -F option is tolerated by newer versions of lsof so the f value needs to be included in the -F option argument to normalize the output over more versions of lsof.

@cljohnso cljohnso self-assigned this Mar 3, 2021
@cljohnso cljohnso added the bug Something isn't working label Mar 3, 2021
@cljohnso
Copy link
Contributor Author

cljohnso commented Mar 3, 2021

This is an observed difference between lsof version 4.91 running on a Mac and lsof version 4.87 running on Centos 7.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant