Operating System - HP-UX
1827593 Members
2591 Online
109965 Solutions
New Discussion

How do find out about total RAM on the server

 
Bob Tehranian_1
New Member

How do find out about total RAM on the server

Hello,

I was wondering if anyone knows how to find out the total RAM on an HP-UX
machine? I am interested in finding out an output like the "bootinfo -r"
command generates in AIX. "dmesg" is not the output that I am looking for.

thanks,
5 REPLIES 5
Melvyn Burnard_1
Regular Advisor

Re: How do find out about total RAM on the server

Although dmesg is one way to obtain the total physical memory from a system, it
is not always available, due to the dmesg buffer being a FIFO, so it rolls
around when there are lots of messages being logged.
The one way to obtain this, is to do :
grep Physical /var/adm/syslog/syslog.log
as when the system is booted, this is logged in the syslog.log.
Another way is to run the diagnostics manager, mstm, to go look for this.
Other than that, you may need to run adb on the running kernel, which I do not
generally advise, or write some C code to obtain this.
Carlos Riera
Frequent Advisor

Re: How do find out about total RAM on the server

Hi:

We use a C program.
See man pstat(2) for description and examples.
Robert Gamble_3
Regular Advisor

Re: How do find out about total RAM on the server

SAM will tell you the physical memory of a system.
SAM->Performance Monitors->System Properties,
then tab to Memory.

If there isn't much memory (>512MB), you can use /usr/sam/lbin/getmem .

Good Luck!
Joseph Lupo
New Member

Re: How do find out about total RAM on the server

> If there isn't much memory (>512MB), you can use /usr/sam/lbin/getmem .

What does getmem do?
Robert Gamble_3
Regular Advisor

Re: How do find out about total RAM on the server

From the comp.sys.hp.hpux FAQ:

Subject: 7.74 How can I determine how much memory there is in my HP-UX system?

Here are three methods to determine the amount of physical memory on your
system (while logged on as superuser):
1. If the diagnostic messages are still in the system buffer since
the last reboot, the following will give the total kbytes:
dmesg | awk '/Physical:/ && /Kbytes/ {print $2}'

2. As of 10.X, the following SAM command will show memory in Mb:
/usr/sam/lbin/getmem

3. It's slow, but the following method will give the total bytes:
wc -c /dev/mem

#EO-FAQ quote

I personally do not know what getmem does exactly, it appears to display in MB
the amount of memory installed. However, I have not seen it work correctly on
systems with memory greater than 512MB. My guess is that SAM uses this command
to find the correct amount of memory like I showed in my earlier post, but with
options that are not documented.

Good Luck!