Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 8208 - initscripts gets CPU count wrong.
Summary: initscripts gets CPU count wrong.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-01-05 18:22 UTC by Stephen Tweedie
Modified: 2014-03-17 02:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-05 19:06:33 UTC

Attachments (Terms of Use)

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.

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