On 07/24/2013 10:28 AM, hzguanqiang wrote:
> On 2013-07-23 18:14, "Daniel P. Berrange" <berra...@redhat.com> wrote:
> 
>>> On Tue, Jul 23, 2013 at 04:56:30PM +0800, hzguanqiang wrote:
>>> Hi Guys,
>>> When I created a lxc container by libvirt, I logged into the lxc
>>> container and noticed that info under /proc/ dir did not match the
>>> lxc container resource.  Is the /proc dir in lxc container just
>>> showing the same thing as the lxc host? If I want to monitor the
>>> realtime resource usage inside the lxc container, What should I do?
> 
>> At this time, the only files in /proc that are virtualized are
>> the /proc/$PID/* files for each process, and the /proc/meminfo
>> global file. All the other files reflect global host state.
> 
>> Are there particular files in /proc/NNNN that you want to see
>> virtualized in the future ?
> 
> Well, I used to monitor a kvm vm by a script reading info from files such as 
> /proc/stat, /proc/loadavg, /proc/meminfo, /proc/diskstats, /proc/net/dev. 
> Through those files under /proc, I can get the whole statistic info of the vm 
> including cpu/memory/disk/net. 
> 
> If I want to do the same work in lxc supported by libvirt, How can I make it? 
> BTW, I know virt-top can do such things.  But what I want is a programming 
> way such as libvirt interface.
> 

virt-top is the tool running on host, it's more like a manager tool.
I believe these /proc/ files haven't been virtualized by lxc-tools too.

_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Reply via email to