kernel param listings

Which shows the current kernel settings accurately? kmtune or sysdef. I ask because although some params show the same setting with both, some do not.
Example

>kmtune | grep nfile
nfile 75008 - (15*NPROC+2048)
>sysdef | grep nfile
nfile 75018 - 14- -

which is the real number and why the differences?

Thanks

What OS are you running?

As for hpux 11.11 nfile kernel parameter is static and should show same value using kmtune or sysdef, look in /stand if system and vmunix have same timestamp.
This may not be true with release of OS where nfile can be set dynamicaly

hpux 11.11, I checked on 4 different boxes and vmunix and system do not have the same timestamp on any of them. nfile is differentt on all of them also.
So sysdef and kmtune "should" return the same values correct?

what about why sysdef does not return values for some params whil kmtune does?

>kmtune | grep shmmax
shmmax 0x200000000
sysdef | grep shmmax
returns nothing

>So sysdef and kmtune "should" return the same values correct?
No because the timestamps ARE different:
kmtune requires /stand/system to be present so it uses it, if the timestamp is different with /stand/vmunix you could have a missmatch : someone updated the kernel but hasnt updated the system file, or someone has edited and updated /stand/system and hasnt rebuilt the kernel...

sysdef reads the values from the current kernel.

>what about why sysdef does not return values for some params whil kmtune does? sysdef | grep shmmax returns nothing
Ah well thats one of many params sysdef will not show...

Now 'sysdef' is deprecated, and kmtune is the correct tool to use with 11.11
and post 11.23 you should be using kcweb as in future sysdef should be removed...

You cannot create a kernel and a system file simultaneously so the timestamps are destined to be different. But which is newer? That is the question. The tools to create kernels vary fast with HP-UX, but with 11.11, here are some comments...

A copy of the system file used to create the kernel has been stored inside the kernel itself. To build a new kernel via the command line, HP suggests as a first step...
cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system
This will suck the system file out of the kernel and deposit it /stand/build. The next step is to fiddle with some parameters with kmtune with -S /stand/build/system to use this particular system file. As you do, the system file changes and kmtune reports the changed value as "planned". It will become the real value if you proceed.

Unfortunately, HP then suggests you build the kernel via some steps that do not update /stand/system. Not a super big deal, since a new system file will be obtained to rebuild a kernel, but it leaves kmtune without a -S parameter a little bit in the dark. This is why I copy or move /stand/build/system to /stand/system as my last step in a kernel rebuild from the command line on 11.11. On the other hand, building a kernel via sam does update /stand/system correctly.

So this is why the confusion exists. Is your system file old and obsolete, or does it reflect your intentions for a change? Only you can say...

Thanks for correcting me!
I realise that things can be so obvious for us (like same timestamps was to be understood within a reasonable time shift due to the edition, the build of new kernel and reboot...) that when it comes to explain, we generate even more confusion... it is true that when I look these files I have only the date displaying since we do not reboot often...

All the best

Thanks for the inffo fellas, good stuff.

Dave