4.3.3. Determining Container UUIDs by Process IDs

Each process is identified by a unique PID (process identifier), which is the entry of that process in the kernel’s process table. For example, when you start Apache, it is assigned a process ID. This PID is then used to monitor and control this program. The PID is always a positive integer. In OpenVZ, you can use the vzpid (retrieve process ID) utility to print the container UUID the process with the given id belongs to. Multiple process IDs can be specified as arguments. In this case the utility will print the container number for each of the processes.

The typical output of the vzpid utility is shown below:

# vzpid 12
Pid               VEID    Name
14663     26bc47f6-...    init

Note

Note: You can also display the container UUID where the corresponding process is running by using the vzps utility.