<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Processes on Lead DevOps</title><link>https://lead-devops.blackdevhub.online/en/tags/processes/</link><description>Recent content in Processes on Lead DevOps</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 04 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lead-devops.blackdevhub.online/en/tags/processes/index.xml" rel="self" type="application/rss+xml"/><item><title>lsof: which processes listen on port and hold file</title><link>https://lead-devops.blackdevhub.online/en/posts/lsof-port-file-processes/</link><pubDate>Fri, 04 Sep 2026 00:00:00 +0000</pubDate><guid>https://lead-devops.blackdevhub.online/en/posts/lsof-port-file-processes/</guid><description>&lt;p&gt;Service won&amp;rsquo;t start — port 8080 is already bound. You dig into who&amp;rsquo;s holding it, and discover the same process has your config file open while you&amp;rsquo;re trying to edit it. lsof answers both questions: which processes opened which files and sockets.&lt;/p&gt;&#10;&lt;h2 id="listening-ports"&gt;Listening Ports&#10;&lt;/h2&gt;&#10;&lt;p&gt;The classic task — find who is listening on a specific port.&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-9cff1145-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-9cff1145-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;lsof -i -n -P&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-table-scroll td-table-scroll--static"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th scope="col"&gt;Flag&lt;/th&gt;&#10; &lt;th scope="col"&gt;Effect&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;code&gt;-i&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;Show internet sockets&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;code&gt;-n&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;Skip DNS resolution (show IP instead of hostname)&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;code&gt;-P&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;Skip port-to-service conversion (show 80 instead of http)&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;Without &lt;code&gt;-n -P&lt;/code&gt;, lsof wastes time on DNS lookups and resolves ports through /etc/services. On production hosts that&amp;rsquo;s unnecessary seconds.&lt;/p&gt;</description></item></channel></rss>