![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 10:20 PM |
| Time Wait interval | eloquent99 | SUN Solaris | 1 | 12-05-2003 05:56 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 | ||
|
|
|
|||
|
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 UNIX.COM |