The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Process wait time chandrakala.sg SUN Solaris 1 09-18-2007 10:04 PM
Linux Going Big Time and Prime Time Against Windows, UNIX (WSJ) (Addict 3D) iBot UNIX and Linux RSS News 0 06-21-2007 01:10 PM
Start time/end time and status of crontab job thambi Shell Programming and Scripting 3 05-16-2007 07:24 AM
How To Provide Time Sync Using Nts-150 Time Server On Unix Network? pesty UNIX for Advanced & Expert Users 2 03-21-2007 11:20 PM
Time Wait interval eloquent99 SUN Solaris 1 12-05-2003 06:56 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-31-2003
Registered User
 

Join Date: Jun 2002
Posts: 37
default time in Solaris 8 for time-wait

Ok, heres the situation. We use Solaris 8 and sometimes users who are logged into our system restart their pc's without shutting down the application that attached to our unix backend. I netstat and I get time-waits for the users.
My question is how long before the time-wait ends and the user can log back in?
Forum Sponsor
  #2  
Old 04-01-2003
Registered User
 

Join Date: Apr 2002
Location: Argentine - that better than to eat meat and to drink wine (both Argentineans)?.
Posts: 132
Try with this ...

In order to close shortly your connections you need
to modify several defaults, for example:

ndd -set /dev/tcp tcp_time_wait_interval 60000


ndd -set /dev/arp tcp_time_wait_interval 60000


Note: use man ndd to look one by one the parameters
of the command

ndd -get /dev/tcp \?

Note: Don't looks like a Time Zone Problem.

I give you an example for tracking connections to the port 80 in Solaris:

#!/bin/ksh
wdate=`date +"%Y%m%d"`
LOG=/opt/home/reports/"$wdate"_port80.txt
LOG2=/opt/home/reports/"$wdate"_port80_in_det.txt
whour=`date +"%H:%M"`

netstat -na |grep -v -i listen |tee -a /tmp/"$wdate"_port80.tmp |/usr/xpg4/bin/awk '{ if ( NF == 7 && substr($1,length($1)-1,2) == 80 ){v[$7]++; cont++} }END{ for (i in v) {print i": " v[i]";" } print " Total: "cont " " }' |while read lin
do
wline="$wline"$lin
done

echo "$wdate ; $whour ; $wline" >> $LOG

cat /tmp/"$wdate"_port80.tmp |/usr/xpg4/bin/awk '{ if ( NF == 7 && substr($1,length($1)-1,2) == 80 ){print $1,$2,$7} }' | /usr/xpg4/bin/awk 'BEGIN{FS="."}{print $1"."$2"."$3"."$4"\t"substr($5,length($5)-2,3)"."$6"."$7"."$8"\t" $9}' | /usr/xpg4/bin/awk '{ d[$1]++ ; o[$1" ;"$2]++ ; f[$1" ;"$2" ;"$4]++ }END{ for (i in d){ print i"; All_ips ; Total ; "d[i]} for (j in o){print j " ;Subtotal; " o[j]} for (k in f){print k " ; " f[k]} }' |sort |while read wline
do
echo "$wdate ; $whour ; $wline" >> $LOG2
done
rm /tmp/"$wdate"_port80.tmp


Regards. Hugo.

Last edited by hugo_perez; 04-03-2003 at 06:24 AM.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:40 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0