The lsof command can be used to find out which ports are currently listening.
lsof -i | grep 3000 lsof -i | grep 3001 lsof -i | grep 9001
Above commands checks whether the port 3000, 3001,9001 are currently active and listening.
A bit about lsop.
lsof is a command meaning “list open files”, which is used in many Unix-like systems to report a list of all open files and the processes that opened them.