lsof is useful for obtaining information about a socket, e.g. lsof -i :<portnumber>. You may need to download it from the Porting and Archive Centre. Opening, closing or "restarting" a port usually consists of stopping or starting the process(es) or services that are using that port.
Annihilannic.