Slay ’em!

Today I found a highly useful tool called slay. It allows one to kick all processes of a particular user. So if I wanted to kick user joe I’d say:

slay joe

// Oliver

This entry was posted in EN, Linux. Bookmark the permalink.

4 Responses to Slay ’em!

  1. Andrej says:

    I find it funny the tool is ‘highly useful’ to you. I wonder what kind of crap you need to deal with?

  2. Oliver says:

    Hehe, you don’t really want to know. But it’s certainly more convenient than going manually through all processes for the user you want to kick.

    // Oliver

  3. Helgi Briem says:

    killall -u (which is built in) seems to do the same. What’s the advantage of slay?

  4. Oliver says:

    Well, no idea what system you refer to on which killall is built in, but I’m sure it’s true for some distros. On my Debian boxes there only exists killall5 which doesn’t know about a -u switch, making the argument about built-in over extra install moot.

    DESCRIPTION
    killall5 is the SystemV killall command. It sends a signal to all processes except kernel threads and the processes in its own session, so it won’t kill the shell that is running the script it was called from. Its primary (only) use is in the rc scripts found in the /etc/init.d directory.

    On Debian you will need the psmisc package in order to get the killall program you want. And now let’s try to type it:

    [1] root@yggdrasil:~# sla[TAB][TAB]
    slabtop slattach slay

    Okay, so we have to enter all four letters:

    [1] root@yggdrasil:~# slay[TAB] joe

    Okay, still acceptable.

    [1] root@yggdrasil:~# ki[TAB]ll[TAB][TAB]
    kill killall killall5

    Oh boy, we need at least two tabs three tabs. And in fact we need to type killall including a blank space in order to get the right killall. Not to mention the potential for mistaking one killall for the other …

    Don’t know for you, but for me this is a good argument for slay over killall with a special switch 😉

Leave a Reply

Your email address will not be published. Required fields are marked *