Score:-5

How to kill all processes from a user using GPU?

jp flag

How do I kill all processes from a user using GPU? E.g.

killall --gpu --user kong
N0rbert avatar
zw flag
Where did you get `--gpu` flag for killall? Manpage even in 21.10 [does not mention it](http://manpages.ubuntu.com/manpages/impish/en/man1/killall.1.html).
hr flag
If you are using nvidia-smi, you may be able to do something like this: [How to kill all processes using a given GPU?](https://unix.stackexchange.com/questions/250244/how-to-kill-all-processes-using-a-given-gpu)
Kong avatar
jp flag
@N0rbert its an example
Score:-1
in flag

Instead of using GPU, you can try a one liner like this:

for i in $(ps axu | tr -s " "  | grep "^kong" | cut -d " " -f 2); do sudo kill -9 $i, ; done

Here, I'm getting all processes belonging to a user and forcing them to be terminated by sending them a kill signal. I assumed the username is kong.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.