<?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 testing memory in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644301#M879084</link>
    <description>I am looking for a process that is memory intensive but not CPU or disk intensive, so I can simulate a high memory load on a machine.  Is there a better way to do this besides running multiple instances of a memory intensive process?</description>
    <pubDate>Mon, 14 Jan 2002 14:44:48 GMT</pubDate>
    <dc:creator>Jason Berendsen</dc:creator>
    <dc:date>2002-01-14T14:44:48Z</dc:date>
    <item>
      <title>testing memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644301#M879084</link>
      <description>I am looking for a process that is memory intensive but not CPU or disk intensive, so I can simulate a high memory load on a machine.  Is there a better way to do this besides running multiple instances of a memory intensive process?</description>
      <pubDate>Mon, 14 Jan 2002 14:44:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644301#M879084</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-01-14T14:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: testing memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644302#M879085</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use Glance for realtime system statastics. You can install trial version of it incase you havn't purchased  the product.&lt;BR /&gt;&lt;BR /&gt;Also sar is a useful utility sar -q &lt;BR /&gt;&lt;BR /&gt;use vmstat 5 30  and look for page out activity .High sustained page _out_ rates; paging in is normal&lt;BR /&gt;&lt;BR /&gt;Goodluck.&lt;BR /&gt;&lt;BR /&gt;-USA..&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jan 2002 14:54:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644302#M879085</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2002-01-14T14:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: testing memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644303#M879086</link>
      <description>Heres a program to consume tons of memory;&lt;BR /&gt;&lt;BR /&gt;#define NULL 0&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;int ptr;&lt;BR /&gt;ptr = NULL; &lt;BR /&gt;ptr = malloc(1024*1024*1024); &lt;BR /&gt;if (ptr) &lt;BR /&gt;perror("Malloc successful"); &lt;BR /&gt;else &lt;BR /&gt;perror("Malloc unsuccessful"); &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Save it as a .c file and compile it. &lt;BR /&gt;cc -o &lt;FILENAME&gt; &lt;FILENAME.C&gt;&lt;BR /&gt;&lt;BR /&gt;Then execute the &lt;FILENAME&gt; file. This program will try to grab 1GB of memory. You can then put a sleep in if you want it to stay in memory for a while. Run top from another window and you will see this process use up the 1GB of ram. You can adjust the 1024*1024*1024 to whatever you want. You will need to ensure your maxdsiz kernel variable is set large enough (to the size of physical ram).&lt;BR /&gt;&lt;/FILENAME&gt;&lt;/FILENAME.C&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Mon, 14 Jan 2002 15:29:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644303#M879086</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-01-14T15:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: testing memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644304#M879087</link>
      <description>&lt;BR /&gt;Oops, malloc only allocates the space, doesnt initialize it. You want to use instead;&lt;BR /&gt;&lt;BR /&gt;#define NULL 0&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;int ptr;&lt;BR /&gt;ptr = NULL; &lt;BR /&gt;ptr = datalock(1000000000,50000);&lt;BR /&gt;if (ptr) &lt;BR /&gt;perror("datalock successful"); &lt;BR /&gt;else &lt;BR /&gt;perror("datalock unsuccessful"); &lt;BR /&gt;sleep(30);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;This will grab 1GB of ram which and hold for 30secs which you will be able to see from running top. You will need to do the following on your binary first;&lt;BR /&gt;chatr +q3p enable &lt;FILENAME&gt;&lt;BR /&gt;or compile it as 64 bit;&lt;BR /&gt;cc +W2.0 &lt;FILENAME.C&gt; &lt;FILENAME&gt;&lt;BR /&gt;but you will need the full ANSI compiler installed for this.&lt;BR /&gt;&lt;BR /&gt;&lt;/FILENAME&gt;&lt;/FILENAME.C&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Mon, 14 Jan 2002 15:49:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644304#M879087</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-01-14T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: testing memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644305#M879088</link>
      <description>Stefan,&lt;BR /&gt;&lt;BR /&gt;I would imagine if I want to change the 1gig datalock to a smaller amount I would change the 1000000000 to a smaller number.  What is the 50000, and do I need to change this if I change the other number?</description>
      <pubDate>Mon, 14 Jan 2002 15:55:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/testing-memory/m-p/2644305#M879088</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-01-14T15:55:56Z</dc:date>
    </item>
  </channel>
</rss>

