Java process is killing my computer (Intel i3, 8GB RAM). It takes over whole CPU and system starts to hang. I was trying to change niceness
of java processes but i have to control it for all time and this is not always possible. So for beginning I tried to construct a command to change process niceness
by name. Ended up with something like this:
ps ax -o pid,comm | grep java | awk '{print $1}' | tr "\n" " " | renice -n 5 -p
But it looks like it doesn't work. And I don't know where to go next. Bash script maybe? Run it by cron
or by watch
every x
time? Or is there a better way?