Juniper: How to kill a process stuck on high CPU usage, including zombie processes

Here is the procedure to identify and kill a process whenever a high CPU usage condition is experienced and the user is not able to lower the utilization of a given process. This article will also cover including zombie processes.

The goal of this article is to identify stuck processes from root, and kill them in order to free up memory and CPU resources. A zombie process is a process running in the background, but having no real function in CLI/operations.

Zombie processes are processes which get stuck while performing a task; they do not release the CPU or memory used. They do not show up as a top process because they are performed at the root level.

1.We need to check the switch’s CPU in order to check the utilization on the different process; however, in this case, we are not going to see any offender process since the offender is a zombie, we identify the Zombie process if the zombie counter shows results other than 0 (the number of stuck processes will be shown on the zombie quantity displayed: (This sentence is very confusing. Please rewrite it to make it clearer; perhaps break it into shorter sentences.)


2.Go to shell in order to identify the process and kill it from there. Run a top command in order to confirm the real time processes utilization seen on the CLI, specifically checking for the zombie counter if any, or any top offender process that is allocating more resources than the average baseline:


3.If the PID is identified from CLI, or the top command, go to step 5.

4.If the process is a zombie, run a “ps aux | grep -w Z ” from shell in order to list the zombie processes.

5.Once the PID of the offender process is found, kill it from the shell with the command kill -9 PID.

6.To view the processes re-initiating, open a parallel session to the switch and run a top command.

7.Once this is done, check CPU utilization and confirm if the offender process/zombie is gone and that utilization is back to normal.


About the author

James Palmer

Leave a Comment