Operating System - HP-UX
1826452 Members
4063 Online
109692 Solutions
New Discussion

list of kernal param in 10.20

 
SOLVED
Go to solution
Deepak Seth_1
Regular Advisor

list of kernal param in 10.20

Anybody know a way to get the list of kernel paramter (minus using SAM or sysdef) in 10.20 . Iam planning to write a script which will tell me what is the value of each paramter in each system . We have about 30 HPUX boxes and i always find difficult to keep track of there values . KMTUNE works just fine for hpux 11.0 but sysdef doesn't give a correct output .

Any suggestion.
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: list of kernal param in 10.20

Hi Deepak:

If you want to see those parameters that *differ* from the defaults, look at (cat) '/stand/system'.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: list of kernal param in 10.20

Hi Deepak:

Kmtune is great for 11.x but that puppy ain't to be found in 10.x. My suggestion would be to ask the kernel itself via adb. Something like this:

echo '*system_data/s' | adb -k /stand/vmunix /dev/kmem.

This will direct the tunables to stdout.

Regards, Clay
If it ain't broke, I can fix that.
linuxfan
Honored Contributor

Re: list of kernal param in 10.20

Hi Deepak,


For 10.20 like Jim mentioned you can look at /stand/system.

Also you can look at /var/sam/boot.config, which lists the current,default,max and min values for various parameters. But to get the information you want you will have to write a script to parse that file.

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sanjay_6
Honored Contributor

Re: list of kernal param in 10.20

Hi Deepak,

If you want to list all the parameters in 10.20, i think you can try these three command. All of them, so you get all the paras

1.) # sysdef >/tmp/kern_para_1
2.) # /usr/lbin/sysadm/system_prep -s /tmp/kern_para_2
3.) # adb -k -w /stand/system /dev/kmem > /tmp/kern_para_3
$e
$q

Hope this helps.

thanks
Lou Zirko_1
Frequent Advisor

Re: list of kernal param in 10.20

Another file that gives you the mix/max/defaults of tunable parameters is /usr/sam/lib/kc/params.tx. There are also two other .tx files there that you may find of interest, drivers.tx and subsys.tx.

Lou Zirko
Deepak Seth_1
Regular Advisor

Re: list of kernal param in 10.20

HI sanjay ,
I tried your 3 commands and the last command takes it forever. i don;t get the desired result.

Clay command gives me the desired result but i think the total number of kernal parameter got in the listing is less than what SAM list - that is my pure guess ? I didn't count it yet.

Thanx everybody for your quick responses.







linuxfan
Honored Contributor

Re: list of kernal param in 10.20

Hi Deepak,


I tried a simple script to get the kernel params on a 10.20 box

here KERNEL_PARAM is a file containing all the configurable parameters. the parameters have a name KC_PARAM_NAME in /var/sam/boot.config, so you will have to create a file with all the configuration parameters.

/Begin/

#!/usr/bin/sh

PATH=/usr/bin:/usr/local/bin
KERNEL_PARM=/tmp/kernel_param

cat $KERNEL_PARAM | while read PARAM
do
echo "$PARAM \c"
sed -n '/'$PARAM'/,$p' /var/sam/boot.config | sed - n '2p' | awk '{print $3}'
done

/End/


You can ofcourse modify it to suit your needs or if you want it in a different format.

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
linuxfan
Honored Contributor
Solution

Re: list of kernal param in 10.20

Hi (again) Deepak,


I guess it would be a good idea to get the output to a file ;)

/Begin/

#!/usr/bin/sh

PATH=/usr/bin:/usr/local/bin
KERNEL_PARM=/tmp/kernel_param
OUTFILE=/tmp/`hostname`.kernel_list

>$OUTFILE

cat $KERNEL_PARAM | while read PARAM
do
echo "$PARAM \c" >> $OUTFILE
sed -n '/'$PARAM'/,$p' /var/sam/boot.config | sed - n '2p' | awk '{print $3}' >> $OUTFILE
done

/End/


-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates