<?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: Getting RSS memory using ps command in HP UX 11.31 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6558044#M487447</link>
    <description>&lt;P&gt;Hello Dave and thanks for the welcome,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't realize that base_pagesize might be changed, but sadly I have checked and it is 4K so I don't understand why if I multiply the number of pages currently allocated in memory (parameter size of ps command) by 4K I am not getting the RSS parameter...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding to the vsz, thank you but, as I said in my previous message, this parameter shows the total memory allocated by the process (its code, parameters, etc) but &amp;nbsp;in vsz it shows also some memory that the process has currently allocated but shared with other processes. At the example that I put it is very clear, I have a Weblogic process which shouldn't been allocating more than 2Gb (because it is configured like that) and the VSZ parameter is showing 3Gb while the RSS memory is less than 2Gb.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank for your reply, kind regards.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2014 06:34:21 GMT</pubDate>
    <dc:creator>David_Ortiz</dc:creator>
    <dc:date>2014-07-30T06:34:21Z</dc:date>
    <item>
      <title>Getting RSS memory using ps command in HP UX 11.31</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557020#M487443</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my first post, so I hope to be well received here :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get a weekly report on the use of memory and CPU of different processes. So far I am using the ps command and redirecting the output to a file like this:&lt;/P&gt;&lt;P&gt;UNIX95=1 ps -ef -o pcpu,pid,args &amp;nbsp;| grep Dweblogic.Name=CitNave02 | grep -v grep &amp;gt;&amp;gt; /home/wlogic11/monitores_procesos/CitNave02_CPU&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after that I process the file and I get the CPU of the process. However, I would also need the rss memory used by this process. I have checked the man of ps and found&amp;nbsp;&lt;SPAN&gt;sz The size in physical pages of the core image of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;the process, including text, data, and stack&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;space.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when using that parameter:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;UNIX95=1 ps -ef -o pcpu,sz,pid,args | grep Dweblogic.Name=CitNave02 | grep -v grep&lt;BR /&gt;5.82 56348 19872 /opt/java6/jre/bin/IA64W/java -Dweblogic.Name=CitNave02&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get 56348 pages, if I multiply that by 4K each page I obtain 225392Kb which is totally different from the output of the glance command for that process which is 1,59Gb :&lt;/P&gt;&lt;P&gt;Process Name &amp;nbsp; &amp;nbsp; PID &amp;nbsp; &amp;nbsp; Name &amp;nbsp; ( 400% max) Cnt &amp;nbsp;IOrate &amp;nbsp; &amp;nbsp; &amp;nbsp;RSS/VSS &amp;nbsp; &amp;nbsp; &amp;nbsp;On&lt;/P&gt;&lt;P&gt;java &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 19872 wlogic11 &amp;nbsp; &amp;nbsp; &amp;nbsp;3.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 55 &amp;nbsp; 0.0 &amp;nbsp; &amp;nbsp;1.59gb &amp;nbsp;3.11gb SLEEP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I obtaing the RSS value using ps command? I have found several responses over the internet where it use the argument "rss" but it this parameter doesn't appear at the ps manual.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is no way to obtaing the RSS value using ps, any suggestion would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David O.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 09:29:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557020#M487443</guid>
      <dc:creator>David_Ortiz</dc:creator>
      <dc:date>2014-07-29T09:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RSS memory using ps command in HP-UX 11.31</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557052#M487444</link>
      <description>&lt;P&gt;&amp;gt;If there is no way to obtaining the RSS value using ps, any suggestion would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does vsz give?&amp;nbsp; A number 4 times smaller?&lt;/P&gt;&lt;P&gt;If you want RSS, perhaps you need to use &amp;nbsp;pstat_getprocvm(2).&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 09:53:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557052#M487444</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-07-29T09:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RSS memory using ps command in HP-UX 11.31</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557084#M487445</link>
      <description>&lt;P&gt;Hello Dennis,&lt;/P&gt;&lt;P&gt;if I use vsz in stead of sz I get approxymately the VSS&lt;BR /&gt;UNIX95=1 ps -ef -o pcpu,vsz,pid,args | grep Dweblogic.Name=CitNave02 | grep -v grep&lt;BR /&gt;2.71 &lt;STRONG&gt;3340484&lt;/STRONG&gt; 19872 /opt/java6/jre/bin/IA64W/java&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3340484/1024/1024= 3.18 Gb. At glance:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Process Name &amp;nbsp; &amp;nbsp; PID &amp;nbsp; &amp;nbsp; Name &amp;nbsp; ( 400% max) Cnt &amp;nbsp;IOrate &amp;nbsp; &amp;nbsp; &amp;nbsp;RSS/VSS &amp;nbsp; &amp;nbsp; &amp;nbsp;On&lt;/P&gt;&lt;P&gt;java &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 19872 wlogic11 &amp;nbsp; &amp;nbsp; &amp;nbsp;1.3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;55 &amp;nbsp; 0.0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.89gb /3.14gb SLEEP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This value is not useful to me, because this weblogic has configurated 2Gb of memory and VSS shows more memory used than this value. VSS shows the memory used by the process itself but also the memory that it shares with other processes while RSS shows the "real" used memory only by that process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, another solution would be to calculate the RSS using the VSS, but I haven't found any way neither.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 10:46:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557084#M487445</guid>
      <dc:creator>David_Ortiz</dc:creator>
      <dc:date>2014-07-29T10:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RSS memory using ps command in HP UX 11.31</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557492#M487446</link>
      <description>&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Welcome to the community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A couple of suggestions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) There is also a "vsz" parameter so you might get better results with that parameter&lt;/P&gt;&lt;P&gt;2) You are multiplying the "sz" parameter by 4K, which makes sense since that is the default page size. However, the base pagesize is tunable via the "base_pagesize" kctune parameter. &amp;nbsp;Are you certain your system is using a 4K pagesize?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 16:42:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6557492#M487446</guid>
      <dc:creator>Dave Olker</dc:creator>
      <dc:date>2014-07-29T16:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RSS memory using ps command in HP UX 11.31</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6558044#M487447</link>
      <description>&lt;P&gt;Hello Dave and thanks for the welcome,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't realize that base_pagesize might be changed, but sadly I have checked and it is 4K so I don't understand why if I multiply the number of pages currently allocated in memory (parameter size of ps command) by 4K I am not getting the RSS parameter...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding to the vsz, thank you but, as I said in my previous message, this parameter shows the total memory allocated by the process (its code, parameters, etc) but &amp;nbsp;in vsz it shows also some memory that the process has currently allocated but shared with other processes. At the example that I put it is very clear, I have a Weblogic process which shouldn't been allocating more than 2Gb (because it is configured like that) and the VSZ parameter is showing 3Gb while the RSS memory is less than 2Gb.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank for your reply, kind regards.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 06:34:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6558044#M487447</guid>
      <dc:creator>David_Ortiz</dc:creator>
      <dc:date>2014-07-30T06:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RSS memory using ps command in HP-UX 11.31</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6559158#M487449</link>
      <description>&lt;P&gt;If you search for pstat_getprocvm(2) you can find several topics with source to a program:&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/Substitue-of-PMAP-in-11-23/m-p/5918583#M482792" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/Substitue-of-PMAP-in-11-23/m-p/5918583#M482792&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/Languages-and-Scripting/C-code-for-getting-process-memory-usage/m-p/3479033#M11681" target="_blank"&gt;http://h30499.www3.hp.com/t5/Languages-and-Scripting/C-code-for-getting-process-memory-usage/m-p/3479033#M11681&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/Determining-what-processes-are-taking-up-the-most-swap-file/m-p/4550542#M370522" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/Determining-what-processes-are-taking-up-the-most-swap-file/m-p/4550542#M370522&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/Memory-footprint-command/m-p/2966942#M119625" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/Memory-footprint-command/m-p/2966942#M119625&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/how-to-snapshot-process-memory-mapping/m-p/2904301#M105723" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/how-to-snapshot-process-memory-mapping/m-p/2904301#M105723&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 20:48:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-rss-memory-using-ps-command-in-hp-ux-11-31/m-p/6559158#M487449</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-07-30T20:48:38Z</dc:date>
    </item>
  </channel>
</rss>

