<?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: Memory usage GlancePlus versus ps in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223957#M170845</link>
    <description>Here's a modified version - using UNIX95:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# processmem - display memory claimed by a process&lt;BR /&gt;#&lt;BR /&gt;if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]&lt;BR /&gt;then&lt;BR /&gt;  echo "Usage:"&lt;BR /&gt;  echo "processmem \"process\""&lt;BR /&gt;  echo "Example:"&lt;BR /&gt;  echo "processmem rpc"&lt;BR /&gt;  exit 1&lt;BR /&gt;fi&lt;BR /&gt;echo " "&lt;BR /&gt;&lt;BR /&gt;PROCESS=$1&lt;BR /&gt;&lt;BR /&gt;mps=0&lt;BR /&gt;#for sz in `ps -elf | grep $PROCESS | grep -v grep | awk '{print $10}'`&lt;BR /&gt;for sz in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $PROCESS | awk '{print $1}'`&lt;BR /&gt;do&lt;BR /&gt;mps=`expr $mps + $sz`&lt;BR /&gt;done&lt;BR /&gt;#echo `expr $mps \* 4096`&lt;BR /&gt;echo "\nMemory claimed by $PROCESS: $mps Kbytes.\n"&lt;BR /&gt;</description>
    <pubDate>Fri, 19 Mar 2004 12:34:18 GMT</pubDate>
    <dc:creator>Geoff Wild</dc:creator>
    <dc:date>2004-03-19T12:34:18Z</dc:date>
    <item>
      <title>Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223951#M170839</link>
      <description>Why does the memory usage of an application group in GlancePlus not equal the amount of memory shown in the size portion of a ps command? I would expect some variance but the numbers are off by mega bytes.</description>
      <pubDate>Fri, 19 Mar 2004 10:22:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223951#M170839</guid>
      <dc:creator>Gordon_10</dc:creator>
      <dc:date>2004-03-19T10:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223952#M170840</link>
      <description>Gordon,&lt;BR /&gt;&lt;BR /&gt;What kind of memory useage are you compairing? Note that memory usage reports are estimates and they "can" differ in time.&lt;BR /&gt;&lt;BR /&gt;Gideon&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Mar 2004 10:26:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223952#M170840</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-03-19T10:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223953#M170841</link>
      <description>How are you getting the memory with ps?&lt;BR /&gt;&lt;BR /&gt;I do it like:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# usermem - display memory claimed by a user&lt;BR /&gt;#&lt;BR /&gt;if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]&lt;BR /&gt;then&lt;BR /&gt;  echo "Usage:"&lt;BR /&gt;  echo "usermem \"userid\""&lt;BR /&gt;  echo "Example:"&lt;BR /&gt;  echo "usermem gwild"&lt;BR /&gt;  exit 1&lt;BR /&gt;fi&lt;BR /&gt;echo " "&lt;BR /&gt;&lt;BR /&gt;USER=$1&lt;BR /&gt;t=0&lt;BR /&gt;for j in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $USER | awk '{print $1}'`&lt;BR /&gt;do&lt;BR /&gt;t=`expr $t + $j`&lt;BR /&gt;done&lt;BR /&gt;echo "\nMemory claimed by $USER: $t Kbytes.\n"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 19 Mar 2004 10:30:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223953#M170841</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-03-19T10:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223954#M170842</link>
      <description>Close. I use the following:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;mps=0&lt;BR /&gt;for sz in `ps -elf | grep $1 | grep -v grep | cut -c47-51`&lt;BR /&gt;do&lt;BR /&gt;mps=`expr $mps + $sz`&lt;BR /&gt;done&lt;BR /&gt;echo `expr $mps \* 4096`&lt;BR /&gt;&lt;BR /&gt;And then pass in what I'm looking for:&lt;BR /&gt;&lt;BR /&gt;$ mps.ksh rpc&lt;BR /&gt;1941504&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;This is the approximate size in bytes of all the rpc processes. In GlancePlus I know I'm looking at the wrong stuff because Virtual Memory and Res. Memory only come to (26680+9712)36392 somethings. Not sure what this is as page size does not work. So the question is what is GlancePlus showing me?</description>
      <pubDate>Fri, 19 Mar 2004 11:47:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223954#M170842</guid>
      <dc:creator>Gordon_10</dc:creator>
      <dc:date>2004-03-19T11:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223955#M170843</link>
      <description>I think it's your cut....&lt;BR /&gt;&lt;BR /&gt;try this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;mps=0&lt;BR /&gt;for sz in `ps -elf | grep $1 | grep -v grep | awk '{print $10}'`&lt;BR /&gt;do&lt;BR /&gt;mps=`expr $mps + $sz`&lt;BR /&gt;done&lt;BR /&gt;echo `expr $mps \* 4096`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 19 Mar 2004 12:02:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223955#M170843</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-03-19T12:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223956#M170844</link>
      <description>Thanks. Looks like expr doesn't care for the spaces left over by the cut.</description>
      <pubDate>Fri, 19 Mar 2004 12:11:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223956#M170844</guid>
      <dc:creator>Gordon_10</dc:creator>
      <dc:date>2004-03-19T12:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage GlancePlus versus ps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223957#M170845</link>
      <description>Here's a modified version - using UNIX95:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# processmem - display memory claimed by a process&lt;BR /&gt;#&lt;BR /&gt;if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]&lt;BR /&gt;then&lt;BR /&gt;  echo "Usage:"&lt;BR /&gt;  echo "processmem \"process\""&lt;BR /&gt;  echo "Example:"&lt;BR /&gt;  echo "processmem rpc"&lt;BR /&gt;  exit 1&lt;BR /&gt;fi&lt;BR /&gt;echo " "&lt;BR /&gt;&lt;BR /&gt;PROCESS=$1&lt;BR /&gt;&lt;BR /&gt;mps=0&lt;BR /&gt;#for sz in `ps -elf | grep $PROCESS | grep -v grep | awk '{print $10}'`&lt;BR /&gt;for sz in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $PROCESS | awk '{print $1}'`&lt;BR /&gt;do&lt;BR /&gt;mps=`expr $mps + $sz`&lt;BR /&gt;done&lt;BR /&gt;#echo `expr $mps \* 4096`&lt;BR /&gt;echo "\nMemory claimed by $PROCESS: $mps Kbytes.\n"&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Mar 2004 12:34:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-glanceplus-versus-ps/m-p/3223957#M170845</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-03-19T12:34:18Z</dc:date>
    </item>
  </channel>
</rss>

