How to terminate the programs executed accidentally

Terminate the program according to the following procedure when you accidentally executed a program on the login node where the program execution is prohibited.
 

See "How to terminate the job submitted to the batch job scheduler" for the deletion of the jobs submitted to the batch job scheduler.

1. Confirm the PID of the process

Show information of the process you want to terminate with top and/or ps commands.

Check the PID with top command.

$ top

Tasks: 1457 total,   1 running, 1441 sleeping,  11 stopped,   3 zombie
%Cpu(s):  78.8 us,  1.3 sy,  0.0 ni, 96.8 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st
KiB Mem:  65598488 total, 18563160 used, 47035328 free,              8 buffers
KiB Swap:   7812092 total,   7422860 used,     389232 free.  6553100 cached Mem
  PID USER      PR  NI    VIRT    RES    SHR S   %CPU  %MEM     TIME+ COMMAND
20680 GSIC   20   0 1157756 5.056g  20628 R 1467.0 1.688   0:01.88 python 
        1 root      20   0  479464 294444   2940 S  0.000 0.449  76:02.24 systemd
        2 root      20   0            0          0          0 S  0.000 0.000  11:25.50 kthreadd   
        3 root      20   0            0          0          0 S  0.000 0.000   9:48.70 ksoftirqd/0
        9 root      20   0            0          0          0 S  0.000 0.000   0:00.00 rcu_bh 
      10 root      rt     0            0          0          0 S  0.000 0.000   0:45.45 migration/0

2. Termination of the process

Terminate the process with kill command.
Specify the PID as the argument. (20680 in this example)

$ kill 20680

3. Conformation that the process is terminated
Use top and ps commands to confirm the process terminated.
if the process is not displayed, it has correctly terminated.
Proceed to 4 if the process does not terminate.

4. Force termination of the process
Execute the command below if the process does not terminate.

$ kill -9 20680

After that, use top and ps commands to confirm the process terminated.