Results 1 to 7 of 7

Thread: Process kill

  1. #1
    Join Date
    Nov 2009
    Location
    Gainesville, VA
    Beans
    459
    Distro
    Ubuntu Studio 12.04 Precise Pangolin

    Process kill

    Hi,

    I cannot for the life of me remember the command that lists process such that you can enter in a number to kill it while the list updates.

    Anyone?

    Thanks!

  2. #2
    Join Date
    Sep 2011
    Beans
    457

    Re: Process kill

    ps aux | less

    http://www.cyberciti.biz/faq/show-al...sses-in-linux/

    mine shows:


    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    root 1 0.1 0.0 3324 1912 ? Ss 11:58 0:01 /sbin/init
    root 2 0.0 0.0 0 0 ? S 11:58 0:00 [kthreadd]
    root 3 0.0 0.0 0 0 ? S 11:58 0:00 [ksoftirqd/0]
    root 6 0.0 0.0 0 0 ? S 11:58 0:00 [migration/0]
    root 7 0.0 0.0 0 0 ? S 11:58 0:00 [migration/1]
    root 9 0.0 0.0 0 0 ? S 11:58 0:00 [ksoftirqd/1]
    root 10 0.0 0.0 0 0 ? S 11:58 0:00 [kworker/0:1]
    root 11 0.0 0.0 0 0 ? S< 11:58 0:00 [cpuset]
    root 12 0.0 0.0 0 0 ? S< 11:58 0:00 [khelper]
    root 13 0.0 0.0 0 0 ? S< 11:58 0:00 [netns]
    root 14 0.0 0.0 0 0 ? S 11:58 0:00 [kworker/u:1]
    root 15 0.0 0.0 0 0 ? S 11:58 0:00 [sync_supers]
    root 16 0.0 0.0 0 0 ? S 11:58 0:00 [bdi-default]
    root 17 0.0 0.0 0 0 ? S< 11:58 0:00 [kintegrityd]
    root 18 0.0 0.0 0 0 ? S< 11:58 0:00 [kblockd]
    root 19 0.0 0.0 0 0 ? S< 11:58 0:00 [ata_sff]
    root 20 0.0 0.0 0 0 ? S 11:58 0:00 [khubd]
    root 21 0.0 0.0 0 0 ? S< 11:58 0:00 [md]
    root 22 0.0 0.0 0 0 ? S 11:58 0:00 [kworker/1:1]
    root 23 0.0 0.0 0 0 ? S 11:58 0:00 [khungtaskd]
    root 24 0.2 0.0 0 0 ? S 11:58 0:02 [kswapd0]
    root 25 0.0 0.0 0 0 ? SN 11:58 0:00 [ksmd]

  3. #3
    Join Date
    Oct 2006
    Location
    Ayrshire.
    Beans
    54,003
    Distro
    Ubuntu Development Release

    Re: Process kill

    pidof processname

  4. #4
    Join Date
    Sep 2010
    Beans
    898

    Re: Process kill

    I cannot for the life of me remember the command that lists process such that you can enter in a number to kill it while the list updates.
    You may be thinking of "top". When "top" is running, if you type "k", you'll be prompted with "PID to kill:".

    "htop" is similar, but might not be installed by default.

  5. #5
    Join Date
    Nov 2009
    Location
    Gainesville, VA
    Beans
    459
    Distro
    Ubuntu Studio 12.04 Precise Pangolin

    Re: Process kill

    Thanks for both of the replies, but the command I'm looking for is an interactive one. When the command is entered an updating list of processes is listed and there is an option to type in a process ID to kill a given process. Kind of like a

    Code:
    tail -f /var/log/logfile
    But is interactive like I described.

    Does that make sense?

    Cheers.

  6. #6
    Join Date
    Nov 2009
    Location
    Gainesville, VA
    Beans
    459
    Distro
    Ubuntu Studio 12.04 Precise Pangolin

    Re: Process kill

    Quote Originally Posted by Dave_L View Post
    You may be thinking of "top". When "top" is running, if you type "k", you'll be prompted with "PID to kill:".

    "htop" is similar, but might not be installed by default.
    That is exactly it! Thank you so much - that was killing me.

    Cheers!

  7. #7
    Join Date
    Jan 2012
    Beans
    342

    Re: Process kill

    ... zsh can complete on 'kill'

    Code:
    % zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
    % kill <tab>
    ---- process ID
     9038 pts/2    0:00.40 -zsh
     9144 pts/2    0:00.11 vim notes.txt
     9166 pts/2    0:01.23 -zsh                         
     9394 pts/2    0:00.07 ssh host.domain.tld                                           
     9475 pts/2    0:00.00 -zsh
     9501 pts/2    0:00.05 mutt
    best ... khay

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •