Page 1 of 1

Nice -n unix

Posted: Wed Oct 07, 2009 5:46 pm
by Pietia
L2J Revision all:
L2JDP Revision all:
the code in serverloop

Code: Select all

nice -n -2
is doing

Code: Select all

nice: cannot set niceness: Permission denied 
on a user without su permissions the solution is simple delete the code or use su (bad thing ) but i guess that this should be avoided in other way than this is now.

Re: Nice -n unix

Posted: Wed Oct 07, 2009 5:59 pm
by _DS_
You cant increase priority without root rights. Use sudo.

Re: Nice -n unix

Posted: Wed Oct 07, 2009 6:34 pm
by nicolasx
CHMOD +X SOMHEWHERE


AND SUCCESS

Re: Nice -n unix

Posted: Wed Oct 07, 2009 6:47 pm
by _DS_
:lol:

Re: Nice -n unix

Posted: Thu Oct 08, 2009 7:39 pm
by DrHouse
_DS_ wrote::lol:
hahahaha

Re: Nice -n unix

Posted: Fri Oct 09, 2009 5:55 am
by _DS_
btw, not a bugreport, moving

Re: Nice -n unix

Posted: Fri Oct 09, 2009 12:48 pm
by Pietia
nicolasx wrote:CHMOD +X SOMHEWHERE


AND SUCCESS
It won't give u anything because a normal user without super user privleadges cannot run nice only su can do it.
Is it so important to give a priority of l2j server?
Root /su /sudo shouldn't run any program in real time like an application/server.

Re: Nice -n unix

Posted: Sat Oct 10, 2009 7:28 pm
by XavierElf
Just allow in /etc/sudoers your user to use nice command.
E.g.
[ini]# User privilege specificationyour_user ALL = /usr/bin/nice [/ini]
or you may add Cmnd alias for convenience.
E.g.
[ini] # Cmnd alias specificationCmnd_Alias CMDS = /usr/bin/kill, /usr/bin/nice, /usr/bin/screen# User privilege specificationyour_user ALL = CMDS [/ini]
BTW '-2' it is far not Real-time priority.
PS: In my practice has shown that when the server is started with the raised priority - problems much less. (Especially for Windows... How I am happy that has refused for a long time its use. :P )