Operating System - OpenVMS
1757423 Members
2888 Online
108860 Solutions
New Discussion юеВ

Re: Physical Memory size unit differs from platform to platform

 
SOLVED
Go to solution
Vineet Deshpande
Frequent Advisor

Physical Memory size unit differs from platform to platform

I want to find the total physical memory. For that I am using "show memory/full" or "show memory/physical_pages" command.

However on OpenVMS VAX & OpenVMS Alpha I am getting the physical memory size in MB while on OpenVMS I64 I am getting it in GB.

Is there any way I can find the physical memory size in a standard unit on all 3 Platforms?

The command "show memory/units=bytes" is not working on VAX and Alpha

Please help
14 REPLIES 14
RBrown_1
Trusted Contributor

Re: Physical Memory size unit differs from platform to platform

Which versions of VMS?

SHOW MEMORY/UNITS=BYTES is an addition in some recent version of VMS. You can probably get a new enough version of VMS to support that command on Alpha. You might not be able to ever get it on VAX.

Why not set it to megabytes on the itanium and use megabytes as your standard unit.

For your convenience, here are the conversions if you need to do it by hand:

1 GB = 1024 MB
1 MB = 1024 KB
1 KB = 1024 B
Vineet Deshpande
Frequent Advisor

Re: Physical Memory size unit differs from platform to platform

Thanks for the reply ..

How do I set the units ?

I executed the command "set process/units=bytes" on I64 but even then the memory capacity was displayed in GB when I executed "show memory/full" or "show memory/physical_pages"

- Vineet
Martin Vorlaender
Honored Contributor

Re: Physical Memory size unit differs from platform to platform

Vineet,

take the total number of pages displayed by SHOW MEMORY /PHYSICAL, and multiply by the value returned by F$GETSYI("PAGE_SIZE").

cu,
Martin
Hoff
Honored Contributor

Re: Physical Memory size unit differs from platform to platform

Options include SNMP; the following is from a Unix box aimed at an OpenVMS box:

$ snmpwalk -c public 10.1.2.1 | grep -i memorysize
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048576 KBytes
$

or the direct request:

$ snmpget -c public 10.1.2.1 HOST-RESOURCES-MIB::hrMemorySize.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048576 KBytes
$

Or mayhap the following DCL lexical functions might be of interest (assuming your OpenVMS version is new enough; the older OpenVMS VAX boxes tend to lack some of these (and you'll often have to assume 512 for these):

f$getsyi("MEMSIZE") * f$getsyi("PAGE_SIZE")

Or dig around over at the mvb.saic.com archives or at dcl.openvms.org or other such sites (the FAQ has some pointers) and find yourself existing tools such as:

http://dcl.openvms.org/print.php?story=05/04/04/7482362

As a rather more general suggestion, parsing and then interpreting the output of DCL commands isn't the best solution here. That output is intended to be human readable and not machine readable and -- as you've already discovered -- the command output can change from release to release.



Vineet Deshpande
Frequent Advisor

Re: Physical Memory size unit differs from platform to platform

Thanks a lot for your answers!

Is there any DCL SHOW command which will give me the Page Size ?? The lexical function approach may not work for me so a SHOW command will be very helpful.

Unfortunately right now I have no option than running show commands on OpenVMS and finding out the information on hardware. Is there any other better approach ? Lexical functions are much better right ? I can't change things right now but in the future I might. I am interested in finding information like IP, MAC, Devices, Size of Devices, Processor info etc etc ...

- Vineet
Jon Pinkley
Honored Contributor
Solution

Re: Physical Memory size unit differs from platform to platform

Vineet,

I am not sure why the lexical function won't work for you. They are part of the DCL command language. Hoff's comment is that if you are working with versions of VMS that existed prior to the introduction of the Alpha processor, those versions didn't have a way to display the pagesize, because every VAX processor had a fixed size page defined by the architecture. On a VAX, pagesize is defined as 512 bytes.

Using the lexical function is going to have a much higher probability of working across platforms and VMS versions than a show command. You could write program, but that would have the same problems as the lexical functions, since the underlying $getsyi system service did not have an item for pagesize prior to the introduction of the Alpha processor. Also, an executable image will be tied to a specific architecture, (VAX, Alpha, IA64), so that doesn't help much either.

The following DCL command line should work on recent version of VMS (anything from the last 10 years). It will return the amount of memory the OS is using (the same as what show memory shows) and it is in units of MB = 1048576 bytes. The calculation is done the way it is to avoid overflow for large memory configurations. This shows it running on an Alpha with 16 GB of memory. Remember 1 GB = 1024 MB, therefore 16GB = 16384 MB.

$ write sys$output f$getsyi("MEMSIZE")/(1048576/f$getsyi("PAGE_SIZE"))
16384
$ sho mem/phy
System Memory Resources on 28-SEP-2008 03:55:24.65

Physical Memory Usage (pages): Total Free In Use Modified
Main Memory (16.00GB) 2097152 957701 1097257 42194

If you really want the low level details, you really need to get it at the console when the OS is not booted. But that is very platform specific, and in general the MEMSIZE is going to return the number of physical pages on the system. But things get murky when some of the sysgen parameters like GALAXY of PHYSICAL_MEMORY are set to non-default values.
it depends
Ian Miller.
Honored Contributor

Re: Physical Memory size unit differs from platform to platform

For wider system configuration information then you may want to look at Karl's
SYSTEM_REPORT
http://dcl.openvms.org/stories.php?story=08/03/27/5166560

which createa an html report of memory size, devices, software and so on
____________________
Purely Personal Opinion
Hoff
Honored Contributor

Re: Physical Memory size unit differs from platform to platform

Your questions imply some misunderstandings around how OpenVMS is designed and implemented and operated; while that might not be the case in reality, please humor me here and explain the particular requirement(s) of the problem(s) you are trying to solve. As part of creating and posting this background, I'd ask you to exclude any references to any specific commands. Please also indicate the particular OpenVMS architectures and versions that must be involved in your solution.

A general note: specific questions and particularly specific questions without mention of requirements or environments will surprisingly often get you correct -- but entirely wrong -- answers, and that looks to be happening here. Yes, correct but wrong answers.


Vineet Deshpande
Frequent Advisor

Re: Physical Memory size unit differs from platform to platform

Hi Hoff,

I apologize for my ambiguous queries. I'll try to give some specifics about my problem.

I am working for a product in which I want to find out the asset information for an OpenVMS system. That is I want to find details about devices, memory, processor, LAN cards, NICs of a system on which OpenVMS Operating System has been installed.

For this I am connecting to a remote machine via SSH/Telnet and running DCL commands and then parsing the output which I am interested in. This code of mine is expected to work on all the platoforms(VAX, Alpha and Itanium) and on all versions.

Therefore I wanted to know if:-
a) My method is correct
b) Is there a different approach which is better than the one I am using currently

Hope this sheds some light on my questions.

Thanks,

Vineet