Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest (solved)

2007-03-08 Thread Adrian Reyer
Thanks to Bertl and daniel_hozac this is solved already.
Most recent util-vserver tools (0.30.213-rcX) from
http://people.linux-vserver.org/~dhozac/t/uv-testing/ can do this.
Just create files
/etc/vservers//sysctl//{setting,value}
holding the key and the value.

E.g. here it looks like this to change shmmax:
# cat /etc/vservers/testguest/sysctl/kernel.shmmax/setting 
kernel.shmmax
# cat /etc/vservers/testguest/sysctl/kernel.shmmax/value   
2147483648

Regards,
_are_
-- 
LiHAS - Adrian Reyer Fon:  +49 (7 11) 78 28 50 90
Krehlstraße 1 - D-70563 StuttgartFax:  +49 (7 11) 78 28 50 91
 [EMAIL PROTECTED] - http://lihas.de
Linux, Netzwerke, Consulting & Support   USt-ID: DE 227 816 626 Stuttgart
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-03-07 Thread Adrian Reyer
On Tue, Jan 02, 2007 at 03:47:35AM +0100, Daniel Hokka Zakrisson wrote:
> >>Could somebody tell me how to modify the guest config to execute "echo
> for this particular problem. Having a non-executable one that does 
> something like
> VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
> is probably the only way to make it happen (with current tools).

I am just running into this very same problem. However, if the above
is a solution I don't understand it.
So far I tried adding this line to prepre-start and making
prepre-start executable as well as just setting this as an environment
variable before calling the vserver start.
Both ways result in just no shmmax changed.
For another attempt I added to vserver.start above the
"[EMAIL PROTECTED]" \
an
$_CHAINECHO /proc/sys/kernel/shmmax 134217728 -- \

unfortunately this stops the vserver from starting and I actually
don't understand what parameters would be correct for the chain-echo.

Regards,
_are_
-- 
LiHAS - Adrian Reyer Fon:  +49 (7 11) 78 28 50 90
Krehlstraße 1 - D-70563 StuttgartFax:  +49 (7 11) 78 28 50 91
 [EMAIL PROTECTED] - http://lihas.de
Linux, Netzwerke, Consulting & Support   USt-ID: DE 227 816 626 Stuttgart
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-02 Thread Herbert Poetzl
On Tue, Jan 02, 2007 at 08:08:40PM +0100, Daniel Hokka Zakrisson wrote:
> Herbert Poetzl wrote:
> >On Tue, Jan 02, 2007 at 03:47:35AM +0100, Daniel Hokka Zakrisson wrote:
> >>Herbert Poetzl wrote:
> >>>On Mon, Jan 01, 2007 at 02:05:30PM +0100, william Famy wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> To begin with Happy new year to every vserver guy.
> >>>and a happy new year to you too ...
> >>>
> I have to extand the shmmax for my guest but I do not manage to do it.
> 
> cat /proc/sys/kernel/shmmax
> 134217728
> I have tried the /etc/vserver/host/rlimits
> I have tried to add bcapability
> but I do not manage to go ahead with it.
> 
> I've run under 2.6.19.1 with the last devel vserver patch under
> debian etch as host.
> 
> Could somebody tell me how to modify the guest config to execute
> "echo 134217728 /proc/sys/kernel/shmmax " for my guest.
> >
> >>>as 2.6.19.x incorporates the mainline namespace
> >>>stuff, you have to set those values from one of
> >>>the early guest startup script (e.g. prepre-start)
> >>>while you still have 'enough' capabilities ...
> >
> >>I assume this requires the IPC namespace to be created? 
> >>That doesn't happen until the context is created, so none of  
> >>the scripts would work for this particular problem. 
> >
> >hmm, isn't the context supposed to exist in
> >the post-start script? if not, please could
> >you once and for all clarify which script is
> >started when and in what context(s)?
> 
> The context will exist in the post-start scripts, but they won't be run 
> inside the context, and the context will already have lost the extra 
> capabilities.

ah, but that script could actually 'enter' the
context with capabilities still intact and
do whatever manipulation necessary ...

(but sounds too complicated)

> >>Having a non-executable one that does something like
> >>VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
> >>is probably the only way to make it happen (with current tools).
> >
> >okay, any plans to allow for such support?
> >
> >>>also using the sysctl interface instead of the
> >>>deprecated procfs one (which might as well be
> >>>hidden away :) is advised ...
> >>>
> >>>maybe special tool support will be added soon,
> >>>so please double check with the tool maintainers
> >>I guess some nicer way to support it would be required,
> >>especially as more of these settings become available.
> >
> >what do you have in mind ... please share
> >your thoughts, as I think those settings _might_
> >become essential for certain setups ...
> 
> I guess something like /etc/vservers//sysctl//{setting,value} 
> shouldn't be a problem, should it?

sounds good to me, 
TIA,
Herbert

> Thanks for any help.
> 
> -- 
> Daniel Hokka Zakrisson
> GPG id: 06723412
> GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
> ___
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-02 Thread Daniel Hokka Zakrisson

Herbert Poetzl wrote:

On Tue, Jan 02, 2007 at 03:47:35AM +0100, Daniel Hokka Zakrisson wrote:

Herbert Poetzl wrote:

On Mon, Jan 01, 2007 at 02:05:30PM +0100, william Famy wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To begin with Happy new year to every vserver guy.

and a happy new year to you too ...


I have to extand the shmmax for my guest but I do not manage to do it.

cat /proc/sys/kernel/shmmax
134217728
I have tried the /etc/vserver/host/rlimits
I have tried to add bcapability
but I do not manage to go ahead with it.

I've run under 2.6.19.1 with the last devel vserver patch under
debian etch as host.

Could somebody tell me how to modify the guest config to execute
"echo 134217728 /proc/sys/kernel/shmmax " for my guest.



as 2.6.19.x incorporates the mainline namespace
stuff, you have to set those values from one of
the early guest startup script (e.g. prepre-start)
while you still have 'enough' capabilities ...


I assume this requires the IPC namespace to be created? 
That doesn't happen until the context is created, so none of  
the scripts would work for this particular problem. 


hmm, isn't the context supposed to exist in
the post-start script? if not, please could
you once and for all clarify which script is
started when and in what context(s)?


The context will exist in the post-start scripts, but they won't be run 
inside the context, and the context will already have lost the extra 
capabilities.



Having a non-executable one that does something like
VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
is probably the only way to make it happen (with current tools).


okay, any plans to allow for such support?


also using the sysctl interface instead of the
deprecated procfs one (which might as well be
hidden away :) is advised ...

maybe special tool support will be added soon,
so please double check with the tool maintainers

I guess some nicer way to support it would be required,
especially as more of these settings become available.


what do you have in mind ... please share
your thoughts, as I think those settings _might_
become essential for certain setups ...


I guess something like /etc/vservers//sysctl//{setting,value} 
shouldn't be a problem, should it?



TIA,
Herbert


HTH,
Herbert


Thanks for any help.


--
Daniel Hokka Zakrisson
GPG id: 06723412
GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-02 Thread Herbert Poetzl
On Tue, Jan 02, 2007 at 03:47:35AM +0100, Daniel Hokka Zakrisson wrote:
> Herbert Poetzl wrote:
> >On Mon, Jan 01, 2007 at 02:05:30PM +0100, william Famy wrote:
> >>-BEGIN PGP SIGNED MESSAGE-
> >>Hash: SHA1
> >>
> >>To begin with Happy new year to every vserver guy.
> >
> >and a happy new year to you too ...
> >
> >>I have to extand the shmmax for my guest but I do not manage to do it.
> >>
> >>cat /proc/sys/kernel/shmmax
> >>134217728
> >>I have tried the /etc/vserver/host/rlimits
> >>I have tried to add bcapability
> >>but I do not manage to go ahead with it.
> >>
> >>I've run under 2.6.19.1 with the last devel vserver patch under
> >>debian etch as host.
> >>
> >>Could somebody tell me how to modify the guest config to execute
> >>"echo 134217728 /proc/sys/kernel/shmmax " for my guest.

> >as 2.6.19.x incorporates the mainline namespace
> >stuff, you have to set those values from one of
> >the early guest startup script (e.g. prepre-start)
> >while you still have 'enough' capabilities ...

> I assume this requires the IPC namespace to be created? 
> That doesn't happen until the context is created, so none of  
> the scripts would work for this particular problem. 

hmm, isn't the context supposed to exist in
the post-start script? if not, please could
you once and for all clarify which script is
started when and in what context(s)?

> Having a non-executable one that does something like
> VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
> is probably the only way to make it happen (with current tools).

okay, any plans to allow for such support?

> >also using the sysctl interface instead of the
> >deprecated procfs one (which might as well be
> >hidden away :) is advised ...
> >
> >maybe special tool support will be added soon,
> >so please double check with the tool maintainers
> 
> I guess some nicer way to support it would be required,
> especially as more of these settings become available.

what do you have in mind ... please share
your thoughts, as I think those settings _might_
become essential for certain setups ...

TIA,
Herbert

> >HTH,
> >Herbert
> >
> >>Thanks for any help.
> 
> -- 
> Daniel Hokka Zakrisson
> GPG id: 06723412
> GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
> ___
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-02 Thread william Famy
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel Hokka Zakrisson a écrit :
> Herbert Poetzl wrote:
>> On Mon, Jan 01, 2007 at 02:05:30PM +0100, william Famy wrote:
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>> To begin with Happy new year to every vserver guy.
>>
>> and a happy new year to you too ...
>>
>>> I have to extand the shmmax for my guest but I do not manage to do it.
>>>
>>> cat /proc/sys/kernel/shmmax
>>> 134217728
>>> I have tried the /etc/vserver/host/rlimits
>>> I have tried to add bcapability
>>> but I do not manage to go ahead with it.
>>>
>>> I've run under 2.6.19.1 with the last devel vserver patch under debian
>>> etch as host.
>>>
>>> Could somebody tell me how to modify the guest config to execute "echo
>>> 134217728 /proc/sys/kernel/shmmax " for my guest.
>>
>> as 2.6.19.x incorporates the mainline namespace
>> stuff, you have to set those values from one of
>> the early guest startup script (e.g. prepre-start)
>> while you still have 'enough' capabilities ...
> 
> I assume this requires the IPC namespace to be created? That doesn't
> happen until the context is created, so none of the scripts would work
> for this particular problem. Having a non-executable one that does
> something like
> VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
> is probably the only way to make it happen (with current tools).

[wf:]
I try the prepre-start but does not work.

vserver-stat
CTX   PROCVSZRSS  userTIME   sysTIMEUPTIME NAME
0   69 211.3M  62.2M   0m06s98   0m04s69   6m15s90 root server
49152   16   194M  30.5M   0m00s80   0m00s30   0m31s99 zm4
___
cat /etc/vservers/zm4/bcapabilities
CAP_SYS_RESOURCE
CAP_SYS_ADMIN
CAP_IPC_LOCK
CAP_IPC_OWNER
__
ls /etc/vservers/zm4/rlimits/
as  rss  shmem
___
cat  /etc/vservers/zm4/rlimits/a
cat  /etc/vservers/zm4/rlimits/as
9
cat  /etc/vservers/zm4/rlimits/rss
1
cat  /etc/vservers/zm4/rlimits/shmem
134217728
___
cat /proc/virtual/49153/nsproxy
NSProxy:c9d27fe0 [c5fba740,cbbf8800,cab7bbc0]
Namespace:  c5fba740 [#2]
RootPath:   /
SysName:Linux
NodeName:   zm4
Release:2.6.19.1-vs2.1.1.7.1
Version:#1 Fri Dec 29 10:53:07 CET 2006
Machine:i686
DomainName: (none)
SEMS:   250 32000 32 128  0
MSG:8192 16384 16
SHM:33554432 2097152  4096 181


cat /proc/virtual/49153/limit
Limitcurrent min/maxsoft/hard   hits
PROC: 24   0/  27 -1/  -1
 0
VM:49660   0/   51941  9/   9
 0
VML:   0   0/   0 -1/  -1
 0
RSS:7812   0/8496  1/   1
 0
ANON:   4544   0/4730 -1/  -1
 0
RMAP:   3268   0/3796 -1/  -1
 0
FILES:   212   0/ 255 -1/  -1
 0
OFD: 152   0/ 152 -1/  -1
 0
LOCKS: 2   0/   2 -1/  -1
 0
SOCK:  7   0/   7 -1/  -1
 0
MSGQ:  0   0/   0 -1/  -1
 0
SHM: 181   0/ 181   134217728/134217728
 0
SEMA:  0   0/   0 -1/  -1
 0
SEMS:  0   0/   0 -1/  -1
 0
DENT:153   0/ 154 -1/  -1
 0

I try number of combinaison but nothing looks great :-(.

I have to contact the tool maintainers. I will do it tomorow.

regards.

If someone have any idea feel free to send them :-).
I have to install my soft under the hosts computer instead of the guest.


> 
>> also using the sysctl interface instead of the
>> deprecated procfs one (which might as well be
>> hidden away :) is advised ...
>>
>> maybe special tool support will be added soon,
>> so please double check with the tool maintainers
> 
> I guess some nicer way to support it would be required, especially as
> more of these settings become available.
> 
>> HTH,
>> Herbert
>>
>>> Thanks for any help.
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFmp3ytBZWkq9aICARAmIkAKCxIwvyTIzHvTYersrmy/7agXM4EwCfeYGC
IjZ19E4OndOqQR1YON15WrM=
=szF7
-END PGP SIGNATURE-
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-01 Thread Daniel Hokka Zakrisson

Herbert Poetzl wrote:

On Mon, Jan 01, 2007 at 02:05:30PM +0100, william Famy wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To begin with Happy new year to every vserver guy.


and a happy new year to you too ...


I have to extand the shmmax for my guest but I do not manage to do it.

cat /proc/sys/kernel/shmmax
134217728
I have tried the /etc/vserver/host/rlimits
I have tried to add bcapability
but I do not manage to go ahead with it.

I've run under 2.6.19.1 with the last devel vserver patch under debian
etch as host.

Could somebody tell me how to modify the guest config to execute "echo
134217728 /proc/sys/kernel/shmmax " for my guest.


as 2.6.19.x incorporates the mainline namespace
stuff, you have to set those values from one of
the early guest startup script (e.g. prepre-start)
while you still have 'enough' capabilities ...


I assume this requires the IPC namespace to be created? That doesn't 
happen until the context is created, so none of the scripts would work 
for this particular problem. Having a non-executable one that does 
something like

VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
is probably the only way to make it happen (with current tools).


also using the sysctl interface instead of the
deprecated procfs one (which might as well be
hidden away :) is advised ...

maybe special tool support will be added soon,
so please double check with the tool maintainers


I guess some nicer way to support it would be required, especially as 
more of these settings become available.



HTH,
Herbert


Thanks for any help.


--
Daniel Hokka Zakrisson
GPG id: 06723412
GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-01 Thread Herbert Poetzl
On Mon, Jan 01, 2007 at 02:05:30PM +0100, william Famy wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> To begin with Happy new year to every vserver guy.

and a happy new year to you too ...

> I have to extand the shmmax for my guest but I do not manage to do it.
> 
> cat /proc/sys/kernel/shmmax
> 134217728
> I have tried the /etc/vserver/host/rlimits
> I have tried to add bcapability
> but I do not manage to go ahead with it.
> 
> I've run under 2.6.19.1 with the last devel vserver patch under debian
> etch as host.
> 
> Could somebody tell me how to modify the guest config to execute "echo
> 134217728 /proc/sys/kernel/shmmax " for my guest.

as 2.6.19.x incorporates the mainline namespace
stuff, you have to set those values from one of
the early guest startup script (e.g. prepre-start)
while you still have 'enough' capabilities ...

also using the sysctl interface instead of the
deprecated procfs one (which might as well be
hidden away :) is advised ...

maybe special tool support will be added soon,
so please double check with the tool maintainers

HTH,
Herbert

> Thanks for any help.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFmQcatBZWkq9aICARAqfbAJ0cvay7XlgnkD7IknjcqHHMkzCm4QCg6qkk
> KkjSptndE3w2yYwrypzxK/U=
> =fzGy
> -END PGP SIGNATURE-
> ___
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-01-01 Thread william Famy
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To begin with Happy new year to every vserver guy.

I have to extand the shmmax for my guest but I do not manage to do it.

cat /proc/sys/kernel/shmmax
134217728
I have tried the /etc/vserver/host/rlimits
I have tried to add bcapability
but I do not manage to go ahead with it.

I've run under 2.6.19.1 with the last devel vserver patch under debian
etch as host.

Could somebody tell me how to modify the guest config to execute "echo
134217728 /proc/sys/kernel/shmmax " for my guest.

Thanks for any help.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFmQcatBZWkq9aICARAqfbAJ0cvay7XlgnkD7IknjcqHHMkzCm4QCg6qkk
KkjSptndE3w2yYwrypzxK/U=
=fzGy
-END PGP SIGNATURE-
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver