|
To enable new system calls, it is required to install the new patched kernel on your Linux box.
We currently support only Linux RedHat 7.3; other UNIX clones are not supported.
FreeVPS kernel is the base linux kernel release 2.4.18 build 27, patched with FreeVPS patch:
Patch10050: freevps-1.1.gz
We provide RPM packages of the patched kernel for most CPUs, such as:
athlon (supports SMP)
i386
i586 (supports SMP)
i686 (supports SMP)
Kernels could be downloaded from the
FreeVPS download area.
For the most part, they are stable and tested,
except for SMP kernels that are not yet thoroughly tested:
kernel-2.4.18-athlon-smp.config
kernel-2.4.18-athlon.config
kernel-2.4.18-i386.config
kernel-2.4.18-i586.config
kernel-2.4.18-i586-smp.config
kernel-2.4.18-i686.config
kernel-2.4.18-i686-smp.config
Kernels are compiled using basic configuration, that's why they support only standard hardware.
Thus, if you want to use some special devices, you need to recompile kernel using kernel sources.
The following kernel sources for development purposes are available for download:
# wget http://www.freevps.com/download/rpms/i386/kernel-freevps-source-1.1-0.i386.rpm
# wget http://www.freevps.com/download/rpms/SRPMS/kernel-freevps-1.1-0.src.rpm
Before installing FreeVPS kernel, you must update modutils to 2.4.18-3.7x version.
Download the new modutils and modutils-devel packages:
# wget http://www.psoft.net/shiv/HS/VPS/modutils-2.4.18-3.7x.i386.rpm
# wget http://www.psoft.net/shiv/HS/VPS/modutils-devel-2.4.18-3.7x.i386.rpm
Updating modutils is described in steps 3.1-3.2 of the kernel installation procedure in the
VPS Installation guide.
FreeVPS Kernel Configuration
After kernel is successfully installed, in the /proc/vservers/ directory
you may find useful and detailed information on VPS system calls and configuration.
/proc/vservers/setup - VPS processes setup file; if it doesn't exist here, VPS is not
implemented.
Parameters:
freevps patch version x.xx-n
- FreeVPS kernel version; x.xx is a kernel release, n is a release build;
freevps build xxxxxxxxxx
- FreeVPS kernel build;
syscall new_context 243
- syscall number to access the new_context kernel function
syscall context_network 244
- syscall number to access the context_network kernel function
syscall limits 245
- syscall number to access the limits kernel function
contexts count 12
- the highest context's id starting from zero.
0 is the host context id, 1 is the entire system context id (host + all VPS),
contexts ids starting from 3 are virtual server context ids. Thus, to know the number of
VPSs on the box, subsctract 4 from the number specified in contexts count (8 in this
example).
Here, the most important parameter is freevps build. It identifies the version of the kernel
installed in your system. The latest stable release is 1056256121 build,
all newer releases are betas.
/proc/vservers/self - information about a particular VPS, not about the host machine.
Parameters:
vserver id - context id number of a virtual server
nodename - host name assigned to a virtual server
domainname - VPS domain name
flags - context flags:
LOCK - enable/disable requests to a new context
SCHED - enable/disable a mode where processes of a context that remains idle for a long time
take higher priority in the scheduler
NPROC - allow/refuse to set limit on the number of processes in a context
PRIVATE - allow/refuse a process join this context
init pid - pid of a parent process that created context.
CapBset - capability allowed in VPS (represented in a standard linux capability format).
Process Limit - maximum number of processes allowed to run by a VPS/context;
Process Count - number of processes running by a VPS/context.
When Process Count becomes equal to Process Limit,
no new processes will start on a VPS/context;
tasks - list of process IDs running on a VPS/context;
Memory Limit - maximum virtual memory size a VPS/context can allocate;
Used memory - virtual memory size used by a running VPS/context;
Context RSS limit - maximum resident memory size a VPS/context can allocate.
If limit is exceeded, VPS starts to use the host's SWAP;
Context RSS - resident memory size used by a running VPS/context;
Disk Limit - maximum disk space that can be used by VPS
(calculated for the entire VPS file tree);
Used disk memory - disk space used by a VPS file tree;
Files limit - maximum number of files that can be switched to a VPS/context;
Used files - number of files used in a VPS/context;
TCP sockets limit - limit on the number of established connections in a virtual server
Established sockets - number of established connections in a virtual server
Addresses assigned - IP addresses and virtual ethernet devices assigned to a VPS/context;
Incoming traffic - summary incoming traffic for a VPS/context;
Outgoing traffic - summary outgoing traffic for a VPS/context.
Read hints on operating with memory, context RSS and disk limits.
3) /proc/vservers/trafstat - network traffic statistics.
Format:
CONTXT_NUMBER INCOMING OUTGOING
CONTXT_NUMBER INCOMING OUTGOING
...
Here, CONTXT_NUMBER is a context number, INCOMING is incoming traffic in bytes
for this context, OUTGOING is the context's outgoing traffic in bytes.
Network traffic per VPS/context is calculated by the system kernel and temporarily stored in
/proc/vservers/trafstat file.
After reading information from /proc/vservers/trafstat file,
network traffic statistics is being reset and restarted.
It is also recommended to load (reset) statistics every hour to avoid incoming/outcoming values
overflow.
|