99.44% of the time, if it is in use, it is because lmgrd is already running on the port - or was recently killed, and the port is not freed yet.
Assuming this is not the case, then use telnet host port - if it displays can't connect, it is a free port.