Net::Connection::lsof - This uses lsof to generate a array of Net::Connection objects.
Version 0.0.0
use Net::Connection::lsof; my @objects; eval{ @objects = &lsof_to_nc_objects; }; # this time don't resolve ports, ptrs, or usernames my $args={ ports=>0, ptrs=>0, uid_resolve=>0, }; eval{ @objects = &lsof_to_nc_objects($args); };
This runs 'lsof -i UDP -i TCP -n -l +c 19 -P' and parses the output returns a array of Net::Connection objects. If a non-zero exit code is returned, it will die.
There is one optional argument and that is hash reference that can take several possible keys.
Attempt to resolve the port names.
Defaults to 1.
Attempt to resolve the PTRs.
Attempt to resolve the UID to a username.
my @objects; eval{ @objects = &lsof_to_nc_objects( $args ); };
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-net-connection-lsof at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Connection-lsof. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-connection-lsof at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::Connection::lsof
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Connection-lsof
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-Connection-lsof
CPAN Ratings
https://cpanratings.perl.org/d/Net-Connection-lsof
Search CPAN
https://metacpan.org/release/Net-Connection-lsof
Git Repo
https://gitea.eesdp.org/vvelox/Net-Connection-lsof
This software is Copyright (c) 2019 by Zane C. Bowers-Hadley.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Net::Connection::lsof, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Connection::lsof
CPAN shell
perl -MCPAN -e shell install Net::Connection::lsof
For more information on module installation, please visit the detailed CPAN module installation guide.