Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
lguevara
Partner - Creator II
Partner - Creator II

How Kill process task when Console in Windows and Server in Linux

Hi,

I want to stop a task, but using process elimination, the server replicate are in linux and the server ui console are in windows.

When try to kill first i execute in linux replicate server: ps -ef | grep repctl

and indetify the task and number process, then  kill this:  kill -9 process

But after appear a new process with the same task.

What is the method to do it to kill task in this scenery?

 

thanks.

 

Labels (2)
2 Replies
Greg_Taffer
Support
Support

To force-kill a process in Linux, you typically send the SIGKILL signal (signal number 9), which instructs the kernel to terminate the process immediately without allowing it to perform cleanup tasks like saving data or closing open files. 

 

1. Identify the Process
 

Before killing a process, you need its Process ID (PID) or its exact name.
 

  • Find PID by Name: Use the pidof command: pidof process_name.
  • List All Processes: Use the ps command to find the PID: ps aux | grep process_name.
  • Interactive List: Use the top or htop command to view a real-time list of running processes. 

2. Common Kill Commands
 

Use these commands depending on whether you have the PID or the process name:

 

  • By PID (Most Precise):
    • kill -9 <PID>
    • Example: kill -9 1234.
  • By Name (Exact Match):
    • killall -9 <process_name>
    • Example: killall -9 firefox.
  • By Name (Partial/Pattern Match):
    • pkill -9 <process_name>
    • Example: pkill -9 fire (kills any process starting with "fire").
  • GUI Method (Desktop Users):
    • Use the xkill command. Type xkill in your terminal, and then click on the frozen window to force it to close. 

3. Key Safety Notes

 

  • Graceful First: Always try kill <PID> (without -9) first. This sends SIGTERM (15), which allows the program to shut down safely.
  • Permissions: You can only kill your own processes. To kill system-level or other users' processes, you must use sudo (e.g., sudo kill -9 1234).
  • Zombies: Some processes appear as "zombie" or "defunct." These are already dead and cannot be killed; you must restart their parent process or the system to remove them from the process table. 

 

john_wang
Support
Support

Hello @lguevara ,

If you terminate a running task directly on the Linux server, Replicate interprets this as an abnormal stop and will attempt to automatically recover the task. This is why you observe the task starting again.

If you need to stop the task properly, please follow these steps:

  1. Stop the task from the Windows GUI. This will gracefully terminate the corresponding process on the Linux server.
  2. If the process still persists and needs to be terminated, you can use kill -9 pid to forcefully stop it immediately.

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!