On 2/7/2016 11:20 PM, Mahmood Naderan wrote: >>"ps" by default shows only the current user's processes > So, I switched to root in order to find all processes
That's unnecessary. Use the flags. >>See the man pages for ps and prstat. They have a lot of options. "ps >>-el" might tell you more. >>Yes, SIGSTOP and SIGCONT will stop and start processes, provided that >>they're in a stoppable place (i.e., not blocked uninterruptably in the >>kernel). > > > OK. I found the java processes for user Hadoop. Problem is, after the > -STOP, the 'job' command shows nothing. I expected to see some suspended > processes. Is there any way to list the suspended processes? That's unrelated. The 'job' command is part of the shell's job control. If the process in question is under that shell's job control, then, yes, you'd see it as stopped when it's stopped. But if it's not, there's nothing magical about SIGSTOP or the "job" command that will make it visible. The processes you're looking at are almost certainly not under this shell's control. I suppose if you wanted to list processes system-wide that are stopped you could do something like: ps -o state,pid,cmd | egrep "^stop" (pgrep, sadly, has no way to match based on process state.) > # kill -STOP 1264 1648 1651 1089 1643 1657 1654 1155 1223 1329 1660 1663 > 1666 16 > 69 1672 1675 1678 1706 1683 1694 1711 > # jobs > # prstat > PID USERNAME SIZE RSS STATE PRI NICE TIME CPU > PROCESS/NLWP > 1660 hadoop 1094M 953M stop 59 0 0:01:05 6.6% java/27 Note the state change. They're now in "stop" state. They are no longer consuming CPU resources as a result of taking that signal. -- James Carlson 42.703N 71.076W <carls...@workingcode.com> ------------------------------------------- dtrace-discuss Archives: https://www.listbox.com/member/archive/184261/=now RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f Modify Your Subscription: https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2 Powered by Listbox: http://www.listbox.com