LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2008, 11:11 AM   #1
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Rep: Reputation: 30
Maximum CPU's


Hi,

Is there any way we can limit the no. of online CPU's on RedHat Linux 4.0 System?

I have heard about maxcpus parameter to be set in /etc/grub.conf file. But it didnt seem to work.

How to check No. Of Online CPU's at any given point?

/etc/procinfo shows Processors upto 7. Does it mean we have 7 CPU in the system ?? And all are online?

Thanks
 
Old 02-04-2008, 11:33 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I take it the grub stuff meant that if you add the option "maxcpu=1" (without quotes) to the smb-enabled kernel line in Grub's menu.lst and boot that, the kernel should only use one cpu. Note that I don't have multiple cpus so I can't try.

When Grub comes up, press ESC if needed to bring the menu to the screen where you can select kernels to boot. Hilight the kernel you want to modify, then press "e" (it says in the bottom to press "e" to edit commands before booting). You should get some lines from that boot section; hilight the one that starts with word "kernel", press "e" again to edit the line (it says that in the bottom of the screen). Type, without quotes, "maxcpu=1" along the other options (but before "--" if that is at the end of the line), separated from the other options by spaces, and press ENTER to accept changes. Then press "b" to boot that kernel. See if it worked; if it did, change Grub configuration permanently (the above is forgotten next time you reboot): as root, open /boot/grub/menu.lst in a text editor, locate the kernel line of the kernel you want to edit, and type maxcpu=1 among the options just like in the above example. Save the file and it's there. Remember to set a Grub password to prevent people from taking the option off (if that's what you intend) just like that, and possibly a BIOS password to prevent them from booting off some other media than your harddisk (thus circumventing your Grub settings).

Code:
cat /proc/cpuinfo
that shows information about your cpu(s)..like I said, I don't have multiple units so I don't know how it looks if you do but I assume if you don't have more than one cpu enabled, you won't see information about the others.

And of course the kernel option doesn't work if the kernel doesn't support more than one cpu

I just wonder why you would want to restrict the amount of cpus..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Are more CPU's better for Apache? mlewis Linux - Hardware 9 04-02-2008 10:06 AM
Stealth cpu's EdR Linux - Newbie 4 10-14-2004 01:35 PM
CPU's doralsoral Linux - Hardware 2 10-29-2003 05:27 AM
CPU's on Linux zakl Linux - Hardware 1 06-12-2003 02:54 AM
two processes on different CPU's CobraMagic Linux - General 1 11-08-2002 11:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration