Operating System - HP-UX
1752511 Members
5000 Online
108788 Solutions
New Discussion юеВ

Getting information on installed memory

 
SOLVED
Go to solution
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
Dennis Handly
Acclaimed Contributor

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
Dennis Handly
Acclaimed Contributor

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

I am an HPE Employee
Accept or Kudo
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