title: <bash> Get PID of all active nginx connections and kill single one
body: <p>I need to kill process ID from an established nginx connection to worker process.</p>
  
  <p>Is there a way to get PID from all nginx established connections?</p>
  
  <p>If i do <code>netstat</code> on nginx worker processes, i am getting pids from worker processes which need to stay alive after I kill process that is connected to it.</p>
  
  <p>I've tried with <code>netstat -anp | grep "client_ip_address" | grep ESTABLISHED</code></p>
  
  <p>and i am getting this:</p>
  
  <pre><code>tcp   0  0  client_ip:dest_port  client_ip:source_port   ESTABLISHED 15925/nginx: worker
  </code></pre>
  
  <p>so 15925 would be the process ID that needs to stay alive when i kill the connection to it.</p>
  
  <p>Is there a way to do it?</p>