centos cpu 썸네일형 리스트형 [centos]cpu memory 점유율 사용률 1. Cpu 사용량 확인하기 1) 확인하기 : top %id가 붙은게 현재 사용가능한 퍼센트 이므로 100 – 99.3 = 0.7 이 현재 사용량이다 2) 사용률 보기 : top -b -n 1 | grep Cpu | awk '{print $5}' | tr -d "%id," | awk '{print 100-$1"%"}' 2. Memory 사용량 확인하기 1) 확인하기 : free –m Mem은 메모리 사용량이고 Swap은 스왑메모리 사용량이다. free –g : 기가단위로 확인 free -m : 메가단위로 확인 free –k : 키로단위로 확인 2) 사용량 확인하기 : free | grep Mem | awk '{print sprintf("%.2f%",$3/$2*100)}' 더보기 [centos]cpu,memory 확인하기 [centos]cpu,memory 확인하기1. cat /proc/meminfo //memory 출력했을때 나오는 memtotal에 나누기 1024를 하면 총 메모리 용량이나온다. 2. cat /proc/cpuinfo //cpu cpu에 대한 정보들이 나오는데 확인해야 할 것은 model name과 cpu cores이다. 더보기 이전 1 다음