Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: current RAM availability

by meetraz (Hermit)
on Oct 24, 2004 at 20:34 UTC ( [id://402066]=note: print w/replies, xml ) Need Help??


in reply to current RAM availability

Here is one way of doing it on Windows:

use strict; use Win32::OLE qw(in); my $WMI = Win32::OLE->GetObject("winmgmts:") or die ("Could not create WMI object."); my $OS_Col = $WMI->InstancesOf('Win32_OperatingSystem') or die ("Could not get OS instances."); foreach my $OS (in $OS_Col) { printf "Free Physical Memory: %10u kB\n", $OS->{FreePhysicalMemor +y}; printf "Free Virtual Memory: %10u kB\n", $OS->{FreeVirtualMemory +}; printf "Total Virtual Memory: %10u kB\n", $OS->{TotalVirtualMemor +ySize}; printf "Total Visible Memory: %10u kB\n", $OS->{TotalVisibleMemor +ySize}; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://402066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found