Loading ...
Sorry, an error occurred while loading the content.

1537Re: [perlguitest] Re: How to check memory usage in Windows with Perl?

Expand Messages
  • Wallace Lai
    Oct 11, 2006
      Hi, evenprime,

      Thanks. This is great help.

      Thanks
      Wallace


      --- evenprime <evenprime@...> wrote:

      > # Don't think you can do that with gui-test, unless
      > I missed somthing
      > in spy--. Might be overkill to use the gui-test
      > module. Might want
      > to stick with wmi query via OLE:
      >
      > use Win32::OLE('in');
      > use constant returnit => 0x10;
      > use constant forwardit => 0x20;
      >
      > my $wmi =
      > Win32::OLE->GetObject("winmgmts:\\\\.\\root\\CIMV2")
      >
      > or next;
      > my $col =
      > $wmi->ExecQuery( "SELECT * FROM Win32_Process",
      > "WQL",
      > returnit | forwardit );
      >
      > foreach my $item ( in $col) {
      > $mem = $item->{WorkingSetSize} / 1024;
      > $name = $item->{Caption};
      > print "App: $name\n";
      > print "Memory: $mem K\n\n";
      > }
      >
      >
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    • Show all 6 messages in this topic