Operating System - HP-UX
1823958 Members
5058 Online
109667 Solutions
New Discussion юеВ

Finding how much memory locked on HPUX 11.x

 
SOLVED
Go to solution
Trevor Dyson
Trusted Contributor

Finding how much memory locked on HPUX 11.x

Hi Folks,

Can anyone tell me what specific commands or application(s) can be used on HP-UX 11.x to determine:

a: The total amount of memory currently locked by all processes.

b: The amount of memory currently locked by an individual process.

This is in relation to memory that has been locked through the use of the plock(2) system call.

Cheers, Trevor
I've got a little black book with me poems in
7 REPLIES 7
Praveen Bezawada
Respected Contributor
Solution

Re: Finding how much memory locked on HPUX 11.x

Hi
From glance you can get the total memory locked and memory locked by each process.
In glance the memory region metrics gives you the
memory locked.
The actual metric that is displayed here for each process is
proc_region_locked
but unfourtunately this includes the memory locked by system calls plock,datalock and shmctl.
Trevor Dyson
Trusted Contributor

Re: Finding how much memory locked on HPUX 11.x

Thanks Praveen,

I can see the memory locked by an individual process in the Memory Regions screen but I can't see how much memory is locked system wide. Is ths possible?
I've got a little black book with me poems in
Praveen Bezawada
Respected Contributor

Re: Finding how much memory locked on HPUX 11.x

Hi
I am not 100% sure but i think the

gbl_mem_cache + gbl_mem_user

or

gbl_mem_avail - gbl_mem_free

will give the memory locked during an interval.

...BPK...
Trevor Dyson
Trusted Contributor

Re: Finding how much memory locked on HPUX 11.x

Thanks for your help Praveen,

Regards,

Trevor
I've got a little black book with me poems in
Eileen Millen
Trusted Contributor

Re: Finding how much memory locked on HPUX 11.x

This is a really good command that Bill Hassel provided. It lists all of the processes and how much memory they are taking.
The command should all be on one line.
UNIX95= ps -e -o vsz=Kbytes -o pid,args=Command-Line | sort -rnk1
We were able to track a scopeaux memory leak using it. You can grep out processes that you want to know about.
Eileen
Sundar_7
Honored Contributor

Re: Finding how much memory locked on HPUX 11.x



I believe

dmesg is going to give U the amount of

Memory that is locked..

Sundar
Learn What to do ,How to do and more importantly When to do ?
Mladen Despic
Honored Contributor

Re: Finding how much memory locked on HPUX 11.x

Trevor,

Unfortunately, the metric PROC_REGION_LOCKED is currently unavailable on HP-UX 11.00. The only value
you will see in Glance is 'na'.

The command 'dmesg' can tell you the size of "locakble memory", but this will not tell you how much memory is actually locked.

I don't see a simple way to determine the total amount of locked memory on HP-UX 11.00, but if pseudo-swap in enabled then you can use the 'memory' line in the output of 'swapinfo -tam' as an indicator. If you take the value under "USED PCT" and multiply it by 3/4, your system is using AT LEAST that much locked memory.
If it is using more than that, I am not sure what that is.

You can find more information in the document

/usr/share/doc/mem_mgt.txt ,

under these 4 sections: Lockable Memory, Reservation of Physical Swap Space, Reservation of Pseudo-Swap Space, and Pseudo Swap and Lockable Memory

On HP-UX 10.20, you could use the metric PROC_REGION_LOCKED to generate a report.
For example, try saving the attached file as 'procreglock.syntax' in your current directory and then run

glance -adviser_only -syntax procreglock.syntax

Depending on your system, it may take a while before a single iteration is completed.

The output will contain the list of all process using locked memory, and for each such process, there will be a list of its locked memory regions. Keep in mind, however, that the sum total in the last column does not mean much, since:

1. some of those regions may be shared among processes

2. there may be other types of locked memory, such as buffer cache

HTH

Mladen