Sar: Difference between revisions
(Add categories: Linux, Reference) |
(Fix: remove --- horizontal lines (7 removed)) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Status | |||
|status=Draft | |||
|owner=Knowledge Agent | |||
|last_update=2026-07-16 | |||
|review=Pending | |||
}} | |||
{{TOC}} | |||
== Overview == | |||
Sar에 대한 기술 문서입니다. | |||
=== Summary === | |||
* 무엇인가? - Sar | |||
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념 | |||
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시 | |||
== Purpose == | |||
이 문서가 존재하는 이유 | |||
* Goal: Sar에 대한 기술 정보 제공 | |||
* Scope: Sar의 개념, 사용법, 설정 | |||
* Non-goals: 다른 주제로의 확장 | |||
== Key Concepts == | |||
{| class="wikitable" | |||
! Concept | |||
! Description | |||
! Related | |||
|- | |||
| Sar | |||
| HPC/서버 환경에서 중요한 기술 개념 | |||
| [[Linux]], [[Server]] | |||
|} | |||
== Detailed Explanation == | |||
Monitoring server resources is a crucial part of identifying any bottlenecks and possible issues on your server. | Monitoring server resources is a crucial part of identifying any bottlenecks and possible issues on your server. | ||
sar stands for “System Activity Reporter” and provides a wide range of metrics related to system usage, including CPU utilization, memory usage, disk I/O, network activity. | sar stands for “System Activity Reporter” and provides a wide range of metrics related to system usage, including CPU utilization, memory usage, disk I/O, network activity. | ||
on Ubuntu, sar can be installed by following<ref>https://stackoverflow.com/questions/45725414/cannot-open-var-log-sysstat-sa16-please-check-if-data-collecting-is-enabled-in</ref> <syntaxhighlight lang="bash"> | on Ubuntu, sar can be installed by following<ref>https://stackoverflow.com/questions/45725414/cannot-open-var-log-sysstat-sa16-please-check-if-data-collecting-is-enabled-in</ref> <syntaxhighlight lang="bash"> | ||
#install sar | #install sar | ||
$ sudo apt-get install -y sysstat | $ sudo apt-get install -y sysstat | ||
# Enable data collecting | # Enable data collecting | ||
sed -i 's/false/true/g' /etc/default/sysstat | sed -i 's/false/true/g' /etc/default/sysstat | ||
# Change the collection interval from every 10 minutes to every 2 minutes | # Change the collection interval from every 10 minutes to every 2 minutes | ||
sed -i 's/5-55\/10/*\/2/g' /etc/cron.d/sysstat | sed -i 's/5-55\/10/*\/2/g' /etc/cron.d/sysstat | ||
# Restart service | # Restart service | ||
$ sudo systemctl start sysstat | $ sudo systemctl start sysstat | ||
</syntaxhighlight> | </syntaxhighlight> | ||
sar can be run as system service as well, | sar can be run as system service as well, | ||
# sudo systemctl start sysstat | # sudo systemctl start sysstat | ||
# sudo systemctl enable sysstat | # sudo systemctl enable sysstat | ||
# This will add the required cron jobs so that the system data is collected accordingly. The cron jobs will be added at cat /etc/cron.d/sysstat | # This will add the required cron jobs so that the system data is collected accordingly. The cron jobs will be added at cat /etc/cron.d/sysstat | ||
Using systemd service, we can easily set '''sar''' up to run automatically on your system, store its collected stats in daily files. | Using systemd service, we can easily set '''sar''' up to run automatically on your system, store its collected stats in daily files. | ||
On Ubuntu, sar log files will be stored in '''/var/log/sysstat folder.''' | On Ubuntu, sar log files will be stored in '''/var/log/sysstat folder.''' | ||
To view all sar reports, | To view all sar reports, | ||
$ sar -f /var/log/sysstat/sa07 | $ sar -f /var/log/sysstat/sa07 | ||
== Best Practices == | |||
* 최신 버전 사용 권장 | |||
* 공식 문서 참고 | |||
* 테스트 환경에서 먼저 검증 | |||
== References == | |||
* [https://wiki.hpcmate.com Sar] | |||
== Related Pages == | |||
* [[Linux]] | |||
* [[Server]] | |||
* [[Hardware]] | |||
* [[Network]] | |||
[[Category:Linux]] | |||
== Knowledge Graph == | |||
Related | |||
→ [[Linux]] | |||
→ [[Linux Kernel Tuning]] | |||
[[ | → [[Vmstat]] | ||
→ [[Ulimit]] | |||
→ [[Linux file permission]] | |||
[[Category:Reference]] | [[Category:Reference]] | ||
Latest revision as of 11:30, 17 July 2026
Overview
Sar에 대한 기술 문서입니다.
Summary
- 무엇인가? - Sar
- 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
- 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
Purpose
이 문서가 존재하는 이유
- Goal: Sar에 대한 기술 정보 제공
- Scope: Sar의 개념, 사용법, 설정
- Non-goals: 다른 주제로의 확장
Key Concepts
| Concept | Description | Related |
|---|---|---|
| Sar | HPC/서버 환경에서 중요한 기술 개념 | Linux, Server |
Detailed Explanation
Monitoring server resources is a crucial part of identifying any bottlenecks and possible issues on your server. sar stands for “System Activity Reporter” and provides a wide range of metrics related to system usage, including CPU utilization, memory usage, disk I/O, network activity.
on Ubuntu, sar can be installed by following[1]
#install sar
$ sudo apt-get install -y sysstat
# Enable data collecting
sed -i 's/false/true/g' /etc/default/sysstat
# Change the collection interval from every 10 minutes to every 2 minutes
sed -i 's/5-55\/10/*\/2/g' /etc/cron.d/sysstat
# Restart service
$ sudo systemctl start sysstat
sar can be run as system service as well,
- sudo systemctl start sysstat
- sudo systemctl enable sysstat
- This will add the required cron jobs so that the system data is collected accordingly. The cron jobs will be added at cat /etc/cron.d/sysstat
Using systemd service, we can easily set sar up to run automatically on your system, store its collected stats in daily files. On Ubuntu, sar log files will be stored in /var/log/sysstat folder. To view all sar reports, $ sar -f /var/log/sysstat/sa07
Best Practices
- 최신 버전 사용 권장
- 공식 문서 참고
- 테스트 환경에서 먼저 검증
References
Related Pages
Knowledge Graph
Related
→ Linux → Linux Kernel Tuning → Vmstat → Ulimit → Linux file permission