Created attachment 222337 [details] svn diff Provides a enhances colorized netstat like tool that is capable of doing searches. The search criteria can be any of the following. * CIDR * port * host * PTR * pctcpu * pctmem * Regex PTR * state * UID * username * wait channel Among other unique features it can also display the full command, PctMem, and PctCPU of the process with the connection. WWW: https://metacpan.org/release/Net-Connection-ncnetstat
This depends on.... https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253409 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253408 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253407 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253406
Built the dependent ports and installed this and got: Can't locate Net/Connection/lsof.pm in @INC (you may need to install the Net::Connection::lsof module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32) at /usr/local/lib/perl5/site_perl/Net/Connection/ncnetstat.pm line 9. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Net/Connection/ncnetstat.pm line 9. Compilation failed in require at /usr/local/bin/ncnetstat line 6. BEGIN failed--compilation aborted at /usr/local/bin/ncnetstat line 6.
(In reply to Steve Wills from comment #2) Doh! Just realized there is a old use line I accidentally left from the previous version that did not use sockstat, only used lsof. Sweet. Fixing. Thank for the catch!
Created attachment 222484 [details] svn diff for 0.6.2
(In reply to Steve Wills from comment #2) And now fixed in 0.6.2. That has been pushed to CPAN and I've updated the diff.
(In reply to Zane C. Bowers-Hadley from comment #5) Hmm, seems the same: Can't locate Net/Connection/lsof.pm in @INC (you may need to install the Net::Connection::lsof module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32) at /usr/local/lib/perl5/site_perl/Net/Connection/ncnetstat.pm line 18. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Net/Connection/ncnetstat.pm line 18. Compilation failed in require at /usr/local/bin/ncnetstat line 6. BEGIN failed--compilation aborted at /usr/local/bin/ncnetstat line 6. The category in these ports doesn't match the categories in the titles. There's a dependency issue: p5-Data-Unixish>=1.570:devel/p5-Data-Unixish/pkg-plist shouldn't have "/pkg-plist". COMMENT is not supposed to begin with 'A ', 'An ', or 'The '. portlint and poudriere find these issues, it would be a good idea if to run them before submitting.
(In reply to Steve Wills from comment #6) Was about to ask for the output of $^O there. Found that apparently use will always be evaluated. I'll need to swap that for require. That said need to cleanup a few of the depend ports, derp. Realized I made a few small mistakes when I knocked this out and submitted while sleep deprived. Sorry about the problems there, I'll get that taken care of tomorrow night. :)
Okay, 0.6.3 uploaded to CPAN. I'll get the rest fixed tomorrow night. Getting late in the morning and sleep is needed or I am likely to botch something else silly. =^.^=
Created attachment 222523 [details] svn diff Portlint and poudriere all happy now.
(In reply to Zane C. Bowers-Hadley from comment #9) Better, but now when I run it, I just get: Use of uninitialized value in getservbyname at /usr/local/lib/perl5/site_perl/Net/Connection.pm line 343. repeatedly.
(In reply to Steve Wills from comment #10) Okay. That is strange. Utterly unable to reproduce that here. Also what version of FreeBSD and Perl are you running? Also what does the output of 'sockstat -46s' look like? What is the exact command you are using that results in it?
(In reply to Zane C. Bowers-Hadley from comment #11) I emailed you sockstat output separately from this bug for privacy reasons. The command I'm running is "ncnetstat". I have perl5-5.32.1_1. I am running FreeBSD 14.0-CURRENT, main-n244529-29f37e9bcc6.
(In reply to Steve Wills from comment #12) Awesome. I see exactly what is happening. The output from sockstat on your system is mangled. It looks like it does not handle real long IPv6 addresses well and sometimes does not separate the columns, joining two together with out any space. Looks like like I am going to revert the change to using sockstat.
Created attachment 222634 [details] svn diff New version, 0.7.0, that just uses lsof after depreciating sockstat. Thanks for the help in locating the formatting issue with sockstat.
Created attachment 222644 [details] svn diff Update to 0.7.1.
Created attachment 222646 [details] svn diff Whoops. The last file was the module tgz.
Created attachment 222676 [details] svn diff Update the required version of Net::Connection::Match to 0.5.0.
A commit references this bug: Author: swills Date: Sat Feb 27 00:06:37 UTC 2021 New revision: 566648 URL: https://svnweb.freebsd.org/changeset/ports/566648 Log: net/p5-Net-Connection-ncnetstat: create port Provides a enhances colorized netstat like tool that is capable of doing searches. The search criteria can be any of the following. * CIDR * port * host * PTR * pctcpu * pctmem * Regex PTR * state * UID * username * wait channel Among other unique features it can also display the full command, PctMem, and PctCPU of the process with the connection. WWW: https://metacpan.org/release/Net-Connection-ncnetstat PR: 253410 Submitted by: Zane C. Bowers-Hadley <vvelox@vvelox.net> Changes: head/net/p5-Net-Connection-ncnetstat/ head/net/p5-Net-Connection-ncnetstat/Makefile head/net/p5-Net-Connection-ncnetstat/distinfo head/net/p5-Net-Connection-ncnetstat/pkg-descr head/net/p5-Net-Connection-ncnetstat/pkg-plist
Committed, thanks!