PowerEdge:如何使用系統活動報告「sar」檢視 SUSE Linux Enterprise Server (SLES) 上的效能資訊
Summary: 如何使用系統活動報告 (SAR) 來檢視 SUSE Linux Enterprise Server (SLES) 的效能資訊
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
文章摘要:本文提供如何使用系統活動報告的資訊。sar」,來檢視 SUSE Linux Enterprise Server (SLES) 的效能資訊。
目錄:
1.安裝
- 請確定您已以「root」身分登入
- '
sar' 是 ' 的一部分sysstat' 包# yast2 -i sysstat
- 為 cron 工作建立符號連結:
# ln -s /etc/sysstat/sysstat.cron /etc/cron.d/sysstat.cron
- 重新啟動 cron 服務:
# rccron restart
2.設定記錄:
- 編輯
'/etc/sysstat/sysstat' 與您最喜歡的編輯器 - 找到以「HISTORY=」開頭的行
- 該值表示保留紀錄檔的天數
- 默認值為 60 天,您可以根據需要進行更改
- 記錄檔儲存在 '
/var/log/sa' 目錄
3.“sar”命令的用法
注意:執行 cron 工作至少需要 10 分鐘才能收集資料,才能使用此命令。
- 顯示目前日期的:
- CPU 統計資料
# sar- 若要指定 CPU,例如 CPU 3:
# sar -P 3
- 佇列長度和平均統計資訊:
# sar -q
- RAM統計資料:
# sar -r# sar -R
- 網路統計資料:
# sar -n NAME
- 替
NAME具有以下其中一項:ALL – This displays all of the above informationDEV – Displays network devices vital statisticsEDEV – Display network device failure statisticsEICMP – Displays ICMPv4 network errorsEIP – Displays IPv4 network errorsEIP6 – Displays IPv6 network errorsETCP – Displays TCPv4 network errorsICMP – Displays ICMPv4 network trafficICMP6 – Displays ICMPv6 network trafficIP – Displays IPv4 network trafficIP6 – Displays IPv6 network trafficNFS – Displays NFS client activitiesNFSD – Displays NFS server activitiesSOCK – Displays sockets in use for IPv4SOCK6 – Displays sockets in use for IPv6TCP – Displays TCPv4 network trafficUDP – Displays UDPv4 network trafficUDP6 - Displays UDPv6 network traffic
- 交換空間使用率:
# sar -S
- 磁碟統計資料:
# sar -b
- 分頁統計:
# sar -B
- 區塊裝置統計資料:
# sar -d
- 索引節點統計資料:
# sar -v
- 交換統計:
# sar -W# sar -w
- 系統切換統計資料:
- 還可以透過新增間隔和整數參數來顯示即時資訊:
- 範例:每五秒顯示一次CPU統計資料,共十次
# sar 5 10
- 默認情況下,「sar」命令顯示當天的統計資訊,但您可以使用開關 -s 表示開始,-e 表示結束來更改它
- 範例:
# sar -s 12:00:00 -e 16:00:00 - 這會顯示今天中午到下午 4 點之間的 CPU 統計資料
Additional Information
在「企業操作系統」論壇上詢問社區。
Affected Products
SUSE Linux Enterprise Server 11, SUSE Linux Enterprise Server 12, SUSE Linux Enterprise Server 15Products
PowerEdge XR2, PowerEdge C6420, PowerEdge C6520, PowerEdge C6525, PowerEdge C6615, PowerEdge C6620, PowerEdge FC640, PowerEdge M640, PowerEdge M640 (for PE VRTX), PowerEdge MX740C, PowerEdge MX750c, PowerEdge MX760c, PowerEdge MX840C, PowerEdge R240
, PowerEdge R250, PowerEdge R260, PowerEdge R340, PowerEdge R350, PowerEdge R360, PowerEdge R440, PowerEdge R450, PowerEdge R540, PowerEdge R550, PowerEdge R640, PowerEdge R6415, PowerEdge R650, PowerEdge R650xs, PowerEdge R6515, PowerEdge R6525, PowerEdge R660, PowerEdge R660xs, PowerEdge R6615, PowerEdge R6625, PowerEdge R740, PowerEdge R740XD, PowerEdge R740XD2, PowerEdge R7415, PowerEdge R7425, PowerEdge R750, PowerEdge R750XA, PowerEdge R750xs, PowerEdge R7515, PowerEdge R7525, PowerEdge R760, PowerEdge R760XA, PowerEdge R760xd2, PowerEdge R760xs, PowerEdge R7615, PowerEdge R7625, PowerEdge R840, PowerEdge R860, PowerEdge R940, PowerEdge R940xa, PowerEdge R960, PowerEdge T140, PowerEdge T150, PowerEdge T160, PowerEdge T340, PowerEdge T350, PowerEdge T360, PowerEdge T440, PowerEdge T550, PowerEdge T560, PowerEdge T640, PowerEdge XE2420, PowerEdge XE7420, PowerEdge XE7440, PowerEdge XE8545, PowerEdge XE8640, PowerEdge XE9640, PowerEdge XE9680, PowerEdge XR11, PowerEdge XR12, PowerEdge XR4510c, PowerEdge XR4520c
...
Article Properties
Article Number: 000137717
Article Type: How To
Last Modified: 10 Dec 2024
Version: 6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.