Linux – How to find and kill remotely a process running on CentOS-5.x

command-line-interfacelinux

  • Context: Ran a backup thinking it'd take no more than 1-hour… and it's still going. The process is a MySQL DB backup that has the DB tables locked.
  • OS: CentOS-5.x
  • Goal: Find and kill remotely a process running on CentOS-5.x

Possible Requested Help:

(1) How do I find it, meaning how do I view all process and sort by CPU use; since I have no idea what the process is, but I'm guessing it's taking up most the CPU cycles now and has a name I'll figure out.

(2) How do I kill it. Please use the following notation, where # is the CMD-line itself: # cd / — meaning change directory to root. If the command allows sudo to be used, include it if if it's unlikely to be needed, example: # sudo cd /secure — meaning change directory to /secure based on sudo rights.

NOTE: Really not sure if the above is clear, so if you have any questions, please comment and I'll reply. Thanks!

Best Answer

top will show you the processes on the system, sorted in default by CPU usage. Press k to select a process to kill. Press q when you want to exit top.