[Users] Re: Capturing the PID of every VE during startup / shutdown.

Aleksandar Ivanisevic aleksandar at ivanisevic.de
Mon May 17 02:52:14 EDT 2010


Daniel Pittman <daniel at rimspace.net>
writes:

> So ... is there any sensibly way I could implement this without needing a
> private patch, other than to scan the process table after starting the
> container and rebuilding that mapping?

What is so wrong with that approach, especially since ovz itself uses that
same technique, see i.e. /etc/cron.d/vz (or /etc/vz/cron/vz)?

you can get the mappings easily using vzpid:

# pgrep init | xargs vzpid
Pid	VEID	Name
1	0	init
4791	1043	init
6502	1045	init
7043	1047	init
8919	1049	init
10689	1050	init
12699	1067	init
14518	1068	init
16518	1070	init
17116	1072	init
19051	1077	init
20606	1078	init
21339	1079	init
22894	1080	init
23407	1081	init
24963	1181	init



More information about the Users mailing list