[Lxc-users] lxc-ls and lxc-execute
Hello, Should lxc-ls list containers created with lxc-execute as well? E.g. when running lxc-execute -n ctx1 /bin/bash, you may run lxc-info -n ctx1 and it will output state: RUNNING pid: 4063 but when issuing lxc-ls, nothing will be printed. Is this normal? I noticed that the container is present when issuing lxc-ls --active. So lxc-ls (with no params) lists only the containers created with lxc-create, while lxc-ls --active lists both containers created with lxc-create (that are running) and those created with lxc-execute? Thank you very much, Bogdan P. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
[Lxc-users] lxc-ls and lxc-execute
Hello, Should lxc-ls list containers created with lxc-execute as well? E.g. when running lxc-execute -n ctx1 /bin/bash, you may run lxc-info -n ctx1 and it will output state:RUNNING pid:4063 but when issuing lxc-ls, nothing will be printed. Is this normal? I noticed that the container is present when issuing lxc-ls --active. So lxc-ls (with no params) lists only the containers created with lxc-create, while lxc-ls --active lists both containers created with lxc-create (that are running) and those created with lxc-execute? Thank you very much, Bogdan P. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Monitoring per container
On Sat, 11 May 2013 13:43:56 +0700 David Parks davidpark...@yahoo.com wrote: Does anyone have any pointers on how I might monitor things like CPU and DISK activity PER CONTAINER? (Ubuntu 12.10 server here) I saw something on You Tube using RHL that demoed it beautifully, but I'm looking for something a bit more rudimentary, maybe that I could plug into Nagios or use to just see how things look under load. Running top-like utilities on the host doesn't really split it up well enough by container, even htop with cgroups is difficult at best. Hi David, not sure it will have the exact information you're looking for, but you can check out lxc-top (part of the lua binding). It just uses info from cgroup though, so that may not be enough for you. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] regarding lxc states available to lxc-monitor or lxc-wait usage
I'm not doing anything special with the container or the socket file. The container is based on the Ubuntu template and I'm running a single program in the container. The program will create its socket file according to its command line. A program in the host looks for the socket file in the /var/lib/lxc/container/rootfs and uses it. It works. I'm using Ubuntu 12.04 LTS. Regards. Mark K Vallevand mark.vallev...@unisys.com May you live in interesting times, may you come to the attention of important people and may all your wishes come true. THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. -Original Message- From: Serge Hallyn [mailto:serge.hal...@ubuntu.com] Sent: Sunday, May 12, 2013 11:33 PM To: brian mullan Cc: Vallevand, Mark K; LXC Users Subject: Re: [Lxc-users] regarding lxc states available to lxc-monitor or lxc-wait usage Quoting brian mullan (bmullan.m...@gmail.com): So given that a socket approach could work... would it make sense if there was some sort of standardized method employed for reading/writing etc. Could work, but it's not pretty. I'd suggest if you want to do this, you bind mount the unix sock file using lxc.mount.entry into the container. Mark, where do you keep them? It would be beneficial if there was some sort of documented standard that people could use so everyone that develops an app for a container could report via lxc-monitor or lxc-wait a private-state that is understood or could be used by anyone? On Fri, May 10, 2013 at 12:36 PM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting Vallevand, Mark K (mark.vallev...@unisys.com): Actually, I've had good success using Unix domain named sockets for communications between programs in containers and host. Perhaps they are in a shared name space. But, don't change it. :-) It works. Right. Abstract unix domain sockets shouldn't work across network namespaces, but regular ones do as they're controlled by the file space. Agreed, don't want those changed :) -serge -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] regarding lxc states available to lxc-monitor or lxc-wait usage
Quoting Vallevand, Mark K (mark.vallev...@unisys.com): I'm not doing anything special with the container or the socket file. The container is based on the Ubuntu template and I'm running a single program in the container. The program will create its socket file according to its command line. A program in the host looks for the socket file in the /var/lib/lxc/container/rootfs and uses it. It works. Right, the question is only which paths we can most reliably count on to not be overmounted by the guest. I suppose we could say /lxc-monitor is a directory for such sockets, or just suggest using '/lxc-*' as the socket names -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Monitoring per container
Not sure if this works for you (12.10) but I've wrote a simple hacky script last day (another way of saying i'm not proud of it), using Stéphane's python3 lxc bindings to see total resource usage of some new test containers running on Ubuntu 13.04. Only thing this does is showing some values from cgroup file system, does not do calculations like cpu percent. I've just put the script into github: https://github.com/bergerx/lxc-status I've looked for same thing as you but couldn't filnd aomething like it. The closest tool i found was a ruby script from https://github.com/astro/lxc-top, but it doesn't seem like suitable with ubuntu 13.04 because it expects a single cgroup mount in /cgroup. I don't have any idea about 12.10, maybe you should try. After Dwigth's answer, I've seen https://github.com/lxc/lxc/blob/staging/src/lxc/lxc-top, this one seems like what we need, but we need to wait for new release to use this. bekir On Mon, May 13, 2013 at 4:02 PM, Dwight Engen dwight.en...@oracle.comwrote: On Sat, 11 May 2013 13:43:56 +0700 David Parks davidpark...@yahoo.com wrote: Does anyone have any pointers on how I might monitor things like CPU and DISK activity PER CONTAINER? (Ubuntu 12.10 server here) I saw something on You Tube using RHL that demoed it beautifully, but I'm looking for something a bit more rudimentary, maybe that I could plug into Nagios or use to just see how things look under load. Running top-like utilities on the host doesn't really split it up well enough by container, even htop with cgroups is difficult at best. Hi David, not sure it will have the exact information you're looking for, but you can check out lxc-top (part of the lua binding). It just uses info from cgroup though, so that may not be enough for you. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users