<?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 get process creation date using script? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830000#M88643</link>
    <description>How do I get the process creation date/time for a process?  I want to be able to get the info via a script.&lt;BR /&gt;&lt;BR /&gt;I've got a process that's been running quite a while and I want to run a script that will print the process creation date and time.&lt;BR /&gt;&lt;BR /&gt;jack...</description>
    <pubDate>Mon, 21 Oct 2002 13:54:11 GMT</pubDate>
    <dc:creator>Jack C. Mahaffey</dc:creator>
    <dc:date>2002-10-21T13:54:11Z</dc:date>
    <item>
      <title>How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830000#M88643</link>
      <description>How do I get the process creation date/time for a process?  I want to be able to get the info via a script.&lt;BR /&gt;&lt;BR /&gt;I've got a process that's been running quite a while and I want to run a script that will print the process creation date and time.&lt;BR /&gt;&lt;BR /&gt;jack...</description>
      <pubDate>Mon, 21 Oct 2002 13:54:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830000#M88643</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-10-21T13:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830001#M88644</link>
      <description>Hi Jack:&lt;BR /&gt;&lt;BR /&gt;The 'stime' from 'ps' represents the process start time.  Once it exceeds 24-hours, only the date is given.&lt;BR /&gt;&lt;BR /&gt;For instance, you could report the uid, command, and starting time for all processes with:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -ef -o uid,comm,stime&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 21 Oct 2002 14:05:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830001#M88644</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-10-21T14:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830002#M88645</link>
      <description>UNIX95= ps -p ${pid} -o stime&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Oct 2002 14:06:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830002#M88645</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-10-21T14:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830003#M88646</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I'd rather give you this example derived from 'man pstat_getproc'. It will be much more precise ...&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jean-Louis.&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;&lt;BR /&gt;main (argc, argv)&lt;BR /&gt;int argc;&lt;BR /&gt;char *argv[];&lt;BR /&gt;{&lt;BR /&gt;  struct pst_status pst;&lt;BR /&gt;  int target = atoi(argv[1]);&lt;BR /&gt;&lt;BR /&gt;  if (pstat_getproc(&amp;amp;pst, sizeof(pst), (size_t)0, target) != -1)&lt;BR /&gt;  {&lt;BR /&gt;    (void)printf("Process %d started at %s", target, ctime(&amp;amp;pst.pst_start));&lt;BR /&gt;  }&lt;BR /&gt;  else&lt;BR /&gt;  {&lt;BR /&gt;    perror("pstat_getproc");&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Mon, 21 Oct 2002 14:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830003#M88646</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-10-21T14:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830004#M88647</link>
      <description>Thanks to all for such a quick response.  This web site rules!!!&lt;BR /&gt;&lt;BR /&gt;jack</description>
      <pubDate>Mon, 21 Oct 2002 14:11:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830004#M88647</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-10-21T14:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830005#M88648</link>
      <description>My version of ps does not support the -o option.  Here's my attempts:&lt;BR /&gt;[8238]root@freprod:/var/adm/sw/save # ps -ef | grep 6323&lt;BR /&gt; frs2mgr  6323  6322 226 10:59:33 ?        15:15 MxCase -d maint&lt;BR /&gt;    root  8186 16113  2 11:20:07 pts/0     0:00 grep 6323&lt;BR /&gt;[8239]root@freprod:/var/adm/sw/save # ps -p 6323 -o stime&lt;BR /&gt;ps: illegal option -- o&lt;BR /&gt;usage: ps [-edaflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup]&lt;BR /&gt;[8246]root@freprod:/var/adm/sw/save # &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jean-Louis... I'm an idiot when trying to write c code.  I wouldn't know how to compile.  Thanks anyway... :)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Oct 2002 14:19:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830005#M88648</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-10-21T14:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830006#M88649</link>
      <description>That's what the UNIX95=&lt;SPACE&gt; ps does. It puts ps in XPG4 mode.&lt;/SPACE&gt;</description>
      <pubDate>Mon, 21 Oct 2002 14:23:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830006#M88649</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-10-21T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830007#M88650</link>
      <description>Jack&lt;BR /&gt;&lt;BR /&gt;You need unix95 for the -o option:-&lt;BR /&gt;&lt;BR /&gt;AS Per Janmes post.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -ef -o uid,comm,stime &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Mon, 21 Oct 2002 14:24:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830007#M88650</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-10-21T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830008#M88651</link>
      <description>Hi Jack,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;ps -ef | grep 6323 | sed 's/\ \{1,\}/#/g' | cut -d"#" -f6&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Mon, 21 Oct 2002 14:27:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830008#M88651</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-10-21T14:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830009#M88652</link>
      <description>Hi (again) Jack:&lt;BR /&gt;&lt;BR /&gt;The format is:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps ...&lt;BR /&gt;&lt;BR /&gt;Note carefully that the variable UNIX95 is set only for the duration of the command line.  It is written as "UNIX95= ", that is with a space character *before* the 'ps' command.&lt;BR /&gt;&lt;BR /&gt;This arms the UNIX95 (XPG4) behavior and thereby allows use of the '-o' option list to create a custom 'ps' output.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Oct 2002 14:28:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830009#M88652</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-10-21T14:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830010#M88653</link>
      <description>Thanks all.   Just learned something new about using UNIX95=&lt;BR /&gt;&lt;BR /&gt;Justo, thanks... Awsome... I added grep -v to exclude the grep invocation.&lt;BR /&gt;&lt;BR /&gt;All examples worked.  Thanks again.&lt;BR /&gt;jack...</description>
      <pubDate>Mon, 21 Oct 2002 14:31:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830010#M88653</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-10-21T14:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830011#M88654</link>
      <description>Hello Jack,&lt;BR /&gt;&lt;BR /&gt;Juste save it in prog.c and use 'make prog'. That's all ... Call the program with a pid number.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jean-Louis.</description>
      <pubDate>Mon, 21 Oct 2002 14:39:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830011#M88654</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-10-21T14:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830012#M88655</link>
      <description>Jean-Louis,  Thanks...  I now know how to compile.  This should be a good week... :)</description>
      <pubDate>Mon, 21 Oct 2002 14:43:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830012#M88655</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-10-21T14:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830013#M88656</link>
      <description>You are welcome Jack.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Mon, 21 Oct 2002 14:49:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830013#M88656</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-10-21T14:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process creation date using script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830014#M88657</link>
      <description>Jean-Louis - Your example was what I needed.  It includes the full timestamp.  Thanks...&lt;BR /&gt;jack...</description>
      <pubDate>Mon, 21 Oct 2002 16:36:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-process-creation-date-using-script/m-p/2830014#M88657</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-10-21T16:36:29Z</dc:date>
    </item>
  </channel>
</rss>

