The interrupt rate can be measured using the 'sar' tool, like:
"sar -I <interrupt_number> 1"
# sar --help
Usage: sar [ options ] [ <interval> [ <count> ] ]
Options are:
[ -A ] [ -B ] [ -b ] [ -C ] [ -d ] [ -F ] [ -H ] [ -h ] [ -p ] [ -q ] [ -R ]
[ -r ] [ -S ] [ -t ] [ -u [ ALL ] ] [ -V ] [ -v ] [ -W ] [ -w ] [ -y ]
[ -I { <int> [,...] | SUM | ALL | XALL } ] [ -P { <cpu> [,...] | ALL } ]
[ -m { <keyword> [,...] | ALL } ] [ -n { <keyword> [,...] | ALL } ]
[ -j { ID | LABEL | PATH | UUID | ... } ]
[ -f [ <filename> ] | -o [ <filename> ] | -[0-9]+ ]
[ -i <interval> ] [ -s [ <hh:mm:ss> ] ] [ -e [ <hh:mm:ss> ] ]
# cat /proc/interrupts
root@OpenWrt:/proc# sar -I 68 -I 90 1
Linux 3.14.0 (OpenWrt) 01/07/15 _armv7l_ (2 CPU)
18:10:08 INTR intr/s
18:10:09 68 992.00
18:10:09 90 0.00
18:10:09 INTR intr/s
18:10:10 68 1026.00
18:10:10 90 0.00
root@OpenWrt:/proc# sar -I 68 1
Linux 3.14.0 (OpenWrt) 01/07/15 _armv7l_ (2 CPU)
18:01:59 INTR intr/s
18:02:00 68 2111.00
18:02:01 68 1657.00
18:02:02 68 1213.00
18:02:03 68 819.00
18:02:04 68 747.00
18:02:05 68 836.00
18:02:06 68 678.00
18:02:07 68 708.00
18:02:08 68 1346.00
18:02:09 68 768.00
18:02:10 68 613.00
18:02:11 68 1399.00
^C
18:02:11 68 993.55
Average: 68 1072.54
root@OpenWrt:/proc# sar -I SUM 68
Linux 3.14.0 (OpenWrt) 01/07/15 _armv7l_ (2 CPU)
^C
18:18:02 INTR intr/s
18:18:03 sum 1721.82
Average: sum 1721.82
============= net socket profile =======================
sar -n DEV 2 2
Network statistics
$ sar -n IP 2 2
$ sar -n TCP 2 2
$ sar -n SOCK 2 2
================================================
root@OpenWrt:/# mpstat -P ALL 1 5
Linux 3.14.77 (OpenWrt) 10/18/18 _armv7l_ (4 CPU)
04:08:09 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
04:08:10 all 2.32 0.00 0.26 0.00 0.26 2.58 0.00 0.00 0.00 94.59
04:08:10 0 5.10 0.00 1.02 0.00 1.02 9.18 0.00 0.00 0.00 83.67
04:08:10 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
04:08:10 2 2.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 97.94
04:08:10 3 2.13 0.00 0.00 0.00 0.00 1.06 0.00 0.00 0.00 96.81
================================================
Linux 3.14.77 (OpenWrt) 10/18/18 _armv7l_ (4 CPU)
04:08:23 CPU %user %nice %system %iowait %steal %idle
04:08:24 all 1.77 0.00 2.78 0.00 0.00 95.45
04:08:24 0 3.03 0.00 10.10 0.00 0.00 86.87
04:08:24 1 0.00 0.00 1.02 0.00 0.00 98.98
04:08:24 2 1.01 0.00 0.00 0.00 0.00 98.99
04:08:24 3 3.00 0.00 0.00 0.00 0.00 97.00
No comments:
Post a Comment