OpenVZ Forum


Home » Mailing lists » Users » Question About /proc file system in VMs.
Question About /proc file system in VMs. [message #43164] Tue, 02 August 2011 23:42 Go to next message
shule ney is currently offline  shule ney
Messages: 17
Registered: March 2011
Junior Member
*Hi, all:*
*I'm wondering if I can write and execute virtual file system like /proc in
OpenVz VMs. For example , write a module to check the incoming traffic rate
of this VM and show it in this VM's /proc as a file. I know different VMs
share one kernel, is it possible??? Thanks very much guys.*
Re: Question About /proc file system in VMs. [message #43166 is a reply to message #43164] Wed, 03 August 2011 06:45 Go to previous messageGo to next message
avagin is currently offline  avagin
Messages: 9
Registered: October 2010
Location: Moscow
Junior Member
On 08/03/2011 03:42 AM, shule ney wrote:
> *Hi, all:*
> *I'm wondering if I can write and execute virtual file system like
> /proc in OpenVz VMs. For example , write a module to check the
> incoming traffic rate of this VM and show it in this VM's /proc as a
> file. I know different VMs share one kernel, is it possible??? Thanks
> very much guys.*
>
>
Re: Question About /proc file system in VMs. [message #43167 is a reply to message #43164] Wed, 03 August 2011 06:51 Go to previous messageGo to next message
avagin is currently offline  avagin
Messages: 9
Registered: October 2010
Location: Moscow
Junior Member
On 08/03/2011 03:42 AM, shule ney wrote:
> *Hi, all:*
> *I'm wondering if I can write and execute virtual file system like
> /proc in OpenVz VMs. For example , write a module to check the
> incoming traffic rate of this VM and show it in this VM's /proc as a
> file. I know different VMs share one kernel, is it possible??? Thanks
> very much guys.*
Yes. It's possible. You can write file system as module, load it from
host (CT0) and mount your file system from CT.
And you can't do that, if you have access to CT only.
>
>
Re: Question About /proc file system in VMs. [message #43176 is a reply to message #43167] Wed, 03 August 2011 15:10 Go to previous messageGo to next message
shule ney is currently offline  shule ney
Messages: 17
Registered: March 2011
Junior Member
Thanks very much vagin,I have access to CT0, I want to have a module to
monitor different VM's traffic, and each VM can see its own traffic insdie,
is it possible?



2011/8/3 Andrew Vagin <avagin@gmail.com>

> On 08/03/2011 03:42 AM, shule ney wrote:
>
>> *Hi, all:*
>> *I'm wondering if I can write and execute virtual file system like /proc
>> in OpenVz VMs. For example , write a module to check the incoming traffic
>> rate of this VM and show it in this VM's /proc as a file. I know different
>> VMs share one kernel, is it possible??? Thanks very much guys.*
>>
> Yes. It's possible. You can write file system as module, load it from host
> (CT0) and mount your file system from CT.
> And you can't do that, if you have access to CT only.
>
>
>>
>> ______________________________**_________________
>> Users mailing list
>> Users@openvz.org
>> https://openvz.org/mailman/**listinfo/users<https://openvz.org/mailman/listinfo/users>
>>
>
> ______________________________**_________________
> Users mailing list
> Users@openvz.org
> https://openvz.org/mailman/**listinfo/users<https://openvz.org/mailman/listinfo/users>
>
Re: Question About /proc file system in VMs. [message #43178 is a reply to message #43176] Wed, 03 August 2011 16:37 Go to previous messageGo to next message
Martin Dobrev is currently offline  Martin Dobrev
Messages: 14
Registered: November 2006
Junior Member
I'm not quite sure what you want to do, but each CT has it's own virtual
/proc. If you check for example the traffic of the veth/venet interface
inside a CT you'll see only the information for the particular CT. Or
you want to have a module showing information for all CTs?

?? 3.8.2011 ?. 18:10 ?., shule ney ??????:
>
> Thanks very much vagin,I have access to CT0, I want to have a module
> to monitor different VM's traffic, and each VM can see its own traffic
> insdie, is it possible?
>
>
>
> 2011/8/3 Andrew Vagin <avagin@gmail.com <mailto:avagin@gmail.com>>
>
> On 08/03/2011 03:42 AM, shule ney wrote:
>
> *Hi, all:*
> *I'm wondering if I can write and execute virtual file system
> like /proc in OpenVz VMs. For example , write a module to
> check the incoming traffic rate of this VM and show it in this
> VM's /proc as a file. I know different VMs share one kernel,
> is it possible??? Thanks very much guys.*
>
> Yes. It's possible. You can write file system as module, load it
> from host (CT0) and mount your file system from CT.
> And you can't do that, if you have access to CT only.
>
>
>
> _______________________________________________
> Users mailing list
> Users@openvz.org <mailto:Users@openvz.org>
> https://openvz.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users@openvz.org <mailto:Users@openvz.org>
> https://openvz.org/mailman/listinfo/users
>
>
>
>
Re: Question About /proc file system in VMs. [message #43179 is a reply to message #43178] Wed, 03 August 2011 17:42 Go to previous message
shule ney is currently offline  shule ney
Messages: 17
Registered: March 2011
Junior Member
*Thanks for your reply Dobrev. my bad, I think I made it a little
confusing. *
*For example: I have a chunk of memory in kernel for every VMs by MMAP
(every VM has a corresponding area of memory in kernel using MMAP), and
kernel may copy some data to this area of memory for each VM.*
*The question is: how can I check the speed of this copy??Can I write a
/proc like virtual file system???
*
2011/8/3 Martin Dobrev <martin@dobrev.eu>

> I'm not quite sure what you want to do, but each CT has it's own virtual
> /proc. If you check for example the traffic of the veth/venet interface
> inside a CT you'll see only the information for the particular CT. Or you
> want to have a module showing information for all CTs?
>
> На 3.8.2011 г. 18:10 ч., shule ney написа:
>
>
> Thanks very much vagin,I have access to CT0, I want to have a module to
> monitor different VM's traffic, and each VM can see its own traffic insdie,
> is it possible?
>
>
>
> 2011/8/3 Andrew Vagin <avagin@gmail.com>
>
>> On 08/03/2011 03:42 AM, shule ney wrote:
>>
>>> *Hi, all:*
>>> *I'm wondering if I can write and execute virtual file system like /proc
>>> in OpenVz VMs. For example , write a module to check the incoming traffic
>>> rate of this VM and show it in this VM's /proc as a file. I know different
>>> VMs share one kernel, is it possible??? Thanks very much guys.*
>>>
>> Yes. It's possible. You can write file system as module, load it from host
>> (CT0) and mount your file system from CT.
>> And you can't do that, if you have access to CT only.
>>
>>
>>>
> _______________________________________________
> Users mailing listUsers@openvz.orghttps://openvz.org/mailman/listinfo/user s
>
>
>
Previous Topic: Reduce Load in VZs
Next Topic: Help Please - Kernel Keeps Crashing
Goto Forum:
  


Current Time: Fri Oct 18 13:31:41 GMT 2024

Total time taken to generate the page: 0.05072 seconds