Operating System - HP-UX
1752574 Members
4570 Online
108788 Solutions
New Discussion юеВ

Re: Is there a command to get various type of memory utilization

 
Prem Mehrotra
Occasional Advisor

Is there a command to get various type of memory utilization

HP has various kinds of memory utilizations: text, data, stack, shared memory. I know how to get shared memory utilization by different processes using ipcs, but looking for command to find: text, data, stack utlization.

In another thread "running 32 bit java on 64 bit HP UNIX", I have pointed out I keep getting memory errors even when my server has 10GB+ free memory as shown using gpm, glance. My maxdsiz is set to 4GB, maxssiz 124M and maxtsiz 100M. Looking at ulimit -a everything else is unlimited.
12 REPLIES 12
Dennis Handly
Acclaimed Contributor

Re: Is there a command to get various type of memory utilization

>command to find: text, data, stack utilization.

That would be glance.
Typically you don't care about text and stack. Unless you have thread stack overflows.

>I keep getting memory errors even when my server has 10GB+ free memory

You need to measure this when you have the error, not when the system is quiet.
Basheer_2
Trusted Contributor

Re: Is there a command to get various type of memory utilization

Hello Prem

vmstat 1 5

you can get the Text, Data, Stack, utili
using
glance
or
gpm

Michal Kapalka (mikap)
Honored Contributor

Re: Is there a command to get various type of memory utilization

hi,

glance or gpm ( gui )

mikap
Aneesh Mohan
Honored Contributor

Re: Is there a command to get various type of memory utilization

Hi,

Glance

or

You can download procsize utility to get the memory usage of each process based on TEXT,DATA,STACK,SHARED MEMORY & MEMORY MAPPED FILES.

Example
----------

# ./procsize -fnc | more
pid Comm UAREA TEXT DATA STACK SHMEM IO MMAP Total
2916 getty v 4 5 6 4 0 0 349 369
2287 prm3d v 68 6 671 513 0 0 37212 38471

Download Information:-
--------------------
procsize is available for download here:

System: hprc.external.hp.com (192.170.19.51)
Login: eh
Password: spear9
ftp://eh:spear9@hprc.external.hp.com/procsize.README.txt
ftp://eh:spear9@hprc.external.hp.com/procsize.sh


Regards,
Aneesh
Aneesh Mohan
Honored Contributor

Re: Is there a command to get various type of memory utilization

addendum....

NOTE: numbers in the output of procsize are the number of 4K pages. So, mulitply by 4096 to get a byte count.

Regards,
Aneesh
Prem Mehrotra
Occasional Advisor

Re: Is there a command to get various type of memory utilization

Whence I enter glance, it only shows me Memory RSS/VSS (probably real/virtual). I do n't see separation in terms of text, stack and data.
Prem Mehrotra
Occasional Advisor

Re: Is there a command to get various type of memory utilization

Aneeh:

For some reaosn ftp fails,, i.e., when I entre login and password, I get a message login incorrect,
Shiv007
Frequent Advisor

Re: Is there a command to get various type of memory utilization

Hi,

you can use vmstat command or there is tool kmeminfo through which you can capture the mem usage.

thanks
Shiv
Dennis Handly
Acclaimed Contributor

Re: Is there a command to get various type of memory utilization

>it only shows me Memory RSS/VSS. I don't see separation in terms of text, stack and data.

You need to look at the memory region details for a specific process. You will have to add up a bunch of numbers.