From: Jonathan Sambrook (jonathan.sambrook_at_dsvr.co.uk)
Date: Tue 01 Apr 2003 - 13:22:51 BST
At 21:14 on Mon 31/03/03, dr_at_port29.net masquerading as 'Dimitri Roschkowski' wrote:
> I want to ask if there is a possibility to find out the name of the
> vserver. I talk about the name, you have to use for the vserver commands
> vserver server1 start
Caveat: we don't use most of the userspace tools
We wanted to have a kernelspace context name <-> context number, so I've
produced the attached patches.
The upshot is that you can:
chcontext --ctxname <the_name> <cmd>
where you would've:
chcontext --ctx <the_number> <cmd>
Now, to get to your point Dimitri: I've added the context's name to
/proc/<pid>/status, which would give you what you want.
You would need further userspace mods too, notably to the 'vserver'
utility so that kernelspace is informed of the name at context creation.
If you want to try them you'll need to rebuild the kernel with the
regular context patch and my attached dsvr-ctx patches and rebuild the
vserver userspace utilities with my attached vserver-0.22-dsvr-name.patch:
$ cd linux-2.4.20
$ patch -p1 < ../dsvr-ctx-sysctrl.patch
$ patch -p1 < ../dsvr-ctx-name.patch
$ make menuconfig dep bzImage
$ cd ../vserver-0.22
$ patch -p1 < ../vserver-0.22-dsvr-name.patch
-- Jonathan Sambrook Software Developer Designer Servers