Bug 8208

Summary: initscripts gets CPU count wrong.
Product: [Retired] Red Hat Linux Reporter: Stephen Tweedie <sct>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-05 19:06:33 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 Stephen Tweedie 2000-01-05 18:22:35 UTC
initscripts greps for CPUs in /proc/stat incorrectly.  The file
/etc/rc.d/rc.local performs a

NUMPROC=`grep -cl "^cpu[0-9]+" /proc/stat`

which should probably be:

NUMPROC=`grep -c "cpu[0-9]" /proc/stat`

as otherwise you just get NUMPROC=0 unless you have >10 CPUs.

Comment 1 Bill Nottingham 2000-01-05 19:06:59 UTC
Fixed in the errata initscripts.