AIX查看CPU、內存等信息
阿新 • • 發佈:2017-05-11
rep ble 其中 pin tco cat in use erp lsd
用邏輯CPU除以物理CPU就是核數。
4. 查看單個CPU的詳細信息
#lsattr -E -l proc0
frequency 4204000000 Processor Speed False
smt_enabled true Processor SMT enabled False
smt_threads 2 Processor SMT threads False
state enable Processor state False
type PowerPC_POWER6 Processor type False
Linux操作系統
Linux下的CPU信息全部都在/proc/cpuinfo這個文件中,可以直接打開看。
1. 查看物理CPU的個數
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
2. 查看邏輯CPU的個數
#cat /proc/cpuinfo |grep "processor"|wc -l
3. 查看CPU是幾核
#cat /proc/cpuinfo |grep "cores"|uniq
4. 查看CPU的主頻
#cat /proc/cpuinfo |grep MHz|uniq
Aix下查看內存命令
1、
# lsdev -Cc memory
查看配置的物理內存設備,下面為其輸出示例:
L2cache0 Available L2 Cache
mem0 Available Memory
# lsattr -El mem0
輸出類似如下所示:
goodsize 7936 Amount of usable physical memory in Mbytes False
size 7936 Total amount of physical memory in Mbytes False
此例說明機器的物理內存為5888MB。如果前面lsdev的輸出中有設備名 mem1,則使用同樣的命令查看其對應的大小並依此類推。
2、
# bootinfo -r
8126464
此例說明機器的物理內存為8126464kB。
3、
# prtconf
輸出類似下面所示:
----
----
Memory Size: 7936 MB
----
----
本命令會打出當前主機的詳細配置信息,輸出中有Memory Size屬性,指示其當前物理內存大小
4、
# svmon -G
輸出類似下面所示:
size inuse free pin virtual
memory 2031616 1474504 557112 210251 440972
pg space 131072 1555
work pers clnt
pin 210251 0 0
in use 440972 0 1033532
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 1426984 1555 187531 393452
m 64 KB - 2970 0 1420 2970
其中:size表示真實的物理內存的大小,單位是4k.因此當前物理內存大小為4k*2031616=8126464kB
磁盤掛載分區使用情況
AIX
總大小:df -g | grep -v "proc" | grep -v "GB" | awk ‘BEGIN {count=0}; {count+= $2} END {print count}‘
已使用:df -g | grep -v "proc" | grep -v "GB" | awk ‘BEGIN {count=0}; {count+= $3} END {print count}‘
LINUX
總大小:df -B 1g | grep -v "G-blocks" | awk ‘BEGIN {count=0}; {count+= $2} END {print count}‘
已使用:df -B 1g | grep -v "G-blocks" | awk ‘BEGIN {count=0}; {count+= $3} END {print count}‘
可用: df -B 1g | grep -v "G-blocks" | awk ‘BEGIN {count=0}; {count+= $4} END {print count}‘
AIX下查看CPU
AIX操作系統
AIX的硬件信息可以通過prtconf命令看到。
1. 查看邏輯CPU個數
#pmcycles -m
CPU 0 runs at 4204 MHz
CPU 1 runs at 4204 MHz
CPU 2 runs at 4204 MHz
CPU 3 runs at 4204 MHz
CPU 4 runs at 4204 MHz
CPU 5 runs at 4204 MHz
CPU 6 runs at 4204 MHz
CPU 7 runs at 4204 MHz
上面描述有8個CPU,CPU的主頻為4.2G赫茲
2. 查看物理CPU個數
#prtconf|grep Processors
Number Of Processors: 4
3. 確定CPU是幾核
用邏輯CPU除以物理CPU就是核數。
4. 查看單個CPU的詳細信息
#lsattr -E -l proc0
frequency 4204000000 Processor Speed False
smt_enabled true Processor SMT enabled False
smt_threads 2 Processor SMT threads False
state enable Processor state False
type PowerPC_POWER6 Processor type False
Linux操作系統
Linux下的CPU信息全部都在/proc/cpuinfo這個文件中,可以直接打開看。
1. 查看物理CPU的個數
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
2. 查看邏輯CPU的個數
#cat /proc/cpuinfo |grep "processor"|wc -l
3. 查看CPU是幾核
#cat /proc/cpuinfo |grep "cores"|uniq
4. 查看CPU的主頻
#cat /proc/cpuinfo |grep MHz|uniq
Aix下查看內存命令
1、
# lsdev -Cc memory
查看配置的物理內存設備,下面為其輸出示例:
L2cache0 Available L2 Cache
mem0 Available Memory
# lsattr -El mem0
輸出類似如下所示:
goodsize 7936 Amount of usable physical memory in Mbytes False
size 7936 Total amount of physical memory in Mbytes False
此例說明機器的物理內存為5888MB。如果前面lsdev的輸出中有設備名 mem1,則使用同樣的命令查看其對應的大小並依此類推。
2、
# bootinfo -r
8126464
此例說明機器的物理內存為8126464kB。
3、
# prtconf
輸出類似下面所示:
----
----
Memory Size: 7936 MB
----
----
本命令會打出當前主機的詳細配置信息,輸出中有Memory Size屬性,指示其當前物理內存大小
4、
# svmon -G
輸出類似下面所示:
size inuse free pin virtual
memory 2031616 1474504 557112 210251 440972
pg space 131072 1555
work pers clnt
pin 210251 0 0
in use 440972 0 1033532
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 1426984 1555 187531 393452
m 64 KB - 2970 0 1420 2970
其中:size表示真實的物理內存的大小,單位是4k.因此當前物理內存大小為4k*2031616=8126464kB
磁盤掛載分區使用情況
AIX
總大小:df -g | grep -v "proc" | grep -v "GB" | awk ‘BEGIN {count=0}; {count+= $2} END {print count}‘
已使用:df -g | grep -v "proc" | grep -v "GB" | awk ‘BEGIN {count=0}; {count+= $3} END {print count}‘
LINUX
總大小:df -B 1g | grep -v "G-blocks" | awk ‘BEGIN {count=0}; {count+= $2} END {print count}‘
已使用:df -B 1g | grep -v "G-blocks" | awk ‘BEGIN {count=0}; {count+= $3} END {print count}‘
可用: df -B 1g | grep -v "G-blocks" | awk ‘BEGIN {count=0}; {count+= $4} END {print count}‘
AIX查看CPU、內存等信息