ipfs idtools for this purpose. The swarm is the component that opens, listens for, and maintains connections to other IPFS peers. You can also examine connected peers and the network using the Web UI.
ipfs swarm peersto examine for connected peers:
ipfs id <hash>command to examine a connected peer:
ipfs swarm peers. Peers are identified on the network directly by their Peer ID.
ipfs idallows you to examine the connected nodes. The Web UI also shows in-depth information about peers.