Below command used to list all the existing port used in the solaris/linux system.
netstat -an
Command to check port is free or not.if the port is free you will not get any output otherwise resulted process using this port.
netstat -an | grep 8080