Operating System - HP-UX
1833550 Members
2912 Online
110061 Solutions
New Discussion

Re: kernel parameters not found in /stand/vmunix

 
SOLVED
Go to solution
Jdamian
Respected Contributor

kernel parameters not found in /stand/vmunix

You can use 'adb' debugger to get the value of kernel parameter. For instance:

echo nproc/D | adb -k /stand/vmunix /dev/mem
nproc:
nproc: 29620

But some kernel parameters are not present in /stand/vmunix as 'shmmax'

echo shmmax/D | adb -k /stand/vmunix /dev/mem
symbol not found

Why ?
10 REPLIES 10
Zeev Schultz
Honored Contributor

Re: kernel parameters not found in /stand/vmunix

They are present in the kernel,like if you
use kmtune | grep shmmax or even grep shmmax
/stand/system you can see 'em.I think it's
up to adb usage,checking now if I'm right :)
So computers don't think yet. At least not chess computers. - Seymour Cray
Jdamian
Respected Contributor

Re: kernel parameters not found in /stand/vmunix

'kmtune' reports formulae for some kernel parameter and I need the value not the formula.

/stand/system contains the values for kernel parameters that are different from their DEFAULT values.

I'm trying to dump to a text file all the values of the kernel parameters but I didn't find a tool. kmtune is not fine because it reports formulae, then an expression evaluator is needed to compute the values.
Trond Haugen
Honored Contributor

Re: kernel parameters not found in /stand/vmunix

Try this:
echo "@system_data?s" | adb /stand/vmunix

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Zeev Schultz
Honored Contributor

Re: kernel parameters not found in /stand/vmunix

It's in the kernel:
strings /stand/vmunix | grep shmmax returns
you shmmax ok.
Now,if you do :
nm /stand/vmunix | grep nproc it will return
nproc this way:
nproc | 7139924|extern|data |$SHORTDATA$
Why?Because nproc is extern (global) symbol.

I would also check shmem (if shared memory is
enabled at all?) with
echo shmem/D | adb .... (if 0 - disabled,1 -
enabled...so if shared memory is disabled why
should kernel keep the symbol for max segment size?)
So computers don't think yet. At least not chess computers. - Seymour Cray
Zeev Schultz
Honored Contributor

Re: kernel parameters not found in /stand/vmunix

fix - shmem is relevant to 700 (workstations)
only,ignore las assumption that shared memory
isn't enabled.
So computers don't think yet. At least not chess computers. - Seymour Cray
BLADE_1
Frequent Advisor

Re: kernel parameters not found in /stand/vmunix

hi,

If u can go thru SAM and view the kernel parameters and then..in File option select print --> and print to file--> you will get all the parameters and their values into file..



Rgds
nainesh
fortune favours the brave
Dietmar Konermann
Honored Contributor
Solution

Re: kernel parameters not found in /stand/vmunix

Using adb you are only able to look at global kernel variables, but by far not all tunables in /stand/system relate directly to a symbol in the name list.

system_data is a one2one copy of /stand/system, created at build time. It is not used by the kernel , there's no guarantee that listed values are really effective.

Looking at shmmax is a litte bit more complicated. It's part of a struct shminfo:

struct shminfo {
long shmmax; /* max shared memory segment size */
long shmmin; /* min shared memory segment size */
int shmmni; /* # of shared memory identifiers */
int shmseg; /* max attached shared memory segments per process */
};

So you need to use shminfo to get the desired values, e.g. for a 64bit system (long is 8 bytes):

# echo "shminfo/XXXXXX" | adb /stand/vmunix /dev/kmem
shminfo:
shminfo: 0 40000000 0 1
0xC8 78

In this case shmmax is 0x40000000.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Rajesh G. Ghone
Regular Advisor

Re: kernel parameters not found in /stand/vmunix

Hi,

If you want to kernel parameters for e.g. u want to know the parameter of shmmax u can simply type.

#kmtune -q shmmax

u will get the output of that parameter.

Regards,
Rajesh G.
Rajesh Ghone
Dietmar Konermann
Honored Contributor

Re: kernel parameters not found in /stand/vmunix

Some addition about kmtune... yes, beginning with 11.11 you can get the current value using kmtune -q. It uses the new tuneinfo(2) syscall to get get the setting from the kernel.

On 11.00 it simply reads /stand/system.

Best regards...
Diezmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Ravi_8
Honored Contributor

Re: kernel parameters not found in /stand/vmunix

Hi,

it reads from /stand/system file
never give up