How do I get a list of all Custom Application Ports already in use?

Document ID : KB000097292
Last Modified Date : 22/05/2018
Show Technical Document Details
Question:
How do I get a list of all Custom Application Ports already in use?
Answer:
You can export the list of unique Destination Ports already in use to a csv file by opening a command prompt and running the command below:

mysql -D reporter -t -e "select distinct newport from application_mappings order by newport;" > Used_application_mapping_ports.csv
 
This will create a csv file in the directory where you run the command that will have a list of all Destination ports already used in Application Definitions.
Additional Information:
If you wish to see a list of All Protocol and Ports in use, and not just the ones used for Application Mappings see this KB article.