The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com




Thread: Hung Port
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 09-08-2006
jmreddyks jmreddyks is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 1
Hung Port

Hi,

I used the below script to clear the FIN_WAIT socket connections. ( HP unix )

for i in $(ndd -get /dev/tcp tcp_status | grep xxx.xxx.xxx.xxx | grep TCP_FIN_WAIT | awk '{print $1}' )
do
ndd -set /dev/tcp tcp_discon 0x${i}
if [ $? -eq 0 ]
then
echo "Cleared $i"
else
echo "Unable to clear $i"
fi
done


xxx.xxx.xxx.xxx = the destination server IP.