On Fri, 8 Aug 2003 09:06:25 -0400, [EMAIL PROTECTED] (Stephen
Gilbert) wrote:

>> -----Original Message-----
>> From: Biju Ramachandran [mailto:[EMAIL PROTECTED]
>> Subject: Re: pid->memory usage - Any takers
>> Please, anybody...

>> >I just  want to know is there any way to find out the PID 
>> ans how much a 
>> >process is using
>> >the physical and virtual memory, as it is show by the 
>> Windows NT task 
>> >manager.

>Well your Process id is $$, But I haven't any ideas on retieving the physical/virtual 
>mem.

You ought to be looking at the Proc::ProcessTable module.
I don't know about your NT requirement, but the following
is a sample that works well under linux.

#!/usr/bin/perl -w
use strict;
use Proc::ProcessTable;

my $t = new Proc::ProcessTable();

foreach my $p (@{$t->table}){
print $p->pid," ",$p->cmndline," ",$p->size,"\n";
}
__END__



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to