AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  AIX Users process

    Posted Mon November 09, 2009 05:21 PM

    Originally posted by: omojoy


    I have a list of process to kill daily for a particular user

    How can I kill all at once without having to specify each process number after the kill command


  • 2.  Re: AIX Users process

    Posted Mon November 09, 2009 05:40 PM

    Originally posted by: orphy


    If they are tied to a particular user, try

    ps -fu<user>|egrep -v 'PID|egrep'|awk '{print $2}'|xargs -i kill {}
    If tied to a particular tty/pts, try

    ps -ft<tty or pts>|egrep -v 'PID|egrep'|awk '{print $2}'|xargs -i kill {}
    If neither, show us a list of those processes and we'll look at this again.
    Orphy


  • 3.  Re: AIX Users process

    Posted Mon November 09, 2009 09:12 PM

    Originally posted by: Kosala


    If all these processes are owned by a single user (not root), then issue "kill -9 -1" from that user.


  • 4.  Re: AIX Users process

    Posted Tue November 10, 2009 12:17 AM

    Originally posted by: Kosala


    NOTE: All the other processes which is owned by the same user, which might not be the processes you need to kill, will also be killed. For example, the shell you're issuing the command from will also be killed... so this is not killing... kind of a massacre.