<?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: Virtual Memory in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077979#M92380</link>
    <description>Thanks to all for your help. I'm experimenting with glance which I think is the best solution ^_^</description>
    <pubDate>Mon, 05 Nov 2007 11:49:50 GMT</pubDate>
    <dc:creator>EnmaAi</dc:creator>
    <dc:date>2007-11-05T11:49:50Z</dc:date>
    <item>
      <title>Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077971#M92372</link>
      <description>Hi! &lt;BR /&gt;I'm want to do a script to monitorize virtual memory of an sprecific process.&lt;BR /&gt;&lt;BR /&gt;Any commands/ideas will be great!!!&lt;BR /&gt;&lt;BR /&gt;Can I use "memstat" in HP_UX or is it just for solaris?</description>
      <pubDate>Mon, 05 Nov 2007 07:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077971#M92372</guid>
      <dc:creator>EnmaAi</dc:creator>
      <dc:date>2007-11-05T07:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077972#M92373</link>
      <description>Hiya,&lt;BR /&gt;&lt;BR /&gt;Depending on your exact needs, maybe the output of ps could already be helpful. When using '-l' (that's a lowercase L) you will get a SZ-field, described in the manpage:&lt;BR /&gt;&lt;BR /&gt; sz: The size in physical pages of the core image of the process, including text, data, and stack space.  Physical page size is defined by&lt;BR /&gt;_SC_PAGE_SIZE in the header file &lt;UNISTD.H&gt; (see sysconf(2) and unistd(5)).&lt;BR /&gt;&lt;BR /&gt;I don't know if that's good enough for your reporting needs, but it could be an 'easy way'.. note that memory on unix machines is a complicated area :)&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Wout&lt;/UNISTD.H&gt;</description>
      <pubDate>Mon, 05 Nov 2007 07:30:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077972#M92373</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-11-05T07:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077973#M92374</link>
      <description>hi enmai;&lt;BR /&gt;&lt;BR /&gt;memstat for solaris only. but you can use &lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -eo "pid ruser pcpu vsz=Kbytes" -o comm &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hasan.</description>
      <pubDate>Mon, 05 Nov 2007 07:34:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077973#M92374</guid>
      <dc:creator>Hasan  Atasoy</dc:creator>
      <dc:date>2007-11-05T07:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077974#M92375</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;I'm afraid ps is not very useful cause i need virtual memory, not physical.&lt;BR /&gt;&lt;BR /&gt;Hasan: I don't understand your command...&lt;BR /&gt;&lt;BR /&gt;^_^&lt;BR /&gt;&lt;BR /&gt;I've also read glance is useful. &lt;BR /&gt;&lt;BR /&gt;Any other ideas will be of great help ;)</description>
      <pubDate>Mon, 05 Nov 2007 09:49:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077974#M92375</guid>
      <dc:creator>EnmaAi</dc:creator>
      <dc:date>2007-11-05T09:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077975#M92376</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I'm afraid ps is not very useful cause i need virtual memory, not physical&lt;BR /&gt;&lt;BR /&gt;Huh?  Do you care where the process's memory really exists --- in physical RAM; versus paged out in swap?  What matters is the overall memory footprint for a process.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 05 Nov 2007 10:08:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077975#M92376</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-11-05T10:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077976#M92377</link>
      <description>hi ;&lt;BR /&gt;if you want to monitor process=1200 then &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;UNIX95= ps -eo "pid vsz=Kbytes" | grep 1200 | awk '{print $2}' &amp;gt;&amp;gt; logfile&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Nov 2007 10:18:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077976#M92377</guid>
      <dc:creator>Hasan  Atasoy</dc:creator>
      <dc:date>2007-11-05T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077977#M92378</link>
      <description>sory a correction . for 1 minutes interval&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;UNIX95= ps -eo "pid vsz=Kbytes" | grep 1200 | awk '{print $2}' &amp;gt;&amp;gt; logfile&lt;BR /&gt;sleep 60&lt;BR /&gt;done</description>
      <pubDate>Mon, 05 Nov 2007 10:19:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077977#M92378</guid>
      <dc:creator>Hasan  Atasoy</dc:creator>
      <dc:date>2007-11-05T10:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077978#M92379</link>
      <description>Glance indeed has nice functionality for calculating the RSS/VSS of a process.&lt;BR /&gt;&lt;BR /&gt;You can tell glance to log this to a file, but you have to create a file with some adviser commands.&lt;BR /&gt;&lt;BR /&gt;Quick and dirty example file (let's name the file 'syntaxfile'):&lt;BR /&gt;--CUT HERE--&lt;BR /&gt;process loop {&lt;BR /&gt;        if proc_proc_name == "top" then&lt;BR /&gt;                print gbl_stattime,proc_proc_id," ",proc_proc_name,proc_mem_virt&lt;BR /&gt;}&lt;BR /&gt;--CUT HERE--&lt;BR /&gt;&lt;BR /&gt;This example, as you can probably figure out, will tell glance to select processes named "top" and print their PID, name and VSS (virtual set size, which you wanted to know), prepended by the time.&lt;BR /&gt;&lt;BR /&gt;In order to run glance with this information, you could run:&lt;BR /&gt;&lt;BR /&gt;# glance -adviser_only -syntax syntaxfile &amp;gt; outputfile&lt;BR /&gt;&lt;BR /&gt;You could run this in the background if you want, and specify the interval (-j), number of iterations (-iterations) or other common glance options.&lt;BR /&gt;&lt;BR /&gt;When I run the above while a top is running on the machine, my output file looks like this:&lt;BR /&gt;&lt;BR /&gt;17:22:29    4073 top                  5.2mb&lt;BR /&gt;17:22:34    4073 top                  5.2mb&lt;BR /&gt;17:22:39    4073 top                  5.2mb&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;More info in 'man glance' and more examples in /opt/perf/examples/adviser.&lt;BR /&gt;&lt;BR /&gt;Hope that helps,&lt;BR /&gt;Cheers,&lt;BR /&gt;Wout</description>
      <pubDate>Mon, 05 Nov 2007 11:26:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077978#M92379</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-11-05T11:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077979#M92380</link>
      <description>Thanks to all for your help. I'm experimenting with glance which I think is the best solution ^_^</description>
      <pubDate>Mon, 05 Nov 2007 11:49:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077979#M92380</guid>
      <dc:creator>EnmaAi</dc:creator>
      <dc:date>2007-11-05T11:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077980#M92381</link>
      <description>Solved with glance</description>
      <pubDate>Tue, 06 Nov 2007 05:29:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/virtual-memory/m-p/5077980#M92381</guid>
      <dc:creator>EnmaAi</dc:creator>
      <dc:date>2007-11-06T05:29:48Z</dc:date>
    </item>
  </channel>
</rss>

