Nice -n unix

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Pietia
Posts: 14
Joined: Fri Sep 25, 2009 10:39 am

Nice -n unix

Post 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.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Nice -n unix

Post by _DS_ »

You cant increase priority without root rights. Use sudo.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
nicolasx
Posts: 39
Joined: Mon Nov 03, 2008 1:26 am

Re: Nice -n unix

Post by nicolasx »

CHMOD +X SOMHEWHERE


AND SUCCESS
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Nice -n unix

Post by _DS_ »

:lol:
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
DrHouse
L2j Inner Circle
L2j Inner Circle
Posts: 912
Joined: Mon Jan 22, 2007 12:14 am
Location: Spain

Re: Nice -n unix

Post by DrHouse »

_DS_ wrote::lol:
hahahaha
Image

Leadership and management are not talk and talk, but talk and do

Proud of being a part of this project
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Nice -n unix

Post by _DS_ »

btw, not a bugreport, moving
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Pietia
Posts: 14
Joined: Fri Sep 25, 2009 10:39 am

Re: Nice -n unix

Post 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.
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Nice -n unix

Post 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 )
Sry for my bad english...
Post Reply