{"id":4027,"date":"2016-08-13T13:27:14","date_gmt":"2016-08-13T12:27:14","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=4027"},"modified":"2023-10-28T21:59:53","modified_gmt":"2023-10-28T20:59:53","slug":"linux-performance-tools-list-check-utilisation-saturation-errors","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/linux-performance-tools-list-check-utilisation-saturation-errors\/","title":{"rendered":"Linux Performance Tools List Check Utilisation, Saturation, Errors (USE)"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_4027\" class=\"pvc_stats all  \" data-element-id=\"4027\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>This is a partial list of tools from Brendan's presentations, book and elsewhere it's up to you to learn how to use them, when and why. Many can show rolling O\/P by a 1 sec addition eg <span style=\"color: #0000ff;\">mpstat 1<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-get install sysstat\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;\">apt-cache show sysstat<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Description-en: system performance tools for Linux<\/span><br \/>\n<span style=\"color: #ff0000;\"> The sysstat package contains the following system performance tools:<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>sar<\/strong>: collects and reports system activity information;<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>iostat<\/strong>: reports CPU utilization and disk I\/O statistics;<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>mpstat<\/strong>: reports global and per-processor statistics;<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>pidstat<\/strong>: reports statistics for Linux tasks (processes);<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>sadf<\/strong>: displays data collected by sar in various formats;<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>nfsiostat<\/strong>: reports I\/O statistics for network filesystems;<\/span><br \/>\n<span style=\"color: #ff0000;\"> - <strong>cifsiostat<\/strong>: reports I\/O statistics for CIFS filesystems.<\/span><br \/>\n<span style=\"color: #ff0000;\"> .<\/span><br \/>\n<span style=\"color: #ff0000;\"> The statistics reported by sar deal with I\/O transfer rates,<\/span><br \/>\n<span style=\"color: #ff0000;\"> paging activity, process-related activities, interrupts,<\/span><br \/>\n<span style=\"color: #ff0000;\"> network activity, memory and swap space utilization, CPU<\/span><br \/>\n<span style=\"color: #ff0000;\"> utilization, kernel activities and TTY statistics, among<\/span><br \/>\n<span style=\"color: #ff0000;\"> others. Both UP and SMP machines are fully supported.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">uptime\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">11:07:33 up 1:33, 3 users, load average: 0.46, 0.59, 0.69<span style=\"color: #ffffff;\">\u00a0(1min, 5 min, 15 min)<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">perl -e 'while(1) {`uptime` =~ \/average: ([\\d.]+)\/; printf(\"% 5s %s\\n\", $1, \"#\" x ($1 * 10)); sleep 3 }'<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/perlloadavg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4530\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/perlloadavg.png\" alt=\"perlloadavg.png\" width=\"1042\" height=\"199\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">nmon<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/nmon.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4532\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/nmon.png\" alt=\"nmon.png\" width=\"658\" height=\"522\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">bmon<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/bmon.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4537\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/bmon.png\" alt=\"bmon.png\" width=\"706\" height=\"658\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">free<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/free.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4386\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/free.png\" alt=\"free.png\" width=\"634\" height=\"131\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">sudo atop<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/atop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4028\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/atop-1024x576.png\" alt=\"atop.png\" width=\"590\" height=\"332\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">top\/htop<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/htop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4050\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/htop-1024x576.png\" alt=\"htop.png\" width=\"590\" height=\"332\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">ps u | head<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/ps.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4072\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/ps.png\" alt=\"ps.png\" width=\"626\" height=\"154\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">netstat -s | head<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/netstat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4051\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/netstat.png\" alt=\"netstat.png\" width=\"779\" height=\"1604\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">sudo iotop<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/iotop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4053\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/iotop.png\" alt=\"iotop.png\" width=\"644\" height=\"714\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">dstat <\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/dstat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4054\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/dstat.png\" alt=\"dstat.png\" width=\"773\" height=\"477\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">vmstat\u00a0<span style=\"color: #ffffff;\">(-sm)<\/span><\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/vmstat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4055\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/vmstat.png\" alt=\"vmstat.png\" width=\"652\" height=\"68\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">slabtop<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/slabtop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4384\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/slabtop.png\" alt=\"slabtop.png\" width=\"650\" height=\"454\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">iostat<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/iostat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4056\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/iostat.png\" alt=\"iostat.png\" width=\"757\" height=\"186\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">man strace <strong><span style=\"color: #ffffff;\">(USE WITH KNOWLEDGE AND CAUTION)<\/span><\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\">DESCRIPTION<\/span><\/p>\n<p><span style=\"color: #ff0000;\"> In the simplest case strace runs the specified command until it exits. It intercepts and records the system calls which are called by a process and the\u00a0<\/span><span style=\"color: #ff0000;\">signals which are received by a process. The name of each system call, its arguments and its return value are printed on standard error or to the file\u00a0<\/span><span style=\"color: #ff0000;\">specified with the -o option.<\/span><\/p>\n<p><span style=\"color: #ff0000;\"> strace is a useful diagnostic, instructional, and debugging tool. System administrators, diagnosticians and trouble-shooters will find it invaluable for\u00a0<\/span><span style=\"color: #ff0000;\">solving problems with programs for which the source is not readily available since they do not need to be recompiled in order to trace them. Students,\u00a0<\/span><span style=\"line-height: 1.5; color: #ff0000;\">hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs.<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/strace.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4058\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/strace-1024x242.png\" alt=\"strace.png\" width=\"717\" height=\"169\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">sudo mpstat -P 0,1,2,3<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/mpstat0123.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4059\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/mpstat0123.png\" alt=\"mpstat0123.png\" width=\"773\" height=\"136\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">nicstat<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/nicstat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4064\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/nicstat.png\" alt=\"nicstat.png\" width=\"638\" height=\"71\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">pidstat | head<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/pidstat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4065\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/pidstat.png\" alt=\"pidstat.png\" width=\"789\" height=\"234\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">sudo lsof | head<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/lsof.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4066\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/lsof-1024x216.png\" alt=\"lsof.png\" width=\"833\" height=\"175\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">ss -a | head<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/ss.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4067\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/ss.png\" alt=\"ss.png\" width=\"807\" height=\"222\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">ethtool -i eth0<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/ethtool.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4068\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/ethtool.png\" alt=\"ethtool.png\" width=\"730\" height=\"1338\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">sudo sar <span style=\"color: #ffffff;\">(-BHRrSsw)<\/span><\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sar.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4060\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sar.png\" alt=\"sar.png\" width=\"709\" height=\"624\" \/><\/a><\/p>\n<p>If you run sar, then a nice addition is sadf as it formats sar data for other use - DB, csv etc. For example, it can show 6 cpu utilizations for each 4 cores which can be grepped nicely for an easy summary:<\/p>\n<p><span style=\"color: #0000ff;\">sadf -p -P 0,1,2,3 | head -24<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sadf24.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4115 \" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sadf24.png\" alt=\"sadf24.png\" width=\"773\" height=\"667\" \/><\/a><\/p>\n<p>Each usage type can be grepped quickly showing 10 min separations for a clear timeline of usage e.g:<\/p>\n<p><span style=\"color: #0000ff;\">sadf -p -P 0,1,2,3 | grep user<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sadfuser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4116\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sadfuser.png\" alt=\"sadfuser.png\" width=\"789\" height=\"1147\" \/><\/a><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sadfsystem.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4117\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/sadfsystem.png\" alt=\"sadfsystem.png\" width=\"833\" height=\"1211\" \/><\/a>These columns could be stripped and graphed quite easily via awk \/ gnuplot etc e.g:<\/p>\n<p><span style=\"color: #0000ff;\">sadf -p -P 0,1,2,3 | grep user | grep cpu0 | awk '{print $3,$4,$7}' &gt; data1.dat<\/span><\/p>\n<p><span style=\"color: #ff0000;\">2016-08-17 11:55:01 10.28<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 12:05:01 5.27<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 12:15:01 17.73<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 12:25:01 13.63<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 12:35:01 4.38<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 12:45:01 7.67<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 12:55:01 8.40<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 13:05:01 11.02<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 13:15:01 13.57<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 13:25:01 10.07<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 13:35:01 5.68<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 13:45:01 3.20<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 13:55:01 4.32<\/span><br \/>\n<span style=\"color: #ff0000;\">2016-08-17 14:05:01 2.40<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/userCPU.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4142\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/userCPU.png\" alt=\"userCPU.png\" width=\"887\" height=\"665\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">cifsiostat<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/cifsiostat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4074\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/cifsiostat.png\" alt=\"cifsiostat.png\" width=\"728\" height=\"74\" \/><\/a><\/p>\n<p>Hard drive cached reads:\u00a0<span style=\"color: #0000ff;\">sudo hdparm -T \/dev\/sd*<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/hdparmTreads.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4487\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/hdparmTreads.png\" alt=\"hdparmTreads.png\" width=\"666\" height=\"267\" \/><\/a><\/p>\n<p>stevee@Dell490 ~ $<span style=\"color: #0000ff;\"> sudo hdparm -t \/dev\/sd*<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sda:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 316 MB in 3.02 seconds = 104.77 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sda1:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 100 MB in 0.96 seconds = 104.44 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sda2:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 312 MB in 3.00 seconds = 103.97 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sda3:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 290 MB in 3.01 seconds = 96.24 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sdb:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 222 MB in 3.01 seconds = 73.76 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sdb1:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 222 MB in 3.01 seconds = 73.64 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sdb2:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: read(2097152) returned 1024 bytes<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/sdb5:<\/span><br \/>\n<span style=\"color: #ff0000;\"> Timing buffered disk reads: 114 MB in 3.04 seconds = 37.45 MB\/sec<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><span style=\"color: #0000ff;\">blkiomon<\/span> EXAMPLES<\/span><br \/>\n<span style=\"color: #ff0000;\"> To get I\/O statistics for \/dev\/sdw every 10 seconds for a period of one<\/span><br \/>\n<span style=\"color: #ff0000;\"> hour, use the following command:<\/span><\/p>\n<p><span style=\"color: #ff0000;\">% blktrace \/dev\/sdw -a issue -a complete -w 3600 -o - | blkiomon -I<\/span><br \/>\n<span style=\"color: #ff0000;\"> 10 -h -<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo blktrace \/dev\/sda -a issue -a complete -w 20 -o iofile.txt <\/span><br \/>\n<span style=\"color: #0000ff;\">=== sda ===<\/span><br \/>\n<span style=\"color: #0000ff;\"> CPU 0: 0 events, 0 KiB data<\/span><br \/>\n<span style=\"color: #0000ff;\"> CPU 1: 1 events, 1 KiB data<\/span><br \/>\n<span style=\"color: #0000ff;\"> Total: 1 events (dropped 0), 1 KiB data<\/span><\/p>\n<p>Webpage graph<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-get install bandwidthd<\/span><\/p>\n<p>browser address bar: \/var\/lib\/bandwidthd\/htdocs\/index.html<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/bandwidthd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4127\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/bandwidthd.png\" alt=\"bandwidthd.png\" width=\"802\" height=\"453\" \/><\/a><\/p>\n<p>or add it as an alias in Apache in the virtual host block e.g. remote view it on your apache server \/\/dellmint\/bd<\/p>\n<p><span style=\"color: #0000ff;\">vi \/etc\/apache2\/sites-available\/000-default.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Alias \/bd<\/strong> \/var\/lib\/bandwidthd\/htdocs<\/span><br \/>\n<span style=\"color: #ff0000;\">&lt;Directory \/var\/lib\/bandwidthd\/htdocs&gt;<\/span><br \/>\n<span style=\"color: #ff0000;\"> Options All<\/span><br \/>\n<span style=\"color: #ff0000;\"> AllowOverride All<\/span><br \/>\n<span style=\"color: #ff0000;\"> order allow,deny<\/span><br \/>\n<span style=\"color: #ff0000;\"> allow from all<\/span><br \/>\n<span style=\"color: #ff0000;\">&lt;\/Directory&gt;<\/span><\/p>\n<p>INFO RE SYSTEMTAP!! You may need a development kernel with debugging installed\/enabled! Most tutorials COMPLETELY fail to mention this - and you wonder why the cmd examples don't work!<\/p>\n<p>see here:\u00a0<a href=\"https:\/\/posulliv.github.io\/2010\/02\/26\/installing-stap\/\"><span style=\"color: #00ff00;\">https:\/\/posulliv.github.io\/2010\/02\/26\/installing-stap\/<\/span><\/a><\/p>\n<p><strong><em>\"SystemTap needs to have a debug version of the kernel available. Unfortunately, installing the debug information for a kernel on ubuntu is not a trivial operation to perform. In fact, there is a bug on Launchpad about this issue.\"<\/em><\/strong><\/p>\n<p>If you want to experiment - use a test PC with a dev kernel...<\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/www.suse.com\/documentation\/sled11\/singlehtml\/book_sle_tuning\/book_sle_tuning.html#sec.tuning.systemtap.setup\">https:\/\/www.suse.com\/documentation\/sled11\/singlehtml\/book_sle_tuning\/book_sle_tuning.html#sec.tuning.systemtap.setup<\/a><\/span><\/p>\n<p>If you HAVE installed just systemtap and\u00a0systemtap-doc, the list of available probes can be seen with:<\/p>\n<p><span style=\"color: #0000ff;\">man probe::[TAB]<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Display all 289 possibilities? (y or n)<\/span><\/p>\n<p><strong>re the above stap kernel info - later, with my std kernel, I did get one of Brendan's <span style=\"color: #0000ff;\">stap<\/span> cmds to work to create a flame graph in \/Flamegraph as root <\/strong>(but much beyond this one cmd,\u00a0it seems you need the full dev install a la suse link):<\/p>\n<p><a href=\"https:\/\/www.brendangregg.com\/FlameGraphs\/cpuflamegraphs.html#perf\"><span style=\"color: #00ff00;\">https:\/\/www.brendangregg.com\/FlameGraphs\/cpuflamegraphs.html#perf<\/span><\/a><\/p>\n<p><span style=\"color: #0000ff;\">stap -s 32 -D MAXBACKTRACE=100 -D MAXSTRINGLEN=4096 -D MAXMAPENTRIES=10240 \\<\/span><br \/>\n<span style=\"color: #0000ff;\"> -D MAXACTION=10000 -D STP_OVERLOAD_THRESHOLD=5000000000 --all-modules \\<\/span><br \/>\n<span style=\"color: #0000ff;\"> -ve 'global s; probe timer.profile { s[backtrace()] &lt;&lt;&lt; 1; } <\/span><br \/>\n<span style=\"color: #0000ff;\"> probe end { foreach (i in s+) { print_stack(i);<\/span><br \/>\n<span style=\"color: #0000ff;\"> printf(\"\\t%d\\n\", @count(s[i])); } } probe timer.s(60) { exit(); }' \\<\/span><br \/>\n<span style=\"color: #0000ff;\"> &gt; out.stap-stacks<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0.\/stackcollapse-stap.pl out.stap-stacks &gt; out.stap-folded<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0cat out.stap-folded | .\/flamegraph.pl &gt; stap-kernel.svg<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/stapflame.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4095 size-large\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/stapflame-1024x371.png\" alt=\"stapflame.png\" width=\"590\" height=\"214\" \/><\/a><\/p>\n<p>You can\u00a0use perf for\u00a0Brendan's script examples such as his \"perf Hacktogram\"<\/p>\n<p><a href=\"https:\/\/www.brendangregg.com\/blog\/2014-07-10\/perf-hacktogram.html\"><span style=\"color: #00ff00;\">https:\/\/www.brendangregg.com\/blog\/2014-07-10\/perf-hacktogram.html<\/span><\/a><\/p>\n<p>in your Flamegraph directory (previous Post) as root - create this histogram in the terminal:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/nethisto.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4091\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/08\/nethisto.png\" alt=\"nethisto.png\" width=\"624\" height=\"291\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_4027\" class=\"pvc_stats all  \" data-element-id=\"4027\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>This is a partial list of tools from Brendan's presentations, book and elsewhere it's up to you to learn how to use them, when and why. Many can show rolling O\/P by a 1 sec addition eg mpstat 1 sudo apt-get install sysstat\u00a0 apt-cache show sysstat Description-en: system performance tools for Linux The sysstat package <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/linux-performance-tools-list-check-utilisation-saturation-errors\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Linux Performance Tools List Check Utilisation, Saturation, Errors (USE)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-4027","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":2,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/4027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=4027"}],"version-history":[{"count":2,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/4027\/revisions"}],"predecessor-version":[{"id":10052,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/4027\/revisions\/10052"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=4027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=4027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=4027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}