John Dunn wrote:
I want to check whether a port is in use and by what process on Solaris
10(Sparc).
I have lsof installed, but cannot seem to get the info I need.
What lsof options do I need to use?
John
hello John,
as Romeo mentions you could use netstat to find if the port is used -
additionally you may also use lsof like this:
[EMAIL PROTECTED]:~]$lsof -i :5000
[EMAIL PROTECTED]:~]$echo $?
1
if the port is not use nothing gets printed and the exit return code in
not 0.
if the port is used:
[EMAIL PROTECTED]:~]$lsof -i :177
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dtlogin 559 root 5u IPv6 0xd46c6580 0t0 UDP *:177 (Idle)
[EMAIL PROTECTED]:~]$echo $?
0
greetings,
Stoyan
_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users