1834209 Members
2277 Online
110066 Solutions
New Discussion

Re: Kernel values report

 
SOLVED
Go to solution

Kernel values report

Hi,

I want to do a report (text file or else) for all the kernel parameters of my computer. I know that with SAM it's possible for the values but I would prefer the formula used.
For instance, nfile=2*nproc...

Regards.

Laurent MENEGUZY
13 REPLIES 13
Sanjay_6
Honored Contributor
Solution

Re: Kernel values report

Hi,

Try,

kmtune -S /stand/system >/tmp/kernel_para.txt

more /tmp/kernel_para.txt

Hope this helps.

regds
John Bolene
Honored Contributor

Re: Kernel values report

Very good product to see everything about your systems.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sysinfo-3.3.1/

It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Bill McNAMARA_1
Honored Contributor

Re: Kernel values report

Try sysdef

Later,
Bill
It works for me (tm)
PIYUSH D. PATEL
Honored Contributor

Re: Kernel values report

Hi,

Try sysdef > /tmp/filename

View the /tmp/filename and you can get all the tunable parameters along with the formulas.

Piyush
James R. Ferguson
Acclaimed Contributor

Re: Kernel values report

Hi Laurent:

If you are running 11.x, use 'kmtune' to query you kernel parameter values. On 10.20, use the deprecated 'sysdef'.

To see the actual limits and formulae used with the various parameters look at :

# /usr/conf/master.d/core-hpux

Regards!

...JRF...
V. V. Ravi Kumar_1
Respected Contributor

Re: Kernel values report

hi,

try this if u are using 11.00
kmtune -l > /tmp/kmtune.lst

regds
ravi
Never Say No
John Carr_2
Honored Contributor

Re: Kernel values report

Hi

sysdef will give you the sum of the formulae but not the formulea itself you need to do as JFR said

# /usr/conf/master.d/core-hpux

you can then cross reference this to the output of sysdef to get both formulea and present set values.

John.

Re: Kernel values report

kmtune works fine on my system (11.0)and reports the formula.
sysdef reports only some values (I don't why).

Thanks everybody !
James R. Ferguson
Acclaimed Contributor

Re: Kernel values report

Hi:

Do *not* rely on 'sysdef' if you are running on 11.x. 'kmtune' is accurate and is intended as its replacement. 'kmtune' is not available prior to 11.0 and there 'sysdef' is quite useful (obviously).

Regards!

...JRF...
Bill McNAMARA_1
Honored Contributor

Re: Kernel values report

In my opinion they've taken a step backwards with kmtune.

sysdef is much better presented and easier to parse.

Is there an SR on that!

Later,
Bill
It works for me (tm)
Arockia Jegan
Trusted Contributor

Re: Kernel values report

kmtune is the best command. You can use "kmtune -l" to get more details. kmtune will look at the follwoing directories/files to get the kernel parameters
/usr/conf/master.d
/stand/system.d
/stand/system

But sysdef will only look at /usr/conf/master.d. So it won't show all the parameters.
H.Merijn Brand (procura
Honored Contributor

Re: Kernel values report

Though kmtune -l yields all the needed info it's now fun to read. I've written a perl wrapper that reformats and calculated formula's:

(Unclobbered version attached, because the spaces *are* important in the output format)

#!/pro/bin/perl -w

use strict;
use integer;

my (%tune, %parm, $parm, %ref);

open my $list, "kmtune -l |";
while (<$list>) {
s/\s+$//;
my ($p, $v) = split m/:\s+/, $_, 2 or next;
$v =~ s/\b0X([\dA-Fa-f]+)\b/0x\L$1/g;
$p eq "Parameter" and $parm = $v, next;

$tune{$parm}{$p} = $v;

$p eq "Value" or next;
if ($v =~ m/^-?(0x[\da-f]+|\d+)$/) {
$parm{uc $parm} = 0 + $v =~ m/^-?0x/ ? hex $v : $v;
}
else {
#printf STDERR "%-20s: '%s'\n", $p, $v;
$ref{$parm} = $v;
}
}
close $list;

while (keys %ref) {
foreach my $p (keys %ref) {
my $up = uc $p;
my $v = $tune{$p}{Value};
#my @r = (m/\b([A-Za-z]\w*)\b/g);
my $x = 0;
eval q(
$v =~ s/\b([A-Za-z]\w*)\b/exists$parm{uc $1}?$parm{uc $1}:do{$x++,$1
}/ge;
);
$x and next;
eval "\$v = $v";
$parm{$up} = $v;
delete $ref{$p};
}
}

$= = 64;
foreach $parm (sort keys %tune) {
$tune{$parm}{Default} eq $tune{$parm}{Value} and $tune{$parm}{Default} = "";
write;
}

format STDOUT_TOP =
Parameter Value hex Value dec Function Defaul
t
-------------------- ------------ ----------- --------------------------- ------
--------------
.
format STDOUT =
@<<<<<<<<<<<<<<<<<<< @>>>>>>>>>>> @>>>>>>>>>> ^<<<<<<<<<<<<<<<<<<<<<<<<<< ^<<<<<
<<<<<<<<<<<<<<
$parm,sprintf("0x%010x",$parm{uc $parm}),$parm{uc $parm},$tune{$parm}{Value},$tu
ne{$parm}{Default}
~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<< ^<<<<<
<<<<<<<<<<<<<<
$tune{$parm}{Value}, $tune{
$parm}{Default}
.
Enjoy, Have FUN! H.Merijn
Bill McNAMARA_1
Honored Contributor

Re: Kernel values report

nice one procura!

kmtune is the best!

Later,
Bill
It works for me (tm)