LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2019, 07:11 AM   #1
erajaysehgal
LQ Newbie
 
Registered: Jun 2019
Posts: 4

Rep: Reputation: Disabled
Lightbulb Command to kill all the sleeping processes !!


Hello Everyone,

Hope you are doing great !

I just want to know a command which can kill all the sleeping processes of a user. Please suggest !

Thank you in advance !
 
Old 06-11-2019, 07:24 AM   #2
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 3,962
Blog Entries: 3

Rep: Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887Reputation: 1887
You'd have to string two or three together to achieve that but it might not be as useful as you think it would be. Please say more about what you are trying to accomplish.
 
2 members found this post helpful.
Old 06-11-2019, 08:23 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,696
Blog Entries: 13

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
You use SIGKILL to terminate processes, but as Turbocapitalist says, you need to be able to qualify which processes you are addressing. Their states sometimes change. Using some manner to select a grouping of processes may not achieve what you want, and instead may do things you do not want. Please respond to Turbocapitalist's last query.
 
Old 06-11-2019, 08:31 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,031

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
Most processes are sleeping most of the time. They run for a tiny fraction of a second, then spend a much longer time waiting for some event like IO or lock or semaphore. If you kill all sleeping processes of a user, you might as well kill all processes of this user.
 
  


Reply

Tags
bash, command line interface, linux, unix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: What Are Zombie Processes And How To Find & Kill Zombie Processes? LXer Syndicated Linux News 0 12-10-2017 04:12 PM
Is it safe to kill sleeping processes in linux? alonzo4u Linux - Newbie 5 11-05-2012 09:39 PM
Use only one "kill" to kill father and child processes Xosen Programming 7 08-28-2008 03:33 AM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 06:35 PM
75 processes sleeping? Is this normal? randon Linux - General 1 09-27-2003 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration