Post Reply 
renice minim process
13-08-2022, 21:43
Post: #1
renice minim process
Hello,

I'd like to renice minim server process at the system boot without make this by hand each time.

Actually I issue :
Code:
pidof java 1 | xargs renice -20

Should I place this command in the "runjaca.sh" script I use to launch minimserver ?

Here is what I think about :

Code:
#!/bin/bash

exec taskset -c 5 java "$@"
pidof java 1 | xargs renice -20
exit

Thank you,
Manu
Find all posts by this user
Quote this message in a reply
13-08-2022, 22:20
Post: #2
RE: renice minim process
Placing pidof after exec won't work because exec replaces the current shell and any subsequent commands in the shell script won't be run.

Also, it seems simpler to use nice to launch java instead of launching java first and then using renice.
Find all posts by this user
Quote this message in a reply
14-08-2022, 14:41
Post: #3
RE: renice minim process
Thank you,

Can you please send me the correct syntax for this please ?

Code:
/bin/nice -20 exec taskset -c 5 java "$@"

?
Find all posts by this user
Quote this message in a reply
14-08-2022, 16:26
Post: #4
RE: renice minim process
final command is

Code:
exec taskset -c 5 /bin/nice -n -20 java "$@"

tested OK

This one launch minimserver on core 5 with high priority
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)