- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Physical Memory size unit differs from platform to...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2008 06:51 AM
09-27-2008 06:51 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2008 07:26 AM
09-27-2008 07:26 AM
Re: Physical Memory size unit differs from platform to platform
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2008 07:42 AM
09-27-2008 07:42 AM
Re: Physical Memory size unit differs from platform to platform
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2008 08:11 AM
09-27-2008 08:11 AM
Re: Physical Memory size unit differs from platform to platform
take the total number of pages displayed by SHOW MEMORY /PHYSICAL, and multiply by the value returned by F$GETSYI("PAGE_SIZE").
cu,
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2008 11:42 AM
09-27-2008 11:42 AM
Re: Physical Memory size unit differs from platform to platform
$ 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2008 09:37 PM
09-27-2008 09:37 PM
Re: Physical Memory size unit differs from platform to platform
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2008 12:39 AM
09-28-2008 12:39 AM
SolutionI 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2008 04:09 AM
09-28-2008 04:09 AM
Re: Physical Memory size unit differs from platform to platform
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2008 10:56 AM
09-28-2008 10:56 AM
Re: Physical Memory size unit differs from platform to platform
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2008 08:52 PM
09-28-2008 08:52 PM
Re: Physical Memory size unit differs from platform to platform
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2008 09:09 PM
09-28-2008 09:09 PM
Re: Physical Memory size unit differs from platform to platform
I think that using the lexicals to get the information will be much better for you, because you won't have to do any parsing at all.
You send WRITE SYS$OUTPUT F$GETSYI ("MEMSIZE")
You get back the number of pages.
You send WRITE SYS$OUTPUT F$GETSYI ("PAGE_SIZE")
You get back the page size. You multiply them together and get your memory size in bytes. Dealing with overflow from the multiply is left as an exercise.
For device names, use F$GETDVI. Check out SYS$MANAGER:SYLOGICALS.COM. I think it has some code in it that finds all disk drives and tape drives (search for $DISK and $TAPE). You could use the same method for you application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2008 10:16 PM
09-28-2008 10:16 PM
Re: Physical Memory size unit differs from platform to platform
Creating one single software package that will work on all VMS versions and all hardware platforms, _without_ taking the differences into account, is impossible. Different hardware means differences in DCL; between VMS versions there are differences as well; what may work in more recent versions may probably not work in older versions. Output formats may differ as well.
It means you will have to do some math, since DCL won't do it for you, depending on VMS version and hardware.
DCL is capable of supplying most infotrmation you want. Use lexical functions like F$GETDVI and F$GETSYI; these are a far more robust way to get the information than parsing output, but I know you cannot always avoid it.
What possibilities you have can be found in the DCL manual, there are several sources for procedures you can use and integrate.
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2008 02:25 AM
09-29-2008 02:25 AM
Re: Physical Memory size unit differs from platform to platform
- Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2008 10:23 AM
09-29-2008 10:23 AM
Re: Physical Memory size unit differs from platform to platform
Your page size will always be an integer multiple of 512 bytes. So divide the page size by 512 bytes before you multiply by memory size. Then divide the result by 2 and you have an exact number of KB (where K = 1024).
I.e.
$ MEMKB = ( F$GETSYI( "MEMSIZE" )/ 2 ) * ( F$GETSYI( "PAGE_SIZE" ) / 512 )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2008 10:14 PM
09-29-2008 10:14 PM
Re: Physical Memory size unit differs from platform to platform
While that seems like a nice goal, I don't think it is realistic.
"All versions" includes V1.0 from August 1978, where many of the current commands did not exist. At that time there was one platform that ran VMS, the VAX/11-780, and VMS would boot on a system with 256KB (that's right, 512 pages of physical memory). The maximum memory supported was 2MB (2048 pages of physical memory).
My point is that there are few systems in existence that are running any version of VMS prior to Version 5, which was released over 20 years ago. You need to come up with a workable minimum version you will support. DCL has evolved along with the new features and increased capabilities of new machines.
If you have to support all versions, you will spend the majority of your time dealing with cases that in all likelihood will never be seen in the field.
Jon