Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you view and change Kernel parameters?

Status
Not open for further replies.

Pacifica

Technical User
Nov 23, 2002
13
0
0
DE
I'm trying to see and change the kernel parameters for Solaris 9.

I issued the ipcs command. I get following :

T ID KEY MODE OWNER GROUP
Message Queues:
Shared Memory:
Semaphores:

but no results. How do I actually get the values?

I added entries in my /etc/system file :
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=1000
set semsys:seminfo_semmns=2000
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767


and rebooted, but still get same result with ipcs command.
 
ipcs-cmd just show if ipcs, shmem or semaphore are
in use or not.
to put or get values to/from you need to write programs,
i use 'c' for this, sure 'perl' can do it too. -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
sysdef will show you what the current settings are for those values. Annihilannic.
 
sysdef will indeed provide info on kernel parameters.
However, not quite all are listed.
In particular, during my pre-installation procedure of Oracle 9i I cannot get confirmation (after booting) of the
shared memory and semaphore kernel parameter settings.
I'm investigating ndd to see if this might provide confirmation...
Platform: Sun Solaris(SPARC) 9
 
Which ones exactly are not listed? sysdef | grep -i s[eh]m lists all of the shared memory and semaphore related kernel parameters that I know of.


Annihilannic.
 
OK, subsequent investigations have led to this answer:

"As Sun explained this to me, your shared memory setting are correct and the system recognizes them. However, since Solaris uses a dynamic kernel, the setting won't take affect until a process attempts to use them. (i.e. Oracle, IBM MQSeries, ...). You manually forced the settings by using the modload command. However, did you try starting your application first, and then checking sysdef?"

FWIW, the output I get from running your sysdef command ends with 'IPC Semaphores module is not loaded'...
So, I was expecting to see all semaphore/shared memory parameters I set (SEMMNI, SEMMNS, SEMMSL, SHMMAX, SHMMIN, SHMSEG, SHMMNI) none of which were listed.
What is your take on this? It sounds feasible, doesn't it?
 
Certainly sounds plausible. I've tried using modunload on my Solaris 8 system to unload the semsys module but get can't unload the module: Device busy, even though ipcs doesn't list any semaphores in use, so i couldn't test it.

I don't think I've encountered a system without those modules loaded; perhaps in single-user mode it would be more likely, or maybe Solaris 9 does something differently there?

Annihilannic.
 
In this side-issue to getting Oracle set up, I think I have finally reached finality! phew...
I issued an "ipcrm -q 10" knowing that such a queue does not exist. The instruction fails, as expected.
Then I perform "sysdef" and, by George, the parameters are listed as required.
So, under Solaris 9, there does seem to be some dynamic kernel configuration.
Thanks for your time and help.
 
man kstat

Entering values to live kernel, example for MAXUSERS

adb -kw
========
root@[/root]: adb -kw
physmem 79ee
maxusers/D --}read value
maxusers:
maxusers: 8264
maxusers/W 200 --}set value
maxusers: 0x2048 = 0x200
maxusers/D
maxusers:
maxusers: 512


Changes will not stay after reboot, enter settings in /etc/system/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top