it:linux:sar
Beispiele für Performance Messung mit sar
Vorausssetzung für SAR Performace Messung installierte packet sysstat
sudo apt-get install sysstat (or) yum install sysstat (or) rpm -ivh sysstat-10.0.0-1.i586.rpm
Cron Eintrag:
vi /etc/cron.d/sysstat # Run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib64/sa/sa1 1 1 # 0 * * * * root /usr/lib64/sa/sa1 600 6 & # Generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib64/sa/sa2 -A
1. CPU Usage of ALL CPUs (sar -u)
sar -u 1
2. CPU Usage of Individual CPU or Core (sar -P)
sar -P ALL 1
3. Memory Free and Used (sar -r)
sar -r 1
4. Swap Space Used (sar -S)
sar -S 1
5. Overall I/O Activities (sar -b)
sar -b 1
6. Individual Block Device I/O Activities (sar -d)
sar -d 1
7. Display context switch per second (sar -w)
sar -w 1
8. Reports run queue and load average (sar -q)
sar -q 1
9. Report network statistics (sar -n)
sar -n DEV 1 sar -n KEYWORD DEV – Displays network devices vital statistics for eth0, eth1, etc., EDEV – Display network device failure statistics NFS – Displays NFS client activities NFSD – Displays NFS server activities SOCK – Displays sockets in use for IPv4 IP – Displays IPv4 network traffic EIP – Displays IPv4 network errors ICMP – Displays ICMPv4 network traffic EICMP – Displays ICMPv4 network errors TCP – Displays TCPv4 network traffic ETCP – Displays TCPv4 network errors UDP – Displays UDPv4 network traffic SOCK6, IP6, EIP6, ICMP6, UDP6 are for IPv6 ALL – This displays all of the above information. The output will be very long.
10. Report Sar Data Using Start Time (sar -s)
sar -q -f /var/log/sa/sa23 -s 10:00:01 sar -q -f /var/log/sa/sa23 -s 10:00:01 | head -n 10 sar -r -f /var/log/sa/sa07 -s 03:00:01 -e 05:00:01
~~UP~~
it/linux/sar.txt · Zuletzt geändert: 2019/05/14 21:16 von 127.0.0.1