Tue, 22 Nov 2011 22:28:42 +0100
Le 22/11/2011 21:26, Jarry a écrit :
> On 22-Nov-11 21:03, Jean Weisbuch wrote:
>> Are you sure that you got the "SYS_RESOURCE" capability in
>> /etc/vservers/vs6/bcapabilities?
>
> I followed http://linux-vserver.org/Memory_Limits
> and http://linux-vserver.org/util-vserver:Cgroups
> and there is not a single word about any "bcapabilities".
> So how should I know about it?
>
> But OK, I just created that file, but it is still all
> the same. No limits are applied for vserver-guest...
>
> Jarry
>
You can get/set live attributes/capabilities with the "vattribute"
command, here is an example of a VServer with the SYS_RESSOURCE cap and
a working memory limit :
root@vserver7:~# vattribute --xid 1194 --get
bcapabilities:
CHOWN,DAC_OVERRIDE,DAC_READ_SEARCH,FOWNER,FSETID,KILL,SETGID,SETUID,NET_BIND_SERVICE,SYS_CHROOT,SYS_PTRACE,SYS_BOOT,SYS_RESOURCE,SYS_TTY_CONFIG,LEASE,AUDIT_WRITE,SETFCAP,MAC_OVERRIDE,MAC_ADMIN,^34,^35,^36,^37,^38,^39,^40,^41,^42,^43,^44,^45,^46,^47,^48,^49,^50,^51,^52,^53,^54,^55,^56,^57,^58,^59,^60,^61,^62,^63
ccapabilities:
set_utsname,raw_icmp,audit_control
flags:
fakeinit,virt_mem,virt_uptime,virt_cpu,virt_load,hide_netif,state_init,state_admin,sc_helper
umask:
root@vserver7:~# cat /dev/cgroup/v1194/memory.limit_in_bytes
2147483648
root@vserver7:~# cat /dev/cgroup/v1194/memory.memsw.limit_in_bytes
2147483648
root@vserver7:~# vserver v1194 exec free -mt
total used free shared buffers
cached
Mem: 2048 1304 743 0
0 560
-/+ buffers/cache: 744 1303
Swap: 0 0 0
Total: 2048 1304 743
Le 22/11/2011 21:26, Jarry a écrit :
On
22-Nov-11 21:03, Jean Weisbuch wrote:
Are you sure that you got the
"SYS_RESOURCE" capability in
/etc/vservers/vs6/bcapabilities?
I followed http://linux-vserver.org/Memory_Limits
and http://linux-vserver.org/util-vserver:Cgroups
and there is not a single word about any "bcapabilities".
So how should I know about it?
But OK, I just created that file, but it is still all
the same. No limits are applied for vserver-guest...
Jarry
You can get/set live attributes/capabilities with the "vattribute"
command, here is an example of a VServer with the SYS_RESSOURCE cap
and a working memory limit :
root@vserver7:~# vattribute --xid 1194 --get
bcapabilities:
CHOWN,DAC_OVERRIDE,DAC_READ_SEARCH,FOWNER,FSETID,KILL,SETGID,SETUID,NET_BIND_SERVICE,SYS_CHROOT,SYS_PTRACE,SYS_BOOT,SYS_RESOURCE,SYS_TTY_CONFIG,LEASE,AUDIT_WRITE,SETFCAP,MAC_OVERRIDE,MAC_ADMIN,^34,^35,^36,^37,^38,^39,^40,^41,^42,^43,^44,^45,^46,^47,^48,^49,^50,^51,^52,^53,^54,^55,^56,^57,^58,^59,^60,^61,^62,^63
ccapabilities:
set_utsname,raw_icmp,audit_control
flags:
fakeinit,virt_mem,virt_uptime,virt_cpu,virt_load,hide_netif,state_init,state_admin,sc_helper
umask:
root@vserver7:~# cat /dev/cgroup/v1194/memory.limit_in_bytes
2147483648
root@vserver7:~# cat /dev/cgroup/v1194/memory.memsw.limit_in_bytes
2147483648
root@vserver7:~# vserver v1194 exec free -mt
total used free shared buffers
cached
Mem: 2048 1304 743 0
0 560
-/+ buffers/cache: 744 1303
Swap: 0 0 0
Total: 2048 1304 743