欢迎来到天天文库
浏览记录
ID:8820298
大小:14.13 KB
页数:2页
时间:2018-04-08
《linux多核cpu控制启动核数》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、Linux多核CPU控制启动核数修改/boot/grub/grub.conf,在kernel行最后加入maxcpus=n(n为需要启动的核数) 例如原来的grub.conf文件如下:#grub.confgeneratedbyanaconda##Notethatyoudonothavetorerungrubaftermakingchangestothisfile#NOTICE: Youhavea/bootpartition. Thismeansthat# allkernelandinitrdpathsarerelativeto/boot/,eg
2、.# root(hd0,0)# kernel/vmlinuz-versionroroot=/dev/VolGroup00/LogVol00# initrd/initrd-version.img#boot=/dev/sdadefault=0timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitleRedHatEnterpriseLinuxServer(2.6.18-164.el5) root(hd0,0) kernel/vmlinuz-2.6.18
3、-164.el5roroot=/dev/VolGroup00/LogVol00rhgbquiet initrd/initrd-2.6.18-164.el5.img 修改为:#grub.confgeneratedbyanaconda##Notethatyoudonothavetorerungrubaftermakingchangestothisfile#NOTICE: Youhavea/bootpartition. Thismeansthat# allkernelandinitrdpathsarerelativeto/boot/,eg.#
4、 root(hd0,0)# kernel/vmlinuz-versionroroot=/dev/VolGroup00/LogVol00# initrd/initrd-version.img#boot=/dev/sdadefault=0timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitleRedHatEnterpriseLinuxServer(2.6.18-164.el5) root(hd0,0) kernel/vmlinuz-2.6.18-164.
5、el5roroot=/dev/VolGroup00/LogVol00rhgbquietmaxcpus=4 initrd/initrd-2.6.18-164.el5.img 则reboot后启动的核数为4
此文档下载收益归作者所有