AIX

AIX

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


#Power
#Power
#Operatingsystems
#Servers
 View Only
  • 1.  AIX Users process

    Posted 11/09/09 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
    #AIX-Forum


  • 2.  Re: AIX Users process

    Posted 11/09/09 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
    #AIX-Forum


  • 3.  Re: AIX Users process

    Posted 11/09/09 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.
    #AIX-Forum


  • 4.  Re: AIX Users process

    Posted 11/10/09 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.
    #AIX-Forum