Bug 77846 - achieve initscripts nicelevel other than 0
Summary: achieve initscripts nicelevel other than 0
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-14 12:17 UTC by Gavin Robertson
Modified: 2014-03-17 02:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 04:56:59 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.