Operating System - HP-UX
1834744 Members
2742 Online
110070 Solutions
New Discussion

Re: How can I get system table`s contents without Glance +

 
SOLVED
Go to solution
Lothar Krueler
Regular Advisor

How can I get system table`s contents without Glance +

Hi,
I want to bring an application from a D270 to a L2000 cluster. For setting up the kernelparms I need the current values the application uses. I do not have glance on the D270 - the trial version has expired long ago.
How can I get information about the system tables by using shell commands ?
From our D270 HP-UX 10.20 I need the currently used values for :
"nproc, nfile, shgmmni, msgmni, semmni, nflocks, nbuf, ninode, buffercache"

Thanks in advance - Lothar
Wissen macht zaghaft, Dummheit kann alles!
10 REPLIES 10
Stefan Farrelly
Honored Contributor

Re: How can I get system table`s contents without Glance +


use the command;

/usr/sbin/sysdef
Im from Palmerston North, New Zealand, but somehow ended up in London...
Kofi ARTHIABAH
Honored Contributor

Re: How can I get system table`s contents without Glance +

your current values can be found in the file /stand/system

its a plain ascii text file! You can also view it from within SAM -> Kernel/Configurable parameters
nothing wrong with me that a few lines of code cannot fix!
Lothar Krueler
Regular Advisor

Re: How can I get system table`s contents without Glance +

Hi Stefan,
thanks for your very fast asnwer, I tried , but the listed values seem to be the configured kernel parm. I need the values currently used, like gance would show in the system tables.
Lothar
Wissen macht zaghaft, Dummheit kann alles!
Stefan Farrelly
Honored Contributor

Re: How can I get system table`s contents without Glance +


OK, go ahead and make your question really tough :-)!

Right, sar -v 1 1 will give you current usage values for;
ninode (inod-sz)
nfile (file-sz)
nproc (proc-sz)

bufpages is statically set, no such thing as its usage, unless it has actually been forced lower than shown in sysdef - so use the sysdef value

The rest...let me think about how to get the rest from the running kernel using adb...
Im from Palmerston North, New Zealand, but somehow ended up in London...
Stefan Farrelly
Honored Contributor

Re: How can I get system table`s contents without Glance +

Now, for semmni, this is real tough becuase Im sure glance actually goes into the kernel structures/tables and totals up the number in use, which is difficult for us to replicate from the command line, however ive worked out a way to get a rough figure;

You need to see the value of semmni from the kernel, but its doesnt show in sysdef, and if you dont have it hardset in your /stand/system file then you can get it from;
strings /stand/vmunix | grep semmni
Lets say its 256. Multiply by 8 (my guess) gives you 2048. Now we need to use the ipcs -sa command to total up your current semaphore usage, eg;

let X=0
for i in `ipcs -sa | awk '{print $9}' | grep -v NSEMS`
do
let X=$X+$i
done
echo $X

On my systems this results in 305 semaphores used, which when worked out as a percentage of 2048 is 14%, glance reports 11%. Tried it on several other systems, %result is always within a few % points of glance so not too bad!

more after lunch........pub time
Im from Palmerston North, New Zealand, but somehow ended up in London...
CHRIS_ANORUO
Honored Contributor

Re: How can I get system table`s contents without Glance +

Hi Lothar,

You can get (nproc, nfile,ninode) values from sar -v 1 1 and the rest from this line command: echo "bufpages/D" |adb /stand/vmunix /dev/mem. Just substitute bufpages with any other.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Stefan Farrelly
Honored Contributor

Re: How can I get system table`s contents without Glance +


Next, I think msgmni is even easier. To see what the current kernel value is hardset to do;
strings /stand/vmunix | grep msgmni

On ours its set to 150. Doing an ipcs -qa command shows the number of queues, which in all cases Ive looked at on our servers = the number in use from glance. eg. ipcs -qa shows 2 entries, gpm reports msgmni of 150 and only 2 in use (1%).

From sysdef, bufpages is in 4k pages so multiply by 4 = amount of memory used by Buffer cache. eg bufpages = 104857, x4, / 1024 = 409.6 Mb, same as gpm reports.
nbuf is simply buffer headers, no need to set this value, just set dbc_max_pct and dbc_min_pct to your desired values and bufpages and nbuf will be set automatically by the kernel. eg. on ours we have 2Gb RAM, we have dbc_max_pct set to 20, dbc_min_pct set to 10 (from sysdef) this has thus automatically set bufpages to 409.6 MB (as per above) and nbuf to 89530. All 409.6 MB is used for caching, usage=100%.


Im from Palmerston North, New Zealand, but somehow ended up in London...
Lothar Krueler
Regular Advisor

Re: How can I get system table`s contents without Glance +

Hi there,
thank you all for your previous suggestions. Please take a look at the attached, not yet completed shell-script.
I`m still searching the currently used values for nflocks and shmmni.

Lothar :-)
Wissen macht zaghaft, Dummheit kann alles!
Stefan Farrelly
Honored Contributor
Solution

Re: How can I get system table`s contents without Glance +


For shmmni do the same as for Semaphores above. You can see the value of shmmni either from sysdef or echo semmni/D | adb /stand/vmunix /dev/jmem
and then use ipcs -? (forget option to show shared mem usage) one column shows how much sharedmem is use, use a script to total it, compare to shmmni and theres your answer. I think nflocks is always 100% used (cant remember, not at work) so simply see the value from sysdef or using adb as per above.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Lothar Krueler
Regular Advisor

Re: How can I get system table`s contents without Glance +

Hi,
Stefan, there is a different between configured nflocks and used nflocks, I found
a script for getting the currently used nflocksvalue :
"http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x3bb9119c3420d411b66300108302854d,00.html"
I tried on our D270 HPUX 10.20 - it works (after adding a / before of q4xpdb), but i couldn`t verify the value, because I don`t have glance on the D270.
Using your last response I?m ready with my script (attached to this post).

Thank you all for your help.
Lothar :-))
Wissen macht zaghaft, Dummheit kann alles!