sockstat

Richard L. Hamilton rlhamil at smart.net
Fri May 12 18:10:32 UTC 2023


I don't think sockstat would say anything about a port on another system that one did not have a connection to, it only reports network activity already involving the system it is run on. Telnet could of course attempt to connect. And nmap could tell you every port open on the other system (at least to packets coming from your system, if some filtering is in use), although some might regard an nmap scan as a preliminary to hostilities.

Telnet is in the inetutils port, as gtelnet.

nc can attempt to connect to either TCP or UDP ports, and is included with macOS. It has a lot of options, so read the man page carefully.

> On May 12, 2023, at 13:56, André-John Mas <andrejohn.mas at gmail.com> wrote:
> 
> I was looking for it based on a stack overflow article, indicating how to check a server I’d is responding on a given port. 
> 
> Previously I was using telnet for this. 
> 
> André-John
> 
> Sent from my phone. Envoyé depuis mon téléphone.
> 
>> On 12 May 2023, at 13:33, Richard L. Hamilton <rlhamil at smart.net> wrote:
>> 
>> If it is, I'm not finding it. I'm also not finding it in homebrew.
>> 
>> Looking around, the FreeBSD original is in C, but there is a perl script version of the same name and somewhat similar description (I did not compare in detail, and I doubt some of the FreeBSD features are feasible on macOS).
>> 
>> https://github.com/freebsd/freebsd-src/tree/main/usr.bin/sockstat <https://github.com/freebsd/freebsd-src/tree/main/usr.bin/sockstat>
>> 
>> https://github.com/pj4dev/Mac-Sockstat <https://github.com/pj4dev/Mac-Sockstat>
>> 
>> 
>> The programs lsof and netstat that come with macOS may provide most of the same information, even if the usage, selection ability, and output format are different.
>> 
>> 
>>> On May 12, 2023, at 12:42, André-John Mas <andrejohn.mas at gmail.com <mailto:andrejohn.mas at gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> Is sockstat available in MacPorts, via a port'. I couldn't find it when search for it directly or as 'sostat' (homebrew formula name).
>>> 
>>> Thanks
>>> 
>>> Andre
>>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230512/7d887e57/attachment.htm>


More information about the macports-users mailing list