<?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 much memory a process use ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791758#M79913</link>
    <description>I need to know how much memory a process is using, and how much shared memory.&lt;BR /&gt;It??s possible ?</description>
    <pubDate>Thu, 22 Aug 2002 12:58:54 GMT</pubDate>
    <dc:creator>Joel Bortolotto Almeida</dc:creator>
    <dc:date>2002-08-22T12:58:54Z</dc:date>
    <item>
      <title>How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791758#M79913</link>
      <description>I need to know how much memory a process is using, and how much shared memory.&lt;BR /&gt;It??s possible ?</description>
      <pubDate>Thu, 22 Aug 2002 12:58:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791758#M79913</guid>
      <dc:creator>Joel Bortolotto Almeida</dc:creator>
      <dc:date>2002-08-22T12:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791759#M79914</link>
      <description>Top will show the memory usage for each process.</description>
      <pubDate>Thu, 22 Aug 2002 13:01:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791759#M79914</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2002-08-22T13:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791760#M79915</link>
      <description>If you have GlancePlus installed, then use it. It will give you the output you want:&lt;BR /&gt;# glance&lt;BR /&gt;# gpm</description>
      <pubDate>Thu, 22 Aug 2002 13:03:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791760#M79915</guid>
      <dc:creator>Sajid_1</dc:creator>
      <dc:date>2002-08-22T13:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791761#M79916</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Use the unix95 options of ps&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;# Show processes sorted by size of core image&lt;BR /&gt;#&lt;BR /&gt;# Usage:&lt;BR /&gt;#    psram [ quantity ]&lt;BR /&gt;#&lt;BR /&gt;# where quantity is the top RAM processes to show (default is 20)&lt;BR /&gt;#&lt;BR /&gt;set -u&lt;BR /&gt;if [ $# -gt 0 ]&lt;BR /&gt;then&lt;BR /&gt;   TOPPROCS=$1&lt;BR /&gt;else&lt;BR /&gt;   TOPPROCS=20&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;MYNAME=$(basename $0)&lt;BR /&gt;TEMPFILE=/var/tmp/$MYNAME.$$&lt;BR /&gt;trap `rm -f $TEMPFILE &amp;gt; /dev/null 2&amp;gt;&amp;amp;1` 0 1 2 3 15&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -e -o ruser,vsz,pid,args &amp;gt; $TEMPFILE&lt;BR /&gt;head -1 $TEMPFILE&lt;BR /&gt;DASH5="-----"&lt;BR /&gt;DASH25="$DASH5$DASH5$DASH5$DASH5$DASH5"&lt;BR /&gt;echo "$DASH5---- $DASH5- $DASH5 $DASH25$DASH25"&lt;BR /&gt;grep -v "VSZ COMMAND" $TEMPFILE      | cut -c -78      | sort -rn -k2      | head -${TOPPROCS}&lt;BR /&gt;rm $TEMPFILE &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;#### END OF SCRIPT&lt;BR /&gt;&lt;BR /&gt;Or 2 lines to show top 20 by cpu with sz and vsz&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;     1  echo "  $(UNIX95= ps -e -o pcpu -o ruser -o sz -o vsz -opid -o args|head&lt;BR /&gt; -n1)"&lt;BR /&gt;     2  UNIX95= ps -e -o pcpu -o ruser -o sz -o vsz -opid -o args|grep -v %CPU|&lt;BR /&gt;sort -nr|tail -n +2|head -n 20&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;              Steve Steel&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 13:20:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791761#M79916</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-08-22T13:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791762#M79917</link>
      <description>Try&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -ef -o pid,vsz,args | grep &lt;PROCESS_NAME&gt;&lt;BR /&gt;&lt;BR /&gt;This will give you &lt;BR /&gt;&lt;BR /&gt;the process ID (pid)&lt;BR /&gt;the number of KB of memory used (vsz)&lt;BR /&gt;the command with arguments (args)&lt;BR /&gt;&lt;BR /&gt;This lists total memory, I don't know if there is a way to display shard memory use.&lt;/PROCESS_NAME&gt;</description>
      <pubDate>Thu, 22 Aug 2002 13:25:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791762#M79917</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2002-08-22T13:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791763#M79918</link>
      <description>If you have Glance then yes you can.&lt;BR /&gt;&lt;BR /&gt;Select Reports-&amp;gt;Process List-&amp;gt;Process Memory Regions.&lt;BR /&gt;&lt;BR /&gt;If you don't have Glance, you can install a 30-day trial version from your Application CD set.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 13:31:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791763#M79918</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-08-22T13:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791764#M79919</link>
      <description>If you are able to compile your own program to examine processes, then you can measure exactly what you want from the pstat_procvm function.  I have attached a couple of examples.  One reports lots of information about every memory region in every process.  The other reports a summary of private and shared sizes.  There are several types of shared regions, so you should decide if you want to count shared text areas, mmap areas, or just system V shared memory areas identified by a pst_type of PS_SHARED_MEMORY.</description>
      <pubDate>Fri, 23 Aug 2002 15:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791764#M79919</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2002-08-23T15:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791765#M79920</link>
      <description>Thank you for your answers, but i need more info.&lt;BR /&gt;&lt;BR /&gt;I used a Steve Steel Script, and it returns me this value of a process PID 6381:&lt;BR /&gt;&lt;BR /&gt;VSZ = 21528&lt;BR /&gt;&lt;BR /&gt;The "ps -el" command returns:&lt;BR /&gt;&lt;BR /&gt;SZ = 3606&lt;BR /&gt;&lt;BR /&gt;The Myke Stroyan program, returns:&lt;BR /&gt;&lt;BR /&gt;pid shared_vm shared_ram private_vm private_ram&lt;BR /&gt;6381  37456K    13788K    457272K     37852K&lt;BR /&gt;&lt;BR /&gt;Who can explain this results ? &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Aug 2002 12:58:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791765#M79920</guid>
      <dc:creator>Joel Bortolotto Almeida</dc:creator>
      <dc:date>2002-08-26T12:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How much memory a process use ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791766#M79921</link>
      <description>&amp;gt; VSZ = 21528&lt;BR /&gt;This is the virtual memory total for TEXT+DATA+STACK, measured as number of 4K pages.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; SZ = 3606&lt;BR /&gt;This is the virtual memory total for TEXT+DATA+STACK, measured as a multiple of 1K.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;pid shared_vm shared_ram private_vm private_ram&lt;BR /&gt;&amp;gt;6381 37456K 13788K 457272K 37852K&lt;BR /&gt;These are totals of shared memory segments and private memory segments, first virtual memory, and then actual RAM.&lt;BR /&gt;&lt;BR /&gt;The "ps" data is only about a very limited part of what is mapped into the process.  In the old classical unix model the TEXT+DATA+STACK was about all a process would use.  In a typical process today a lot of the mapped memory is shared library text and data.  It looks like this process must have a very large amount of other memory, probably mmap regions or system V shared memory regions.&lt;BR /&gt;&lt;BR /&gt;The virtual memory number is the amount of addressable address range.  That can be much more than the RAM number, because many pages can be either on disk or never accessed and never really allocated in RAM.&lt;BR /&gt;&lt;BR /&gt;If you decipher the output of the full procvm tool, you can see the type and the length in pages of each segment in a process.</description>
      <pubDate>Fri, 30 Aug 2002 02:12:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-much-memory-a-process-use/m-p/2791766#M79921</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2002-08-30T02:12:01Z</dc:date>
    </item>
  </channel>
</rss>

