Difference between revisions of "Sar -d"
Jump to navigation
Jump to search
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{lowercase}} |
+ | *<code>[[sar]] -d</code> To report disk ([[block]] devices) activity. See also <code>[[iostat -x]]</code>. | ||
+ | |||
+ | * <code>[[sar]] -d</code> | ||
+ | * <code>sar -d --human</code> | ||
+ | * <code>sar -d --human | egrep "util|dev253-4"</code> | ||
+ | |||
+ | <pre> | ||
+ | sar -d | ||
+ | 02:45:01 PM DEV tps rkB/s wkB/s areq-sz aqu-sz await svctm %util | ||
+ | 02:46:01 PM dev7-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | ||
+ | 02:46:01 PM dev7-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | ||
+ | 02:46:01 PM dev7-2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | ||
+ | </pre> | ||
+ | |||
+ | '''svctm''' The average service time (in milliseconds) for I/O requests that were issued to the device. Warning! '''Do not trust this field any more'''. This field will be removed in a future sysstat version | ||
+ | |||
+ | |||
+ | |||
+ | sar | ||
+ | 01:12:01 PM CPU %user %nice %system %iowait %[[steal]] %idle | ||
+ | 01:13:01 PM all 2.99 0.00 6.58 7.13 0.00 83.30 | ||
+ | 01:14:01 PM all 5.39 0.00 2.30 6.70 0.00 85.61 | ||
+ | 01:15:01 PM all 4.80 0.00 0.96 8.91 0.00 85.33 | ||
+ | 01:16:01 PM all 4.65 0.00 0.64 6.19 0.00 88.52 | ||
+ | |||
+ | <code>%iowait</code> column from <code>sar</code> command also provide information about disk I/O requests. | ||
+ | |||
+ | == Activities == | ||
+ | # Review read, write and load of block devices using <code>sar</code> and <code>[[awk]]</code> | ||
+ | :: wkB/s > 90.000 | ||
+ | :::<code>DEVICE="dev253"; for i in `ls -1 /var/log/sysstat/sa??`; do echo $i; sar -f $i -d | awk '$6>90000' | grep $DEVICE | grep -v "^0" ; done</code> | ||
+ | :: rkB/s > 90.000 | ||
+ | :::<code>DEVICE="dev253"; for i in `ls -1 /var/log/sysstat/sa??`; do echo $i; sar -f $i -d | awk '$5>90000' | grep $DEVICE | grep -v "^0" ; done</code> | ||
+ | :: %util > 95% | ||
+ | :::<code>DEVICE="dev253"; for i in `ls -1 /var/log/sysstat/sa??`; do echo $i; sar -f $i -d | awk '$NF>95' | grep $DEVICE | grep -v "^0" ; done</code> | ||
+ | |||
+ | |||
+ | == Related commands == | ||
+ | * <code>[[sar -F]]</code> [[filesystem]] [[disk space usage]] | ||
+ | * <code>[[sar -b]]</code> | ||
+ | * [[Device mapper]]: <code>ls -lrt [[/dev/mapper/]]</code> | ||
+ | * [[iostat]] | ||
+ | * [[/etc/sysstat/sysstat]] | ||
== See also == | == See also == | ||
− | {{io performance commands}} | + | * {{sysstat}} |
+ | * {{io performance commands}} | ||
+ | * {{sar}} | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Linux commands]] | [[Category:Linux commands]] |
Latest revision as of 12:18, 29 November 2023
sar -d
sar -d --human
sar -d --human | egrep "util|dev253-4"
sar -d 02:45:01 PM DEV tps rkB/s wkB/s areq-sz aqu-sz await svctm %util 02:46:01 PM dev7-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 02:46:01 PM dev7-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 02:46:01 PM dev7-2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
svctm The average service time (in milliseconds) for I/O requests that were issued to the device. Warning! Do not trust this field any more. This field will be removed in a future sysstat version
sar 01:12:01 PM CPU %user %nice %system %iowait %steal %idle 01:13:01 PM all 2.99 0.00 6.58 7.13 0.00 83.30 01:14:01 PM all 5.39 0.00 2.30 6.70 0.00 85.61 01:15:01 PM all 4.80 0.00 0.96 8.91 0.00 85.33 01:16:01 PM all 4.65 0.00 0.64 6.19 0.00 88.52
%iowait
column from sar
command also provide information about disk I/O requests.
Activities[edit]
- Review read, write and load of block devices using
sar
andawk
- wkB/s > 90.000
DEVICE="dev253"; for i in `ls -1 /var/log/sysstat/sa??`; do echo $i; sar -f $i -d | awk '$6>90000' | grep $DEVICE | grep -v "^0" ; done
- rkB/s > 90.000
DEVICE="dev253"; for i in `ls -1 /var/log/sysstat/sa??`; do echo $i; sar -f $i -d | awk '$5>90000' | grep $DEVICE | grep -v "^0" ; done
- %util > 95%
DEVICE="dev253"; for i in `ls -1 /var/log/sysstat/sa??`; do echo $i; sar -f $i -d | awk '$NF>95' | grep $DEVICE | grep -v "^0" ; done
- wkB/s > 90.000
Related commands[edit]
sar -F
filesystem disk space usagesar -b
- Device mapper:
ls -lrt /dev/mapper/
- iostat
- /etc/sysstat/sysstat
See also[edit]
- Performance: sysstat,
sar
,sadc
,debian-sa1
,sa1, sa2
,iostat
,nfsiostat
mpstat
,changelog
,/usr/lib/sysstat/sadc
,/etc/sysstat/sysstat
,pidstat, irqstat
- IO performance:
iotop, iostat, sar -d, fio, nmon, vmstat -d
,dd
,nmon
,stress
sar
, installation, sar -A,sar -F, sar -d
,sar -I ALL
,sar -n NFS
,sar -r
,sar -S
,sar -W
,sar -n ALL
, Installing sysstat using Ansible,/etc/sysstat/sysstat
,/etc/cron.d/sysstat
,sar --help
, Sysstat changelog,/var/log/sysstat/
,cpu time steal
, sargraph, isag, Telegraf
Advertising: