CentOS 6.4 设备管理之CPU

Netkiller CentOS Linux 手札

Redhat, CentOS and Scientific Linux

Mr. Neo Chan, 陈景峰(BG7NYT)

中国广东省深圳市宝安区龙华镇溪山美地
518109
+86 13113668890
+86 755 29812080
<netkiller@msn.com>

$Id: book.xml 451 2012-08-13 09:38:29Z netkiller $

版权 2009, 2010, 2011, 2012 Neo Chan

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

文档出处:
http://netkiller.sourceforge.net
http://netkiller.github.com

 

$Date: 2012-08-13 17:38:29 +0800 (Mon, 13 Aug 2012) $

我的系列文档

 

Netkiller Architect 手札 Netkiller Developer 手札 Netkiller Testing 手札 Netkiller Cryptography 手札 Netkiller Version 手札
Netkiller Linux 手札 Netkiller Debian 手札 Netkiller CentOS 手札 Netkiller FreeBSD 手札 Netkiller Security 手札
Netkiller Web 手札 Netkiller Monitoring 手札 Netkiller Storage 手札 Netkiller Mail 手札 Netkiller Shell 手札
Netkiller Database 手札 Netkiller PostgreSQL 手札 Netkiller MySQL 手札 Netkiller NoSQL 手札 Netkiller LDAP 手札
Netkiller Installation 手札 Netkiller Cisco IOS 手札 Netkiller Intranet 手札 Netkiller Multimedia 手札 Netkiller Docbook 手札
Netkiller Management 手札        

 

 

 

第 22 章 设备管理

目录

1. CPU 资源管理1.1. lscpu - display information about the CPU architecture1.2. chcpu - configure CPUs

1. CPU 资源管理

1.1. lscpu - display information about the CPU architecture

查看CPU信息

# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 13
Stepping:              3
CPU MHz:               2400.084
BogoMIPS:              4800.16
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
NUMA node0 CPU(s):     0
			

1.2. chcpu - configure CPUs

禁用谋个CPU(含超线程)

# chcpu -d 3
CPU 3 disabled

# lscpu -c --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
3   -    -      -    :::           no

# lscpu -b --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0   0    0      0    0:0:0:0       yes
1   0    0      1    1:1:1:0       yes
2   0    0      2    2:2:2:0       yes
4   0    1      3    3:3:3:1       yes
5   0    1      4    4:4:4:1       yes
6   0    1      5    5:5:5:1       yes
7   0    1      6    6:6:6:1       yes

# lscpu --all --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0   0    0      0    0:0:0:0       yes
1   0    0      1    1:1:1:0       yes
2   0    0      2    2:2:2:0       yes
3   -    -      -    :::           no
4   0    1      3    3:3:3:1       yes
5   0    1      4    4:4:4:1       yes
6   0    1      5    5:5:5:1       yes
7   0    1      6    6:6:6:1       yes

# chcpu -d 3
CPU 3 is already disabled

# chcpu -d 1
CPU 1 disabled

# chcpu -d 3
CPU 3 disabled

# chcpu -d 5
CPU 5 disabled

# chcpu -d 7
CPU 7 disabled

# lscpu --all --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0   0    0      0    0:0:0:0       yes
1   -    -      -    :::           no
2   0    0      1    1:1:1:0       yes
3   -    -      -    :::           no
4   0    1      2    2:2:2:1       yes
5   -    -      -    :::           no
6   0    1      3    3:3:3:1       yes
7   -    -      -    :::           no
			

启用谋个CPU

# chcpu -e 3
CPU 3 enabled

# lscpu --all --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0   0    0      0    0:0:0:0       yes
1   0    0      1    1:1:1:0       yes
2   0    0      2    2:2:2:0       yes
3   0    0      3    3:3:3:0       yes
4   0    1      4    4:4:4:1       yes
5   0    1      5    5:5:5:1       yes
6   0    1      6    6:6:6:1       yes
7   0    1      7    7:7:7:1       yes
			

0 号 CPU不允许禁用

# lscpu --all --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0   0    0      0    0:0:0:0       yes
1   -    -      -    :::           no
2   -    -      -    :::           no
3   -    -      -    :::           no
4   -    -      -    :::           no
5   -    -      -    :::           no
6   -    -      -    :::           no
7   -    -      -    :::           no

# chcpu -d 0
CPU 0 is not hot pluggable
			

1号处于启用状态,0号仍然不能禁用

# lscpu --all --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0   0    0      0    0:0:0:0       yes
1   0    0      1    1:1:1:0       yes
2   -    -      -    :::           no
3   -    -      -    :::           no
4   -    -      -    :::           no
5   -    -      -    :::           no
6   -    -      -    :::           no
7   -    -      -    :::           no

# chcpu -d 0
CPU 0 is not hot pluggable

 

时间: 2024-08-20 15:36:09

CentOS 6.4 设备管理之CPU的相关文章

centos yum安装nginx 提示 No package nginx available问题解决方法

问题原因:   nginx位于第三方的yum源里面,而不在centos官方yum源里面   解决方法:   安装epel(Extra Packages for Enterprise Linux) a.去epel网站 http://fedoraproject.org/wiki/EPEL下载 b.我的系统是centos5.7,cpu是x86_64,所以我下载的是wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.no

时间子系统6_高分辨率定时器框架初始化

// 高分辨率定时器框架初始化 // 调用路径:start_kernel->hrtimers_init // 函数任务: // 1.创建cpu时钟基础 // 2.注册监听cpu状态变化 // 3.注册高分辨率模式下的定时器软中断 // 注: // 1.高分辨率定时器框架的通用部分总是编译进内核 // 2.高分辨率定时器框架初始为未激活状态,由低分辨率定时器软中断中切换到高分辨率 1.1 void __init hrtimers_init(void) { //通知clockevent设备管理,创建

Hypertable对决HBase!谁是云开源利器

HBase(Hadoop Database)是一个高可靠性.高性能.面向列.可伸缩的分布式存储系统,利用HBase技术可在廉价PC Server上搭建起大规模结构化存储集群,Hypertable则是搜索引擎公司Zvents以Google发布的BigTable为基础,推出的一款开源分布式数据存储系统.这两类分布式存储系统通常被用于新兴互联网架构或者云计算.云存储架构中. 两者都是模仿谷歌BigTable数据库设计而成,主要区别是Hypertable依靠C++语言实现,而HBase则基于Java编写

大数据集群环境ambari支持集群管理监控,供应hadoop+hbase+zookeepe

Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应.管理和监控.Ambari目前已支持大多数Hadoop组件,包括HDFS.MapReduce.Hive.Pig. Hbase.Zookeper.Sqoop和Hcatalog等.   Apache Ambari 支持HDFS.MapReduce.Hive.Pig.Hbase.Zookeper.Sqoop和Hcatalog等的集中管理.也是5个顶级hadoop管理工具之一.   Ambari主要取得了以下成绩:

CentOS中使用top命令查看CPU

  CentOS 是 RHEL(Red Hat Enterprise Linux)源代码再编译的产物,而且在 RHEL 的基础上修正了不少已知的 Bug ,相对于其他 Linux 发行版,其稳定性值得信赖. 在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 top 命令后,CPU 使用状态会以全屏的方式显示,并且会处在对话的模式 -- 用基于 top 的命令,可以控制显示方式等等.

Centos系统查看cpu是否支持64位例子

  下面看一个简单的Centos系统查看cpu是否支持64位例子,希望这个例子可以帮助到大家. 查看cpuinfo中是否有lm,如果有lm表示支持64位,lm的意思是long mode,具体命令如下: cat /proc/cpuinfo | grep flags 检查输出里面是否有 lm 字符 或 cat /proc/cpuinfo | grep flags | grep lm | wc -l 输出结果大于 0 表示支持64位 cat 语法结构; de>cat [选项] [文件]...de>

centos性能监控-centos cpu监控,流量监控的问题

问题描述 centos cpu监控,流量监控的问题 监控图不连续,怀疑中途是不是web服务器重启了还是什么其它情况 解决方案 http://www.linuxidc.com/Linux/2014-01/95639.htm

centos的内置程序setup进行网络设备管理找不到网卡,但是电脑能上网。

问题描述 centos的内置程序setup进行网络设备管理找不到网卡,但是电脑能上网. 能上网,但是没法用setup进行设置,怎么解决 而且查询/etc/sysconfig/network-scripts里没有ifcfg-eth0,只有ifcfg-lo.ifconfig可以查到eth0,但是/etc/rc.d/init.d/network restart没有看到eth0重启.只有环回接口的重启. 查看dmeg:dmesg|grep -i eth sky2 eth0: addr 00:23:8b:

关于CentOS 6下Hadoop占用系统态CPU高的处理办法

关于CentOS 6下Hadoop占用系统态CPU高的处理办法 一次不经意发现Hadoop的系统态CPU使用率很高,然后百度一下居然是个已知问题.     RHEL6优化了内存申请的效率,而且在某些场景下对KVM的性能有明显提升:http://www.linux-kvm.org/wiki/images/9/9e/2010-forum-thp.pdf.     而Hadoop是个高密集型内存运算系统,这个改动似乎给它带来了副作用.理论上运算型Java程序应该更多的使用用户态CPU才对,Cloude