Discussion:
How to checlk kernel limitations for specific user at Solaris 10?
(too old to reply)
Pavel Simonovsky
2010-03-31 07:39:27 UTC
Permalink
In 9 version and other OS (like HP for example) there are well known kernel
parameters like:
SHMMAX
SHMMIN
SHMMNI
SHMSEG
SEMMNS
SEMMNI
SEMMSL
It is simple to check them also interactive, and also in shell/Perl script.
But in Solaris10 Sun introduced (As I understand - it was available also for
8 and 9, but as separate, not built in product) dynamical system of
management of kernel parameters/limitations driven by projects...
Now question: how can I at script to check limits for some specific user
(for example on semaphores and shared memory)? is it enough to run with his
user id:

'sh -c "prctl -i process $$"'

and parse its output? Or I have to take into account something else?




--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Michael Vilain
2010-03-31 07:45:55 UTC
Permalink
Post by Pavel Simonovsky
In 9 version and other OS (like HP for example) there are well known kernel
SHMMAX
SHMMIN
SHMMNI
SHMSEG
SEMMNS
SEMMNI
SEMMSL
It is simple to check them also interactive, and also in shell/Perl script.
But in Solaris10 Sun introduced (As I understand - it was available also for
8 and 9, but as separate, not built in product) dynamical system of
management of kernel parameters/limitations driven by projects...
Now question: how can I at script to check limits for some specific user
(for example on semaphores and shared memory)? is it enough to run with his
'sh -c "prctl -i process $$"'
and parse its output? Or I have to take into account something else?
These are kernel parameters. AFAIK, you have to be root and use mdb to
pull the current values out of the running system. Don't think there's
any API or scriptable way to do this. You best bet is to rethink this
approach.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
Pavel Simonovsky
2010-03-31 10:14:44 UTC
Permalink
Hmm...

Why analyzing output of prctl is not Ok? I afraid that there can be some
additional limitations, that have to be taken into account, but principally
prctl says you what are limits posed for current process... What is so
generally wrong with those approach?
Post by Michael Vilain
Post by Pavel Simonovsky
In 9 version and other OS (like HP for example) there are well known kernel
SHMMAX
SHMMIN
SHMMNI
SHMSEG
SEMMNS
SEMMNI
SEMMSL
It is simple to check them also interactive, and also in shell/Perl script.
But in Solaris10 Sun introduced (As I understand - it was available also for
8 and 9, but as separate, not built in product) dynamical system of
management of kernel parameters/limitations driven by projects...
Now question: how can I at script to check limits for some specific user
(for example on semaphores and shared memory)? is it enough to run with his
'sh -c "prctl -i process $$"'
and parse its output? Or I have to take into account something else?
These are kernel parameters. AFAIK, you have to be root and use mdb to
pull the current values out of the running system. Don't think there's
any API or scriptable way to do this. You best bet is to rethink this
approach.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Michael Vilain
2010-03-31 21:32:48 UTC
Permalink
Post by Pavel Simonovsky
Hmm...
Why analyzing output of prctl is not Ok? I afraid that there can be some
additional limitations, that have to be taken into account, but principally
prctl says you what are limits posed for current process... What is so
generally wrong with those approach?
Post by Michael Vilain
Post by Pavel Simonovsky
In 9 version and other OS (like HP for example) there are well known kernel
SHMMAX
SHMMIN
SHMMNI
SHMSEG
SEMMNS
SEMMNI
SEMMSL
It is simple to check them also interactive, and also in shell/Perl script.
But in Solaris10 Sun introduced (As I understand - it was available also for
8 and 9, but as separate, not built in product) dynamical system of
management of kernel parameters/limitations driven by projects...
Now question: how can I at script to check limits for some specific user
(for example on semaphores and shared memory)? is it enough to run with his
'sh -c "prctl -i process $$"'
and parse its output? Or I have to take into account something else?
These are kernel parameters. AFAIK, you have to be root and use mdb to
pull the current values out of the running system. Don't think there's
any API or scriptable way to do this. You best bet is to rethink this
approach.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
If you're looking for the overall settings for the kernel, I don't think
you can get them from prctl. Process specific ones, if prctl gives you
values, what's your concern about their validity? If you doubt them,
why not look up the source for prctl on OpenSolaris and see what it's
doing?
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
Pavel Simonovsky
2010-04-01 06:26:50 UTC
Permalink
That not that I doubt prctl output. I just am not sure, if there are no some
additional limitations, that can participate in mess... That is exaclty what
I am asking... Since I am not sysadmin, but programmer (although I have long
expirence with programming and scripting on UNIX , still I am not system
man), that is asked to write script to perfomr those check during(actually -
before) installtion of some components
Post by Michael Vilain
If you're looking for the overall settings for the kernel, I don't think
you can get them from prctl. Process specific ones, if prctl gives you
values, what's your concern about their validity? If you doubt them,
why not look up the source for prctl on OpenSolaris and see what it's
doing?
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Loading...