<?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: Script or command to find amount of real time for a process in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-or-command-to-find-amount-of-real-time-for-a-process/m-p/4215766#M91799</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you use the XPG4 (UNIX95) mode of 'ps' you can output your time in 'days-hours:minutes:seconds'.  This field is then easy to parse for computation purposes.&lt;BR /&gt;&lt;BR /&gt;Compare these:&lt;BR /&gt;&lt;BR /&gt;# ps -ef |grep xntpd&lt;BR /&gt;    root  1671     1  0  Mar  3  ?        28:28 /usr/sbin/xntpd -x&lt;BR /&gt; &lt;BR /&gt;...versus:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -e -o pid -o etime -o comm|grep xntpd&lt;BR /&gt; 1671 100-18:59:40 xntpd&lt;BR /&gt;&lt;BR /&gt;Set the UNIX95 variable *only* for the duration of the 'ps' command as shown.  There is no semicolon after the assignment operator and before the 'ps'.&lt;BR /&gt;&lt;BR /&gt;If you don't want headings added to the output, do:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -e -o pid= -o etime= -o comm=&lt;BR /&gt;&lt;BR /&gt;See the manpages for 'ps' for more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
    <pubDate>Thu, 12 Jun 2008 16:46:14 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-06-12T16:46:14Z</dc:date>
    <item>
      <title>Script or command to find amount of real time for a process</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-or-command-to-find-amount-of-real-time-for-a-process/m-p/4215765#M91798</link>
      <description>Is there a command to find the amount of real time a process has been running?&lt;BR /&gt;&lt;BR /&gt;Or does anyone have a script example to find this information?&lt;BR /&gt;&lt;BR /&gt;Trying to write a script to look for processes that have been running greater than or equal to 12 hours.</description>
      <pubDate>Thu, 12 Jun 2008 16:35:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-or-command-to-find-amount-of-real-time-for-a-process/m-p/4215765#M91798</guid>
      <dc:creator>J Greg Wallace</dc:creator>
      <dc:date>2008-06-12T16:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script or command to find amount of real time for a process</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-or-command-to-find-amount-of-real-time-for-a-process/m-p/4215766#M91799</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you use the XPG4 (UNIX95) mode of 'ps' you can output your time in 'days-hours:minutes:seconds'.  This field is then easy to parse for computation purposes.&lt;BR /&gt;&lt;BR /&gt;Compare these:&lt;BR /&gt;&lt;BR /&gt;# ps -ef |grep xntpd&lt;BR /&gt;    root  1671     1  0  Mar  3  ?        28:28 /usr/sbin/xntpd -x&lt;BR /&gt; &lt;BR /&gt;...versus:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -e -o pid -o etime -o comm|grep xntpd&lt;BR /&gt; 1671 100-18:59:40 xntpd&lt;BR /&gt;&lt;BR /&gt;Set the UNIX95 variable *only* for the duration of the 'ps' command as shown.  There is no semicolon after the assignment operator and before the 'ps'.&lt;BR /&gt;&lt;BR /&gt;If you don't want headings added to the output, do:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -e -o pid= -o etime= -o comm=&lt;BR /&gt;&lt;BR /&gt;See the manpages for 'ps' for more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:46:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-or-command-to-find-amount-of-real-time-for-a-process/m-p/4215766#M91799</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-12T16:46:14Z</dc:date>
    </item>
  </channel>
</rss>

