For example, we need to query the occupancy of the three ports "8080|8848|9600" :
Linux & macOS operating system environment, available
netstat -an | grep -E "8080|8848|9600" | grep -i listen
Command to check whether the above three ports are in the listening state.
Linux operating system can also be used
netstat -nltp | grep -E "8080|8848|9600"
To check the open status of these three ports and whether the process is open.