Tal,

You might have a look at Win32::SystemInfo module.
It claims to do what you need.

If the above doesn't work try to use use
Win32::TieRegistry and then extract the registry key
which contains the information about the amount of
installed memory. I assume it is either under

HKEY_LOCAL_MACHINE\Hardware or
HKEY_LOCAL_MACHINE\System 

but you'll have to look for it as I don't have such a
deep knowledge of the Windows registry.

Stefan


--- Tal Cohen <[EMAIL PROTECTED]> wrote:
> Yeah, I thought of that. I was hoping for a platform
> independent mechanism.
> If not, then I can use this type of methodology, but
> how do I account for
> Windows based machines?
> 
> Tal
> 
> -----Original Message-----
> From: Anthony R. J. Ball [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 14, 2004 2:14 PM
> To: Tal Cohen
> Cc: 'Boston.PM'
> Subject: Re: [Boston.pm] Is there a module to access
> memory usage?
> 
> 
>   `top -n 1` will spit out one iteration of top that
> you could then
> parse. 
> 
> On Wed, Jul 14, 2004 at 02:05:07PM -0400, Tal Cohen
> wrote:
> > Hi All,
> > 
> >      I need to write a script that will return how
> much memory (RAM) is on
> a
> > system as well as how much of it is being used.
> Can anyone assist?
> > 
> >  
> > 
> > Thanks,
> > 
> > Tal Cohen
> > 
> > _______________________________________________
> > Boston-pm mailing list
> > [EMAIL PROTECTED]
> > http://mail.pm.org/mailman/listinfo/boston-pm
> > 
> 
> -- 
>      www.suave.net - Anthony Ball - [EMAIL PROTECTED]
>         OSB - http://rivendell.suave.net/Beer
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Live as you will have wished to have lived when you
> are dying.
> 
> 
> _______________________________________________
> Boston-pm mailing list
> [EMAIL PROTECTED]
> http://mail.pm.org/mailman/listinfo/boston-pm
> 

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to