- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Memory usage GlancePlus versus ps
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 02:22 AM
03-19-2004 02:22 AM
Memory usage GlancePlus versus ps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 02:26 AM
03-19-2004 02:26 AM
Re: Memory usage GlancePlus versus ps
What kind of memory useage are you compairing? Note that memory usage reports are estimates and they "can" differ in time.
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 02:30 AM
03-19-2004 02:30 AM
Re: Memory usage GlancePlus versus ps
I do it like:
#!/bin/ksh
# usermem - display memory claimed by a user
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "usermem \"userid\""
echo "Example:"
echo "usermem gwild"
exit 1
fi
echo " "
USER=$1
t=0
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}'`
do
t=`expr $t + $j`
done
echo "\nMemory claimed by $USER: $t Kbytes.\n"
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 03:47 AM
03-19-2004 03:47 AM
Re: Memory usage GlancePlus versus ps
#!/bin/ksh
mps=0
for sz in `ps -elf | grep $1 | grep -v grep | cut -c47-51`
do
mps=`expr $mps + $sz`
done
echo `expr $mps \* 4096`
And then pass in what I'm looking for:
$ mps.ksh rpc
1941504
$
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 04:02 AM
03-19-2004 04:02 AM
Re: Memory usage GlancePlus versus ps
try this:
#!/bin/sh
mps=0
for sz in `ps -elf | grep $1 | grep -v grep | awk '{print $10}'`
do
mps=`expr $mps + $sz`
done
echo `expr $mps \* 4096`
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 04:11 AM
03-19-2004 04:11 AM
Re: Memory usage GlancePlus versus ps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 04:34 AM
03-19-2004 04:34 AM
Re: Memory usage GlancePlus versus ps
#!/bin/sh
# processmem - display memory claimed by a process
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "processmem \"process\""
echo "Example:"
echo "processmem rpc"
exit 1
fi
echo " "
PROCESS=$1
mps=0
#for sz in `ps -elf | grep $PROCESS | grep -v grep | awk '{print $10}'`
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}'`
do
mps=`expr $mps + $sz`
done
#echo `expr $mps \* 4096`
echo "\nMemory claimed by $PROCESS: $mps Kbytes.\n"