head	1.1;
branch	1.1.1;
access;
symbols
	caudium_1_4_9:1.1.1.1
	caudium_1_4_8:1.1.1.1
	caudium_1_4_7:1.1.1.1
	caudium_1_4_6:1.1.1.1
	caudium_1_2_35:1.1.1.1
	caudium_1_2_34:1.1.1.1
	caudium_1_4_5:1.1.1.1
	caudium_1_4_4:1.1.1.1
	caudium_1_4_3:1.1.1.1
	caudium_1_4_2:1.1.1.1
	caudium_1_5_1:1.1.1.1
	caudium_1_4_1:1.1.1.1
	stable_1_4:1.1.1.1.0.6
	caudium_1_3_33:1.1.1.1
	caudium_1_3_32:1.1.1.1
	caudium_1_3_31:1.1.1.1
	caudium_1_3_30:1.1.1.1
	caudium_1_3_29:1.1.1.1
	caudium_1_2_33:1.1.1.1
	caudium_1_2_32:1.1.1.1
	caudium_1_3_23:1.1.1.1
	caudium_1_3_22:1.1.1.1
	caudium_1_3_21:1.1.1.1
	caudium_1_3_20:1.1.1.1
	caudium_1_3_19:1.1.1.1
	caudium_1_3_18:1.1.1.1
	caudium_1_2_31:1.1.1.1
	caudium_1_2_30:1.1.1.1
	caudium_1_2_29:1.1.1.1
	caudium_1_2_28:1.1.1.1
	caudium_1_3_17:1.1.1.1
	caudium_1_3_16:1.1.1.1
	caudium_1_2_27:1.1.1.1
	caudium_1_2_26:1.1.1.1
	caudium_1_2_25:1.1.1.1
	caudium_1_2_24:1.1.1.1
	caudium_1_0_57:1.1.1.1
	caudium_1_0_56:1.1.1.1
	caudium_1_3_15:1.1.1.1
	caudium_1_3_14:1.1.1.1
	caudium_1_2_23:1.1.1.1
	caudium_1_2_22:1.1.1.1
	caudium_1_2_21:1.1.1.1
	caudium_1_2_20:1.1.1.1
	caudium_1_0_55:1.1.1.1
	caudium_1_0_54:1.1.1.1
	caudium_1_3_13:1.1.1.1
	caudium_1_3_12:1.1.1.1
	caudium_1_3_11:1.1.1.1
	caudium_1_3_10:1.1.1.1
	caudium_1_2_19:1.1.1.1
	caudium_1_2_18:1.1.1.1
	caudium_1_3_9:1.1.1.1
	caudium_1_3_8:1.1.1.1
	caudium_1_3_7:1.1.1.1
	caudium_1_3_6:1.1.1.1
	caudium_1_2_17:1.1.1.1
	caudium_1_2_16:1.1.1.1
	caudium_1_2_15:1.1.1.1
	caudium_1_2_14:1.1.1.1
	caudium_1_2_12:1.1.1.1
	caudium_1_2_10:1.1.1.1
	caudium_1_3_5:1.1.1.1
	caudium_1_3_4:1.1.1.1
	caudium_1_2_9:1.1.1.1
	caudium_1_2_8:1.1.1.1
	caudium_1_3_3:1.1.1.1
	caudium_1_2_7:1.1.1.1
	caudium_1_2_6:1.1.1.1
	caudium_1_0_53:1.1.1.1
	caudium_1_0_52:1.1.1.1
	caudium_1_0_51:1.1.1.1
	caudium_1_0_50:1.1.1.1
	caudium_1_0_45:1.1.1.1
	caudium_1_0_44:1.1.1.1
	caudium_1_0_43:1.1.1.1
	caudium_1_0_42:1.1.1.1
	Caudium_1_3_2:1.1.1.1
	caudium_1_2_5:1.1.1.1
	caudium_1_2_4:1.1.1.1
	caudium_1_0_41:1.1.1.1
	caudium_1_0_40:1.1.1.1
	caudium_1_0_39:1.1.1.1
	Caudium_1_0_38:1.1.1.1
	caudium_1_2_3:1.1.1.1
	caudium_1_2_2:1.1.1.1
	caudium_1_3_1:1.1.1.1
	caudium_1_2_1:1.1.1.1
	stable_1_2:1.1.1.1.0.2
	caudium_1_0_37:1.1.1.1
	caudium_1_0_36:1.1.1.1
	caudium_1_1_5:1.1.1.1
	caudium_1_1_4:1.1.1.1
	caudium_1_1_3:1.1.1.1
	caudium_1_1_2:1.1.1.1
	caudium_1_0_34:1.1.1.1
	caudium_1_0_32:1.1.1.1
	caudium_1_0_30:1.1.1.1
	caudium_1_0_28:1.1.1.1
	caudium_1_0_24:1.1.1.1
	caudium_1_0_22:1.1.1.1
	caudium_1_0_20:1.1.1.1
	caudium_1_0_18:1.1.1.1
	caudium_1_0_17:1.1.1.1
	caudium_1_0_16:1.1.1.1
	caudium_1_0_15:1.1.1.1
	caudium_1_0_14:1.1.1.1
	caudium_1_0_13:1.1.1.1
	caudium_1_0_12:1.1.1.1
	caudium_1_0_11:1.1.1.1
	caudium_1_0_10:1.1.1.1
	stable_1_0:1.1.1.1.0.4
	caudium_1_0_9:1.1.1.1
	caudium_1_0_8:1.1.1.1
	caudium_1_0_7:1.1.1.1
	caudium_1_0_6:1.1.1.1
	caudium_1_0_5:1.1.1.1
	caudium_1_0_4:1.1.1.1
	caudium_1_0_3:1.1.1.1
	caudium_1_0_2:1.1.1.1
	start:1.1.1.1
	Roxen:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2000.07.28.16.31.10;	author neotron;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.07.28.16.31.10;	author neotron;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@#!/bin/sh
#
# script to bump up tcp_conn_req_max > 32 in Solaris 2.4
# This script should be run by root and only by the competent who
# realize that this changes the kernel on the fly and its consequences
# READ THE FOLLOWING BEFORE USING THIS SCRIPT.
#
# Disclaimer:This is not an officially supported script from Sun
#
# Questions/comments about this script to mukesh.kacker@@eng.sun.com
#
#
# Warning ! This can affect the behavior of *all*  TCP listeners on
# the machine. It has the potential to increase kernel memory  useage.
# Since the the tcp_conn_req_max parameter is the limit
# the kernel imposes on the listeners, it is only relevant for listener
# applications which are compiled with the backlog parameter of the
# liten() call higher than the limit imposed by the kernel. The default
# limit is 5 in Solaris 2.4 and can be routinely bumped up as follows
# ndd -set tcp_conn_req_max <new limit upto 32>
#
# ndd imposes a max bound on how high this limit can be bumped up since
# it affects kernel memory resource useage and it is not wise to allow it
# to be increased to a dangerous level. This script is to allow experiments
# to increase it to higher values (The unreleased Solaris 2.5 increases
# this limit to 1024 and that should make this script obsolete).
# The exact value chosen should take into account the
# memory available on the machine and how many TCP listeners are likely
# to be affected by this. The known bound that people have been known
# to have experimented with is 128.
# 
# This script operates by first bumping up the maximum imposed by ndd for
# this parameter using adb on the running kernel image  and then using in
# a normal manner to set it to this value.
#
# To undo its affects, you can use adb to undo what is done here (left
# as an exercise to the reader :-)) or just reboot machine
#


fail()
{
	echo "$*" 1>&2
	echo "Aborting command" 1>&2
	exit 1
}
verify_root_user()
{
	set `id`
	test "$1" = "uid=0(root)" || fail "You must be super user to run this script."
}
verify_useage()
{
	if [ $# -ne 1 ]; then
		progname=`basename $0`
		fail "Usage: $progname <limit in decimal>"
		exit 1
	fi
}
main()
{
	verify_root_user
	verify_useage $*
	limit=$1
	if [ $limit -gt 32 ]; then
		adb -w -k /dev/ksyms /dev/mem << EOF 2>&1 >/dev/null
		tcp_param_arr+14/W 0t$limit
EOF
	fi
	ndd -set /dev/tcp tcp_conn_req_max $limit
}
main $*
@


1.1.1.1
log
@Roxen 1.3 imported
@
text
@@
