리눅스 sar

system activity monitor; sar
리눅스 sar, 시스템 활동 모니터
/usr/bin/sar

1 CPU 사용률 (오늘)[편집]

sar
[root@zetawiki ~]# sar
Linux 2.6.32.59-0.7-xen (jmnote) 	10/24/12 	_x86_64_

00:00:01        CPU     %user     %nice   %system   %iowait    %steal     %idle
00:10:01        all     20.63      0.00     11.65      2.17      0.08     65.46
00:20:01        all      9.32      0.00      4.34      1.99      0.05     84.30
00:30:01        all     11.32      0.00      6.61      1.17      0.13     80.77
... (생략)
Average:        all     10.28      0.00      6.03      2.03      0.12     81.53
→ 00시부터 현재까지 10분마다 CPU 사용률 측정한 기록을 보여준다.[1]

2 CPU 사용률 (날짜별)[편집]

sar -f /var/log/sa/sa날짜
[root@zetawiki ~]# sar -f /var/log/sa/sa15
Linux 2.6.32.24-0.2-xen (jmnote) 	01/15/13 	_x86_64_

00:00:01        CPU     %user     %nice   %system   %iowait    %steal     %idle
00:10:01        all      0.20      0.00      0.13      0.14      0.02     99.51
00:20:01        all      0.18      0.00      0.10      0.09      0.02     99.61
00:30:01        all      0.20      0.00      0.11      0.08      0.02     99.59
... (생략)
23:50:01        all      0.03      0.00      0.03      0.02      0.00     99.92
Average:        all      0.03      0.00      0.04      0.64      0.00     99.29
→ 15일의 시간대별 CPU사용률

3 메모리 사용률 (오늘)[편집]

sar -r
[root@zetawiki ~]# sar -r
Linux 2.6.32-431.17.1.el6.x86_64 (jmnote) 	12/16/2014 	_x86_64_	(8 CPU)

12:00:01 AM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
12:10:01 AM     98368   1823252     94.88    139736   1106924    865680     14.31
12:20:01 AM     88392   1833228     95.40    139980   1109164    872664     14.42
... (생략)
07:30:01 AM     94708   1826912     95.07    162720   1083324    836068     13.82
07:40:01 AM     88120   1833500     95.41    162916   1085992    840896     13.90
Average:        84828   1818782     94.65    154463   1100276    830238     13.72

4 메모리 사용률 (날짜별)[편집]

sar -r -f /var/log/sa/sa날짜
[root@zetawiki ~]# sar -r -f /var/log/sa/sa14
Linux 2.6.32-431.17.1.el6.x86_64 (jmnote) 	12/14/2014 	_x86_64_	(8 CPU)

12:00:01 AM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
12:10:01 AM     75956   1845664     96.05    111232   1186356    821400     13.58
12:20:01 AM     88780   1832840     95.38    111636   1173244    820888     13.57
... (생략)
11:40:01 PM    244440   1677180     87.28    140936    995520    818468     13.53
11:50:01 PM    240612   1681008     87.48    141240    998560    815016     13.47
Average:       136637   1784983     92.89    130622   1085960    838863     13.86

5 로드 에버리지[편집]

[root@zetawiki ~]# sar -q
Linux 2.6.32-431.17.1.el6.x86_64 (jmnote) 	02/10/2015 	_x86_64_	(8 CPU)

12:00:01 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
12:10:01 AM         0       208      0.38      0.27      0.15
12:20:01 AM         0       208      0.10      0.19      0.17
... (생략)
11:30:01 AM         0       208      0.14      0.26      0.26
11:40:01 AM         0       206      0.67      0.36      0.29
Average:            0       204      0.24      0.22      0.19

6 같이 보기[편집]

7 주석[편집]

  1. 10분간 데이터를 요약한 것이 아니라 해당시점에 1번 측정한 결과임

8 참고[편집]

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