Operating System - HP-UX
1827728 Members
2759 Online
109968 Solutions
New Discussion

how to know about memory available?

 
SOLVED
Go to solution
bossuyt
Occasional Contributor

how to know about memory available?

hi folks,

with which command can i know how much RAM is on the computer (ram, not swap), without using dmesg.

thanks
8 REPLIES 8
Rick Garland
Honored Contributor

Re: how to know about memory available?

If you have DIAGS installed, can use the stm utility. top will also show.
Rick Garland
Honored Contributor

Re: how to know about memory available?

Forgot about SAM as well. Go into System Properties.
Rita C Workman
Honored Contributor

Re: how to know about memory available?

When your system comes up it display the physical memory.
You can enter dmesg.
You can also check this via SAM/Performance Monitors/System Properties and then look under the Memory tab.....it's all there!

Regards,
Victor BERRIDGE
Honored Contributor

Re: how to know about memory available?

You can always look in /var/adm/syslog/syslog.log:
cat syslog.log |grep Physical:
vmunix: Physical: 524288 Kbytes, lockable: 441956 Kb
ytes, available: 472492 Kbytes
Andreas Voss
Honored Contributor

Re: how to know about memory available?

Hi,

look at this thread:
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf36a7e990647d4118fee0090279cd0f9,00.html

Andy Monks has attached a little C program for this issue.

Regards

Andrew
John Palmer
Honored Contributor
Solution

Re: how to know about memory available?

Or you could use adb if you want to get the value into a shell variable:-

10.20
let MEM=$(echo 'physmem/D'| adb /stand/vmunix /dev/kmem | tail -1 | awk '{print $2}')
let MEM="(MEM+128)/256"

11.00
let MEM=$(echo 'phys_mem_pages/D'| adb /stand/vmunix /dev/kmem | tail -1 | awk '{print $2}')
let MEM="(MEM+128)/256"

In both cases, ${MEM} is in megabytes.
CHRIS_ANORUO
Honored Contributor

Re: how to know about memory available?

Use echo "mem_ptr/D"| adb /stand/vmunix
/dev/mem (gives in number of bytes).
Or

cat /var/adm/syslog/syslog.log|grep Phy*
This will show you the Physical; Lockable and Available memory in Kbytes

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Stefan Schulz
Honored Contributor

Re: how to know about memory available?

Instead of activating SAM you can also use the tool on command line. Type /usr/sam/lbin/getmem as root. It will display the physical RAM installed in MB.
No Mouse found. System halted. Press Mousebutton to continue.