<?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: question on pstat_getcommandline in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128918#M804002</link>
    <description>Thanks Jean-Louis for the answer.  This helped me solve the problem.</description>
    <pubDate>Wed, 26 Nov 2003 06:12:57 GMT</pubDate>
    <dc:creator>Padmini_2</dc:creator>
    <dc:date>2003-11-26T06:12:57Z</dc:date>
    <item>
      <title>question on pstat_getcommandline</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128914#M803998</link>
      <description>Hi,&lt;BR /&gt;     I am currently running on HPUX 11i.  I am using pstat_getcommandline in one of my programs.  I get the following error when I try to compile.&lt;BR /&gt;---------------------------&lt;BR /&gt;Function 'pstat_getcommandline' has not been defined yet; cannot call.&lt;BR /&gt;---------------------------&lt;BR /&gt;Even though I have included sys/pstat.h? &lt;BR /&gt;&lt;BR /&gt;Could someone please help me out?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Padmini</description>
      <pubDate>Wed, 26 Nov 2003 02:12:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128914#M803998</guid>
      <dc:creator>Padmini_2</dc:creator>
      <dc:date>2003-11-26T02:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: question on pstat_getcommandline</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128915#M803999</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;I can't see the option for 'pstat_getcommandline' from the manual page on HP-UX 11i system.&lt;BR /&gt;&lt;BR /&gt;# man pstat&lt;BR /&gt;&lt;BR /&gt;Could you inform to me what the purpose of 'pstat_getcommandline' in your script ?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;AW</description>
      <pubDate>Wed, 26 Nov 2003 02:41:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128915#M803999</guid>
      <dc:creator>Adisuria Wangsadinata_1</dc:creator>
      <dc:date>2003-11-26T02:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: question on pstat_getcommandline</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128916#M804000</link>
      <description>Hi,&lt;BR /&gt;  From the net I found pstat_getcommandline Returns the commandline of the process specified (which is listed for 11.i v2)&lt;BR /&gt;However, I am currently running on 11.11 (pa risc ).  Does it mean, pstat_getcommandline for 11.11, is not supported?&lt;BR /&gt;And that pstat_getcommandline is only for 11.i v2 (for intel itanium 2 architecture)?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Padmini&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Nov 2003 05:03:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128916#M804000</guid>
      <dc:creator>Padmini_2</dc:creator>
      <dc:date>2003-11-26T05:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: question on pstat_getcommandline</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128917#M804001</link>
      <description>You are right ... Unsupported ! From doc KBRC00006317 you can read :&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;The PSTAT_GETCOMMANDLINE opcode is undocumented and unsupported for normal use. &lt;BR /&gt;...&lt;BR /&gt;With these caveats in mind, here is sample C code that uses the PSTAT_GETCOMMANDLINE function code and works on an HP-UX 11.11 system as of March 28, 2001: &lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#define MAX_LENGTH (1024)&lt;BR /&gt;main (argc, argv) int argc; char *argv[]; {&lt;BR /&gt;  int    pid;&lt;BR /&gt;  char   long_command [MAX_LENGTH];&lt;BR /&gt;  union  pstun pu;&lt;BR /&gt;&lt;BR /&gt;  pid = atoi(argv[1]);&lt;BR /&gt;  pu.pst_command = long_command;&lt;BR /&gt;  if (pstat(PSTAT_GETCOMMANDLINE, pu, MAX_LENGTH, 1, pid) == -1) {&lt;BR /&gt;    printf("ERROR: pstat() failure using pid(%d)\n", pid);&lt;BR /&gt;    exit(-1);&lt;BR /&gt;  }&lt;BR /&gt;  printf("pid %d = %s\n", pid, pu.pst_command);&lt;BR /&gt;}&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Wed, 26 Nov 2003 05:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128917#M804001</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-11-26T05:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: question on pstat_getcommandline</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128918#M804002</link>
      <description>Thanks Jean-Louis for the answer.  This helped me solve the problem.</description>
      <pubDate>Wed, 26 Nov 2003 06:12:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-pstat-getcommandline/m-p/3128918#M804002</guid>
      <dc:creator>Padmini_2</dc:creator>
      <dc:date>2003-11-26T06:12:57Z</dc:date>
    </item>
  </channel>
</rss>

