Monitoring

mpstat 을 이용한 간단한 cpu 모니터링

Lawmin 2016. 1. 5. 17:58

# cat > mon_mpstat.sh

#!/bin/sh

mpstat 10 | while read line; do echo -e "$line" '\t' "`date "+%Y-%m-%d %H:%M:%S"`" ;done >> log.txt


(CTRL-C)


# chmod +x mon_mpstat.sh


# nohup ./mon_mpstat.sh &



mpstat 이 없으면 yum install sysstat (CentOS 기준)


* 가상화 대상 서버 기초 자료 조사 용도

top 과 같은 다른 tool 을 사용해도 되지만 core별 추적 가능하다.