HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting information on installed memory

 
SOLVED
Go to solution
Vineet Deshpande
Frequent Advisor

Getting information on installed memory

Hi,

I want to find out the installed memory on a HP-UX system. The constraints are that I cannot use root credentials and the STM utility is not working.

Is there any command which will give me this information? I will prefer command over any utility for getting this information.

Please help.

Thanks,

Vineet
23 REPLIES
Prashanth Waugh
Esteemed Contributor

Re: Getting information on installed memory

Hi Vineet,

Use #galnce

Reagrds
Prashant
For success, attitude is equally as important as ability
Prashanth Waugh
Esteemed Contributor

Re: Getting information on installed memory

hi,

#glance -m

here it will show physical mem

Reagrds
Prashant
For success, attitude is equally as important as ability
Alex Mantelos_1
Occasional Advisor

Re: Getting information on installed memory

Hello,

Yes, it is one of those issues that come up often.

Some simple possibilities with relatively
reliable results:

# swapinfo -tm

...look for memory line and add columns
together

# top -d 1

... again, look for memory line

Cheers,

VK2COT

PS. It is one of my around 20 different recommendations to add proper, simple command-line interface for
checking RAM in HP-UX 11.41. As Unix Ambassador at HP, I have right and
obligation to report what our customers
need and want :)
Suraj K Sankari
Honored Contributor

Re: Getting information on installed memory

Hi,

top and swapinfo -tam are the command

Suraj
Suraj K Sankari
Honored Contributor

Re: Getting information on installed memory

Hi again,

one more i missed

dmesg | grep -i physical


Suraj
Pete Randall
Outstanding Contributor

Re: Getting information on installed memory

You can obtain CPU speed as well as RAM without CSTM or root access as described by Tom Ferony (under Nancy Rippey's login) here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851889


Pete

Pete
Jeeshan
Honored Contributor
Solution

Re: Getting information on installed memory

check with this command

#print_manifest|more
a warrior never quits
VK2COT
Honored Contributor

Re: Getting information on installed memory

Ashan,

print_manifest will not work for non-root users.

It only runs for privileged accounts :)

VK2COT
VK2COT - Dusan Baljevic
ARCHITECT_1
Advisor

Re: Getting information on installed memory

use

#cstm
>selall
>infolog


thanks
prasadb
Super Advisor

Re: Getting information on installed memory

This works even for a normal user

$echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm
Vineet Deshpande
Frequent Advisor

Re: Getting information on installed memory

Hi,

Thank you very much for your help. I'll try and reply to all the commands:-

1) I cannot use STM as its not working
2) I cannot use print_manifest as it requires root credentials
3) I also cannot use top
4) glance is also not present
5) I did some testing for swapinfo -tm but I am getting different values as compared to STM
Adding columns of total gives a very large value for Memory.

So from all this I think swapinfo sounds a good option but I am having trouble in finding what is the exact size of memory. Following is a sample output. Please help me interpret it:-

$ /usr/sbin/swapinfo -tm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 3072 24 3048 1% 0 - 1 /dev/vg00/lvol2
dev 3000 24 2976 1% 0 - 1 /dev/vg01/swap
reserve - 1017 -1017
memory 2330 1995 335 86%
total 8402 3060 5342 36% - 0 -

Thanks,

Vineet

Re: Getting information on installed memory

>Please help me interpret it:
memory 2330

The value 2330 Mb multiplied by a magic number, probably 4/3, is the memory you have.
Analyst
Trusted Contributor

Re: Getting information on installed memory

Hi Vineet,

command to check the Installed memory

machinfo |grep -i memory.

swapinfo -m ( see the dev)

Thz,
Analyst.


Vineet Deshpande
Frequent Advisor

Re: Getting information on installed memory

Hi,

I tried machinfo and swapinfo -m.

machinfo is not available on some of my HP B.11.11 machines.

I am still having problems in interpreting the swapinfo -m output. These are the outputs of stm and swapinfo -m used on the same machine.

When I run stm using command:echo "scl type memory \\n info ; wait \\n infolog" 2>/dev/null | /usr/sbin/cstm 2>/dev/null and look for Total Configured Memory I get it as 3072 MB.

And swapinfo -m gives this output:-
$ /usr/sbin/swapinfo -m

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 3072 86 2986 3% 0 - 1 /dev/vg00/lvol2
dev 3000 87 2913 3% 0 - 1 /dev/vg01/swap
reserve - 904 -904
memory 2330 1995 335 86%

Here the first first entry in dev gives the correct memory but on another machine I am getting memory from STM as 8192 MB and memory from swapinfo -m as 4096.

Please help.

Thanks,

Vineet

Re: Getting information on installed memory

>I am still having problems in interpreting the swapinfo -m output.

Always use -tam. And probably you should only be looking at the total line.

>look for "Total Configured Memory" I get it as 3072 MB.

This is how much you have. Stop, don't look any further.

>swapinfo -m gives this output:
>dev 3072 86 2986 3% 0 - 1 /dev/vg00/lvol2
>memory 2330 1995 335 86%
>Here the first first entry in dev gives the correct memory

Device swap has nothing to do with RAM. Only because of guidelines of how much swap to add.

The memory line (pseudo-swap) in swapinfo may be different than actual memory size, as I mentioned above.
Vineet Deshpande
Frequent Advisor

Re: Getting information on installed memory

Hi,

I still don't have a solution to my problem. From STM I am getting physical memory as 3072 MB which it seems is very accurate.

However swapinfo -tam gives me this output:
$ /usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 3072 86 2986 3% 0 - 1 /dev/vg00/lvol2
dev 3000 87 2913 3% 0 - 1 /dev/vg01/swap
reserve - 556 -556
memory 2330 1995 335 86%
total 8402 2724 5678 32% - 0 -

In this output the only value corresponding to value given by STM is in the dev row which it seems is not the same thing right.

So which value in this output is correct? Is there any other command which gives physical memory? Till now these are the options tries by me:-

1) STM : Does not work
2) swapinfo -tam : Problem in understanding output
3) machineinfo : Does not work
4) top : Not possible to use

Thanks,

Vineet
Don Morris_1
Honored Contributor

Re: Getting information on installed memory

Why not just write your own simple C program to query via pstat(2) interfaces?

Sample attached, all you really care about here is the physical_memory field of the pst_static structure filled in from pstat_getstatic() to answer this question, so you could strip it down to just that if you want.

Re: Getting information on installed memory

Is it just me who thinks the points being missed here... I was also taught to treat the problem, not the symptoms... if STM isn't working, why don't you fix that? I've always found STM to be a completely reliable method of understanding the memory layput of my system... I'd also always consider a system where STM is broken to be "at risk".

When you say STM isn't working, what do you mean?

HTH

Duncan

HTH

Duncan
Michael Mike Reaser
Valued Contributor

Re: Getting information on installed memory

Duncan > Is it just me who thinks the points being missed here... I was also taught to treat the problem, not the symptoms...

You are very wise. I've found that there are two types of tech troubleshooters: ones who "make the error go away" and ones who "fix the problem".

Those in the first group firmly believe they are performing the second. Those of us in the second group realize that those in the first are not. :-)
There's no place like 127.0.0.1

HP-Server-Literate since 1979
James R. Ferguson
Acclaimed Contributor

Re: Getting information on installed memory

Hi Vineet:

I wholly agree with Duncan --- "fix" STM.

> I want to find out the installed memory on a HP-UX system. The constraints are that I cannot use root credentials and the STM utility is not working...

Is this some academic exercise?

> Is there any command which will give me this information? I will prefer command over any utility for getting this information.

How do you define "command" versus "utility"?

Regards!

...JRF...
Vineet Deshpande
Frequent Advisor

Re: Getting information on installed memory

Hi,

Yes I do agree with your views. But STM was not working at a Customer's side so I was trying to find out an alternative command. But now I do feel that getting STM to work is the best option. Thank you.

- Vineet

Re: Getting information on installed memory

>From STM I am getting physical memory as 3072 MB which it seems is very accurate.

Then STM is working.

>In this output the only value corresponding to value given by STM is in the dev row

As I said, this correspondence may have to do with convention. Don't rely on it.

>1) STM: Does not work

Does it not work at your customer's site?
Vineet Deshpande
Frequent Advisor

Re: Getting information on installed memory

Hi Dennis,

STM is not working at the Customer's end. I was trying to find an alternative command at my end and was tallying the output with STM at my end to check accuracy.

Thanks,

Vineet