Operating System - HP-UX
1833016 Members
2254 Online
110048 Solutions
New Discussion

How much RAM is in a server?

 
SOLVED
Go to solution
Philip Kernohan
Advisor

How much RAM is in a server?

In HP-UX 11.0 how can I tell how much RAM I have in a server?

I have used 'dmesg' for a long time to find out how much Physical Memory is in a server but as I believe you can clear dmesg and hence this value is not always available.

Point to note, servers are of different classes from D to V and I do not have STM installed on all of the servers that I would like to check.

Is there a simple method available that covers all servers without installing additional software?
It's nice to be important but it's more important to be nice
9 REPLIES 9
Vincenzo Restuccia
Honored Contributor

Re: How much RAM is in a server?

`echo "physmem/D" | adb /stand/vmunix /dev/kmem | tail -1 | awk '$2 > 0 {print $2 / 256 , "MByte" }'`


adb /stand/vmunix /dev/kmem | tail -1 | awk '{print $2}'`
Patrick Wallek
Honored Contributor

Re: How much RAM is in a server?

If you have ignite/ux installed, you can do a print_manifest and that will list various system parameters, including the amount of RAM.

You can also use sam. Get into sam, then go to Performance Monitors, then go to System Properties, then click on the Memory tab and you will see your memory configuration.

Neither of these will work if you need this information as part of a script though.
MANOJ SRIVASTAVA
Honored Contributor

Re: How much RAM is in a server?

Hi Philip

Try this

1. SAM----> Performance Monitor ---> System Properties.

2. dmesg .

3. STM

Manoj Srivastava
Wieslaw Krajewski
Honored Contributor
Solution

Re: How much RAM is in a server?

Hi,

And one more way:

/usr/sam/lbin/getmem

Rgds.
Permanent training makes master
Philip Kernohan
Advisor

Re: How much RAM is in a server?

From author:

Thank you all for your very prompt replies.

Vincenzo:
echo "physmem/D" | adb /stand/vmunix /dev/kmem | tail -1 | awk '{print $2/256 " Mbytes"}'

works great.

Wieslaw, your solution is a very neat method also.

Sorry, I should have said that I wanted to script this and hence command line options were what I was looking for - my fault.

I hope I have awarded points accordingly.

Once again, many thanks - I never knew such easy methods existed.
It's nice to be important but it's more important to be nice
Animesh Chakraborty
Honored Contributor

Re: How much RAM is in a server?

hi,
You can try this one:

cat /var/adm/syslog/syslog.log|grep Phy

I have tried /usr/sam/lbin/getmem
Result I got 152 where my actual phy. memmory
is 6 GB.
How can I explain this ?

Thanks
animesh
Did you take a backup?
Philip Kernohan
Advisor

Re: How much RAM is in a server?

Animesh,

My syslogs aren't so 'young' as to have the startup information still in them.

Check back here in a few days - I'm about to run these commands on several servers and I'll post my findings.

It worked for the server I'm doing some testing on but you've sparked my interest in verifying it further.

Regards,
Philip
It's nice to be important but it's more important to be nice
Darrel Louis
Honored Contributor

Re: How much RAM is in a server?

Philip,

Here are some extra commands to verify system resources:
for HP-UX 10x
example:

echo physmem/D | adb -k /stand/vmunix /dev/kmem
physmem:
physmem: 24576

for HP-UX 11.x systems running on 32 bit architecture:
example:

echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem
phys_mem_pages:
phys_mem_pages: 24576

for HP-UX 11.x systems running on 64 bit architecture:
example:

echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem
phys_mem_pages:
phys_mem_pages: 262144

The results of these commands are in memory pages, multiply by 4096
to obtain the size in bytes.

To determine the amount of lockable memory:
example:

echo total_lockable_mem/D | adb -k /stand/vmunix /dev/mem
total_lockable_mem:
total_lockable_mem: 185280

To determine the number of free swap pages :
example:

echo swapspc_cnt/D | adb -k /stand/vmunix /dev/kmem
swapspc_cnt:
swapspc_cnt: 216447

This will display the number of free swap pages.
Multiply the number returned by 4096 for the number of free swap bytes.

To determine the processor speed:
example:
echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
itick_per_usec:
itick_per_usec: 360

To determine the number of processors in use:
example:
echo "runningprocs/D" | adb -k /stand/vmunix /dev/mem
runningprocs:
runningprocs: 2

To determine the number of pages of buffer cache ( 4Kb in size)
example:
echo bufpages/D | adb -k /stand/vmunix /dev/mem
bufpages:
bufpages: 18848

To display kernel parameters using adb use the parameter name :
example:
echo nproc/D | adb -k /stand/vmunix /dev/mem
nproc:
nproc: 276

To determine the kernel your booted from:
example:
10.x
echo 'boot_string/S' | adb /stand/vmunix /dev/mem
boot_string:
boot_string: disc(52.6.0;0)/stand/vmunix

11.x
echo 'boot_string/S' | adb /stand/vmunix /dev/mem
boot_string:
boot_string: disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix
Philip Kernohan
Advisor

Re: How much RAM is in a server?

.
It's nice to be important but it's more important to be nice