1823097 Members
3172 Online
109646 Solutions
New Discussion юеВ

Free memory

 
Simon,Tam├бs
Occasional Contributor

Free memory

Hi everyone!
I ask for help.
I have been working on HP V class UX11.
The Glance Plus displays me the Free Mem. value.
It is 7.42 Gb. It's a correct value.
I'd like to know wich UX command shows me this
value. The command vmstat gives me only the virtual memory. /perhaps sar?/
Thanks, Regards! Tomas.
8 REPLIES 8
Ian Dennison_1
Honored Contributor

Re: Free memory

Tomas,

There are several different ways with several different answers,...

'swapinfo -ta' - look for the memory component

top - look for memory free component.

glance - by far the best way of examining your system and memory. try the Trial version if you don't already have it.

Share and Enjoy! ian
Building a dumber user
Pete Randall
Outstanding Contributor

Re: Free memory

Tomas,

Take a look at this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa56442308663d611abdb0090277a778c,00.html

There's several good ideas there.

Pete

Pete
Pete Randall
Outstanding Contributor

Re: Free memory

John Palmer
Honored Contributor

Re: Free memory

The 'free' value from vmstat is accurate. It's reported as a number of 4K pages so you'll have to multiply by 4096 to get bytes (or divide by 256 to get megabytes).

Regards,
John
Ken Hubnik_2
Honored Contributor

Re: Free memory

Try using /sbin/mem.
steven Burgess_2
Honored Contributor

Re: Free memory

Hi Simon

for overall , try this script

let x=$(grep -i physical: /var/adm/syslog/syslog.log | head -1 | awk '{print $7}
')/1048
let z=$(vmstat|tail -1|awk '{print $5}')*4096;let z=$z/1000000
let free=100000/$x*$z
let free=$free/1000
let free=100-$free
echo "$x Mb physical memory \n$z Mb memory free \n$free % used"


HTH

Steve

take your time and think things through
Pete Randall
Outstanding Contributor

Re: Free memory

Ken,

You've suggested /sbin/mem before and the person was unable to find it. I don't have it on my 11.0 or 11i systems. Can you do a what on it - maybe that will give some indication of where it came from.

Pete

Pete
MANOJ SRIVASTAVA
Honored Contributor

Re: Free memory

Simon


There is a small c program which u can compile and run to give the free memory o/p as :

Memory Stat total used avail %used
physical 32764.0 8058.4 24705.6 25%
active virtual 531.3 128.9 402.4 24%
active real 597.0 136.0 461.0 23%
memory swap 26522.5 3738.2 22784.3 14%
device swap 2378.0 2365.5 12.5 99%


I have attached the c script .


Manoj Srivastava