"리눅스 CPU 개수 확인"의 두 판 사이의 차이

 
(사용자 4명의 중간 판 38개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
;리눅스 CPU 개수 확인하기
;리눅스 CPU 개수 확인하기
;리눅스 CPU 코어 수 확인하기
;리눅스 CPU 코어 수 확인하기


==개요==
<syntaxhighlight lang='console'>
*CPU core 수를 셀 수 있다.
$ nproc
*다만 인텔 하이퍼스레딩의 경우, OS(윈도우, 리눅스 등)에서 코어 수가 실제 코어 수의 2배로 인식된다.
4
*예를 들어 싱글코어는 코어 2개로, 듀얼코어는 4개로 인식된다.
</syntaxhighlight>
 
<syntaxhighlight lang='console'>
==가상 CPU 코어 수==
$ grep -c '^processor' /proc/cpuinfo
<source lang='bash'>
4
grep -c processor /proc/cpuinfo
</syntaxhighlight>
</source>
<syntaxhighlight lang='console'>
<source lang='dos'>
$ lscpu | grep '^CPU(s):'
[root@jmnote ~]# grep -c processor /proc/cpuinfo
CPU(s):                            4
48
</syntaxhighlight>
</source>
→ 가상 CPU 코어 수는 16. 물리적으로는 8 코어.


==물리 CPU 코어 수==
==같이 보기==
;명령어
{{z컬럼3|
<source lang='bash'>
* [[lscpu]]
grep -c "physical id" /proc/cpuinfo
* [[nproc]]
</source>
* [[멀티 코어]]
 
* [[dmidecode]]
;예시
* [[/proc/cpuinfo]]
<source lang='dos'>
* [[/proc/interrupts]]
[root@jmnote ~]# grep -c processor /proc/cpuinfo
* [[리눅스 메모리 크기 확인]]
64
* [[리눅스 하이퍼스레딩 확인]]
</source>
* [[리눅스 CPU 속도 확인하기]]
→ 물리 코어수가 64.
* [[Xen host CPU수, 소켓수 확인]]
 
* [[윈도우 CPU 코어 수 확인]]
==물리 CPU 수==
}}
;명령어
<source lang='bash'>
grep "physical id" /proc/cpuinfo | tail -1
</source>
 
;실행예시
<source lang='dos'>
[root@pt1dbw01 ~]# grep "physical id" /proc/cpuinfo | tail -1
physical id : 3
</source>
:→ 3이 나왔지만, physical id는 0부터 시작하므로 0, 1, 2, 3. 물리 CPU는 4개.


==같이 보기==
==참고==
*[[리눅스 CPU 속도 확인하기]]


[[분류:리눅스]]
[[분류:리눅스]]

2024년 7월 29일 (월) 01:06 기준 최신판

1 개요[ | ]

리눅스 CPU 개수 확인하기
리눅스 CPU 코어 수 확인하기
$ nproc
4
$ grep -c '^processor' /proc/cpuinfo
4
$ lscpu | grep '^CPU(s):'
CPU(s):                             4

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}