Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

RENICE command not working with '-u'

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Daffy_Duck
Posts: 3
Joined: 2019-11-14 10:10

RENICE command not working with '-u'

#1 Post by Daffy_Duck »

Hi, :)
I'm trying to use the command 'RENICE' for the first time and i run into a problem.
My CPU usage is between 2-9%. And if i run './xmr-stak' it will take all the free CPU power, so i have to lower the priority like i did it on Windows.
But if i use "RENICE -n 15 -u xmr-stak" then 'xmr-stak' will use 0% CPU. It only works if i use "RENICE -n 15 -p <ProcessID>".
How can i do so that 'xmr-stak' will always start with priority 15. :?:

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 622
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 81 times
Been thanked: 98 times

Re: RENICE command not working with '-u'

#2 Post by wizard10000 »

renice can only change a running process. If you want to *start* the process with a higher priority use nice instead. nice's man page explains pretty clearly.

Hope this helps -
we see things not as they are, but as we are.
-- anais nin

Daffy_Duck
Posts: 3
Joined: 2019-11-14 10:10

Re: RENICE command not working with '-u'

#3 Post by Daffy_Duck »

I get the same problem with "NICE -n 19 ./xmr-stak" vs "NICE -n 15 -p <ProcessID>". For some strange reason NICE/RENICE only works with the 'ProcessID' and not with the 'ProcessName' or 'UserName'.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 622
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 81 times
Been thanked: 98 times

Re: RENICE command not working with '-u'

#4 Post by wizard10000 »

The little bit of research I've done suggests this is a shell script. If you renice a shell script the only thing that gets reniced is bash. You'll probably have to edit the script and use nice to launch commands there.

Hope this helps -
we see things not as they are, but as we are.
-- anais nin

Daffy_Duck
Posts: 3
Joined: 2019-11-14 10:10

Re: RENICE command not working with '-u'

#5 Post by Daffy_Duck »

I cannot edit this 'xmr-stak' file, it's a a bin file.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 622
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 81 times
Been thanked: 98 times

Re: RENICE command not working with '-u'

#6 Post by wizard10000 »

I guess maybe someone needs to update nice's man page then. Sorry I wasn't helpful :(
we see things not as they are, but as we are.
-- anais nin

Post Reply