An HPUX would say how much memory at boot time:
ant:/sm/cron/bin $ grep Phys /var/adm/syslog/syslog.log
May 21 19:28:28 ant vmunix: Physical: 8388608 Kbytes, lockable: 6464976 Kbytes, available: 7426824 Kbytes
After you would have to use other tools like glance/gpm stm etc...
In simple language, what you are seeing in top is the reflect of how HPUX works (memory management...) For HPUX memory is "virtual" and so your device swap count as memory...
HPUX till 11.23 (after I have no boxes nor knowledge...) the size of your usable (addressable) memory is the size of your swap
Depending on the kernel parameter swapmem_on (set to 0/1) it will extend the swap size by using some of your RAM... and so extend its "memory".
As you can see, depending how you configured your kernel and swap size you may face different issues: Not enough swap although plenty RAM, and box saying run out of mem resource or boy loading far more than it can afford and swapping like mad...
I will present you 2 cases:
box1 D230 HPUX11 with 1 GB RAM:
ard # grep Phys /var/adm/syslog/titi
Dec 7 15:22:07 ard vmunix: Physical: 1048576 Kbytes, lockable: 938336 Kbytes, available: 972940 Kbytes
ard # swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
reserve - 41 -41
total 1024 41 983 4% - 0 -
You could guess by looking at the above outputs that this box swapmem_on is set to 0:
swapmem_on 0 - - -
(TRUE!) And you know this box could not exceed 1 GB memory usage...
If it had swapmem_on on, it would have maybe an extra 200MB of addressable memory...
Box2 : K360 HPUX11...
aco:/var/adm/syslog $ grep Phys /var/adm/syslog/titi
Sep 7 14:51:21 aco vmunix: Physical: 2097140 Kbytes, lockable: 1797216 Kbytes, available: 1833500 Kbytes
aco:/var/adm/syslog $ swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 2048 0 2048 0% 0 - 0 /dev/vg00/lvol9
dev 2048 0 2048 0% 0 - 0 /dev/r5vg03/lvol2
reserve - 318 -318
total 5120 318 4802 6% - 0 -
2GB RAM - 5GB swap
5GB swap matches the total device swap so?
aco:/var/adm/syslog $ sysdef|grep swapmem
swapmem_on 0 - - -
swapmem turned off... but 5 GB of memory would be seen...
This allowed me to install 6 oracle (of different versions...)instance plus 1 sybase and more than 600 concurent users and the lot was slow perhaps but was from the beginning and everybody was happy once used to its speed (180Mhz bi-proc..) The most amasing... Never did you have a cursor freeze for a moment even short...
Box3 L2000 HPUX11.11
you comment...
elm:/home/vbe $ grep Phys /var/adm/syslog/syslog.log
Oct 2 12:12:34 elm vmunix: Physical: 4194304 Kbytes, lockable: 3756084 Kbytes, available: 3499136 Kbytes
elm:/home/vbe $ swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 3000 0 3000 0% 0 - 1 /dev/vg00/lvol2
dev 1500 0 1500 0% 0 - 2 /dev/vg01/lvol10
reserve - 1389 -1389
total 4500 1389 3111 31% - 0 -
How much can be loaded in memory?
And so?
elm:/home/vbe $ sysdef|grep swapmem
swapmem_on 0 - - -
Now tricky one
Box4 L2000 (RP5450) HPUX11.11
ant:/home/vbe $ grep Physi /var/adm/syslog/syslog.log
May 21 19:28:28 2 ant vmunix: Physical: 8388608 Kbytes, lockable: 6464976 Kbytes, available: 7426824 Kbytes
ant:/home/vbe $ swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4000 0 4000 0% 0 - 1 /dev/vg00/lvol2
dev 4096 0 4096 0% 0 - 1 /dev/vg00/swap3
dev 4096 0 4096 0% 0 - 0 /dev/esvg01/lvol2
reserve - 1336 -1336
memory 6326 1504 4822 24%
total 18518 2840 15678 15% - 0 -
ant:/home/vbe $ sysdef|grep swapmem
swapmem_on 1 - - -
All the best