Bug 77846

Summary: achieve initscripts nicelevel other than 0
Product: [Retired] Red Hat Linux Reporter: Gavin Robertson <gavin_robertson>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-14 04:56:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gavin Robertson 2002-11-14 12:17:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
I found no documented way for a initscript to run with an adjusted scheduling
priority i.e. nice value other than 0.

to achieve this i did the following.

add line in /etc/sysconfig/example
NICELEVEL="-10"

changed line in /etc/rc.d/init.d/example to read
daemon $NICELEVEL example $OPTIONS

this seems to be a clean solution that sould work on all initscrips. although i
have only looked at a few.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.add line in /etc/sysconfig/example
NICELEVEL="-10"

2.changed line in /etc/rc.d/init.d/example to read 
daemon $NICELEVEL example $OPTIONS

	

Additional info:

Comment 1 Bill Nottingham 2002-11-14 17:54:48 UTC
You can pass +X or -X to set a different nice level. See /etc/init.d/functions.

Comment 2 Gavin Robertson 2002-11-14 20:54:22 UTC
have reopened. clearly i did not supplied enough info in my first post and i
think you may have misunderstood. I am passing +X or -X 
I will try to explain better. 

IMHO nicelevel should be a user config option stored in /etc/sysconfig/*. 

as things are now in order to change the nicelevel you need to first understand
/etc/init.d/function and the daemon function (not a bad thing) then hack the
script and place +X or -X at correct place. by doing as my original comment the
OP need only change the NICELEVEL= value in the config file.

I guess it comes down to how easily you want the OP to be able to change the
nicelevel.

If i am still missing something please close with my apologies.

Comment 3 Bill Nottingham 2003-01-14 04:56:59 UTC
Added in 7.03-1.