If I have a mongo instance running, how can I check what port numbers it is listening on from the shell? I thought that db.serverStatus() would do it but I don\
db.serverStatus()
Try this:
db.runCommand({whatsmyuri : 1})
It will display both the IP address and the port number.