getting RAM size

Sir,

How can i get the RAM size .Is there is any predefined function ..Howsir???

                 Thanks In advance,
                  ArunKumar

Whether or not this is possible and how to do it if it is possible depends on the specific OS.

sir i am using unix how can i do it.If possible please explain with a example code.

           Thanks,
          ArunKumar

Unix is a family of operating systems. If you need a portable way to determine the ram size on all of them you are out of luck. That cannot be done. As an example, I believe that I could do this with HP-UX 11i provided that I am running as root. If you do not know your OS, run "uname -a" and post the results.

i get

Linux linuxserver 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux

sir please give me idea how can i get for windows and dos

With linux, you can read the file /proc/meminfo and parse the results. It will seem to be a text file. You can "cat /proc/meminfo" to see what you have to work with.

I'm not a Windows guy. But I think WMI is the way to go at least with XP. I'm not a wmi expert. But from my command window I ran the command:
wmic path Win32_PhysicalMemory get Capacity
and I got two lines, one for each of my memory modules. I know that you can invoke wmi from vbscript but I have never done that. Anyway look for wmi documentation as a starting point.

Thank you i will parse the result i am etting many output i dont know which is ram memory.. Help please...