문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
os:system:usage:cpu:proc_stat [2009/02/15 00:55] starlits |
os:system:usage:cpu:proc_stat [2009/02/15 03:21] (현재) starlits |
||
---|---|---|---|
줄 11: | 줄 11: | ||
==== cpu ==== | ==== cpu ==== | ||
+ | === 그림 중에 CPU 항목만 정리해보자 === | ||
^ CPU ^ user ^ nice ^ system ^ idle ^ iowait ^ irq ^ softirq ^ | ^ CPU ^ user ^ nice ^ system ^ idle ^ iowait ^ irq ^ softirq ^ | ||
- | | cpu | 7357238 | + | | cpu |
- | | cpu0 | 2885881 | + | | cpu0 | 2887366 |
- | | cpu1 | 2165476 | + | | cpu1 | 2165862 |
- | | cpu2 | 1289125 | + | | cpu2 | 1289202 |
- | | cpu3 | 1016754 | + | | cpu3 | 1016902 |
- | ^ cpu | cpu number, 맨처음의 cpu는 모든 CPU 정보를 나타낸것이다 | | + | |
+ | === 각 필드의 정의 === | ||
+ | |||
+ | ^ cpu | cpu number, 맨처음의 cpu는 모든 CPU 정보를 나타내는 | ||
^ user | normal processes executing in user mode | | ^ user | normal processes executing in user mode | | ||
- | ^ nice | niced processes executing in user mode | | + | ^ nice | niced(=low priority) |
^ system | ^ system | ||
^ idle | twiddling thumbs | | ^ idle | twiddling thumbs | | ||
줄 27: | 줄 31: | ||
^ irq | servicing interrupts | | ^ irq | servicing interrupts | | ||
^ softirq | servicing softirqs | | ^ softirq | servicing softirqs | | ||
+ | |||
+ | == CPU 사용률 계산방법 === | ||
+ | - CPU 사용률은 사용중은 | ||
+ | ( (idle jiffies) / (user jiffies + nice jiffies + system jiffies + idle jiffies) ) * 100 | ||
+ | </ | ||
+ | - 이와 같은 방법을 통해 일정시간(sec) 소비된 jiffies 구해야 한다. (이전 jiffies 값도 알고 있어야 한다.) | ||
+ | |||
+ | |||
+ | |||
==== intr ==== | ==== intr ==== | ||
줄 50: | 줄 63: | ||
+ | ===== 관련문서 ===== | ||
+ | - http:// |