problem !!!!

I need every body now.
First I expose to you my problem.
in solaris environment, I use one user.
And this user owns 5 applicative servers ( with their 5 ports ).
And I want to start/stop one of them. But I can know if its be started/closed really.

my idea is : to see if the port of this server is free (so stopped ) or not (started )

but how can I do that ?

"netstat -a" will show you which ports have processes listening.