3.3.3.1 lsof
lsof lists open files and network connections. The following command shows open network connections for processes that contain the name Squeak. Since Pharo currently uses the Squeak VM, this should show Pharo sockets.
$ lsof -n -i -P | grep Squeak
Here are some examples, this creates a basic TCP socket.
socket := Socket newTCP
Squeak 15272 mike 9u IPv4 0x66ac66c 0t0 TCP *:* (CLOSED)
This puts the socket into listening mode.
socket listenOn: 12345 backlogSize: 4
Squeak 15272 mike 9u IPv4 0x66ac66c 0t0 TCP *:12345 (LISTEN)