The easiest way to find out is this:
telnet hostname port number
For example to check if port 22000 is in use, use this command:
telnet justanexample.com 22000
If the port is in use, the screen will go blank. You can then press Ctrl + ] to get to telnet prompt, from where you can type exit and quit.
If the port is not in use, you'll get a message like "Connect timed out". This works for all operating systems supporting TCP/IP that's all unix and all windows versions.