aboutsummaryrefslogtreecommitdiffhomepage
path: root/print.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2024-01-31 22:52:33 +0000
committerjohannst <johannst@users.noreply.github.com>2024-01-31 22:52:33 +0000
commitbfc5ce4bc01e5eb28969eefcc01ecfefa2601fdf (patch)
tree9de58b72811e7e84892c3a3749ca1ed5ccb83e42 /print.html
parente5b4aacc5d30dedc78fe955de6ab340374ca2920 (diff)
downloadnotes-bfc5ce4bc01e5eb28969eefcc01ecfefa2601fdf.tar.gz
notes-bfc5ce4bc01e5eb28969eefcc01ecfefa2601fdf.zip
deploy: f3e631f7539c71686d1e336756c9c0fcd0b587ad
Diffstat (limited to 'print.html')
-rw-r--r--print.html113
1 files changed, 108 insertions, 5 deletions
diff --git a/print.html b/print.html
index 02d997b..0f7c10f 100644
--- a/print.html
+++ b/print.html
@@ -89,7 +89,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
- <ol class="chapter"><li class="chapter-item expanded affix "><a href="intro.html">Introduction</a></li><li class="chapter-item expanded "><a href="tools/index.html"><strong aria-hidden="true">1.</strong> Tools</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tools/zsh.html"><strong aria-hidden="true">1.1.</strong> zsh</a></li><li class="chapter-item expanded "><a href="tools/bash.html"><strong aria-hidden="true">1.2.</strong> bash</a></li><li class="chapter-item expanded "><a href="tools/fish.html"><strong aria-hidden="true">1.3.</strong> fish</a></li><li class="chapter-item expanded "><a href="tools/tmux.html"><strong aria-hidden="true">1.4.</strong> tmux</a></li><li class="chapter-item expanded "><a href="tools/git.html"><strong aria-hidden="true">1.5.</strong> git</a></li><li class="chapter-item expanded "><a href="tools/awk.html"><strong aria-hidden="true">1.6.</strong> awk</a></li><li class="chapter-item expanded "><a href="tools/emacs.html"><strong aria-hidden="true">1.7.</strong> emacs</a></li><li class="chapter-item expanded "><a href="tools/gpg.html"><strong aria-hidden="true">1.8.</strong> gpg</a></li><li class="chapter-item expanded "><a href="tools/gdb.html"><strong aria-hidden="true">1.9.</strong> gdb</a></li><li class="chapter-item expanded "><a href="tools/gdbserver.html"><strong aria-hidden="true">1.10.</strong> gdbserver</a></li><li class="chapter-item expanded "><a href="tools/radare2.html"><strong aria-hidden="true">1.11.</strong> radare2</a></li><li class="chapter-item expanded "><a href="tools/qemu.html"><strong aria-hidden="true">1.12.</strong> qemu</a></li><li class="chapter-item expanded "><a href="tools/pacman.html"><strong aria-hidden="true">1.13.</strong> pacman</a></li><li class="chapter-item expanded "><a href="tools/dot.html"><strong aria-hidden="true">1.14.</strong> dot</a></li><li class="chapter-item expanded "><a href="tools/ffmpeg.html"><strong aria-hidden="true">1.15.</strong> ffmpeg</a></li><li class="chapter-item expanded "><a href="tools/column.html"><strong aria-hidden="true">1.16.</strong> column</a></li><li class="chapter-item expanded "><a href="tools/sort.html"><strong aria-hidden="true">1.17.</strong> sort</a></li><li class="chapter-item expanded "><a href="tools/sed.html"><strong aria-hidden="true">1.18.</strong> sed</a></li></ol></li><li class="chapter-item expanded "><a href="monitor/index.html"><strong aria-hidden="true">2.</strong> Resource analysis & monitor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="monitor/lsof.html"><strong aria-hidden="true">2.1.</strong> lsof</a></li><li class="chapter-item expanded "><a href="monitor/ss.html"><strong aria-hidden="true">2.2.</strong> ss</a></li><li class="chapter-item expanded "><a href="monitor/pidstat.html"><strong aria-hidden="true">2.3.</strong> pidstat</a></li><li class="chapter-item expanded "><a href="monitor/pgrep.html"><strong aria-hidden="true">2.4.</strong> pgrep</a></li><li class="chapter-item expanded "><a href="monitor/ps.html"><strong aria-hidden="true">2.5.</strong> ps</a></li><li class="chapter-item expanded "><a href="monitor/pmap.html"><strong aria-hidden="true">2.6.</strong> pmap</a></li><li class="chapter-item expanded "><a href="monitor/pstack.html"><strong aria-hidden="true">2.7.</strong> pstack</a></li></ol></li><li class="chapter-item expanded "><a href="trace_profile/index.html"><strong aria-hidden="true">3.</strong> Trace and Profile</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="trace_profile/time.html"><strong aria-hidden="true">3.1.</strong> time</a></li><li class="chapter-item expanded "><a href="trace_profile/strace.html"><strong aria-hidden="true">3.2.</strong> strace</a></li><li class="chapter-item expanded "><a href="trace_profile/ltrace.html"><strong aria-hidden="true">3.3.</strong> ltrace</a></li><li class="chapter-item expanded "><a href="trace_profile/perf.html"><strong aria-hidden="true">3.4.</strong> perf</a></li><li class="chapter-item expanded "><a href="trace_profile/oprofile.html"><strong aria-hidden="true">3.5.</strong> OProfile</a></li><li class="chapter-item expanded "><a href="trace_profile/callgrind.html"><strong aria-hidden="true">3.6.</strong> callgrind</a></li></ol></li><li class="chapter-item expanded "><a href="binary/index.html"><strong aria-hidden="true">4.</strong> Binary</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="binary/od.html"><strong aria-hidden="true">4.1.</strong> od</a></li><li class="chapter-item expanded "><a href="binary/xxd.html"><strong aria-hidden="true">4.2.</strong> xxd</a></li><li class="chapter-item expanded "><a href="binary/readelf.html"><strong aria-hidden="true">4.3.</strong> readelf</a></li><li class="chapter-item expanded "><a href="binary/objdump.html"><strong aria-hidden="true">4.4.</strong> objdump</a></li><li class="chapter-item expanded "><a href="binary/nm.html"><strong aria-hidden="true">4.5.</strong> nm</a></li></ol></li><li class="chapter-item expanded "><a href="development/index.html"><strong aria-hidden="true">5.</strong> Development</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="development/c++filt.html"><strong aria-hidden="true">5.1.</strong> c++filt</a></li><li class="chapter-item expanded "><a href="development/c++.html"><strong aria-hidden="true">5.2.</strong> c++</a></li><li class="chapter-item expanded "><a href="development/glibc.html"><strong aria-hidden="true">5.3.</strong> glibc</a></li><li class="chapter-item expanded "><a href="development/gcc.html"><strong aria-hidden="true">5.4.</strong> gcc</a></li><li class="chapter-item expanded "><a href="development/cmake.html"><strong aria-hidden="true">5.5.</strong> cmake</a></li><li class="chapter-item expanded "><a href="development/make.html"><strong aria-hidden="true">5.6.</strong> make</a></li><li class="chapter-item expanded "><a href="development/ld.so.html"><strong aria-hidden="true">5.7.</strong> ld.so</a></li><li class="chapter-item expanded "><a href="development/symbolver.html"><strong aria-hidden="true">5.8.</strong> symbol versioning</a></li><li class="chapter-item expanded "><a href="development/python.html"><strong aria-hidden="true">5.9.</strong> python</a></li><li class="chapter-item expanded "><a href="development/gcov.html"><strong aria-hidden="true">5.10.</strong> gcov</a></li><li class="chapter-item expanded "><a href="development/pgo.html"><strong aria-hidden="true">5.11.</strong> pgo</a></li></ol></li><li class="chapter-item expanded "><a href="linux/index.html"><strong aria-hidden="true">6.</strong> Linux</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="linux/systemd.html"><strong aria-hidden="true">6.1.</strong> systemd</a></li><li class="chapter-item expanded "><a href="linux/coredump.html"><strong aria-hidden="true">6.2.</strong> coredump</a></li><li class="chapter-item expanded "><a href="linux/ptrace_scope.html"><strong aria-hidden="true">6.3.</strong> ptrace_scope</a></li><li class="chapter-item expanded "><a href="linux/cryptsetup.html"><strong aria-hidden="true">6.4.</strong> cryptsetup</a></li><li class="chapter-item expanded "><a href="linux/swap.html"><strong aria-hidden="true">6.5.</strong> swap</a></li><li class="chapter-item expanded "><a href="linux/input.html"><strong aria-hidden="true">6.6.</strong> input</a></li><li class="chapter-item expanded "><a href="linux/acl.html"><strong aria-hidden="true">6.7.</strong> acl</a></li><li class="chapter-item expanded "><a href="linux/zfs.html"><strong aria-hidden="true">6.8.</strong> zfs</a></li></ol></li><li class="chapter-item expanded "><a href="network/index.html"><strong aria-hidden="true">7.</strong> Network</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="network/tcpdump.html"><strong aria-hidden="true">7.1.</strong> tcpdump</a></li><li class="chapter-item expanded "><a href="network/tshark.html"><strong aria-hidden="true">7.2.</strong> tshark</a></li><li class="chapter-item expanded "><a href="network/firewall-cmd.html"><strong aria-hidden="true">7.3.</strong> firewall-cmd</a></li><li class="chapter-item expanded "><a href="network/nftables.html"><strong aria-hidden="true">7.4.</strong> nftables</a></li></ol></li><li class="chapter-item expanded "><a href="web/index.html"><strong aria-hidden="true">8.</strong> Web</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="web/html.html"><strong aria-hidden="true">8.1.</strong> html</a></li><li class="chapter-item expanded "><a href="web/css.html"><strong aria-hidden="true">8.2.</strong> css</a></li><li class="chapter-item expanded "><a href="web/chartjs.html"><strong aria-hidden="true">8.3.</strong> chartjs</a></li></ol></li><li class="chapter-item expanded "><a href="arch/index.html"><strong aria-hidden="true">9.</strong> Arch</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="arch/x86_64.html"><strong aria-hidden="true">9.1.</strong> x86_64</a></li><li class="chapter-item expanded "><a href="arch/arm64.html"><strong aria-hidden="true">9.2.</strong> arm64</a></li><li class="chapter-item expanded "><a href="arch/armv7.html"><strong aria-hidden="true">9.3.</strong> armv7</a></li><li class="chapter-item expanded "><a href="arch/riscv.html"><strong aria-hidden="true">9.4.</strong> riscv</a></li></ol></li></ol>
+ <ol class="chapter"><li class="chapter-item expanded affix "><a href="intro.html">Introduction</a></li><li class="chapter-item expanded "><a href="tools/index.html"><strong aria-hidden="true">1.</strong> Tools</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tools/zsh.html"><strong aria-hidden="true">1.1.</strong> zsh</a></li><li class="chapter-item expanded "><a href="tools/bash.html"><strong aria-hidden="true">1.2.</strong> bash</a></li><li class="chapter-item expanded "><a href="tools/fish.html"><strong aria-hidden="true">1.3.</strong> fish</a></li><li class="chapter-item expanded "><a href="tools/tmux.html"><strong aria-hidden="true">1.4.</strong> tmux</a></li><li class="chapter-item expanded "><a href="tools/git.html"><strong aria-hidden="true">1.5.</strong> git</a></li><li class="chapter-item expanded "><a href="tools/awk.html"><strong aria-hidden="true">1.6.</strong> awk</a></li><li class="chapter-item expanded "><a href="tools/emacs.html"><strong aria-hidden="true">1.7.</strong> emacs</a></li><li class="chapter-item expanded "><a href="tools/gpg.html"><strong aria-hidden="true">1.8.</strong> gpg</a></li><li class="chapter-item expanded "><a href="tools/gdb.html"><strong aria-hidden="true">1.9.</strong> gdb</a></li><li class="chapter-item expanded "><a href="tools/gdbserver.html"><strong aria-hidden="true">1.10.</strong> gdbserver</a></li><li class="chapter-item expanded "><a href="tools/radare2.html"><strong aria-hidden="true">1.11.</strong> radare2</a></li><li class="chapter-item expanded "><a href="tools/qemu.html"><strong aria-hidden="true">1.12.</strong> qemu</a></li><li class="chapter-item expanded "><a href="tools/pacman.html"><strong aria-hidden="true">1.13.</strong> pacman</a></li><li class="chapter-item expanded "><a href="tools/dot.html"><strong aria-hidden="true">1.14.</strong> dot</a></li><li class="chapter-item expanded "><a href="tools/ffmpeg.html"><strong aria-hidden="true">1.15.</strong> ffmpeg</a></li><li class="chapter-item expanded "><a href="tools/column.html"><strong aria-hidden="true">1.16.</strong> column</a></li><li class="chapter-item expanded "><a href="tools/sort.html"><strong aria-hidden="true">1.17.</strong> sort</a></li><li class="chapter-item expanded "><a href="tools/sed.html"><strong aria-hidden="true">1.18.</strong> sed</a></li><li class="chapter-item expanded "><a href="tools/gnuplot.html"><strong aria-hidden="true">1.19.</strong> gnuplot</a></li></ol></li><li class="chapter-item expanded "><a href="monitor/index.html"><strong aria-hidden="true">2.</strong> Resource analysis & monitor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="monitor/lsof.html"><strong aria-hidden="true">2.1.</strong> lsof</a></li><li class="chapter-item expanded "><a href="monitor/ss.html"><strong aria-hidden="true">2.2.</strong> ss</a></li><li class="chapter-item expanded "><a href="monitor/pidstat.html"><strong aria-hidden="true">2.3.</strong> pidstat</a></li><li class="chapter-item expanded "><a href="monitor/pgrep.html"><strong aria-hidden="true">2.4.</strong> pgrep</a></li><li class="chapter-item expanded "><a href="monitor/ps.html"><strong aria-hidden="true">2.5.</strong> ps</a></li><li class="chapter-item expanded "><a href="monitor/pmap.html"><strong aria-hidden="true">2.6.</strong> pmap</a></li><li class="chapter-item expanded "><a href="monitor/pstack.html"><strong aria-hidden="true">2.7.</strong> pstack</a></li></ol></li><li class="chapter-item expanded "><a href="trace_profile/index.html"><strong aria-hidden="true">3.</strong> Trace and Profile</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="trace_profile/time.html"><strong aria-hidden="true">3.1.</strong> time</a></li><li class="chapter-item expanded "><a href="trace_profile/strace.html"><strong aria-hidden="true">3.2.</strong> strace</a></li><li class="chapter-item expanded "><a href="trace_profile/ltrace.html"><strong aria-hidden="true">3.3.</strong> ltrace</a></li><li class="chapter-item expanded "><a href="trace_profile/perf.html"><strong aria-hidden="true">3.4.</strong> perf</a></li><li class="chapter-item expanded "><a href="trace_profile/oprofile.html"><strong aria-hidden="true">3.5.</strong> OProfile</a></li><li class="chapter-item expanded "><a href="trace_profile/callgrind.html"><strong aria-hidden="true">3.6.</strong> callgrind</a></li></ol></li><li class="chapter-item expanded "><a href="binary/index.html"><strong aria-hidden="true">4.</strong> Binary</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="binary/od.html"><strong aria-hidden="true">4.1.</strong> od</a></li><li class="chapter-item expanded "><a href="binary/xxd.html"><strong aria-hidden="true">4.2.</strong> xxd</a></li><li class="chapter-item expanded "><a href="binary/readelf.html"><strong aria-hidden="true">4.3.</strong> readelf</a></li><li class="chapter-item expanded "><a href="binary/objdump.html"><strong aria-hidden="true">4.4.</strong> objdump</a></li><li class="chapter-item expanded "><a href="binary/nm.html"><strong aria-hidden="true">4.5.</strong> nm</a></li></ol></li><li class="chapter-item expanded "><a href="development/index.html"><strong aria-hidden="true">5.</strong> Development</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="development/c++filt.html"><strong aria-hidden="true">5.1.</strong> c++filt</a></li><li class="chapter-item expanded "><a href="development/c++.html"><strong aria-hidden="true">5.2.</strong> c++</a></li><li class="chapter-item expanded "><a href="development/glibc.html"><strong aria-hidden="true">5.3.</strong> glibc</a></li><li class="chapter-item expanded "><a href="development/gcc.html"><strong aria-hidden="true">5.4.</strong> gcc</a></li><li class="chapter-item expanded "><a href="development/cmake.html"><strong aria-hidden="true">5.5.</strong> cmake</a></li><li class="chapter-item expanded "><a href="development/make.html"><strong aria-hidden="true">5.6.</strong> make</a></li><li class="chapter-item expanded "><a href="development/ld.so.html"><strong aria-hidden="true">5.7.</strong> ld.so</a></li><li class="chapter-item expanded "><a href="development/symbolver.html"><strong aria-hidden="true">5.8.</strong> symbol versioning</a></li><li class="chapter-item expanded "><a href="development/python.html"><strong aria-hidden="true">5.9.</strong> python</a></li><li class="chapter-item expanded "><a href="development/gcov.html"><strong aria-hidden="true">5.10.</strong> gcov</a></li><li class="chapter-item expanded "><a href="development/pgo.html"><strong aria-hidden="true">5.11.</strong> pgo</a></li></ol></li><li class="chapter-item expanded "><a href="linux/index.html"><strong aria-hidden="true">6.</strong> Linux</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="linux/systemd.html"><strong aria-hidden="true">6.1.</strong> systemd</a></li><li class="chapter-item expanded "><a href="linux/coredump.html"><strong aria-hidden="true">6.2.</strong> coredump</a></li><li class="chapter-item expanded "><a href="linux/ptrace_scope.html"><strong aria-hidden="true">6.3.</strong> ptrace_scope</a></li><li class="chapter-item expanded "><a href="linux/cryptsetup.html"><strong aria-hidden="true">6.4.</strong> cryptsetup</a></li><li class="chapter-item expanded "><a href="linux/swap.html"><strong aria-hidden="true">6.5.</strong> swap</a></li><li class="chapter-item expanded "><a href="linux/input.html"><strong aria-hidden="true">6.6.</strong> input</a></li><li class="chapter-item expanded "><a href="linux/acl.html"><strong aria-hidden="true">6.7.</strong> acl</a></li><li class="chapter-item expanded "><a href="linux/zfs.html"><strong aria-hidden="true">6.8.</strong> zfs</a></li></ol></li><li class="chapter-item expanded "><a href="network/index.html"><strong aria-hidden="true">7.</strong> Network</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="network/tcpdump.html"><strong aria-hidden="true">7.1.</strong> tcpdump</a></li><li class="chapter-item expanded "><a href="network/tshark.html"><strong aria-hidden="true">7.2.</strong> tshark</a></li><li class="chapter-item expanded "><a href="network/firewall-cmd.html"><strong aria-hidden="true">7.3.</strong> firewall-cmd</a></li><li class="chapter-item expanded "><a href="network/nftables.html"><strong aria-hidden="true">7.4.</strong> nftables</a></li></ol></li><li class="chapter-item expanded "><a href="web/index.html"><strong aria-hidden="true">8.</strong> Web</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="web/html.html"><strong aria-hidden="true">8.1.</strong> html</a></li><li class="chapter-item expanded "><a href="web/css.html"><strong aria-hidden="true">8.2.</strong> css</a></li><li class="chapter-item expanded "><a href="web/chartjs.html"><strong aria-hidden="true">8.3.</strong> chartjs</a></li></ol></li><li class="chapter-item expanded "><a href="arch/index.html"><strong aria-hidden="true">9.</strong> Arch</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="arch/x86_64.html"><strong aria-hidden="true">9.1.</strong> x86_64</a></li><li class="chapter-item expanded "><a href="arch/arm64.html"><strong aria-hidden="true">9.2.</strong> arm64</a></li><li class="chapter-item expanded "><a href="arch/armv7.html"><strong aria-hidden="true">9.3.</strong> armv7</a></li><li class="chapter-item expanded "><a href="arch/riscv.html"><strong aria-hidden="true">9.4.</strong> riscv</a></li></ol></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
@@ -200,6 +200,7 @@
<li><a href="tools/./column.html">column</a></li>
<li><a href="tools/./sort.html">sort</a></li>
<li><a href="tools/./sed.html">sed</a></li>
+<li><a href="tools/./gnuplot.html">gnuplot</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="zsh1"><a class="header" href="#zsh1">zsh(1)</a></h1>
<h2 id="keybindings"><a class="header" href="#keybindings">Keybindings</a></h2>
@@ -2661,6 +2662,82 @@ echo -e 'aafooaa\ncc' | sed 's/foo/MOOSE/'
# BAR
# bar
</code></pre>
+<div style="break-before: page; page-break-before: always;"></div><h1 id="gnuplot-1"><a class="header" href="#gnuplot-1">gnuplot (1)</a></h1>
+<pre><code># Launch interactive shell.
+gnuplot
+
+# Launch interactive shell.
+gnuplot [opt]
+ opt:
+ -p ................ persist plot window
+ -c &lt;file&gt; ......... run script file
+ -e &quot;&lt;cmd1&gt;; ..&quot; ... run cmd(s)
+</code></pre>
+<h2 id="frequently-used-configuration"><a class="header" href="#frequently-used-configuration">Frequently used configuration</a></h2>
+<pre><code class="language-sh"># Plot title.
+set title &quot;the plot&quot;
+
+# Labels.
+set xlabel &quot;abc&quot;
+set ylabel &quot;def&quot;
+
+# Output format, 'help set term' for all output formats.
+set term svg
+# Output file.
+set output &quot;out.svg&quot;
+
+# Make axis logarithmic to given base.
+set logscale x 2
+
+# Change separator, default is whitespace.
+set datafile separator &quot;,&quot;
+</code></pre>
+<h2 id="plot"><a class="header" href="#plot">Plot</a></h2>
+<pre><code class="language-sh"># With specific style (eg lines, linespoint, boxes, steps, impulses, ..).
+plot &quot;&lt;data_file&gt;&quot; with &lt;plot_style&gt;
+
+&gt; cat data.txt
+1 1 3
+2 2 2
+3 3 1
+4 2 2
+
+# Plot specific column.
+plot &quot;data.txt&quot; using 1:2, &quot;data.txt&quot; using 1:3
+# Equivalent using the special file &quot;&quot;, which re-uses the previous input file.
+plot &quot;data.txt&quot; using 1:2, &quot;&quot; using 1:3
+
+# Plot piped data.
+plot &quot;&lt; head -n2 data.txt&quot;
+
+# Plot with alternate title.
+plot &quot;data.txt&quot; title &quot;moose&quot;
+</code></pre>
+<h2 id="example-multiple-data-sets-in-on-plot"><a class="header" href="#example-multiple-data-sets-in-on-plot">Example: multiple data sets in on plot</a></h2>
+<pre><code class="language-sh"># file: mem_lat.plot
+
+set title &quot;memory latency (different strides)&quot;
+set xlabel &quot;array in KB&quot;
+set ylabel &quot;cycles / access&quot;
+
+set logscale x 2
+
+plot &quot;stride_32.txt&quot; title &quot;32&quot; with linespoints, \
+ &quot;stride_64.txt&quot; title &quot;64&quot; with linespoints, \
+ &quot;stride_128.txt&quot; title &quot;128&quot; with linespoints, \
+ &quot;stride_256.txt&quot; title &quot;256&quot; with linespoints, \
+ &quot;stride_512.txt&quot; title &quot;512&quot; with linespoints
+</code></pre>
+<p>On Linux x86_64, <a href="tools/gnuplot/mem_lat.c"><code>mem_lat.c</code></a> provides an example which can
+be run as follows.</p>
+<pre><code class="language-sh">gcc -o mem_lat mem_lat.c -g -O3 -Wall -Werror
+
+for stride in 32 64 128 256 512; do \
+ taskset -c 1 ./mem_lat 128 $stride | tee stride_$stride.txt ; \
+done
+
+gnuplot -p -c mem_lat.plot
+</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="resource-analysis--monitor"><a class="header" href="#resource-analysis--monitor">Resource analysis &amp; monitor</a></h1>
<ul>
<li><a href="monitor/./lsof.html">lsof</a></li>
@@ -2795,13 +2872,16 @@ major_pagefault: Happens when the page needed is NOT in memory, the kernel
--no-header .... do not print column header
-o &lt;OUT&gt; ....... comma separated list of output columns
-p &lt;PID&gt; ....... only show pid
+ -C &lt;name&gt; ...... only show processes matching name
-T ............. list threads
+ --signames ..... use short signames instead bitmasks
</code></pre>
<blockquote>
<p>Set <code>PS_FORMAT</code> env variable to setup default output columns.</p>
</blockquote>
<p>Frequently used output columns</p>
<pre><code>pid process id
+ppid parent process id
pgid process group id
tid thread id
@@ -2810,17 +2890,34 @@ cmd name of process + args (full)
etime elapsed time (since process started)
user user owning process
+thcount thread count of process
+nice nice value (-20 highest priority to 19 lowest)
pcpu cpu utilization (percent)
pmem physical resident set (rss) (percent)
rss physical memory (in kb)
vsz virtual memory (in kb)
+
+sig mask of pending signals
+sigcatch mask of caught signals
+sigignore mask of ignored signals
+sigmask mask of blocked signals
</code></pre>
<h2 id="example-use-output-for-scripting"><a class="header" href="#example-use-output-for-scripting">Example: Use output for scripting</a></h2>
<pre><code class="language-sh">for tid in $(ps -o tid --no-header -T -p 31084); do
taskset -c -p $tid;
done
</code></pre>
+<h2 id="example-watch-processes-by-name"><a class="header" href="#example-watch-processes-by-name">Example: Watch processes by name</a></h2>
+<pre><code class="language-sh">watch -n1 ps -o pid,pcpu,pmem,rss,vsz,state,user,comm -C fish
+</code></pre>
+<h2 id="example-show-signal-information"><a class="header" href="#example-show-signal-information">Example: Show signal information</a></h2>
+<pre><code class="language-sh"># With signal masks.
+ps -o pid,user,sig,sigcatch,sigignore,sigmask,comm -p 66570
+
+# With signal names.
+ps --signames -o pid,user,sig,sigcatch,sigignore,sigmask,comm -p 66570
+</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="pmap1"><a class="header" href="#pmap1">pmap(1)</a></h1>
<pre><code class="language-markdown">pmap [opts] &lt;pid&gt;
Dump virtual memory map of process.
@@ -2902,6 +2999,7 @@ opts:
perf stat
-p &lt;pid&gt; ..... show stats for running process
+ -o &lt;file&gt; .... write output to file (default stderr)
-I &lt;ms&gt; ...... show stats periodically over interval &lt;ms&gt;
-e &lt;ev&gt; ...... select event(s)
-M &lt;met&gt; ..... print metric(s), this adds the metric events
@@ -2915,6 +3013,7 @@ perf top
perf record
-p &lt;pid&gt; ............... record stats for running process
+ -o &lt;file&gt; .............. write output to file (default perf.data)
-F &lt;hz&gt; ................ sampling frequency
--call-graph &lt;method&gt; .. [fp, dwarf, lbr] method how to caputre backtrace
fp : use frame-pointer, need to compile with
@@ -2923,8 +3022,9 @@ perf record
lbr : use hardware last branch record facility
-g ..................... short-hand for --call-graph fp
-e &lt;ev&gt; ................ select event(s)
- --all-user ... configure all selected events for user space
- --all-kernel . configure all selected events for kernel space
+ --all-user ............. configure all selected events for user space
+ --all-kernel ........... configure all selected events for kernel space
+ -M intel ............... use intel disassembly in annotate
perf report
-n .................... annotate symbols with nr of samples
@@ -3010,7 +3110,7 @@ perf script --per-event-dump
# fold &amp; generate as above
</code></pre>
<h2 id="examples-10"><a class="header" href="#examples-10">Examples</a></h2>
-<h3 id="determine-theoretical-max-instructions-per-cycle"><a class="header" href="#determine-theoretical-max-instructions-per-cycle">Determine theoretical max instructions per cycle</a></h3>
+<h3 id="estimate-max-instructions-per-cycle"><a class="header" href="#estimate-max-instructions-per-cycle">Estimate max instructions per cycle</a></h3>
<pre><code class="language-c">#define NOP4 &quot;nop\nnop\nnop\nnop\n&quot;
#define NOP32 NOP4 NOP4 NOP4 NOP4 NOP4 NOP4 NOP4 NOP4
#define NOP256 NOP32 NOP32 NOP32 NOP32 NOP32 NOP32 NOP32 NOP32
@@ -3076,13 +3176,16 @@ perf report --stdio -g graph,callee
<h2 id="references-2"><a class="header" href="#references-2">References</a></h2>
<ul>
<li><a href="https://github.com/intel/perfmon">intel/perfmon</a> - intel PMU event database per uarch</li>
-<li><a href="https://perfmon-events.intel.com/">intel/perfmon-html</a> - a html rendered version of the PMU events with search</li>
+<li><a href="https://perfmon-events.intel.com/">intel/perfmon-html</a> - a html rendered version of the PMU
+events with search</li>
<li><a href="https://github.com/intel/perfmon/blob/main/mapfile.csv">intel/perfmon/mapfile.csv</a> - processor family to uarch mapping</li>
<li><a href="https://github.com/torvalds/linux/tree/master/tools/perf/pmu-events/arch/x86">linux/perf/events</a> - x86 PMU events known to perf tools</li>
<li><a href="https://github.com/torvalds/linux/blob/master/arch/x86/events/intel/core.c">linux/arch/events</a> - x86 PMU events linux kernel</li>
<li><a href="https://en.wikichip.org/wiki/WikiChip">wikichip</a> - computer architecture wiki</li>
<li><a href="https://man7.org/linux/man-pages/man1/perf-list.1.html">perf-list(1)</a> - manpage</li>
<li><a href="https://man7.org/linux/man-pages/man2/perf_event_open.2.html">perf_event_open(2)</a> - manpage</li>
+<li><a href="https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html">intel/sdm</a> - intel software developer manuals (eg Optimization
+Reference Manual)</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="oprofile"><a class="header" href="#oprofile"><a href="https://oprofile.sourceforge.io/">OProfile</a></a></h1>
<pre><code class="language-markdown">operf -g -p &lt;pid&gt;