Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info.

Sktune

From Higher Intellect Vintage Wiki
Jump to navigation Jump to search
sktune for sunos 4.1
##################################################################
#!/bin/sh
######################
# 19950629 ***@an.bradford.ma.us
######################
# taken out of SunPerfOvDec93
######################
# tunes a 32M, 1*4412rpm disk system

RAM=32 DISKS=1 SPEED=4412 # defaults: 32M ram, 1 sun0424 disk
KERN=true MEM=true

# process options here
# -r ram, -d disks -s speed [of disks]

while getopts r:d:s:km OPTION
do
case $OPTION in
r) RAM=$OPTARG;;
d) DISKS=$OPTARG;;
s) SPEED=$OPTARG;;
k) MEM=false;;
m) KERN=false;;
\?) echo $0: error! unknown option $OPTARG!; exit 1;;
esac
done
shift `expr $OPTIND - 1`

FASTSCAN=`expr $RAM \* 64`
LOTSFREE=`expr $RAM \* 8`
MAXPGIO=`expr $SPEED \* $DISKS / 90`

# change /vmunix
$KERN &&
{
echo "tuning /vmunix..."
adb -k -w /vmunix /dev/mem <<--
fastscan?W0t${FASTSCAN}
lotsfree?W0t${LOTSFREE}
maxpgio?W0t${MAXPGIO}
maxslp?W0x80
-
}

# change /dev/mem
$MEM &&
{
echo "tuning /dev/mem..."
adb -k -w /vmunix /dev/mem <<--
fastscan/W0t${FASTSCAN}
lotsfree/W0t${LOTSFREE}
maxslp/W0x80
-
}

# tried and abandoned
#udp_cksum?W1 #to enable udp checksums
##################################################################
end sktune