<?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 Re: How to get full path of a process listed on ps output in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785778#M488995</link>
    <description>&lt;P&gt;Since parent PID is 1 it is most likely started by init.&lt;/P&gt;&lt;P&gt;But maybe "whence" or "whereis" can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Google points to ca autosys product.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2015 18:06:26 GMT</pubDate>
    <dc:creator>Torsten.</dc:creator>
    <dc:date>2015-09-17T18:06:26Z</dc:date>
    <item>
      <title>How to get full path of a process listed on ps output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785741#M488994</link>
      <description>&lt;P&gt;Hi, I need to know the full path of a process I see on the ps output / top output :&lt;BR /&gt;&lt;BR /&gt;$ ps -ef | grep event_demon&lt;BR /&gt;autosys 25876 1 0 Jun 2 ? 3419:44 event_demon -A PPE -R&lt;BR /&gt;autosys 3092 1 0 Jun 5 ? 3228:04 event_demon -A PQE -R&lt;BR /&gt;gzdz51 16813 14788 0 10:46:20 pts/3 0:00 grep event_demon&lt;BR /&gt;$ uname&lt;BR /&gt;HP-UX&lt;BR /&gt;$ uname -a&lt;BR /&gt;HP-UX uspls005 B.11.31 U ia64 1164653830 unlimited-user license&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I cannot determine what started those event_demon, maybe knowing its location will help me. Does anybody know if that is possible to get?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 15:48:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785741#M488994</guid>
      <dc:creator>villarre</dc:creator>
      <dc:date>2015-09-17T15:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get full path of a process listed on ps output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785778#M488995</link>
      <description>&lt;P&gt;Since parent PID is 1 it is most likely started by init.&lt;/P&gt;&lt;P&gt;But maybe "whence" or "whereis" can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Google points to ca autosys product.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 18:06:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785778#M488995</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2015-09-17T18:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get full path of a process listed on ps output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785886#M489002</link>
      <description>&lt;P&gt;lsof(1m) may provide this info given the PID?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you can get out your trusty "find(1) -name&amp;nbsp;event_demon" and scan files systems.&amp;nbsp; :-)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 05:55:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785886#M489002</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2015-09-18T05:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get full path of a process listed on ps output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785954#M489003</link>
      <description>&lt;P&gt;Have you tried pstat_getcommandline() ?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 07:15:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6785954#M489003</guid>
      <dc:creator>Santosh Abraham</dc:creator>
      <dc:date>2015-09-18T07:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get full path of a process listed on ps output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6786006#M489004</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1075710"&gt;@Santosh Abraham&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Have you tried pstat_getcommandline() ?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sorry - ignore the above.&amp;nbsp; I did not grok your question correctly.&amp;nbsp; If you have super-user access and are inclined to a bit of programming perhaps the following might work:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;-------------------------------&amp;lt;snip&amp;gt;----------------------&lt;/P&gt;&lt;P&gt;char filename[PATH_MAX+1];&lt;BR /&gt;&amp;nbsp; struct pst_status ps;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (pstat_getproc(&amp;amp;ps,sizeof(ps),0,pid_of_prog_u_r_interested_in)) == -1) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; perror("pstat_getproc");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (pstat_getpathname(filename,sizeof(filename),&amp;amp;ps.pst_fid_text) == -1) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; perror("pstat_getpathname");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;--------------------------&amp;lt;snip&amp;gt;----------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 08:25:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6786006#M489004</guid>
      <dc:creator>Santosh Abraham</dc:creator>
      <dc:date>2015-09-18T08:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get full path of a process listed on ps output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6786082#M489005</link>
      <description>&lt;P&gt;There is no substitute for &lt;STRONG&gt;pstree&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;pstree -p &amp;lt;any_PID&amp;gt;&lt;/PRE&gt;&lt;P&gt;will show you the entire top-to-bottom parent-child relationship.&lt;/P&gt;&lt;P&gt;Just give it *any* PID and the entire tree will be shown.&lt;/P&gt;&lt;PRE&gt;# pstree -p 17186
-+- 00001 root init
 \-+- 01894 root /usr/local/sbin/sshd
   \-+- 16910 root sshd: root@pts/0
     \-+- 16912 root -sh
       \-+- 17186 root /usr/bin/ksh cfg2html -o /tmp
         \-+- 18130 root /usr/bin/ksh cfg2html -o /tmp
           \-+- 18133 root fold -w160
             |--- 18137 root expand
             \-+- 18134 root /usr/bin/ksh cfg2html -o /tmp
               \-+- 18135 root /usr/bin/sh /opt/hpsmh/bin/smhassist
                 \-+- 18138 root /opt/perl/bin/perl /opt/hpsmh/bin/smhassist.pl
                   \--- 18140 root /usr/sbin/swverify -x autoselect_dependencies.. &lt;/PRE&gt;&lt;P&gt;Here are all the options:&lt;/P&gt;&lt;PRE&gt;pstree $Revision: 2.33 $ by Fred Hucht (C) 1993-2007
EMail: fred AT thp.Uni-Duisburg.de

Usage: pstree [-f file] [-g n] [-u user] [-U] [-s string] [-p pid] [-w] [pid ...]
   -f file   read input from &amp;lt;file&amp;gt; (- is stdin) instead of running
             "ps -ef"
   -g n      use graphics chars for tree. n=1: IBM-850, n=2: VT100, n=3: UTF-8
   -l n      print tree to n level deep
   -u user   show only branches containing processes of &amp;lt;user&amp;gt;
   -U        don't show branches containing only root processes
   -s string show only branches containing process with &amp;lt;string&amp;gt; in commandline
   -p pid    show only branches containing process &amp;lt;pid&amp;gt;
   -w        wide output, not truncated to window width
   pid ...   process ids to start from, default is 1 (init)
             use 0 to also show kernel processes&lt;/PRE&gt;&lt;P&gt;It is mandatory for my toolbox, just like &lt;STRONG&gt;lsof&lt;/STRONG&gt; and &lt;STRONG&gt;tusc&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Get a copy here: &lt;A href="ftp://ftp.sourcedirect.com/pub/tools/pstree/" target="_blank"&gt;ftp://ftp.sourcedirect.com/pub/tools/pstree/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 10:19:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-full-path-of-a-process-listed-on-ps-output/m-p/6786082#M489005</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2015-09-18T10:19:58Z</dc:date>
    </item>
  </channel>
</rss>

