How to Kill Nutanix Stuck, Hung Task via Command

How to Kill Stuck, Hung Task in Nutanix Prism and CVM

Now a days i am getting very common question from my Blog readers How to kill running / stuck / hung / task in Nutanix Prism via command line interface CLI. And which command is more useful among Nutanix commands: ecli task.list command, acli task.list command or progress_monitor_cli command , which is the best command to kill the running / stuck / hung / clear the task(s) in Nutanix Prism console.

Actually each command ( Nutanix acli, ecli and progress_monitor_cli ) having specific purpose and density to kill the stuck / hung / running task(s) in Nutanix Prism , Nutanix CVM. Nutanix usually built the task management commands in major Nutanix AOS release version.

Read also: Top 10 Nutanix Useful Commands

Nutanix Task Manager List

Nutanix AOS / CVM offer three types of task mangers to manage, run and kill the task(s). We can use any task manger command tool as per the task type and process structure to start and kill the task(s) on Nutanix acropolis cluster.

Nutanix Top 3 task manager Command Tools are:

  1. acli task.list
  2. ecli task.list
  3. progress_monitor_cli

Now you will ask what is difference between Nutanix acli task.list, ecli task.list or progress_monitor_cli. Lets explore the Nutanix task management commands one by one.

Read also: Nutanix Acropolis acli vs ncli Command Explained

Nutanix Progress_montor_cli Command

Nutanix progress_monitor_cli is most powerful task management command line tool is the number #1 useful and my favorite command to kill the running, stuck, hung task(s) in Nutanix Prism and/or Nutanix CVM.

How to use the Nutanix progress_monitor_cli command to kill stuck / hung task in Nutanix Prism / Nutanix CVM.

Lets explore the Nutanix Progess_monitor_cli commands to kill the task.

Follow the given Steps to kill the running, hung, stuck task(s)

Step 1: SSH to any Nutanix CVM of the Nutanix cluster ( Nutanix CVM default credentials )

Step 2: Get the running / stuck / hung task(s) list

cvm$ progress_monitor_cli --fetchall

Output would be like this:

    ================== Proto Start =========================
    logical_timestamp: 10
    progress_info_id {
      operation: kDownload
      entity_type: kPackage
      entity_id: "xx.xx.tar.gz"
    }
    title_message: "Software Upload" ----> This is My Stuck / Hung task
    start_time_secs: 1087597349
    progress_task_list {
      component: kPrism
      task_tag: "xx.xx.tar.gz"
      start_time_secs: 1087597349
      percentage_complete: 10
      progress_status: kRunning
    }
    =================== Proto End ==========================

now you have to collect following info from above command output.

  1. operation
  2. entity_type
  3. entity_id

Step 3: Now kill the stuck / hung task using following command

cvm$ progress_monitor_cli --entity_id="<Entity_ID>" --entity_type=<Package_Name> --operation=<Operation> -delete

Example:

cvm$ progress_monitor_cli --entity_id="xx.xx.tar.gz" --entity_type=package --operation=download -delete

Wow, progess_monitor_cli command successfully killed the stuck / hung task from Nutanix prism web console.

Read also: Top 10 Nutanix System Administrator Commands

Nutanix ecli task.list Command

If Nutanix progress_monitor_cli –fetchall command does not show any running / stuck / hung task list or does not kill the task. You do not worry Nutanix has another task management service known as Ergon task manager service.

Nutanix Ergon is the task manager that is responsible to start and kill the running , stuck tasks automatically and/or manually if needed. /
Ergon task manager has two versions of command first is ergon_update_task that is available to kill the task.

But Nutanix has evolved the second verson of ergon task manger with advance commands launched with AOS version 5.5 or later ecli ( Ergon Command Line Interface ) to manually show the running, stuck , hung task(s) list.
More info refer Nutanix Cluster Most Critical Services

Follow the steps to kill the running / stuck / hung task(s) via Nutanix ecli task.list command

Step 1: SSH to any Nutanix CVM of the Nutanix cluster ( Nutanix CVM default credentials )

Step 2: Get the running stuck / hung task need to be killed to run following command

nutanix@NTNX-A-CVM::~$ ecli task.list include_completed=false
Output :
Task UUID = 3f814122-0bd8-4cc4-af3d-f17763c2e7f0
Component = lcm
Sequence-id = 1
Type = kLcmInventoryOperation
Status = kRunning

Note : Copy Task UUID before executing another command.

Step 3: Now kill the stuck / hung task(s) to execute following command

NTNX-A-CVM::~$ ergon_update_task --task_uuid='<Task UUID>' --task_status=aborted 
OR
NTNX-A-CVM::~$ ergon_update_task --task_uuid='<Task UUID>' --task_status=succeeded

Example

NTNX-A-CVM::~$ ergon_update_task --task_uuid='3f814122-0bd8-4cc4-af3d-f17763c2e7f0' --task_status=aborted
Task aborted successfully.

Wow, stuck / hung task has killed successfully.

Read also: Reset Prism Central Password From Command Line

Nutanix acli task.list Command

Nutanix acli task.list command is obsoleted and no longer available in latest AOS 5.10 or later version.

Note: acli command is available but task.list command is removed in latest AOS versions.

In my personal opinion – acli task.list was not powerful as super expected, that might be the reason Nutanix removed this command from acli command interface.

Hopefully, you got the more clarity and detailed information how to kill the running , hung, stuck task(s) in Nutanix via progress_monitor_cli and ecli task.list command.

Read also: Nutanix Move Tool Issues / Errors – Troubleshooting

Thanks to being with HyperHCI Tech Blog with stay tuned with latest and trending technology updates.

If you have any query / doubt, write in comment section and/or sent your query / question through link: https://hyperhci.com/ask-question/