<?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: Tru64 proc file system with ioctl call in Operating System - Tru64 Unix</title>
    <link>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441381#M2743</link>
    <description>I strongly doubt that you can do it through /proc as such; the function of /proc in Tru64 is quite different than it is in Linux.  But all you really need is some way to retrieve the command line arguments in C.  In that case, you should be able to do it with the table() system call, which lets you retrieve various tables of information about processes.  See man table(2) for tons of information.  &lt;BR /&gt;&lt;BR /&gt;If you specify TBL_ARGUMENTS as the desired table, it should do just what you need:&lt;BR /&gt;&lt;BR /&gt;"...This table contains all the command line arguments for the process. Specify the process id in the index argument. The addr argument points to a buffer into which the command line arguments are placed."&lt;BR /&gt;&lt;BR /&gt;Martin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Jun 2009 10:27:00 GMT</pubDate>
    <dc:creator>Martin Moore</dc:creator>
    <dc:date>2009-06-18T10:27:00Z</dc:date>
    <item>
      <title>Tru64 proc file system with ioctl call</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441378#M2740</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;In Linux, the process command line arguments can be accessed using /proc file system. Here, the file "/proc/&lt;PID&gt;/cmdline" contains the command line arguments of the process. How to access the command line arguments of a running process in Tru64? Is it possible to read it through ioctl() with proc()&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Roopa&lt;/PID&gt;</description>
      <pubDate>Wed, 17 Jun 2009 11:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441378#M2740</guid>
      <dc:creator>Roopa V</dc:creator>
      <dc:date>2009-06-17T11:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Tru64 proc file system with ioctl call</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441379#M2741</link>
      <description>ps -o args, in conjunction with whatever other flags you like.  For example, to see the args that xntpd was started with:&lt;BR /&gt;&lt;BR /&gt;% ps -e -o pid,ppid,cmd,args | grep xntpd&lt;BR /&gt;    525367     524289 /usr/sbin/xntpd  /usr/sbin/xntpd -g -x -c /etc/ntp.conf&lt;BR /&gt;    843798     843880 grep xntpd       grep xntpd&lt;BR /&gt;&lt;BR /&gt;Martin&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:27:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441379#M2741</guid>
      <dc:creator>Martin Moore</dc:creator>
      <dc:date>2009-06-17T19:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Tru64 proc file system with ioctl call</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441380#M2742</link>
      <description>Thanks Martin.&lt;BR /&gt;&lt;BR /&gt;I need to write a C application to get the command line arguments of a given process id.&lt;BR /&gt;But I do not want to rely on -&lt;BR /&gt;popen("ps -eo pid,args | grep &lt;PID&gt;") or system("ps -eo pid,args | grep &lt;PID&gt;") call. Can we read command line arguments using proc() on Tru64?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Roopa&lt;/PID&gt;&lt;/PID&gt;</description>
      <pubDate>Thu, 18 Jun 2009 08:56:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441380#M2742</guid>
      <dc:creator>Roopa V</dc:creator>
      <dc:date>2009-06-18T08:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Tru64 proc file system with ioctl call</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441381#M2743</link>
      <description>I strongly doubt that you can do it through /proc as such; the function of /proc in Tru64 is quite different than it is in Linux.  But all you really need is some way to retrieve the command line arguments in C.  In that case, you should be able to do it with the table() system call, which lets you retrieve various tables of information about processes.  See man table(2) for tons of information.  &lt;BR /&gt;&lt;BR /&gt;If you specify TBL_ARGUMENTS as the desired table, it should do just what you need:&lt;BR /&gt;&lt;BR /&gt;"...This table contains all the command line arguments for the process. Specify the process id in the index argument. The addr argument points to a buffer into which the command line arguments are placed."&lt;BR /&gt;&lt;BR /&gt;Martin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:27:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441381#M2743</guid>
      <dc:creator>Martin Moore</dc:creator>
      <dc:date>2009-06-18T10:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Tru64 proc file system with ioctl call</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441382#M2744</link>
      <description>&lt;!--!*#--&gt;Thanks again Martin. I tried using table() system call. But I'm able to retrieve only argv[0]. Please find my sample program below which I tried.&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt; * Sample program to retrieve command line arguments of a running process&lt;BR /&gt; * on Tru64 using table() system call.&lt;BR /&gt; */&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;#define MAX_BUF_SIZE    1024&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char *argv[])&lt;BR /&gt;{&lt;BR /&gt;    char arg_list[MAX_BUF_SIZE];&lt;BR /&gt;    char *nextp = NULL;&lt;BR /&gt;    int mypid = getpid();&lt;BR /&gt;    int len = 0;&lt;BR /&gt;&lt;BR /&gt;    len = table(TBL_ARGUMENTS, mypid, arg_list, 1, MAX_BUF_SIZE);&lt;BR /&gt;    if (len &amp;gt;= 0) {&lt;BR /&gt;        nextp = arg_list;&lt;BR /&gt;        while (nextp &amp;lt; arg_list + len) {&lt;BR /&gt;            printf("%s\t", nextp);&lt;BR /&gt;            nextp += strlen(nextp) + 1;&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;    else {&lt;BR /&gt;        perror("table");&lt;BR /&gt;    }&lt;BR /&gt;    return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Roopa&lt;/STRING.H&gt;&lt;/SYS&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Mon, 22 Jun 2009 09:39:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/tru64-proc-file-system-with-ioctl-call/m-p/4441382#M2744</guid>
      <dc:creator>Roopa V</dc:creator>
      <dc:date>2009-06-22T09:39:29Z</dc:date>
    </item>
  </channel>
</rss>

