get port for command line