What exactly you want to do?
If the Logstash service is running, the port on the http input will always be listening, if the port is not listening then the logstash service may be stopped.
What does your configuration looks like? You need to share it.