<div dir="ltr">Please, where can is set this intruction <br><div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">lxc.cgroup.cpuset.</span><span style="color:rgb(0,0,0);white-space:pre-wrap">cpu_<wbr>exclusive = 1<span class=""> </span>  in which file ?</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Kind regards. <br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-11 13:00 GMT+01:00  <span dir="ltr"><<a href="mailto:lxc-users-request@lists.linuxcontainers.org" target="_blank">lxc-users-request@lists.linuxcontainers.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send lxc-users mailing list submissions to<br>
        <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:lxc-users-request@lists.linuxcontainers.org">lxc-users-request@lists.<wbr>linuxcontainers.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:lxc-users-owner@lists.linuxcontainers.org">lxc-users-owner@lists.<wbr>linuxcontainers.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of lxc-users digest..."<br>
<br>Today's Topics:<br>
<br>
   1. Number of core for a container (Thouraya TH)<br>
   2. Re: Number of core for a container (Fajar A. Nugraha)<br>
   3. Re: lxc-users Digest, Vol 204, Issue 3 (Thouraya TH)<br>
   4. Re: lxc-users Digest, Vol 204, Issue 3 (Tony Poder)<br>
<br><br>---------- Message transféré ----------<br>From: Thouraya TH <<a href="mailto:thouraya87@gmail.com">thouraya87@gmail.com</a>><br>To: LXC users mailing-list <<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>><br>Cc: <br>Bcc: <br>Date: Fri, 10 Nov 2017 13:29:23 +0100<br>Subject: [lxc-users] Number of core for a container<br><div dir="ltr"><div>Hi all,<br><br></div>I have used this command to fix cpu cores on which we have set running containers. <br><div><br><div>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 0<br>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 1<br>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 2<br>root@g--105:~# lxc-cgroup -n worker cpuset.cpus 3</div><div><br></div><div>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 4<br>lxc_container: cgmanager.c: do_cgm_set: 1022 Error setting cgroup value cpuset.cpus for cpuset:/lxc<br>lxc_container: cgmanager.c: do_cgm_set: 1023 call to cgmanager_set_value_sync failed: invalid request<br>lxc_container: lxc_cgroup.c: main: 103 failed to assign '4' value to 'cpuset.cpus' for 'worker'</div><div><br></div><div>--> i have only 4 cores<br></div><div><br>root@g-105:~# lxc-cgroup -n workerTest cpuset.cpus 0,1,2,3<br>root@g-105:~# lxc-cgroup -n workerTest cpuset.cpus 0,1,2 <br></div><div><br></div><div>Please, is there a command to display containers and list of cores used by each container ?</div><div>A second question please,  can i fix that only container 1 uses  cpu 2,3 <b>(exclusive use)</b> or not ? i.e container 2 CANNOT use cpu 2,3<br></div><div><br></div><div>Thanks so much for help.</div><div>Kind regards. <br></div></div></div>
<br><br>---------- Message transféré ----------<br>From: "Fajar A. Nugraha" <<a href="mailto:list@fajar.net">list@fajar.net</a>><br>To: LXC users mailing-list <<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>><br>Cc: <br>Bcc: <br>Date: Fri, 10 Nov 2017 20:14:55 +0700<br>Subject: Re: [lxc-users] Number of core for a container<br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Disclaimer: I no longer use lxc. Mostly lxd nowadays.</div><div class="gmail_quote"><br></div><div class="gmail_quote">I can point you to some documentation on the web though, hopefully that helps</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Nov 10, 2017 at 7:29 PM, Thouraya TH <span dir="ltr"><<a href="mailto:thouraya87@gmail.com" target="_blank">thouraya87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,<br><br></div>I have used this command to fix cpu cores on which we have set running containers. <br><div><br><div>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 0<br>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 1<br>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 2<br>root@g--105:~# lxc-cgroup -n worker cpuset.cpus 3</div><div><br></div><div>root@g-105:~# lxc-cgroup -n worker cpuset.cpus 4<br>lxc_container: cgmanager.c: do_cgm_set: 1022 Error setting cgroup value cpuset.cpus for cpuset:/lxc<br>lxc_container: cgmanager.c: do_cgm_set: 1023 call to cgmanager_set_value_sync failed: invalid request<br>lxc_container: lxc_cgroup.c: main: 103 failed to assign '4' value to 'cpuset.cpus' for 'worker'</div><div><br></div><div>--> i have only 4 cores<br></div></div></div></blockquote><div><br></div><div><br></div><div>... and what is your question here, if any? The cpuset cgroup is working as intended, since there's no 'cpu 4' on your system.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div></div><div><br>root@g-105:~# lxc-cgroup -n workerTest cpuset.cpus 0,1,2,3<br>root@g-105:~# lxc-cgroup -n workerTest cpuset.cpus 0,1,2 <br></div><div><br></div><div>Please, is there a command to display containers and list of cores used by each container ?</div></div></div></blockquote><div><br></div><div>Probably the combination of lxc-ls and lxc-cgroup.</div><div><br></div><div>'lxc-cgroup -n workerTest cpuset.cpus' will show you its current values. See </div><div>- <a href="http://man7.org/linux/man-pages/man1/lxc-cgroup.1.html" target="_blank">http://man7.org/linux/man-<wbr>pages/man1/lxc-cgroup.1.html</a><br></div><div>- <a href="https://linuxcontainers.org/lxc/manpages/man1/lxc-ls.1.html" target="_blank">https://linuxcontainers.org/<wbr>lxc/manpages/man1/lxc-ls.1.<wbr>html</a></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>A second question please,  can i fix that only container 1 uses  cpu 2,3 <b>(exclusive use)</b> or not ? i.e container 2 CANNOT use cpu 2,3<br></div><div><br></div></div></div></blockquote><div><br></div><div><br></div><div>Try <a href="https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html" target="_blank">https://linuxcontainers.org/<wbr>lxc/manpages/man5/lxc.<wbr>container.conf.5.html</a>, 'control group' section. And <a href="https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt" target="_blank">https://www.kernel.org/<wbr>doc/Documentation/cgroup-v1/<wbr>cpusets.txt</a>, search for '<span style="color:rgb(0,0,0);white-space:pre-wrap">cpuset.cpu_exclusive'. You could probably try (in container 1's config)</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">lxc.cgroup.cpuset.</span><span style="color:rgb(0,0,0);white-space:pre-wrap">cpu_<wbr>exclusive = 1</span></div></div><div><font color="#000000"><span style="white-space:pre-wrap">lxc.cgroup.cpuset.cpus = 2,3</span></font><br></div><div><br></div><div>It might work if no other cgroups currently explicitly use cpu 2-3.</div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>
<br><br>---------- Message transféré ----------<br>From: Thouraya TH <<a href="mailto:thouraya87@gmail.com">thouraya87@gmail.com</a>><br>To: LXC users mailing-list <<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>>, <a href="mailto:yonsy.s.p@gmail.com">yonsy.s.p@gmail.com</a><br>Cc: <br>Bcc: <br>Date: Fri, 10 Nov 2017 14:40:06 +0100<br>Subject: Re: [lxc-users] lxc-users Digest, Vol 204, Issue 3<br><div dir="ltr"><div><div><div><div><div><div>Hi, <br></div>Thanks.<br></div>shutdown -P 1<br></div>Please, is there a command that i can use from the outside of container ?<br></div>E.g: lxc-start -n c1 -shutdown 1 ?<br></div>Thanks a lot.<br></div>Kind regards. <br></div>
<br><br>---------- Message transféré ----------<br>From: Tony Poder <<a href="mailto:tpoder@novaquark.com">tpoder@novaquark.com</a>><br>To: LXC users mailing-list <<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>><br>Cc: <br>Bcc: <br>Date: Fri, 10 Nov 2017 15:39:10 +0100<br>Subject: Re: [lxc-users] lxc-users Digest, Vol 204, Issue 3<br><div dir="ltr">poweroff ?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 10, 2017 at 2:40 PM, Thouraya TH <span dir="ltr"><<a href="mailto:thouraya87@gmail.com" target="_blank">thouraya87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi, <br></div>Thanks.<br></div>shutdown -P 1<br></div>Please, is there a command that i can use from the outside of container ?<br></div>E.g: lxc-start -n c1 -shutdown 1 ?<br></div>Thanks a lot.<br></div>Kind regards. <br></div>
<br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainer<wbr>s.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.o<wbr>rg/listinfo/lxc-users</a><br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br></blockquote></div><br></div>