怎么在LINUX下面关闭双核呢

CPU/显卡/打印机/USB设备等硬件问题
回复
Mingfei
帖子: 4
注册时间: 2008-10-20 7:50

怎么在LINUX下面关闭双核呢

#1

帖子 Mingfei » 2008-10-29 16:35

rt。
由于BIOS不支持,不知道能不能在LINUX下面关闭双核,剩一个,就像windows一样。
thx
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

Re: 怎么在LINUX下面关闭双核呢

#2

帖子 bones7456 » 2008-10-29 16:36

用那个不支持双核的内核就好了....

想不通啊想不通...
关注我的blog: ε==3
头像
yiding_he
帖子: 2677
注册时间: 2006-10-25 18:10
来自: 长沙
联系:

Re: 怎么在LINUX下面关闭双核呢

#3

帖子 yiding_he » 2008-10-29 16:40

简单地说,添加内核启动参数 maxcpus=1 即可。下面是详细步骤:

When using Linux the procedure is quite different, when starting up your PC, you should find the Grub menu, which is responsible for launching Linux. Select the entry you want to use, press “e” key and a menu will appear (depending on the version used).

代码: 全选

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=a8a39729-9d2a-425b-b84b-ecc5c7dad104 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
Using the arrow key, go the line beginning with the word kernel and press on “e” again.

Be aware that you are editing the line, which defines the path to your Linux kernel (core), at the end of the line add the following command:

代码: 全选

maxcpus=1
The end result should be:

代码: 全选

kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=a8a39729-9d2a-425b-b84b-ecc5c7dad104 ro quiet maxcpus=1
Note that que ro, quiet and maxcpus are the parameters send to the core when starting up Linux.

Press on the “b” key to start Linux. Only one of your processor should be used by Linux, the rest will be ignored.
你是自由的。别人也是。
头像
yiding_he
帖子: 2677
注册时间: 2006-10-25 18:10
来自: 长沙
联系:

Re: 怎么在LINUX下面关闭双核呢

#4

帖子 yiding_he » 2008-10-29 16:44

又找到一个方法。下面的代码用来关闭 CPU1:

代码: 全选

echo 0 >> /sys/devices/system/cpu/cpu1/online
参考:
http://mailman.lug.org.uk/pipermail/not ... 10937.html
你是自由的。别人也是。
Mingfei
帖子: 4
注册时间: 2008-10-20 7:50

Re: 怎么在LINUX下面关闭双核呢

#5

帖子 Mingfei » 2008-10-30 0:43

哈,谢谢大家,搞定了。还是用的grub那个办法。
回复