OpenVZ Forum


Home » General » Support » Abilty to read VE /proc without being constrained by UBC
Abilty to read VE /proc without being constrained by UBC [message #8650] Thu, 30 November 2006 09:53 Go to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
I know this is a contradiction in some ways, but is it possible to read the /proc filesystem of a VE without invoking "vzctl enter VEID" or is there some way for the UBC not to be applied to the execution?

The reason this would be useful to me, is that I am developing an openvz VE resource reporting tool as posted in the discussions forum. One thing that the application needs to do is read /proc files from each VE such as /proc/net/dev, /proc/stat to read some VE specific statistics. Right now I am running "vzctl exec VEID cat FILE" from on the HN and it works fine most of the time. However if the VE has a resource exhausted such as numfile, privvmpages, kmemsize, the "cat" cannot execute and the stats collection fails.

Ideally we would be able to read each VEs proc directory from something like /proc/VE_PROC/VEID/ from the HN. VE_PROC is just a name I made up for this example. ie, inside VE 50, /proc/stat would be /proc/VE_PROC/50/stat on the HN.

Thanks!
Rick Blundell


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Abilty to read VE /proc without being constrained by UBC [message #8651 is a reply to message #8650] Thu, 30 November 2006 10:42 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
I think your soft should try to get statistics, and if it fails, display that getting statistics is failed and display also information from /proc/user_bancounters (from HN) related to VE in question.

HTH,
Vasily.
Re: Abilty to read VE /proc without being constrained by UBC [message #8663 is a reply to message #8651] Thu, 30 November 2006 16:32 Go to previous message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Yea, it seems that resource information gathering should be separate from from UBC failcount reporting. Checking the resource statistics of a VE ideally wouldn't use the VEs resources. Whats funny is when I check /proc/stat in the VE, I have to decrement running procs by one because my cat process is counted in there, thanks Heisenberg.

Anyway thanks for the advice.

Rick


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Previous Topic: memory consumed suddenly increases inspite of no activity taking place..
Next Topic: Negative vm_rss
Goto Forum:
  


Current Time: Sun Jun 01 13:21:56 GMT 2025

Total time taken to generate the page: 0.02699 seconds