Operating System - HP-UX
1753687 Members
5160 Online
108799 Solutions
New Discussion юеВ

setting permanent qdepth to device 11.11

 
brian_31
Super Advisor

setting permanent qdepth to device 11.11

Greetings!

I am setting up the scsi_max_qdepth of a particluar device to 64 and i want that change to be permanent. Please help me to do this..I copied the /sbin/init.d/template to qdepth. i also ln -s /sbin/init.d/qdepth /sbin/rc3.d/S900qdepth. i have Cut and Paste below the script, could someone tell me if this is correct? I have put a *** next to changed line!
---------------------------------------------

here is copy of the changes i made (i have put a *** next to the changed 2
lines.

case $1 in
'start_msg')
# Emit a _short_ message relating to running this script with
# the "start" argument; this message appears as part of the
checklist.
echo "Setting the scsidepth for c14t8d2 to 32" ***
;;
'stop_msg')
# Emit a _short_ message relating to running this script with
# the "stop" argument; this message appears as part of the
checklist.
echo "Stopping the subsystem"
;;
'start')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$CONTROL_VARIABLE" != 1 ]; then
rval=2
else
# Execute the commands to start your subsystem
scsictl -m queue_depth=64 /dev/rdsk/c14t8d2 ***
:
fi
;;
'stop')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$CONTROL_VARIABLE" != 1 ]; then
rval=2
else
:
# Execute the commands to stop your subsystem

fi
;;
*)
echo "usage: $0 {start|stop|start_msg|stop_msg}"
rval=1
;;
esac
exit $rval

Best Regards

Brian.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: setting permanent qdepth to device 11.11

Shalom Brian,

Script looks good. Test it. init scripts don't always work the same in init mode as they do on the command line.

PATH and other environment variables may impact results during an actual init transition.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
brian_31
Super Advisor

Re: setting permanent qdepth to device 11.11

Steve

/sbin/init.d/qdepth start does not set it 64..still stays at 8, the current level. Not sure what i am missing.

Thanks'

Brian
Jeff_Traigle
Honored Contributor

Re: setting permanent qdepth to device 11.11

Did you create /etc/rc.config.d/qdepth and enter CONTROL_VARIABLE=1 in it? If not, you condition fails and the scsictl command is not executed. CONTROL_VARIABLE should actually be named something meaningful instead of left as a template name. Maybe CHANGE_QDEPTH.
--
Jeff Traigle
brian_31
Super Advisor

Re: setting permanent qdepth to device 11.11

yes i have the rc.config.d/qdepth and the entry is set as follows..

# pwd
/etc/rc.config.d
# more qdepth
CHANGE_QDEPTH=1
#

still does not work!

thx

brian