<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pate Bryant</title>
    <description>The latest articles on DEV Community by Pate Bryant (@patebryant).</description>
    <link>https://dev.to/patebryant</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4169963%2Fcbbacdec-a936-4c1e-adc7-8328901cffda.png</url>
      <title>DEV Community: Pate Bryant</title>
      <link>https://dev.to/patebryant</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/patebryant"/>
    <language>en</language>
    <item>
      <title>ptop: Pate's top, a copy of vtop in Rust</title>
      <dc:creator>Pate Bryant</dc:creator>
      <pubDate>Thu, 08 Oct 2026 00:26:58 +0000</pubDate>
      <link>https://dev.to/patebryant/ptop-pates-top-a-copy-of-vtop-in-rust-e5o</link>
      <guid>https://dev.to/patebryant/ptop-pates-top-a-copy-of-vtop-in-rust-e5o</guid>
      <description>&lt;p&gt;I like &lt;a href="https://github.com/MrRio/vtop" rel="noopener noreferrer"&gt;vtop&lt;/a&gt;. I wanted a more performant version that works exactly the same, so I made &lt;strong&gt;ptop&lt;/strong&gt;, short for &lt;strong&gt;Pate's top&lt;/strong&gt;. It's a copy of vtop, rewritten in Rust.&lt;/p&gt;

&lt;p&gt;The dotted graphs are the point. So are the process list, the keyboard controls, and the themes. I wanted to keep the terminal monitor I already liked and reduce the resources it uses to tell me what is using my resources.&lt;/p&gt;

&lt;p&gt;The code is on &lt;a href="https://github.com/patebry/ptop" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, and the native executable is available as &lt;a href="https://www.npmjs.com/package/@patebryant/ptop" rel="noopener noreferrer"&gt;@patebryant/ptop on npm&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ye5fes7vzjrrwjz7uu6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ye5fes7vzjrrwjz7uu6.png" alt="ptop terminal monitor" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Rendered by ptop using synthetic demonstration data. The font depends on your terminal.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try ptop
&lt;/h2&gt;

&lt;p&gt;ptop runs on &lt;strong&gt;macOS and Linux&lt;/strong&gt;. The installation method depends on your platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  macOS: install from npm
&lt;/h3&gt;

&lt;p&gt;For &lt;strong&gt;Apple Silicon Macs running macOS 15 or later&lt;/strong&gt;, install the prebuilt native package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @patebryant/ptop
ptop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Press &lt;code&gt;q&lt;/code&gt; to quit. You don't need to install Rust. npm distributes the compiled native executable; there is no resident Node wrapper or install-time binary download.&lt;/p&gt;

&lt;h3&gt;
  
  
  Linux: install from source
&lt;/h3&gt;

&lt;p&gt;Linux has its own CPU and memory sensors, and Ubuntu builds, compatibility checks, and live-terminal tests run in CI alongside macOS. With Rust 1.92.0 installed and the usual Linux tools (&lt;code&gt;ps&lt;/code&gt;, &lt;code&gt;free&lt;/code&gt;, &lt;code&gt;hostname&lt;/code&gt;, and &lt;code&gt;killall&lt;/code&gt;) available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--git&lt;/span&gt; https://github.com/patebry/ptop &lt;span class="nt"&gt;--locked&lt;/span&gt;
ptop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The npm package currently includes only the macOS ARM64 binary. &lt;strong&gt;That is a packaging limit, not a Mac-only limit on ptop itself.&lt;/strong&gt; Other Linux distributions and CPU architectures have not all been verified, and Intel Mac source builds are not yet verified.&lt;/p&gt;

&lt;h2&gt;
  
  
  How close is it to vtop?
&lt;/h2&gt;

&lt;p&gt;Matching vtop's appearance and behavior is the goal, including its dotted CPU and memory history, process grouping, sorting, keyboard navigation, mouse selection, and 12 themes. The reference is &lt;strong&gt;vtop 0.6.1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The test harness checks 90 fixture frames against the upstream renderer, plus a separate ptop branding frame. It also tests command-line output, input handling, sensor timing, and terminal restoration. Those checks give us specific evidence of compatibility; they don't prove every possible terminal and workload behaves identically.&lt;/p&gt;

&lt;p&gt;A few differences are deliberate. It says ptop, the old footer link is gone, and updates are manual. Normal ptop does not poll npm in the background or invoke sudo to update itself.&lt;/p&gt;

&lt;p&gt;For reference testing, &lt;code&gt;--vtop-parity&lt;/code&gt; restores vtop's branding, footer, and updater behavior. For everyday use, just run &lt;code&gt;ptop&lt;/code&gt;. The optional &lt;code&gt;--fix&lt;/code&gt; flag corrects vtop's macOS memory arithmetic; the default retains the compatibility behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does rewriting vtop in Rust actually help?
&lt;/h2&gt;

&lt;p&gt;For the workload I measured, yes. These are the published &lt;strong&gt;ptop 0.1.0 vs. vtop 0.6.1&lt;/strong&gt; results, not a new benchmark of the 0.1.1 or later packages:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measurement&lt;/th&gt;
&lt;th&gt;vtop 0.6.1&lt;/th&gt;
&lt;th&gt;ptop 0.1.0&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Mean own-process memory (RSS)&lt;/td&gt;
&lt;td&gt;111.18 MiB&lt;/td&gt;
&lt;td&gt;7.31 MiB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mean CPU, percent of one core&lt;/td&gt;
&lt;td&gt;27.20%&lt;/td&gt;
&lt;td&gt;23.02%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's about &lt;strong&gt;93% less own-process RAM&lt;/strong&gt; and &lt;strong&gt;15% less CPU&lt;/strong&gt; in this comparison.&lt;/p&gt;

&lt;p&gt;I ran three matched 20-second pairs on an Apple M2 Max with macOS 15.4.1, using a 100 × 30 terminal, a 300 ms update interval, the parallax theme, and mouse input disabled. ptop used its vtop compatibility mode. CPU accounting includes reaped sensor child processes; the RSS samples measure the monitor itself, not its whole process tree.&lt;/p&gt;

&lt;p&gt;This is one local workload. Process count, terminal size, update interval, and whatever else your machine is doing all affect the result. Rust alone isn't proof of a speedup.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/patebry/ptop/blob/main/docs/PERFORMANCE-NPM-0.1.0.md" rel="noopener noreferrer"&gt;full benchmark report and raw measurements&lt;/a&gt; are in the repository, along with &lt;a href="https://github.com/patebry/ptop/blob/main/docs/BENCHMARKING.md" rel="noopener noreferrer"&gt;instructions for running your own comparison&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Same dots, familiar controls
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;j&lt;/code&gt; and &lt;code&gt;k&lt;/code&gt; to move through processes, &lt;code&gt;c&lt;/code&gt; to sort by CPU, and &lt;code&gt;m&lt;/code&gt; to sort by memory. Mouse selection and scrolling work too. To change the look:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ptop &lt;span class="nt"&gt;-t&lt;/span&gt; nord
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All 12 themes ship with the binary. The &lt;a href="https://github.com/patebry/ptop#controls" rel="noopener noreferrer"&gt;README has the full control list&lt;/a&gt;, build instructions, and compatibility notes.&lt;/p&gt;

&lt;p&gt;ptop is MIT licensed, with credits and notices for vtop and the projects it builds on. vtop deserves the credit for the interface. I just wanted my own Rust version with a smaller footprint. And apparently an excuse to make a ridiculous launch commercial.&lt;/p&gt;

&lt;p&gt;Disclosure: This article was prepared by an AI coding agent from the project documentation and published benchmark data, at my direction. The project was also developed with AI assistance.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>opensource</category>
      <category>performance</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
