You may talk to the socket directly over DBus using any of the existing DBus libraries in your favorite language.
You may look at what cgm is doing (it just calls dbus-send) and then do the equivalent in whatever language you want directly using DBus. On Wed, Apr 23, 2014 at 05:50:57PM +0200, Flo wrote: > Hi Stéphane, > > thank you for your help. I didn't know about cgmanager. We implemented a > perl tool to get LXC metrics. Is there an easy way to get those metrics > from the cgmanager socket? > At the cmdl I tried to talk to the socket via "socat": > > echo "getvalue memory '/lxc/galera01-jobs-prodm' memory.limit_in_bytes" | > socat unix-connect:/sys/fs/cgroup/cgmanager/sock stdio > > But this did not work. After reading "https://cgmanager.linuxcontainers.org/" > I am still not sure how to to talk to the socket. "cgm" works fine > > cgm getvalue memory '/lxc/containername' memory.limit_in_bytes > > but I would like to "talk" directly to the socket. > > Regards, > Flo > > PS: Thank you for your GREAT work!!! > > > On Tue, Apr 22, 2014 at 3:15 PM, Stéphane Graber <[email protected]>wrote: > > > On Tue, Apr 22, 2014 at 10:08:29AM +0200, Flo wrote: > > > Hi, > > > > > > since we upgraded to the latest ubuntu release (14.04 developement -> > > > 14.04. 22. Apr 2014) those cgroups mounted inside the container via > > > "lxc.mount.auto = cgroup:mixed" do not exist anmyore? > > > > > > > > > root@app01-xxxxxx:~# ls -la /sys/fs/cgroup/ > > > total 0 > > > drwxr-xr-x 3 root root 60 Apr 22 09:58 . > > > drwxr-xr-x 7 root root 0 Apr 22 09:58 .. > > > drwxr-xr-x 2 root root 60 Apr 22 09:56 cgmanager > > > > > > > > > Any idea what changed? > > > > > > Regards, > > > Flo > > > > It's actually working as expected in that cgroup:mixed will either > > bind-mount all independent cgroups when LXC uses cgroupfs or the > > cgmanager socket when using cgmanager. Ubuntu 14.04 uses cgmanager so > > the latter case was used and only the cgmanager socket was bind-mounted. > > > > > > -- > > Stéphane Graber > > Ubuntu developer > > http://www.ubuntu.com > > > > _______________________________________________ > > lxc-users mailing list > > [email protected] > > http://lists.linuxcontainers.org/listinfo/lxc-users > > > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: Digital signature
_______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
