OpenVZ Forum


Home » General » Support » Content of /proc/self/status
icon5.gif  Content of /proc/self/status [message #31967] Wed, 16 July 2008 10:33 Go to next message
neerd is currently offline  neerd
Messages: 3
Registered: July 2008
Junior Member
I encounter a small (which may not be one ...), I'm using OpenVZ on a gentoo.

On my Hardware Node /proc/self/status contains:

envID:  0

which is fine, but in my Virtual Environments I found no trace of envID in /proc/self/status. Is it an normal behavior ?

This may be a problem as one of my init script rely on this value to detect if it is inside a VE.

My kernel (compiled by myself based on the gentoo openvz kernel)
GoBox ji # uname -a
Linux GoBox 2.6.24-ovz005 #5 SMP Wed Jul 2 15:24:03 CEST 2008 i686 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz GenuineIntel GNU/Linux
Re: Content of /proc/self/status [message #32003 is a reply to message #31967] Thu, 17 July 2008 08:20 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

Quote:


I found no trace of envID



Please show the output of the following commands (just to clarify the situation)
from HN:
cat /proc/self/status  | grep -i env

vzctl exec VE_ID cat /proc/self/status  | grep -i env



Quote:


My kernel (compiled by myself based on the gentoo openvz kernel)



- what does it mean "gentoo openvz kernel"?
- could you possibly describe in more detail where have you got your kernel and if it is possible attach here .config file from your kernel.
- have patched your kernel or made any sort of corrections?

Thank You!
Re: Content of /proc/self/status [message #32006 is a reply to message #32003] Thu, 17 July 2008 08:40 Go to previous messageGo to next message
neerd is currently offline  neerd
Messages: 3
Registered: July 2008
Junior Member
On the HN: cat /proc/self/status | grep -i env

GoBox ~ # cat /proc/self/status  | grep -i env
envID:  0
GoBox ~ # 



GoBox ~ # vzctl exec 111 cat /proc/self/status | grep -i env
GoBox ~ # 
(nothing returned)

What I call a gentoo openvz kernel is the openvz kernel found in the gentoo tree (I do not know if your are familiar with gentoo, I just typed 'emerge openvz-sources' to get this kernel).

I did not make any modification to the kernel I got from the gentoo repository but I think the gentoo maintainer did (but I do not know what he did) Smile

Please find attached my .config.

As the VZ things are modules this is my lsmod output:
GoBox ~ # lsmod
Module                  Size  Used by
simfs                   5060  2
vznetdev               16004  4
vzrst                 131220  0
vzcpt                 107812  0
tun                    10240  2 vzrst,vzcpt
vzdquota               41368  2 [permanent]
vzmon                  28040  5 vznetdev,vzrst,vzcpt
vzdev                   3716  5 vznetdev,vzdquota,vzmon
GoBox ~ #
  • Attachment: .config
    (Size: 36.90KB, Downloaded 222 times)
Re: Content of /proc/self/status [message #32015 is a reply to message #32006] Thu, 17 July 2008 11:02 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

OK, I understand the problem.
You can fix it by recompiling your kernel.

Please, find in linux/fs/proc/array.c file following strings:
#ifdef CONFIG_VE
        if (ve_is_super(get_exec_env()))
                buffer += sprintf(buffer,
                                "envID:\t%d\n"
                                "VPid:\t%d\n"
                                "PNState:\t%u\n"
                                "StopState:\t%u\n",
                                p->ve_task_info.owner_env->veid,
                                task_pid_vnr(p),
                                p->pn_state,
                                p->stopped_state);
#endif


And just remove "if (ve_is_super(get_exec_env()))" string.

I don't know why this was done in 2.6.24 kernel. Could you possibly fill the bug here http://bugzilla.openvz.org/.

P.S. you can obtain envID number for example via /proc/user_beancounters
Re: Content of /proc/self/status [message #32023 is a reply to message #32015] Thu, 17 July 2008 13:17 Go to previous message
neerd is currently offline  neerd
Messages: 3
Registered: July 2008
Junior Member
First of all many thanks for you help, I submitted a bug: http://bugzilla.openvz.org/show_bug.cgi?id=936

If this change is reverted I will patch my kernel if not I will submit a patch to the gentoo init script functions Smile
Previous Topic: MZ mismatch on migration with Stock Kernels
Next Topic: Network Suggestion Please
Goto Forum:
  


Current Time: Sat Oct 19 22:25:20 GMT 2024

Total time taken to generate the page: 0.05526 seconds