Difference between revisions of "Finding init process ID or killing container"
From Notes_Wiki
(Created page with "<yambe:breadcrumb>Troubleshooting_openVZ_issues|Troubleshooting openVZ issues</yambe:breadcrumb> =Finding init process ID or killing container= If "vzctl stop <CTID>" o...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Virtualization tools]] > [[OpenvZ]] > [[Troubleshooting openVZ issues]] > [[Finding init process ID or killing container]] | |||
If "vzctl stop <CTID>" or "vzctl restart <CTID>" hangs then we can kill the container using following steps: | If "vzctl stop <CTID>" or "vzctl restart <CTID>" hangs then we can kill the container using following steps: | ||
Line 9: | Line 8: | ||
#::The process which has /dev/null open inside the container is init. Typically first lowest (PID) should also be of init | #::The process which has /dev/null open inside the container is init. Typically first lowest (PID) should also be of init | ||
#Use '<tt> kill -9 <init-pid></tt>' to kill the container. | #Use '<tt> kill -9 <init-pid></tt>' to kill the container. | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Virtualization tools]] > [[OpenvZ]] > [[Troubleshooting openVZ issues]] > [[Finding init process ID or killing container]] |
Latest revision as of 13:09, 24 August 2022
Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Troubleshooting openVZ issues > Finding init process ID or killing container
If "vzctl stop <CTID>" or "vzctl restart <CTID>" hangs then we can kill the container using following steps:
- Find container init process ID using:
- lsof 2>&1 | grep /vz/root/<CTID>/ | grep -v UID | less
-
- The process which has /dev/null open inside the container is init. Typically first lowest (PID) should also be of init
- Use ' kill -9 <init-pid>' to kill the container.
Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Troubleshooting openVZ issues > Finding init process ID or killing container