On Saturday June 14 2003 02:03 pm, rikona wrote:
> Hello Tom,
>
> Thursday, June 12, 2003, 10:54:10 AM, you wrote:
> >> That's exactly what I did, but it didn't kill it. I'd run top,
> >> get the PID, exit top, kill it, go back to top, and it's still
> >> there. Any idea why?
>
> TB>    Usually I start with a 'killall <app-name>'  If that
> doesn't get TB> it done I run 'wpid <app-name>' to get the pid(s)
> and then TB> 'kill -9' all the relevant pid's.   (alias wpid='ps
> aux | grep')
>
> When I ran kill -9 x, it seemed to disable the entire machine. I
> couldn't log on remotely anymore, and nothing else responded.
> Should there be something still running when x is killed
> ungracefully, or is that just inviting a crash?

tom$ wpid x
xfs       1423  0.0  0.8  5936 4524 ?        S    Jun14   0:00 [xfs]
root      1556  0.0  0.1  2072  788 ?        S    Jun14   0:00 
xinetd -stayalive
-reuse -pidfile /var/run/xinetd.pid
tom       1610  0.0  0.2  2572 1288 ?        S    Jun14   0:00 
/bin/sh /usr/X11R6
/bin/startx
tom       1649  0.0  0.1  2396  620 ?        S    Jun14   0:00 xinit 
/etc/X11/xin  it/xinitrc -- -deferglyphs 16
tom       2105  0.0  2.2 24804 11692 ?       S    Jun14   0:00 
kdeinit: kmix -ses  sion 
110a00000a000104248667700000023470025_1055622305_268917
tom      32430  0.0  0.1  2640  744 pts/3    R    08:55   0:00 ps 
aux

     As you can see 'x' is a heck of a lot more than 'X'. It's my 
fault, I should'a included a few cautions. First, you generally 
only want to use 'kill' on specific applications that can't be 
stopped more normally, not systems like X. Second, 'kill -9' is a 
last resort, and should be used sparingly and carefully, and never 
as root on your user owned apps.  Much, much better to, as user run
'killall <app-name>'  (see 'man killall').

   If you need to stop X, use <Crtl+Alt+Backspace>

> I tried running ps aux | grep appname, but it gives me an error.

    Was this after your 'kill -9 x'?  Try running 'which ps' (and 
also see 'man ps')

> Does linux treat alises as (some alias) appname?

    Not sure what you mean, but aliases are only modified commands 
you already have on your system.  alias wpid='ps aux | grep' put at 
the end of the /etc/bashrc file just creates a command to run 'ps' 
with aux switches and use it to search (grep) for the app-name you 
supply after wpid .  I use a lot of aliases to save typing or 
needing to remember the syntax for long command lines. Probly be a 
good idea to read the various Bash how-to's. Also do a Google on 
'linux bash', there's many good tutorials on the Net.
-- 
    Tom Brinkman                  Corpus Christi, Texas


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to