<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to find the Process path in Servers - General</title>
    <link>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183196#M18131</link>
    <description>&lt;P&gt;I have a process running and i need to find out the process path&lt;/P&gt;&lt;P&gt;sxxxxxc: home/sxxxxai $ ps -ef |grep -i jmx&lt;BR /&gt;sxxxxxai 12571 4873 1 19:50:42 pts/0 0:00 grep -i jmx&lt;/P&gt;&lt;P&gt;By above i can see that JMX Process id is 12571 , how to find out the location of the file&lt;/P&gt;&lt;P&gt;Same for below&amp;nbsp;&lt;/P&gt;&lt;P&gt;sxxxxc:home/sxxxxi $ ps -ef |grep -i activemq&lt;BR /&gt;sxxxxxi 13090 4873 0 19:56:50 pts/0 0:00 grep -i activemq&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried below&amp;nbsp; commands but of no use&lt;/P&gt;&lt;P&gt;pwdx 13090&lt;/P&gt;&lt;P&gt;sudo ls -l /proc/13090/exe&lt;/P&gt;&lt;P&gt;readlink -f /proc/&amp;lt;13090&amp;gt;/exe&lt;/P&gt;&lt;P&gt;lsof -p 13090 | grep cwd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Mar 2023 16:59:26 GMT</pubDate>
    <dc:creator>satha</dc:creator>
    <dc:date>2023-03-04T16:59:26Z</dc:date>
    <item>
      <title>How to find the Process path</title>
      <link>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183196#M18131</link>
      <description>&lt;P&gt;I have a process running and i need to find out the process path&lt;/P&gt;&lt;P&gt;sxxxxxc: home/sxxxxai $ ps -ef |grep -i jmx&lt;BR /&gt;sxxxxxai 12571 4873 1 19:50:42 pts/0 0:00 grep -i jmx&lt;/P&gt;&lt;P&gt;By above i can see that JMX Process id is 12571 , how to find out the location of the file&lt;/P&gt;&lt;P&gt;Same for below&amp;nbsp;&lt;/P&gt;&lt;P&gt;sxxxxc:home/sxxxxi $ ps -ef |grep -i activemq&lt;BR /&gt;sxxxxxi 13090 4873 0 19:56:50 pts/0 0:00 grep -i activemq&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried below&amp;nbsp; commands but of no use&lt;/P&gt;&lt;P&gt;pwdx 13090&lt;/P&gt;&lt;P&gt;sudo ls -l /proc/13090/exe&lt;/P&gt;&lt;P&gt;readlink -f /proc/&amp;lt;13090&amp;gt;/exe&lt;/P&gt;&lt;P&gt;lsof -p 13090 | grep cwd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 16:59:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183196#M18131</guid>
      <dc:creator>satha</dc:creator>
      <dc:date>2023-03-04T16:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the Process path</title>
      <link>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183868#M18180</link>
      <description>&lt;P style="margin: 0;"&gt;Hello Satha,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;The process id "12571" you have mentioned/seeing, is the PID of the "ps" command ran with grepping for jmx and there is no process with name "jmx" included in server .&lt;BR /&gt;sxxxxxc: home/sxxxxai $ ps -ef |grep -i jmx&lt;BR /&gt;sxxxxxai 12571 4873 1 19:50:42 pts/0 0:00 grep -i jmx&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Here, it says there is only one entry on ps table with "jmx" included is the "grep -i jmx" which you executed .&lt;BR /&gt;The process ID would exit once you get the prompt back with the output .&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Same is the case of the other command you ran .&lt;BR /&gt;sxxxxc:home/sxxxxi $ ps -ef |grep -i activemq&lt;BR /&gt;sxxxxxi 13090 4873 0 19:56:50 pts/0 0:00 grep -i activemq&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Following would the output when there is an actual process running , here is an example of sshd .&lt;BR /&gt;# ps -ef | grep -i sshd&lt;BR /&gt;&amp;nbsp; &amp;nbsp; root &amp;nbsp;9881 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 &amp;nbsp;Feb &amp;nbsp;2 &amp;nbsp;? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0:00 /opt/ssh/sbin/sshd&lt;BR /&gt;&amp;nbsp; &amp;nbsp; root 10988 &amp;nbsp;9881 &amp;nbsp;0 20:37:58 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0:00 sshd: root@pts/1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; root 27884 24409 &amp;nbsp;0 22:15:40 pts/0 &amp;nbsp; &amp;nbsp; 0:00 grep -i sshd&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Here , PID 27884 is for the grep command executed .&lt;BR /&gt;PID 10988 is the sshd child process and PID 9881 is the actual SSHD process running in server , where you could also see the path of the binary .&lt;/P&gt;
&lt;P style="margin: 0;"&gt;I work for HPE/ I am an HPE Employee (HPE Community)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 16:49:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183868#M18180</guid>
      <dc:creator>georgek_1</dc:creator>
      <dc:date>2023-03-01T16:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the Process path</title>
      <link>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183922#M18185</link>
      <description>&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;P&gt;To find the location of the process file, you can try using the ls command with the process ID. Here's how you can do it:&lt;/P&gt;
&lt;P&gt;For the JMX process with ID 12571:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN class=""&gt;bash&lt;/SPAN&gt;Copy code&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=""&gt;ls&lt;/SPAN&gt; -l /proc/12571/exe&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;This should give you the full path to the process file.&lt;/P&gt;
&lt;P&gt;For the ActiveMQ process with ID 13090:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN class=""&gt;bash&lt;/SPAN&gt;Copy code&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=""&gt;ls&lt;/SPAN&gt; -l /proc/13090/exe&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;This should also give you the full path to the process file.&lt;/P&gt;
&lt;P&gt;Note that you need to have sufficient permissions to access the process file. If you're not running these commands as the same user that started the process, you may need to run them with sudo.&lt;/P&gt;
&lt;P&gt;Also, if the process has already terminated, the /proc directory may no longer contain information about the process, in which case you won't be able to find the process file using this method.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2023 05:49:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/how-to-find-the-process-path/m-p/7183922#M18185</guid>
      <dc:creator>sarafoster</dc:creator>
      <dc:date>2023-03-03T05:49:22Z</dc:date>
    </item>
  </channel>
</rss>

